File gmp-ppc64le-mod.patch of Package gmp

changeset:   15878:221a3c6d87fd
user:        Torbjorn Granlund <tege@gmplib.org>
date:        Mon Jul 22 15:07:17 2013 +0200
summary:     Handle little-endian mode.

diff -r 89a5c76228fd -r 221a3c6d87fd mpn/powerpc64/mode64/mod_1_1.asm
--- a/mpn/powerpc64/mode64/mod_1_1.asm	Mon Jul 22 00:39:44 2013 +0200
+++ b/mpn/powerpc64/mode64/mod_1_1.asm	Mon Jul 22 15:07:17 2013 +0200
@@ -69,7 +69,10 @@
 	adde	r9, r9, r10
 	bdnz	L(top)
 
-L(end):	lwz	r0, 12(r6)
+L(end):
+ifdef(`HAVE_LIMB_LITTLE_ENDIAN',
+`	lwz	r0, 8(r6)',
+`	lwz	r0, 12(r6)')
 	ld	r3, 0(r6)
 	cmpdi	cr7, r0, 0
 	beq-	cr7, L(4)
diff -r 89a5c76228fd -r 221a3c6d87fd mpn/powerpc64/mode64/mod_1_4.asm
--- a/mpn/powerpc64/mode64/mod_1_4.asm	Mon Jul 22 00:39:44 2013 +0200
+++ b/mpn/powerpc64/mode64/mod_1_4.asm	Mon Jul 22 15:07:17 2013 +0200
@@ -144,7 +144,10 @@
 	adde	r9, r7, r4
 	bdnz	L(top)
 
-L(end):	lwz	r3, 12(cps)
+L(end):
+ifdef(`HAVE_LIMB_LITTLE_ENDIAN',
+`	lwz	r3, 8(cps)',
+`	lwz	r3, 12(cps)')
 	mulld	r10, r9, r26
 	mulhdu	r9, r9, r26
 	addc	r11, r0, r10