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

mercurial at gmplib.org mercurial at gmplib.org
Mon Apr 1 01:08:51 CEST 2013


details:   /var/hg/gmp/rev/41011a2a17f5
changeset: 15662:41011a2a17f5
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Mon Apr 01 01:08:37 2013 +0200
description:
Tweak for tighter loop.

details:   /var/hg/gmp/rev/cc23faf27401
changeset: 15663:cc23faf27401
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Mon Apr 01 01:08:46 2013 +0200
description:
ChangeLog

diffstat:

 ChangeLog             |  13 +++++++++++++
 mpn/sparc64/gcd_1.asm |  26 +++++++++++++-------------
 2 files changed, 26 insertions(+), 13 deletions(-)

diffs (88 lines):

diff -r 1fb8623f905b -r cc23faf27401 ChangeLog
--- a/ChangeLog	Sun Mar 31 23:08:55 2013 +0200
+++ b/ChangeLog	Mon Apr 01 01:08:46 2013 +0200
@@ -1,3 +1,16 @@
+2013-04-01  Torbjorn Granlund  <tege at gmplib.org>
+
+	* mpn/sparc64/gcd_1.asm: Tweak for tighter loop.
+
+2013-03-31  Torbjorn Granlund  <tege at gmplib.org>
+
+	* mpn/sparc64/lshift.asm: New file.
+	* mpn/sparc64/rshift.asm: New file.
+	* mpn/sparc64/lshiftc.asm: New file.
+	* mpn/sparc64/ultrasparct1/lshift.asm: Remove.
+	* mpn/sparc64/ultrasparct1/rshift.asm: Remove.
+	* mpn/sparc64/ultrasparct1/lshiftc.asm: Remove.
+
 2013-03-29  Torbjorn Granlund  <tege at gmplib.org>
 
 	* mpn/sparc64/ultrasparct3/aormul_2.asm: Always do mulx before umulxhi.
diff -r 1fb8623f905b -r cc23faf27401 mpn/sparc64/gcd_1.asm
--- a/mpn/sparc64/gcd_1.asm	Sun Mar 31 23:08:55 2013 +0200
+++ b/mpn/sparc64/gcd_1.asm	Mon Apr 01 01:08:46 2013 +0200
@@ -1,9 +1,9 @@
 dnl  SPARC64 mpn_gcd_1.
 
-dnl  Based on the K7 gcd_1.asm, by Kevin Ryde.  Rehacked for SPARC by Torbjorn
+dnl  Based on the K7 gcd_1.asm, by Kevin Ryde.  Rehacked for SPARC by Torbjörn
 dnl  Granlund.
 
-dnl  Copyright 2000, 2001, 2002, 2005, 2009, 2011, 2012 Free Software
+dnl  Copyright 2000, 2001, 2002, 2005, 2009, 2011, 2012, 2013 Free Software
 dnl  Foundation, Inc.
 
 dnl  This file is part of the GNU MP Library.
@@ -25,9 +25,11 @@
 
 
 C		  cycles/bit (approx)
-C UltraSPARC 1&2:      5.1
-C UltraSPARC 3:        5.0
-C UltraSPARC T1:      12.8
+C UltraSPARC 1&2:	 5.1
+C UltraSPARC 3:		 5.0
+C UltraSPARC T1:	11.4
+C UltraSPARC T3:	 ?
+C UltraSPARC T4:	 ?
 C Numbers measured with: speed -CD -s32-64 -t32 mpn_gcd_1
 
 C ctz_table[n] is the number of trailing zeros on n, or MAXSHIFT if n==0.
@@ -110,7 +112,7 @@
 
 	cmp	%o0, 0
 	bnz	%xcc, L(mid)
-	 andcc	%o0, MASK, %g3		C
+	 and	%o0, MASK, %g3		C
 
 	return	%i7+8
 	 sllx	%o2, %o4, %o0		C CAUTION: v0 alias for o2
@@ -118,15 +120,13 @@
 	ALIGN(16)
 L(top):	movcc	%xcc, %l4, v0		C v = min(u,v)
 	movcc	%xcc, %l2, %o0		C u = |v - u]
-	cmp	%g3, 0			C are all MAXSHIFT low bits zero?
-L(mid):	ldub	[%i5+%g3], %g3		C
-	bz,a	%xcc, L(shift_alot)	C
+L(mid):	ldub	[%i5+%g3], %g5		C
+	brz,a,pn %g3, L(shift_alot)	C
 	 srlx	%o0, MAXSHIFT, %o0
-	srlx	%o0, %g3, %l4		C new u, odd
-	nop				C force parallel exec of sub insns
+	srlx	%o0, %g5, %l4		C new u, odd
 	subcc	v0, %l4, %l2		C v - u, set flags for branch and movcc
 	sub	%l4, v0, %o0		C u - v
-	bnz	%xcc, L(top)		C
+	bnz,pt	%xcc, L(top)		C
 	 and	%l2, MASK, %g3		C extract low MAXSHIFT bits from (v-u)
 
 	return	%i7+8
@@ -134,7 +134,7 @@
 
 L(shift_alot):
 	b	L(mid)
-	 andcc	%o0, MASK, %g3		C
+	 and	%o0, MASK, %g3		C
 
 ifdef(`PIC',`
 L(LGETPC0):


More information about the gmp-commit mailing list