[Gmp-commit] /var/hg/gmp: Make logic for determining ABI wrt struct return mo...

mercurial at gmplib.org mercurial at gmplib.org
Sun Aug 25 00:18:49 UTC 2019


details:   /var/hg/gmp/rev/f487753805c5
changeset: 17847:f487753805c5
user:      Torbjorn Granlund <tg at gmplib.org>
date:      Sun Aug 25 02:18:39 2019 +0200
description:
Make logic for determining ABI wrt struct return more robust.

diffstat:

 mpn/powerpc64/mode64/p7/gcd_22.asm |  9 ++++++---
 mpn/powerpc64/mode64/p9/gcd_22.asm |  9 ++++++---
 2 files changed, 12 insertions(+), 6 deletions(-)

diffs (52 lines):

diff -r 77b1dbabfe0b -r f487753805c5 mpn/powerpc64/mode64/p7/gcd_22.asm
--- a/mpn/powerpc64/mode64/p7/gcd_22.asm	Sat Aug 24 01:43:42 2019 +0200
+++ b/mpn/powerpc64/mode64/p7/gcd_22.asm	Sun Aug 25 02:18:39 2019 +0200
@@ -43,8 +43,11 @@
 C We define SLOW if this target uses a slow struct return mechanism, with
 C r3 as an implicit parameter for the struct pointer.
 undefine(`SLOW')dnl
-ifdef(`AIX',       `define(`SLOW',`due to AIX')')dnl
-ifdef(`ELFv1_ABI', `define(`SLOW',`due to ELFv1')')dnl
+ifdef(`AIX',`define(`SLOW',`due to AIX')',`
+  ifdef(`DARWIN',,`
+    ifdef(`ELFv2_ABI',,`define(`SLOW',`due to ELFv1')')dnl
+  ')
+')
 
 ifdef(`SLOW',`
 define(`IFSLOW', `$1')
@@ -91,7 +94,7 @@
 	srd	u1, u1, cnt		C 8
 	or	u0, u0, tmp		C 10
 
-	or.	r0, u1, v1		C 12
+	or.	r0, u1, v1		C 10
 	bne	L(top)
 
 
diff -r 77b1dbabfe0b -r f487753805c5 mpn/powerpc64/mode64/p9/gcd_22.asm
--- a/mpn/powerpc64/mode64/p9/gcd_22.asm	Sat Aug 24 01:43:42 2019 +0200
+++ b/mpn/powerpc64/mode64/p9/gcd_22.asm	Sun Aug 25 02:18:39 2019 +0200
@@ -43,8 +43,11 @@
 C We define SLOW if this target uses a slow struct return mechanism, with
 C r3 as an implicit parameter for the struct pointer.
 undefine(`SLOW')dnl
-ifdef(`AIX',       `define(`SLOW',`due to AIX')')dnl
-ifdef(`ELFv1_ABI', `define(`SLOW',`due to ELFv1')')dnl
+ifdef(`AIX',`define(`SLOW',`due to AIX')',`
+  ifdef(`DARWIN',,`
+    ifdef(`ELFv2_ABI',,`define(`SLOW',`due to ELFv1')')dnl
+  ')
+')
 
 ifdef(`SLOW',`
 define(`IFSLOW', `$1')
@@ -90,7 +93,7 @@
 	srd	u1, u1, cnt		C 8
 	or	u0, u0, tmp		C 10
 
-	or.	r0, u1, v1		C 8
+	or.	r0, u1, v1		C 10
 	cmpld	cr7, v0, u0
 	bne	L(top)
 


More information about the gmp-commit mailing list