[Gmp-commit] /var/hg/gmp: Handle n = 0.

mercurial at gmplib.org mercurial at gmplib.org
Fri Jul 5 14:45:25 CEST 2013


details:   /var/hg/gmp/rev/45c38e4c1de2
changeset: 15861:45c38e4c1de2
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Fri Jul 05 14:45:17 2013 +0200
description:
Handle n = 0.

diffstat:

 ChangeLog                  |   5 +++++
 mpn/powerpc64/p7/copyd.asm |  12 +++++++-----
 mpn/powerpc64/p7/copyi.asm |  12 +++++++-----
 3 files changed, 19 insertions(+), 10 deletions(-)

diffs (80 lines):

diff -r c5a3e773e185 -r 45c38e4c1de2 ChangeLog
--- a/ChangeLog	Thu Jul 04 23:56:26 2013 +0200
+++ b/ChangeLog	Fri Jul 05 14:45:17 2013 +0200
@@ -1,3 +1,8 @@
+2013-07-05  Torbjorn Granlund  <tege at gmplib.org>
+
+	* mpn/powerpc64/p7/copyi.asm: Handle n = 0.
+	* mpn/powerpc64/p7/copyd.asm: Likewise.
+
 2013-07-04  Torbjorn Granlund  <tege at gmplib.org>
 
 	* mpn/powerpc64/mode64/p7/aormul_2.asm: New file.
diff -r c5a3e773e185 -r 45c38e4c1de2 mpn/powerpc64/p7/copyd.asm
--- a/mpn/powerpc64/p7/copyd.asm	Thu Jul 04 23:56:26 2013 +0200
+++ b/mpn/powerpc64/p7/copyd.asm	Fri Jul 05 14:45:17 2013 +0200
@@ -61,15 +61,15 @@
 	addi	rp, rp, -8
 
 L(xx0):	bne	cr6, L(x10)
-L(x00):	ld	r6, -8(r4)
-	ld	r7, -16(r4)
+L(x00):	ld	r6, -8(up)
+	ld	r7, -16(up)
 	bne	cr7, L(100)
 L(000):	addi	rp, rp, 32
 	b	L(lo0)
 L(100):	addi	up, up, 32
 	b	L(lo4)
-L(x10):	ld	r8, -8(r4)
-	ld	r9, -16(r4)
+L(x10):	ld	r8, -8(up)
+	ld	r9, -16(up)
 	bne	cr7, L(110)
 L(010):	addi	up, up, -16
 	addi	rp, rp, 16
@@ -78,7 +78,9 @@
 	addi	rp, rp, 48
 	b	L(lo6)
 
-L(sml):	mtctr	n
+L(sml):	cmpdi	cr0, n, 0
+	beqlr-	cr0
+	mtctr	n
 L(t):	ld	r6, -8(up)
 	addi	up, up, -8
 	std	r6, -8(rp)
diff -r c5a3e773e185 -r 45c38e4c1de2 mpn/powerpc64/p7/copyi.asm
--- a/mpn/powerpc64/p7/copyi.asm	Thu Jul 04 23:56:26 2013 +0200
+++ b/mpn/powerpc64/p7/copyi.asm	Fri Jul 05 14:45:17 2013 +0200
@@ -62,15 +62,15 @@
 	addi	rp, rp, 8
 
 L(xx0):	bne	cr6, L(x10)
-L(x00):	ld	r6, 0(r4)
-	ld	r7, 8(r4)
+L(x00):	ld	r6, 0(up)
+	ld	r7, 8(up)
 	bne	cr7, L(100)
 L(000):	addi	rp, rp, -32
 	b	L(lo0)
 L(100):	addi	up, up, -32
 	b	L(lo4)
-L(x10):	ld	r8, 0(r4)
-	ld	r9, 8(r4)
+L(x10):	ld	r8, 0(up)
+	ld	r9, 8(up)
 	bne	cr7, L(110)
 L(010):	addi	up, up, 16
 	addi	rp, rp, -16
@@ -79,7 +79,9 @@
 	addi	rp, rp, -48
 	b	L(lo6)
 
-L(sml):	mtctr	n
+L(sml):	cmpdi	cr0, n, 0
+	beqlr-	cr0
+	mtctr	n
 L(t):	ld	r6, 0(up)
 	addi	up, up, 8
 	std	r6, 0(rp)


More information about the gmp-commit mailing list