ce426f
# commit 7b88401f3b25325b1381798a0eccb3efe7751fec
ce426f
# Author: Alan Modra <amodra@gmail.com>
ce426f
# Date:   Sat Aug 17 18:31:45 2013 +0930
ce426f
# 
ce426f
#     PowerPC floating point little-endian [12 of 15]
ce426f
#     http://sourceware.org/ml/libc-alpha/2013-08/msg00087.html
ce426f
#     
ce426f
#     Fixes for little-endian in 32-bit assembly.
ce426f
#     
ce426f
#         * sysdeps/powerpc/sysdep.h (LOWORD, HIWORD, HISHORT): Define.
ce426f
#         * sysdeps/powerpc/powerpc32/fpu/s_copysign.S: Load little-endian
ce426f
#         words of double from correct stack offsets.
ce426f
#         * sysdeps/powerpc/powerpc32/fpu/s_copysignl.S: Likewise.
ce426f
#         * sysdeps/powerpc/powerpc32/fpu/s_lrint.S: Likewise.
ce426f
#         * sysdeps/powerpc/powerpc32/fpu/s_lround.S: Likewise.
ce426f
#         * sysdeps/powerpc/powerpc32/power4/fpu/s_llrint.S: Likewise.
ce426f
#         * sysdeps/powerpc/powerpc32/power4/fpu/s_llrintf.S: Likewise.
ce426f
#         * sysdeps/powerpc/powerpc32/power5+/fpu/s_llround.S: Likewise.
ce426f
#         * sysdeps/powerpc/powerpc32/power5+/fpu/s_lround.S: Likewise.
ce426f
#         * sysdeps/powerpc/powerpc32/power5/fpu/s_isnan.S: Likewise.
ce426f
#         * sysdeps/powerpc/powerpc32/power6/fpu/s_isnan.S: Likewise.
ce426f
#         * sysdeps/powerpc/powerpc32/power6/fpu/s_llrint.S: Likewise.
ce426f
#         * sysdeps/powerpc/powerpc32/power6/fpu/s_llrintf.S: Likewise.
ce426f
#         * sysdeps/powerpc/powerpc32/power6/fpu/s_llround.S: Likewise.
ce426f
#         * sysdeps/powerpc/powerpc32/power7/fpu/s_finite.S: Likewise.
ce426f
#         * sysdeps/powerpc/powerpc32/power7/fpu/s_isinf.S: Likewise.
ce426f
#         * sysdeps/powerpc/powerpc32/power7/fpu/s_isnan.S: Likewise.
ce426f
#         * sysdeps/powerpc/powerpc64/power7/fpu/s_finite.S: Use HISHORT.
ce426f
#         * sysdeps/powerpc/powerpc64/power7/fpu/s_isinf.S: Likewise.
ce426f
# 
ce426f
diff -urN glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/fpu/s_copysign.S glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/fpu/s_copysign.S
ce426f
--- glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/fpu/s_copysign.S	2014-05-27 22:45:44.000000000 -0500
ce426f
+++ glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/fpu/s_copysign.S	2014-05-27 22:45:46.000000000 -0500
ce426f
@@ -29,7 +29,7 @@
ce426f
 	stwu	r1,-16(r1)
ce426f
 	cfi_adjust_cfa_offset (16)
ce426f
 	stfd	fp2,8(r1)
ce426f
-	lwz	r3,8(r1)
ce426f
+	lwz	r3,8+HIWORD(r1)
ce426f
 	cmpwi   r3,0
ce426f
 	addi    r1,r1,16
ce426f
 	cfi_adjust_cfa_offset (-16)
ce426f
diff -urN glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/fpu/s_copysignl.S glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/fpu/s_copysignl.S
ce426f
--- glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/fpu/s_copysignl.S	2014-05-27 22:45:44.000000000 -0500
ce426f
+++ glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/fpu/s_copysignl.S	2014-05-27 22:45:46.000000000 -0500
ce426f
@@ -30,7 +30,7 @@
ce426f
 	fmr	fp0,fp1
