[Gmp-commit] /home/hgfiles/gmp: Trim away 0.5 c/l for submul_1 for POWER5.

mercurial at gmplib.org mercurial at gmplib.org
Thu Jan 20 00:19:54 CET 2011


details:   /home/hgfiles/gmp/rev/e9ea2b76025c
changeset: 13749:e9ea2b76025c
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Thu Jan 20 00:19:48 2011 +0100
description:
Trim away 0.5 c/l for submul_1 for POWER5.

diffstat:

 ChangeLog                          |   5 +++++
 mpn/powerpc64/mode64/aorsmul_1.asm |  23 +++++++++++++----------
 2 files changed, 18 insertions(+), 10 deletions(-)

diffs (86 lines):

diff -r fb6fddc552e2 -r e9ea2b76025c ChangeLog
--- a/ChangeLog	Wed Jan 19 17:22:52 2011 +0100
+++ b/ChangeLog	Thu Jan 20 00:19:48 2011 +0100
@@ -1,3 +1,8 @@
+2011-01-20  Torbjorn Granlund  <tege at gmplib.org>
+
+	* mpn/powerpc64/mode64/aorsmul_1.asm: Trim away 0.5 c/l for submul_1
+	for POWER5.
+
 2011-01-19  Torbjorn Granlund  <tege at gmplib.org>
 
 	* mpn/x86_64/core2/rsh1aors_n.asm: New file.
diff -r fb6fddc552e2 -r e9ea2b76025c mpn/powerpc64/mode64/aorsmul_1.asm
--- a/mpn/powerpc64/mode64/aorsmul_1.asm	Wed Jan 19 17:22:52 2011 +0100
+++ b/mpn/powerpc64/mode64/aorsmul_1.asm	Thu Jan 20 00:19:48 2011 +0100
@@ -1,7 +1,7 @@
 dnl  PowerPC-64 mpn_addmul_1 and mpn_submul_1.
 
-dnl  Copyright 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2010 Free Software
-dnl  Foundation, Inc.
+dnl  Copyright 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2010, 2011 Free
+dnl  Software Foundation, Inc.
 
 dnl  This file is part of the GNU MP Library.
 
@@ -23,8 +23,8 @@
 C		mpn_addmul_1	mpn_submul_1
 C		cycles/limb	cycles/limb
 C POWER3/PPC630   6-18		   6-18
-C POWER4/PPC970	   8?		    8.3?  not updated for last file revision
-C POWER5	   8		    8.63
+C POWER4/PPC970	   8		    8.3
+C POWER5	   8		    8.25
 C POWER6	  16.25		   16.75
 
 C TODO
@@ -41,15 +41,14 @@
   define(ADDSUB,	addc)
   define(func,		mpn_addmul_1)
   define(func_nc,	mpn_addmul_1c)
-  define(INVCY,		`')
+  define(SM,		`')
 ')
 ifdef(`OPERATION_submul_1',`
   define(ADDSUBC,	subfe)
   define(ADDSUB,	subfc)
   define(func,		mpn_submul_1)
   define(func_nc,	mpn_submul_1c)
-  define(INVCY,		`subfe	$1, $1, $1
-			addic	$1, $1,1')
+  define(SM,		`$1')
 ')
 
 ASM_START()
@@ -112,7 +111,8 @@
 	mulhdu	r8, r9, r6
 	ADDSUB	r0, r0, r11
 	std	r0, 0(rp)
-	INVCY(r11)
+SM(`	subfe	r11, r11, r11 ')
+SM(`	addic	r11, r11, 1 ')
 	addze	r3, r8
 	blr
 L(gt1):	ld	r9, 0(up)
@@ -180,8 +180,10 @@
 	ADDSUBC	r11, r11, r31	C 11 31
 	std	r11, 24(rp)	C 11
 	addi	up, up, 32
+SM(`	subfe	r11, r11, r11 ')
 	addi	rp, rp, 32
-L(bot):	INVCY(r11)
+L(bot):
+SM(`	addic	r11, r11, 1 ')
 	bdnz	L(top)
 
 L(end):	mulld	r0, r9, r6
@@ -197,7 +199,8 @@
 	std	r0, 0(rp)
 	ADDSUBC	r7, r7, r29
 	std	r7, 8(rp)
-	INVCY(r11)
+SM(`	subfe	r11, r11, r11 ')
+SM(`	addic	r11, r11, 1 ')
 	addze	r3, r8
 	ld	r31, -8(r1)
 	ld	r30, -16(r1)


More information about the gmp-commit mailing list