[Gmp-commit] /var/hg/gmp: Do addex insn via m4 macro.

mercurial at gmplib.org mercurial at gmplib.org
Sun Nov 11 11:57:10 UTC 2018


details:   /var/hg/gmp/rev/923f7a777b33
changeset: 17686:923f7a777b33
user:      Torbjorn Granlund <tg at gmplib.org>
date:      Sun Nov 11 12:43:58 2018 +0100
description:
Do addex insn via m4 macro.

diffstat:

 mpn/powerpc32/powerpc-defs.m4        |   3 +++
 mpn/powerpc64/mode64/p9/addmul_2.asm |  16 ++++++++--------
 mpn/powerpc64/mode64/p9/mul_2.asm    |  16 ++++++++--------
 3 files changed, 19 insertions(+), 16 deletions(-)

diffs (143 lines):

diff -r 94b7b61a3ff0 -r 923f7a777b33 mpn/powerpc32/powerpc-defs.m4
--- a/mpn/powerpc32/powerpc-defs.m4	Sat Nov 10 14:13:27 2018 +0100
+++ b/mpn/powerpc32/powerpc-defs.m4	Sun Nov 11 12:43:58 2018 +0100
@@ -115,4 +115,7 @@
 define(`divdeu',m4_assert_numargs(3)`dnl
 .long eval(0x7c000312+m4_lshift($1,21)+m4_lshift($2,16)+m4_lshift($3,11))')
 
+define(`addex',m4_assert_numargs(4)`dnl
+.long eval(0x7c000154+m4_lshift($1,21)+m4_lshift($2,16)+m4_lshift($3,11)+m4_lshift($4,9))')
+
 divert
diff -r 94b7b61a3ff0 -r 923f7a777b33 mpn/powerpc64/mode64/p9/addmul_2.asm
--- a/mpn/powerpc64/mode64/p9/addmul_2.asm	Sat Nov 10 14:13:27 2018 +0100
+++ b/mpn/powerpc64/mode64/p9/addmul_2.asm	Sun Nov 11 12:43:58 2018 +0100
@@ -114,7 +114,7 @@
 	std	r0, 0(rp)
 	maddld(	r5, r8, v1, r29)	C 1  5   -> addex
 	maddhdu(r10, r8, v1, r29)	C 2  6
-	addex	r0, r12, r30, 0		C    8 12
+	addex(	r0, r12, r30, 0)	C    8 12
 L(lo2):	ld	r8, 8(up)
 	maddld(	r27, r9, v0, r11)	C 1  5   -> adde
 	maddhdu(r30, r9, v0, r11)	C 2  6
@@ -123,7 +123,7 @@
 	std	r0, 8(rp)
 	maddld(	r12, r9, v1, r28)	C 2  6   -> addex
 	maddhdu(r11, r9, v1, r28)	C 3  7
-	addex	r0, r5, r31, 0		C 5  9 13
+	addex(	r0, r5, r31, 0)		C 5  9 13
 L(lo1):	ld	r9, 16(up)
 	maddld(	r26, r8, v0, r10)	C 2  6   -> adde
 	maddhdu(r31, r8, v0, r10)	C 3  7
@@ -132,7 +132,7 @@
 	std	r0, 16(rp)
 	maddld(	r5, r8, v1, r29)	C 3  7   -> addex
 	maddhdu(r10, r8, v1, r29)	C 4  8
-	addex	r0, r12, r30, 0		C    6 10
+	addex(	r0, r12, r30, 0)	C    6 10
 L(lo0):	ld	r8, 24(up)
 	maddld(	r27, r9, v0, r11)	C 3  7   -> adde
 	maddhdu(r30, r9, v0, r11)	C 4  8
@@ -141,7 +141,7 @@
 	std	r0, 24(rp)
 	maddld(	r12, r9, v1, r28)	C 4  8   -> addex
 	maddhdu(r11, r9, v1, r28)	C 5  9
-	addex	r0, r5, r31, 0		C    7 11
+	addex(	r0, r5, r31, 0)		C    7 11
 	addi	up, up, 32
 	addi	rp, rp, 32
 	bdnz	L(top)
@@ -153,22 +153,22 @@
 	std	r0, 0(rp)		C		-4
 	maddld(	r5, r8, v1, r29)	C 1  5
 	maddhdu(r10, r8, v1, r29)	C 2  6
-	addex	r0, r12, r30, 0		C    8 12
+	addex(	r0, r12, r30, 0)	C    8 12
 L(cj2):	maddld(	r27, r9, v0, r11)	C 1  5		-2
 	maddhdu(r30, r9, v0, r11)	C 2  6		-1
 	adde	r0, r26, r0		C    8 12	-3
 	std	r0, 8(rp)		C		-3
 	mulld	r12, r9, v1		C 2  6		-1
 	mulhdu	r11, r9, v1		C 3  7		0 = return limb
-	addex	r0, r5, r31, 0		C 5  9 13
+	addex(	r0, r5, r31, 0)		C 5  9 13
 	adde	r0, r27, r0		C    5  9 13	-2
 	std	r0, 16(rp)		C		-2
-	addex	r0, r12, r30, 0		C    6 10	-1
+	addex(	r0, r12, r30, 0)	C    6 10	-1
 	adde	r0, r0, r10		C		-1
 	std	r0, 24(rp)		C		-1
 	li	r4, 0
 	addze	r3, r11
-	addex	r3, r3, r4, 0
+	addex(	r3, r3, r4, 0)
 
 L(ret):	ld	r26, -48(r1)
 	ld	r27, -40(r1)
diff -r 94b7b61a3ff0 -r 923f7a777b33 mpn/powerpc64/mode64/p9/mul_2.asm
--- a/mpn/powerpc64/mode64/p9/mul_2.asm	Sat Nov 10 14:13:27 2018 +0100
+++ b/mpn/powerpc64/mode64/p9/mul_2.asm	Sun Nov 11 12:43:58 2018 +0100
@@ -107,7 +107,7 @@
 	std	r0, 0(rp)
 	mulld	r5, r8, v1		C 1  5   -> addex
 	mulhdu	r10, r8, v1		C 2  6
-	addex	r0, r12, r30, 0		C    8 12
+	addex(	r0, r12, r30, 0)	C    8 12
 L(lo2):	ld	r8, 8(up)
 	maddld(	r29, r9, v0, r11)	C 1  5   -> adde
 	maddhdu(r30, r9, v0, r11)	C 2  6
@@ -115,7 +115,7 @@
 	std	r0, 8(rp)
 	mulld	r12, r9, v1		C 2  6   -> addex
 	mulhdu	r11, r9, v1		C 3  7
-	addex	r0, r5, r31, 0		C 5  9 13
+	addex(	r0, r5, r31, 0)		C 5  9 13
 L(lo1):	ld	r9, 16(up)
 	maddld(	r28, r8, v0, r10)	C 2  6   -> adde
 	maddhdu(r31, r8, v0, r10)	C 3  7
@@ -123,7 +123,7 @@
 	std	r0, 16(rp)
 	mulld	r5, r8, v1		C 3  7   -> addex
 	mulhdu	r10, r8, v1		C 4  8
-	addex	r0, r12, r30, 0		C    6 10
+	addex(	r0, r12, r30, 0)	C    6 10
 L(lo0):	ld	r8, 24(up)
 	maddld(	r29, r9, v0, r11)	C 3  7   -> adde
 	maddhdu(r30, r9, v0, r11)	C 4  8
@@ -131,7 +131,7 @@
 	std	r0, 24(rp)
 	mulld	r12, r9, v1		C 4  8   -> addex
 	mulhdu	r11, r9, v1		C 5  9
-	addex	r0, r5, r31, 0		C    7 11
+	addex(	r0, r5, r31, 0)		C    7 11
 	addi	up, up, 32
 	addi	rp, rp, 32
 	bdnz	L(top)
@@ -143,22 +143,22 @@
 	std	r0, 0(rp)		C		-4
 	mulld	r5, r8, v1		C 1  5
 	mulhdu	r10, r8, v1		C 2  6
-	addex	r0, r12, r30, 0		C    8 12
+	addex(	r0, r12, r30, 0)	C    8 12
 L(cj2):	maddld(	r29, r9, v0, r11)	C 1  5		-2
 	maddhdu(r30, r9, v0, r11)	C 2  6		-1
 	adde	r0, r28, r0		C    8 12	-3
 	std	r0, 8(rp)		C		-3
 	mulld	r12, r9, v1		C 2  6		-1
 	mulhdu	r11, r9, v1		C 3  7		0 = return limb
-	addex	r0, r5, r31, 0		C 5  9 13
+	addex(	r0, r5, r31, 0)		C 5  9 13
 	adde	r0, r29, r0		C    5  9 13	-2
 	std	r0, 16(rp)		C		-2
-	addex	r0, r12, r30, 0		C    6 10	-1
+	addex(	r0, r12, r30, 0)	C    6 10	-1
 	adde	r0, r0, r10		C		-1
 	std	r0, 24(rp)		C		-1
 	li	r4, 0
 	addze	r3, r11
-	addex	r3, r3, r4, 0
+	addex(	r3, r3, r4, 0)
 
 L(ret):	ld	r28, -32(r1)
 	ld	r29, -24(r1)


More information about the gmp-commit mailing list