[Gmp-commit] /var/hg/gmp: 3 new changesets

mercurial at gmplib.org mercurial at gmplib.org
Sun Oct 30 21:41:16 UTC 2016


details:   /var/hg/gmp/rev/a0f39da946b9
changeset: 17088:a0f39da946b9
user:      Torbjorn Granlund <tg at gmplib.org>
date:      Sun Oct 30 22:39:43 2016 +0100
description:
Add more comments.

details:   /var/hg/gmp/rev/12cc0820da2a
changeset: 17089:12cc0820da2a
user:      Torbjorn Granlund <tg at gmplib.org>
date:      Sun Oct 30 22:40:14 2016 +0100
description:
(TARG_DIST): Add riscv.

details:   /var/hg/gmp/rev/3dcbff36ac6b
changeset: 17090:3dcbff36ac6b
user:      Torbjorn Granlund <tg at gmplib.org>
date:      Sun Oct 30 22:41:00 2016 +0100
description:
ChangeLog

diffstat:

 ChangeLog                  |   4 ++++
 mpn/Makefile.am            |   2 +-
 mpn/riscv/64/aors_n.asm    |  22 +++++++++++-----------
 mpn/riscv/64/aorsmul_1.asm |   8 ++++----
 mpn/riscv/64/mul_1.asm     |   8 ++++----
 5 files changed, 24 insertions(+), 20 deletions(-)

diffs (114 lines):

diff -r 881730a1eb06 -r 3dcbff36ac6b ChangeLog
--- a/ChangeLog	Sun Oct 30 19:18:05 2016 +0100
+++ b/ChangeLog	Sun Oct 30 22:41:00 2016 +0100
@@ -1,3 +1,7 @@
+2016-10-30  Torbjörn Granlund  <tg at gmplib.org>
+
+	* mpn/Makefile.am (TARG_DIST): Add riscv.
+
 2016-10-28  Marc Glisse  <marc.glisse at inria.fr>
 
 	* gmpxx.h (__gmp_binary_divides): Let 1/q call mpq_inv.
diff -r 881730a1eb06 -r 3dcbff36ac6b mpn/Makefile.am
--- a/mpn/Makefile.am	Sun Oct 30 19:18:05 2016 +0100
+++ b/mpn/Makefile.am	Sun Oct 30 22:41:00 2016 +0100
@@ -41,7 +41,7 @@
 
 TARG_DIST = alpha arm arm64 cray generic ia64 lisp m68k m88k \
   minithres mips32 mips64 pa32 pa64 power powerpc32 powerpc64 \
-  s390_32 s390_64 sh sparc32 sparc64 thumb vax x86 x86_64
+  riscv s390_32 s390_64 sh sparc32 sparc64 thumb vax x86 x86_64
 
 EXTRA_DIST = asm-defs.m4 cpp-ccas m4-ccas $(TARG_DIST)
 
diff -r 881730a1eb06 -r 3dcbff36ac6b mpn/riscv/64/aors_n.asm
--- a/mpn/riscv/64/aors_n.asm	Sun Oct 30 19:18:05 2016 +0100
+++ b/mpn/riscv/64/aors_n.asm	Sun Oct 30 22:41:00 2016 +0100
@@ -63,25 +63,25 @@
 
 L(top):	ld	a4, 0(up)
 	ld	a6, 0(vp)
-	addi	n, n, -2		C bookkeeping
-	addi	up, up, 16		C bookkeeping
+	addi	n, n, -2	C bookkeeping
+	addi	up, up, 16	C bookkeeping
 	ADDSUB	t0, a4, a6
 	CMPCY(	t2, t0, a4)
-	ADDSUB	t4, t0, t6
-	CMPCY(	t3, t4, t0)
+	ADDSUB	t4, t0, t6	C cycle 3, 9, ...
+	CMPCY(	t3, t4, t0)	C cycle 4, 10, ...
 	sd	t4, 0(rp)
-	add	t6, t2, t3
+	add	t6, t2, t3	C cycle 5, 11, ...
 L(mid):	ld	a5, -8(up)
 	ld	a7, 8(vp)
-	addi	vp, vp, 16		C bookkeeping
-	addi	rp, rp, 16		C bookkeeping
+	addi	vp, vp, 16	C bookkeeping
+	addi	rp, rp, 16	C bookkeeping
 	ADDSUB	t1, a5, a7
 	CMPCY(	t2, t1, a5)
-	ADDSUB	t4, t1, t6		C cycle 0
-	CMPCY(	t3, t4, t1)		C cycle 1
+	ADDSUB	t4, t1, t6	C cycle 0, 6, ...
+	CMPCY(	t3, t4, t1)	C cycle 1, 7, ...
 	sd	t4, -8(rp)
-	add	t6, t2, t3		C cycle 2
-	bne	n, x0, L(top)
+	add	t6, t2, t3	C cycle 2, 8, ...
+	bne	n, x0, L(top)	C bookkeeping
 
 L(end):	mv	a0, t6
 	ret
diff -r 881730a1eb06 -r 3dcbff36ac6b mpn/riscv/64/aorsmul_1.asm
--- a/mpn/riscv/64/aorsmul_1.asm	Sun Oct 30 19:18:05 2016 +0100
+++ b/mpn/riscv/64/aorsmul_1.asm	Sun Oct 30 22:41:00 2016 +0100
@@ -54,11 +54,11 @@
 	li	a6, 0
 
 L(top):	ld	a7, 0(up)
-	addi	up, up, 8
+	addi	up, up, 8	C bookkeeping
 	ld	a4, 0(rp)
-	addi	rp, rp, 8
+	addi	rp, rp, 8	C bookkeeping
 	mul	a5, a7, v0
-	addi	n, n, -1
+	addi	n, n, -1	C bookkeeping
 	mulhu	a7, a7, v0
 	ADDSUB	a5, a4, a5
 	ADDSUB	a6, a5, a6	C cycle 0, 3, ...
@@ -67,7 +67,7 @@
 	CMPCY(	a5, a6, a5)	C cycle 1, 4, ...
 	sd	a6, -8(rp)
 	add	a6, a4, a5	C cycle 2, 5, ...
-	bne	n, x0, L(top)
+	bne	n, x0, L(top)	C bookkeeping
 
 L(end):	mv	a0, a6
 	ret
diff -r 881730a1eb06 -r 3dcbff36ac6b mpn/riscv/64/mul_1.asm
--- a/mpn/riscv/64/mul_1.asm	Sun Oct 30 19:18:05 2016 +0100
+++ b/mpn/riscv/64/mul_1.asm	Sun Oct 30 22:41:00 2016 +0100
@@ -41,16 +41,16 @@
 	li	a6, 0
 
 L(top):	ld	a7, 0(up)
-	addi	up, up, 8
-	addi	rp, rp, 8
+	addi	up, up, 8	C bookkeeping
+	addi	rp, rp, 8	C bookkeeping
 	mul	a5, a7, v0
-	addi	n, n, -1
+	addi	n, n, -1	C bookkeeping
 	mulhu	a7, a7, v0
 	add	a6, a5, a6	C cycle 0, 3, ...
 	sltu	a5, a6, a5	C cycle 1, 4, ...
 	sd	a6, -8(rp)
 	add	a6, a7, a5	C cycle 2, 5, ...
-	bne	n, x0, L(top)
+	bne	n, x0, L(top)	C bookkeeping
 
 L(end):	mv	a0, a6
 	ret


More information about the gmp-commit mailing list