|
|
5de29b |
# commit 6a31fe7f9cce72b69fce8fe499a2c6ad492c2311
|
|
|
5de29b |
# Author: Alan Modra <amodra@gmail.com>
|
|
|
5de29b |
# Date: Sat Aug 17 18:32:18 2013 +0930
|
|
|
5de29b |
#
|
|
|
5de29b |
# PowerPC floating point little-endian [13 of 15]
|
|
|
5de29b |
# http://sourceware.org/ml/libc-alpha/2013-08/msg00088.html
|
|
|
5de29b |
#
|
|
|
5de29b |
# * sysdeps/powerpc/powerpc32/fpu/s_roundf.S: Increase alignment of
|
|
|
5de29b |
# constants to usual value for .cst8 section, and remove redundant
|
|
|
5de29b |
# high address load.
|
|
|
5de29b |
# * sysdeps/powerpc/powerpc32/power4/fpu/s_llround.S: Use float
|
|
|
5de29b |
# constant for 0x1p52. Load little-endian words of double from
|
|
|
5de29b |
# correct stack offsets.
|
|
|
5de29b |
#
|
|
|
12745e |
diff -urN glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/fpu/s_roundf.S glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/fpu/s_roundf.S
|
|
|
12745e |
--- glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/fpu/s_roundf.S 2014-05-27 22:50:13.000000000 -0500
|
|
|
12745e |
+++ glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/fpu/s_roundf.S 2014-05-27 22:50:13.000000000 -0500
|
|
|
5de29b |
@@ -19,7 +19,7 @@
|
|
|
5de29b |
#include <sysdep.h>
|
|
|
5de29b |
|
|
|
5de29b |
.section .rodata.cst8,"aM",@progbits,8
|
|
|
5de29b |
- .align 2
|
|
|
5de29b |
+ .align 3
|
|
|
5de29b |
.LC0: /* 2**23 */
|
|
|
5de29b |
.long 0x4b000000
|
|
|
5de29b |
.LC1: /* 0.5 */
|
|
|
5de29b |
@@ -60,7 +60,6 @@
|
|
|
5de29b |
#ifdef SHARED
|
|
|
5de29b |
lfs fp10,.LC1-.LC0(r9)
|
|
|
5de29b |
#else
|
|
|
5de29b |
- lis r9,.LC1@ha
|
|
|
5de29b |
lfs fp10,.LC1@l(r9)
|
|
|
5de29b |
#endif
|
|
|
5de29b |
ble- cr6,.L4
|
|
|
12745e |
diff -urN glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/power4/fpu/s_llround.S glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/power4/fpu/s_llround.S
|
|
|
12745e |
--- glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/power4/fpu/s_llround.S 2014-05-27 22:50:13.000000000 -0500
|
|
|
12745e |
+++ glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/power4/fpu/s_llround.S 2014-05-27 22:50:13.000000000 -0500
|
|
|
5de29b |
@@ -19,12 +19,10 @@
|
|
|
5de29b |
#include <sysdep.h>
|
|
|
5de29b |
#include <math_ldbl_opt.h>
|
|
|
5de29b |
|
|
|
5de29b |
- .section .rodata.cst12,"aM",@progbits,12
|
|
|
5de29b |
+ .section .rodata.cst8,"aM",@progbits,8
|
|
|
5de29b |
.align 3
|
|
|
5de29b |
- .LC0: /* 0x1.0000000000000p+52 == 2^52 */
|
|
|
5de29b |
- .long 0x43300000
|
|
|
5de29b |
- .long 0x00000000
|
|
|
5de29b |
- .long 0x3f000000 /* Use this for 0.5 */
|
|
|
5de29b |
+ .LC0: .long (52+127)<<23 /* 0x1p+52 */
|
|
|
5de29b |
+ .long (-1+127)<<23 /* 0.5 */
|
|
|
5de29b |
|
|
|
5de29b |
.section ".text"
|
|
|
5de29b |
|
|
|
5de29b |
@@ -57,12 +55,12 @@
|
|
|
5de29b |
addi r9,r9,.LC0-got_label@l
|
|
|
5de29b |
mtlr r11
|
|
|
5de29b |
cfi_same_value (lr)
|
|
|
5de29b |
- lfd fp9,0(r9)
|
|
|
5de29b |
- lfs fp10,8(r9)
|
|
|
5de29b |
+ lfs fp9,0(r9)
|
|
|
5de29b |
+ lfs fp10,4(r9)
|
|
|
5de29b |
#else
|
|
|
5de29b |
lis r9,.LC0@ha
|
|
|
5de29b |
- lfd fp9,.LC0@l(r9) /* Load 2^52 into fpr9. */
|
|
|
5de29b |
- lfs fp10,.LC0@l+8(r9) /* Load 0.5 into fpr10. */
|
|
|
5de29b |
+ lfs fp9,.LC0@l(r9) /* Load 2^52 into fpr9. */
|
|
|
5de29b |
+ lfs fp10,.LC0@l+4(r9) /* Load 0.5 into fpr10. */
|
|
|
5de29b |
#endif
|
|
|
5de29b |
fabs fp2,fp1 /* Get the absolute value of x. */
|
|
|
5de29b |
fsub fp12,fp10,fp10 /* Compute 0.0 into fpr12. */
|
|
|
5de29b |
@@ -80,8 +78,8 @@
|
|
|
5de29b |
nop
|
|
|
5de29b |
nop
|
|
|
5de29b |
nop
|
|
|
5de29b |
- lwz r4,12(r1) /* Load return as integer. */
|
|
|
5de29b |
- lwz r3,8(r1)
|
|
|
5de29b |
+ lwz r3,8+HIWORD(r1) /* Load return as integer. */
|
|
|
5de29b |
+ lwz r4,8+LOWORD(r1)
|
|
|
5de29b |
.Lout:
|
|
|
5de29b |
addi r1,r1,16
|
|
|
5de29b |
blr
|