ce426f
 	fabs	fp1,fp1
ce426f
 	fcmpu	cr7,fp0,fp1
ce426f
-	lwz	r3,8(r1)
ce426f
+	lwz	r3,8+HIWORD(r1)
ce426f
 	cmpwi	cr6,r3,0
ce426f
 	addi	r1,r1,16
ce426f
 	cfi_adjust_cfa_offset (-16)
ce426f
diff -urN glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/fpu/s_lrint.S glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/fpu/s_lrint.S
ce426f
--- glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/fpu/s_lrint.S	2014-05-27 22:45:44.000000000 -0500
ce426f
+++ glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/fpu/s_lrint.S	2014-05-27 22:45:46.000000000 -0500
ce426f
@@ -24,10 +24,10 @@
ce426f
 	stwu	r1,-16(r1)
ce426f
 	fctiw	fp13,fp1
ce426f
 	stfd	fp13,8(r1)
ce426f
-	nop	/* Insure the following load is in a different dispatch group */
ce426f
+	nop	/* Ensure the following load is in a different dispatch group */
ce426f
 	nop	/* to avoid pipe stall on POWER4&5.  */
ce426f
 	nop
ce426f
-	lwz	r3,12(r1)
ce426f
+	lwz	r3,8+LOWORD(r1)
ce426f
 	addi	r1,r1,16
ce426f
 	blr
ce426f
 	END (__lrint)
ce426f
diff -urN glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/fpu/s_lround.S glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/fpu/s_lround.S
ce426f
--- glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/fpu/s_lround.S	2014-05-27 22:45:44.000000000 -0500
ce426f
+++ glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/fpu/s_lround.S	2014-05-27 22:45:46.000000000 -0500
ce426f
@@ -67,7 +67,7 @@
ce426f
 	nop	/* Ensure the following load is in a different dispatch  */
ce426f
 	nop	/* group to avoid pipe stall on POWER4&5.  */
ce426f
 	nop
ce426f
-	lwz	r3,12(r1)	/* Load return as integer.  */
ce426f
+	lwz	r3,8+LOWORD(r1)	/* Load return as integer.  */
ce426f
 .Lout:
ce426f
 	addi	r1,r1,16
ce426f
 	blr
ce426f
diff -urN glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/power4/fpu/s_llrint.S glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/power4/fpu/s_llrint.S
ce426f
--- glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/power4/fpu/s_llrint.S	2014-05-27 22:45:44.000000000 -0500
ce426f
+++ glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/power4/fpu/s_llrint.S	2014-05-27 22:48:09.000000000 -0500
ce426f
@@ -29,8 +29,8 @@
ce426f
 	nop	/* Insure the following load is in a different dispatch group */
ce426f
 	nop	/* to avoid pipe stall on POWER4&5.  */
ce426f
 	nop
ce426f
-	lwz	r3,8(r1)
ce426f
-	lwz	r4,12(r1)
ce426f
+	lwz	r3,8+HIWORD(r1)
ce426f
+	lwz	r4,8+LOWORD(r1)
ce426f
 	addi	r1,r1,16	
ce426f
 	blr
ce426f
 	END (__llrint)
ce426f
diff -urN glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/power4/fpu/s_llrintf.S glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/power4/fpu/s_llrintf.S
ce426f
--- glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/power4/fpu/s_llrintf.S	2014-05-27 22:45:44.000000000 -0500
ce426f
+++ glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/power4/fpu/s_llrintf.S	2014-05-27 22:48:44.000000000 -0500
ce426f
@@ -28,8 +28,8 @@
ce426f
 	nop	/* Insure the following load is in a different dispatch group */
ce426f
 	nop	/* to avoid pipe stall on POWER4&5.  */
ce426f
 	nop
