about summary refs log tree commit diff
path: root/sysdeps/powerpc/powerpc32/fpu/s_trunc.S
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/powerpc/powerpc32/fpu/s_trunc.S')
-rw-r--r--sysdeps/powerpc/powerpc32/fpu/s_trunc.S20
1 files changed, 6 insertions, 14 deletions
diff --git a/sysdeps/powerpc/powerpc32/fpu/s_trunc.S b/sysdeps/powerpc/powerpc32/fpu/s_trunc.S
index 08acc00cb2..7a3e705a81 100644
--- a/sysdeps/powerpc/powerpc32/fpu/s_trunc.S
+++ b/sysdeps/powerpc/powerpc32/fpu/s_trunc.S
@@ -19,19 +19,10 @@
 
 #include <sysdep.h>
 
-	.section	.rodata
-	.align 3
-	.type	TWO52.0,@object
-	.size	TWO52.0,8
-TWO52.0:
-	.long 0x43300000
-	.long 0
-
-	.section	.rodata.cst8,"aM",@progbits,8
-	.align 3
+	.section	.rodata.cst4,"aM",@progbits,4
+	.align	2
 .LC0:	/* 2**52 */
-	.long 0x43300000
-	.long 0
+	.long 0x59800000
 
 /* double [fp1] trunc (double x [fp1])
    IEEE 1003.1 trunc function.  IEEE specifies "trunc to the integer
@@ -40,6 +31,7 @@ TWO52.0:
    We set "round toward Zero" mode and trunc by adding +-2**52 then
    subtracting +-2**52.  */
 
+	.section	".text"
 ENTRY (__trunc)
 	mffs	fp11		/* Save current FPU rounding mode.  */
 #ifdef SHARED
@@ -48,10 +40,10 @@ ENTRY (__trunc)
 	mflr	r10
 	lwz	r9,.LC0@got(10)
 	mtlr	r11
-	lfd	fp13,0(r9)
+	lfs	fp13,0(r9)
 #else
 	lis	r9,.LC0@ha
-	lfd	fp13,.LC0@l(r9)
+	lfs	fp13,.LC0@l(r9)
 #endif
 	fabs	fp0,fp1
 	fsub	fp12,fp13,fp13	/* generate 0.0  */