[Gmp-commit] /var/hg/gmp: LLVM doesn't support negative immediates in arithme...

mercurial at gmplib.org mercurial at gmplib.org
Mon Sep 22 20:09:12 UTC 2014


details:   /var/hg/gmp/rev/bc6d13bef980
changeset: 16496:bc6d13bef980
user:      Marc Glisse <marc.glisse at inria.fr>
date:      Mon Sep 22 22:09:03 2014 +0200
description:
LLVM doesn't support negative immediates in arithmetic ops on aarch64.

diffstat:

 ChangeLog            |   5 +++++
 mpn/arm64/lshift.asm |   8 ++++----
 mpn/arm64/rshift.asm |  14 +++++++-------
 3 files changed, 16 insertions(+), 11 deletions(-)

diffs (88 lines):

diff -r ba4b2f3c0574 -r bc6d13bef980 ChangeLog
--- a/ChangeLog	Sat Sep 13 22:58:19 2014 +0200
+++ b/ChangeLog	Mon Sep 22 22:09:03 2014 +0200
@@ -1,3 +1,8 @@
+2014-09-22  Marc Glisse  <marc.glisse at inria.fr>
+
+	* mpn/arm64/lshift.asm: Avoid negative immediates.
+	* mpn/arm64/rshift.asm: Likewise.
+
 2014-09-13  Marc Glisse  <marc.glisse at inria.fr>
 
 	* mpn/generic/div_qr_1n_pi1.c: Honor NO_ASM.
diff -r ba4b2f3c0574 -r bc6d13bef980 mpn/arm64/lshift.asm
--- a/mpn/arm64/lshift.asm	Sat Sep 13 22:58:19 2014 +0200
+++ b/mpn/arm64/lshift.asm	Mon Sep 22 22:09:03 2014 +0200
@@ -51,7 +51,7 @@
 	str	x18, [rp,#-8]
 	ret
 L(gt1):	ldp	x4, x5, [up,#-24]
-	add	up, up, #-8
+	sub	up, up, #8
 	add	rp, rp, #16
 	b	L(lo2)
 
@@ -78,7 +78,7 @@
 L(gt2):	ldp	x4, x5, [up,#-32]
 	orr	x10, x10, x13
 	str	x10, [rp,#-8]
-	add	up, up, #-16
+	sub	up, up, #16
 	add	rp, rp, #8
 	b	L(lo2)
 
@@ -94,8 +94,8 @@
 
 	ALIGN(16)
 L(top):	ldp	x4, x5, [up,#-48]
-	add	rp, rp, #-32		C integrate with stp?
-	add	up, up, #-32		C integrate with ldp?
+	sub	rp, rp, #32		C integrate with stp?
+	sub	up, up, #32		C integrate with ldp?
 	orr	x11, x11, x9
 	orr	x10, x10, x13
 	stp	x10, x11, [rp,#-16]
diff -r ba4b2f3c0574 -r bc6d13bef980 mpn/arm64/rshift.asm
--- a/mpn/arm64/rshift.asm	Sat Sep 13 22:58:19 2014 +0200
+++ b/mpn/arm64/rshift.asm	Mon Sep 22 22:09:03 2014 +0200
@@ -50,16 +50,16 @@
 	str	x18, [rp,#0]
 	ret
 L(gt1):	ldp	x5, x4, [up,#8]
-	add	up, up, #-8
-	add	rp, rp, #-32
+	sub	up, up, #8
+	sub	rp, rp, #32
 	b	L(lo2)
 
 L(b11):	lsl	x0, x4, tnc
 	lsr	x9, x4, cnt
 	ldp	x7, x6, [up,#8]
 	add	n, n, #1
-	add	up, up, #-24
-	add	rp, rp, #-48
+	sub	up, up, #24
+	sub	rp, rp, #48
 	b	L(lo0)
 
 L(bx0):	ldp	x5, x4, [up,#0]
@@ -77,7 +77,7 @@
 L(gt2):	ldp	x5, x4, [up,#16]
 	orr	x10, x10, x13
 	str	x10, [rp,#0]
-	add	rp, rp, #-24
+	sub	rp, rp, #24
 	b	L(lo2)
 
 L(b00):	lsl	x0, x5, tnc
@@ -87,8 +87,8 @@
 	ldp	x7, x6, [up,#16]
 	orr	x10, x10, x13
 	str	x10, [rp,#0]
-	add	up, up, #-16
-	add	rp, rp, #-40
+	sub	up, up, #16
+	sub	rp, rp, #40
 	b	L(lo0)
 
 	ALIGN(16)


More information about the gmp-commit mailing list