ce426f
-	lwz	r3,8(r1)
ce426f
-	lwz	r4,12(r1)
ce426f
+	lwz	r3,8+HIWORD(r1)
ce426f
+	lwz	r4,8+LOWORD(r1)
ce426f
 	addi	r1,r1,16	
ce426f
 	blr
ce426f
 	END (__llrintf)
ce426f
diff -urN glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/power5/fpu/s_isnan.S glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/power5/fpu/s_isnan.S
ce426f
--- glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/power5/fpu/s_isnan.S	2014-05-27 22:45:44.000000000 -0500
ce426f
+++ glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/power5/fpu/s_isnan.S	2014-05-27 22:45:46.000000000 -0500
ce426f
@@ -27,8 +27,8 @@
ce426f
 	ori	r1,r1,0
ce426f
 	stfd	fp1,24(r1)	/* copy FPR to GPR */
ce426f
 	ori	r1,r1,0
ce426f
-	lwz	r4,24(r1)
ce426f
-	lwz	r5,28(r1)
ce426f
+	lwz	r4,24+HIWORD(r1)
ce426f
+	lwz	r5,24+LOWORD(r1)
ce426f
 	lis	r0,0x7ff0	/* const long r0 0x7ff00000 00000000 */
ce426f
 	clrlwi	r4,r4,1		/* x = fabs(x) */
ce426f
 	cmpw	cr7,r4,r0	/* if (fabs(x) =< inf) */
ce426f
diff -urN glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/power5+/fpu/s_llround.S glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/power5+/fpu/s_llround.S
ce426f
--- glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/power5+/fpu/s_llround.S	2014-05-27 22:45:44.000000000 -0500
ce426f
+++ glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/power5+/fpu/s_llround.S	2014-05-27 22:45:46.000000000 -0500
ce426f
@@ -39,8 +39,8 @@
ce426f
 	nop	/* Ensure the following load is in a different dispatch  */
ce426f
 	nop	/* group to avoid pipe stall on POWER4&5.  */
ce426f
 	nop
ce426f
-	lwz	r4,12(r1)
ce426f
-	lwz	r3,8(r1)
ce426f
+	lwz	r3,8+HIWORD(r1)
ce426f
+	lwz	r4,8+LOWORD(r1)
ce426f
 	addi	r1,r1,16
ce426f
 	blr
ce426f
 	END (__llround)
ce426f
diff -urN glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/power5+/fpu/s_lround.S glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/power5+/fpu/s_lround.S
ce426f
--- glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/power5+/fpu/s_lround.S	2014-05-27 22:45:44.000000000 -0500
ce426f
+++ glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/power5+/fpu/s_lround.S	2014-05-27 22:45:46.000000000 -0500
ce426f
@@ -38,7 +38,7 @@
ce426f
 	nop	/* Ensure the following load is in a different dispatch  */
ce426f
 	nop	/* group to avoid pipe stall on POWER4&5.  */
ce426f
 	nop
ce426f
-	lwz	r3,12(r1)
ce426f
+	lwz	r3,8+LOWORD(r1)
ce426f
 	addi	r1,r1,16
ce426f
 	blr
ce426f
 	END (__lround)
ce426f
diff -urN glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/power6/fpu/s_isnan.S glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/power6/fpu/s_isnan.S
ce426f
--- glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/power6/fpu/s_isnan.S	2014-05-27 22:45:44.000000000 -0500
ce426f
+++ glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/power6/fpu/s_isnan.S	2014-05-27 22:45:46.000000000 -0500
ce426f
@@ -27,8 +27,8 @@
ce426f
 	ori	r1,r1,0
ce426f
 	stfd	fp1,24(r1)	/* copy FPR to GPR */
ce426f
 	ori	r1,r1,0
