[Gmp-commit] /var/hg/gmp: Revert some of the LEA and INT32 changes.

mercurial at gmplib.org mercurial at gmplib.org
Sun Apr 14 23:24:57 CEST 2013


details:   /var/hg/gmp/rev/bd92f35223f8
changeset: 15716:bd92f35223f8
user:      David S. Miller
date:      Sun Apr 14 23:24:54 2013 +0200
description:
Revert some of the LEA and INT32 changes.

diffstat:

 ChangeLog                       |   5 +++++
 mpn/sparc32/v9/sqr_diagonal.asm |  14 ++++++++++----
 mpn/sparc64/gcd_1.asm           |  25 ++++++++++++++++++++++---
 3 files changed, 37 insertions(+), 7 deletions(-)

diffs (87 lines):

diff -r 747215ea6143 -r bd92f35223f8 ChangeLog
--- a/ChangeLog	Sun Apr 14 15:12:59 2013 +0200
+++ b/ChangeLog	Sun Apr 14 23:24:54 2013 +0200
@@ -1,3 +1,8 @@
+2013-04-14  David S. Miller  <davem at davemloft.net>
+
+	* mpn/sparc32/v9/sqr_diagonal.asm: Revert LEA and INT32 changes.
+	* mpn/sparc64/gcd_1.asm: Likewise.
+
 2013-04-13  Torbjorn Granlund  <tege at gmplib.org>
 
 	* mpn/x86_64/bd1/tabselect.asm: New file.
diff -r 747215ea6143 -r bd92f35223f8 mpn/sparc32/v9/sqr_diagonal.asm
--- a/mpn/sparc32/v9/sqr_diagonal.asm	Sun Apr 14 15:12:59 2013 +0200
+++ b/mpn/sparc32/v9/sqr_diagonal.asm	Sun Apr 14 23:24:54 2013 +0200
@@ -73,14 +73,20 @@
 define(`fanop',`fitod %f12,%f10')	dnl  A quasi nop running in the FA pipe
 
 ASM_START()
-	LEA_THUNK(l7)
+
 	TEXT
-	INT32(noll, 0)
+	ALIGN(4)
+.Lnoll:
+	.word	0
+
 PROLOGUE(mpn_sqr_diagonal)
 	save	%sp,-256,%sp
 
-	LEA(L(noll),l0,l7)
-	ld	[%l0], %f8
+ifdef(`PIC',
+`.Lpc:	rd	%pc,%o7
+	ld	[%o7+.Lnoll-.Lpc],%f8',
+`	sethi	%hi(.Lnoll),%g1
+	ld	[%g1+%lo(.Lnoll)],%f8')
 
 	sethi	%hi(0xffff0000),%g5
 	add	%i1,-8,%i1
diff -r 747215ea6143 -r bd92f35223f8 mpn/sparc64/gcd_1.asm
--- a/mpn/sparc64/gcd_1.asm	Sun Apr 14 15:12:59 2013 +0200
+++ b/mpn/sparc64/gcd_1.asm	Sun Apr 14 23:24:54 2013 +0200
@@ -58,8 +58,6 @@
 ASM_START()
 	REGISTER(%g2,#scratch)
 	REGISTER(%g3,#scratch)
-	LEA_THUNK(l7)
-	TEXT
 PROLOGUE(mpn_gcd_1)
 	save	%sp, -192, %sp
 	ldx	[up+0], %g1		C U low limb
@@ -95,7 +93,22 @@
 	 mov	0, %o3
 
 L(noreduce):
-	LEA(ctz_table,i5,l7)
+
+ifdef(`PIC',`
+	sethi	%hi(_GLOBAL_OFFSET_TABLE_-4), %l7
+	call	L(LGETPC0)
+	add	%l7, %lo(_GLOBAL_OFFSET_TABLE_+4), %l7
+	sethi	%hi(ctz_table), %g1
+	or	%g1, %lo(ctz_table), %g1
+	ldx	[%l7+%g1], %i5
+',`
+	sethi	%hh(ctz_table), %l7
+	or	%l7, %hm(ctz_table), %l7
+	sllx	%l7, 32, %l7
+	sethi	%lm(ctz_table), %g1
+	add	%l7, %g1, %l7
+	or	%l7, %lo(ctz_table), %i5
+')
 
 	cmp	%o0, 0
 	bnz	%xcc, L(mid)
@@ -122,4 +135,10 @@
 L(shift_alot):
 	b	L(mid)
 	 and	%o0, MASK, %g3		C
+
+ifdef(`PIC',`
+L(LGETPC0):
+	retl
+	add	%o7, %l7, %l7
+')
 EPILOGUE()


More information about the gmp-commit mailing list