olga / rpms / glibc

Forked from rpms/glibc 5 years ago
Clone

Blame SOURCES/glibc-ppc64le-18.patch

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