ce426f
-	lwz	r4,24(r1)
ce426f
-	lwz	r5,28(r1)
ce426f
+	lwz	r4,24+HIWORD(r1)
ce426f
+	lwz	r5,24+LOWORD(r1)
ce426f
 	lis	r0,0x7ff0	/* const long r0 0x7ff00000 00000000 */
ce426f
 	clrlwi	r4,r4,1		/* x = fabs(x) */
ce426f
 	cmpw	cr7,r4,r0	/* if (fabs(x) =< inf) */
ce426f
diff -urN glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/power6/fpu/s_llrint.S glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/power6/fpu/s_llrint.S
ce426f
--- glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/power6/fpu/s_llrint.S	2014-05-27 22:45:44.000000000 -0500
ce426f
+++ glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/power6/fpu/s_llrint.S	2014-05-27 22:46:52.000000000 -0500
ce426f
@@ -29,8 +29,8 @@
ce426f
 /* Insure the following load is in a different dispatch group by
ce426f
    inserting "group ending nop".  */
ce426f
 	ori	r1,r1,0
ce426f
-	lwz	r3,8(r1)
ce426f
-	lwz	r4,12(r1)
ce426f
+	lwz	r3,8+HIWORD(r1)
ce426f
+	lwz	r4,8+LOWORD(r1)
ce426f
 	addi	r1,r1,16	
ce426f
 	blr
ce426f
 	END (__llrint)
ce426f
diff -urN glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/power6/fpu/s_llrintf.S glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/power6/fpu/s_llrintf.S
ce426f
--- glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/power6/fpu/s_llrintf.S	2014-05-27 22:45:44.000000000 -0500
ce426f
+++ glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/power6/fpu/s_llrintf.S	2014-05-27 22:47:29.000000000 -0500
ce426f
@@ -28,8 +28,8 @@
ce426f
 /* Insure the following load is in a different dispatch group by
ce426f
    inserting "group ending nop".  */
ce426f
 	ori	r1,r1,0
ce426f
-	lwz	r3,8(r1)
ce426f
-	lwz	r4,12(r1)
ce426f
+	lwz	r3,8+HIWORD(r1)
ce426f
+	lwz	r4,8+LOWORD(r1)
ce426f
 	addi	r1,r1,16	
ce426f
 	blr
ce426f
 	END (__llrintf)
ce426f
diff -urN glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/power6/fpu/s_llround.S glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/power6/fpu/s_llround.S
ce426f
--- glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/power6/fpu/s_llround.S	2014-05-27 22:45:44.000000000 -0500
ce426f
+++ glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/power6/fpu/s_llround.S	2014-05-27 22:45:46.000000000 -0500
ce426f
@@ -39,8 +39,8 @@
ce426f
 /* Insure the following load is in a different dispatch group by
ce426f
    inserting "group ending nop".  */
ce426f
 	ori	r1,r1,0
ce426f
-	lwz	r4,12(r1)
ce426f
-	lwz	r3,8(r1)
ce426f
+	lwz	r3,8+HIWORD(r1)
ce426f
+	lwz	r4,8+LOWORD(r1)
ce426f
 	addi	r1,r1,16
ce426f
 	blr
ce426f
 	END (__llround)
ce426f
diff -urN glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/power7/fpu/s_finite.S glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/power7/fpu/s_finite.S
ce426f
--- glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/power7/fpu/s_finite.S	2014-05-27 22:45:44.000000000 -0500
ce426f
+++ glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/power7/fpu/s_finite.S	2014-05-27 22:45:46.000000000 -0500
ce426f
@@ -54,9 +54,8 @@
ce426f
 	stfd    fp1,8(r1)     /* Transfer FP to GPR's.  */
ce426f
 
ce426f
 	ori	2,2,0	      /* Force a new dispatch group.  */
ce426f
-	lhz     r0,8(r1)      /* Fetch the upper portion of the high word of
ce426f
-			      the FP value (where the exponent and sign bits
ce426f
-			      are).  */
ce426f
+	lhz	r0,8+HISHORT(r1) /* Fetch the upper 16 bits of the FP value
ce426f
+				    (biased exponent and sign bit).  */
ce426f
 	clrlwi	r0,r0,17      /* r0 = abs(r0).  */
ce426f
 	addi	r1,r1,16      /* Reset the stack pointer.  */
ce426f
 	cmpwi	cr7,r0,0x7ff0 /* r4 == 0x7ff0?.  */
ce426f
diff -urN glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/power7/fpu/s_isinf.S glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/power7/fpu/s_isinf.S
ce426f
--- glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/power7/fpu/s_isinf.S	2014-05-27 22:45:44.000000000 -0500
ce426f
+++ glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/power7/fpu/s_isinf.S	2014-05-27 22:45:46.000000000 -0500
ce426f
@@ -48,14 +48,13 @@
ce426f
 	li	r3,0
ce426f
 	bflr    29	      /* If not INF, return.  */
ce426f
 
ce426f
-	/* Either we have -INF/+INF or a denormal.  */
ce426f
+	/* Either we have +INF or -INF.  */
ce426f
 
ce426f
 	stwu    r1,-16(r1)    /* Allocate stack space.  */
ce426f
 	stfd    fp1,8(r1)     /* Transfer FP to GPR's.  */
ce426f
 	ori	2,2,0	      /* Force a new dispatch group.  */
ce426f
-	lhz	r4,8(r1)      /* Fetch the upper portion of the high word of
ce426f
-			      the FP value (where the exponent and sign bits
ce426f
-			      are).  */
ce426f
+	lhz	r4,8+HISHORT(r1) /* Fetch the upper 16 bits of the FP value
ce426f
+				    (biased exponent and sign bit).  */
ce426f
 	addi	r1,r1,16      /* Reset the stack pointer.  */
ce426f
 	cmpwi	cr7,r4,0x7ff0 /* r4 == 0x7ff0?  */
ce426f
 	li	r3,1
ce426f
diff -urN glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/power7/fpu/s_isnan.S glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/power7/fpu/s_isnan.S
ce426f
--- glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/power7/fpu/s_isnan.S	2014-05-27 22:45:44.000000000 -0500
ce426f
+++ glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/power7/fpu/s_isnan.S	2014-05-27 22:45:46.000000000 -0500
ce426f
@@ -53,8 +53,8 @@
ce426f
 	stwu	r1,-16(r1)    /* Allocate stack space.  */
ce426f
 	stfd	fp1,8(r1)     /* Transfer FP to GPR's.  */
ce426f
 	ori	2,2,0	      /* Force a new dispatch group.  */
ce426f
-	lwz     r4,8(r1)      /* Load the upper half of the FP value.  */
ce426f
-	lwz     r5,12(r1)     /* Load the lower half of the FP value.  */
ce426f
+	lwz     r4,8+HIWORD(r1) /* Load the upper half of the FP value.  */
ce426f
+	lwz     r5,8+LOWORD(r1) /* Load the lower half of the FP value.  */
ce426f
 	addi	r1,r1,16      /* Reset the stack pointer.  */
ce426f
 	lis     r0,0x7ff0     /* Load the upper portion for an INF/NaN.  */
ce426f
 	clrlwi  r4,r4,1	      /* r4 = abs(r4).  */
ce426f
diff -urN glibc-2.17-c758a686/sysdeps/powerpc/powerpc64/power7/fpu/s_finite.S glibc-2.17-c758a686/sysdeps/powerpc/powerpc64/power7/fpu/s_finite.S
ce426f
--- glibc-2.17-c758a686/sysdeps/powerpc/powerpc64/power7/fpu/s_finite.S	2014-05-27 22:45:44.000000000 -0500
ce426f
+++ glibc-2.17-c758a686/sysdeps/powerpc/powerpc64/power7/fpu/s_finite.S	2014-05-27 22:45:46.000000000 -0500
ce426f
@@ -39,10 +39,8 @@
ce426f
 
ce426f
 	stfd    fp1,-16(r1)   /* Transfer FP to GPR's.  */
ce426f
 	ori	2,2,0	      /* Force a new dispatch group.  */
ce426f
-
ce426f
-	lhz     r4,-16(r1)    /* Fetch the upper portion of the high word of
ce426f
-			      the FP value (where the exponent and sign bits
ce426f
-			      are).  */
ce426f
+	lhz     r4,-16+HISHORT(r1)  /* Fetch the upper 16 bits of the FP value
ce426f
+				    (biased exponent and sign bit).  */
ce426f
 	clrlwi  r4,r4,17      /* r4 = abs(r4).  */
ce426f
 	cmpwi   cr7,r4,0x7ff0 /* r4 == 0x7ff0?  */
ce426f
 	bltlr   cr7	      /* LT means finite, other non-finite.  */
ce426f
diff -urN glibc-2.17-c758a686/sysdeps/powerpc/powerpc64/power7/fpu/s_isinf.S glibc-2.17-c758a686/sysdeps/powerpc/powerpc64/power7/fpu/s_isinf.S
ce426f
--- glibc-2.17-c758a686/sysdeps/powerpc/powerpc64/power7/fpu/s_isinf.S	2014-05-27 22:45:44.000000000 -0500
ce426f
+++ glibc-2.17-c758a686/sysdeps/powerpc/powerpc64/power7/fpu/s_isinf.S	2014-05-27 22:45:46.000000000 -0500
ce426f
@@ -38,9 +38,8 @@
ce426f
 
ce426f
 	stfd    fp1,-16(r1)   /* Transfer FP to GPR's.  */
ce426f
 	ori	2,2,0	      /* Force a new dispatch group.  */
ce426f
-	lhz	r4,-16(r1)    /* Fetch the upper portion of the high word of
ce426f
-			      the FP value (where the exponent and sign bits
ce426f
-			      are).  */
ce426f
+	lhz	r4,-16+HISHORT(r1)  /* Fetch the upper 16 bits of the FP value
ce426f
+				    (biased exponent and sign bit).  */
ce426f
 	cmpwi	cr7,r4,0x7ff0 /* r4 == 0x7ff0?  */
ce426f
 	li	r3,1
ce426f
 	beqlr   cr7	      /* EQ means INF, otherwise -INF.  */
ce426f
diff -urN glibc-2.17-c758a686/sysdeps/powerpc/sysdep.h glibc-2.17-c758a686/sysdeps/powerpc/sysdep.h
ce426f
--- glibc-2.17-c758a686/sysdeps/powerpc/sysdep.h	2014-05-27 22:45:44.000000000 -0500
ce426f
+++ glibc-2.17-c758a686/sysdeps/powerpc/sysdep.h	2014-05-27 22:45:46.000000000 -0500
ce426f
@@ -144,6 +144,21 @@
ce426f
 
ce426f
 #define VRSAVE	256
ce426f
 
ce426f
+/* The 32-bit words of a 64-bit dword are at these offsets in memory.  */
ce426f
+#if defined __LITTLE_ENDIAN__ || defined _LITTLE_ENDIAN
ce426f
+# define LOWORD 0
ce426f
+# define HIWORD 4
ce426f
+#else
ce426f
+# define LOWORD 4
ce426f
+# define HIWORD 0
ce426f
+#endif
ce426f
+
ce426f
+/* The high 16-bit word of a 64-bit dword is at this offset in memory.  */
ce426f
+#if defined __LITTLE_ENDIAN__ || defined _LITTLE_ENDIAN
ce426f
+# define HISHORT 6
ce426f
+#else
ce426f
+# define HISHORT 0
ce426f
+#endif
ce426f
 
ce426f
 /* This seems to always be the case on PPC.  */
ce426f
 #define ALIGNARG(log2) log2