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

mercurial at gmplib.org mercurial at gmplib.org
Mon Apr 11 21:58:52 CEST 2011


details:   /var/hg/gmp/rev/ddb7975733d1
changeset: 14123:ddb7975733d1
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Mon Apr 11 21:50:04 2011 +0200
description:
(define_mpn): Use deflit.

details:   /var/hg/gmp/rev/3ce9a5298882
changeset: 14124:3ce9a5298882
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Mon Apr 11 21:57:25 2011 +0200
description:
Use deflit for Darwin bug workaround.  Undo 2011-03-28 change.

details:   /var/hg/gmp/rev/8f7dab1f7431
changeset: 14125:8f7dab1f7431
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Mon Apr 11 21:58:37 2011 +0200
description:
Undo change from some hours ago.

details:   /var/hg/gmp/rev/24037ebc567a
changeset: 14126:24037ebc567a
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Mon Apr 11 21:58:44 2011 +0200
description:
*** empty log message ***

diffstat:

 ChangeLog                  |  5 ++++-
 mpn/asm-defs.m4            |  2 +-
 mpn/x86/k7/invert_limb.asm |  4 ++--
 mpn/x86_64/invert_limb.asm |  9 ++++++---
 4 files changed, 13 insertions(+), 7 deletions(-)

diffs (69 lines):

diff -r 7fc68309cfb2 -r 24037ebc567a ChangeLog
--- a/ChangeLog	Mon Apr 11 14:30:24 2011 +0200
+++ b/ChangeLog	Mon Apr 11 21:58:44 2011 +0200
@@ -1,6 +1,9 @@
 2011-04-11  Torbjorn Granlund  <tege at gmplib.org>
 
-	* mpn/x86_64/invert_limb.asm: Make proper PIC reference.
+	* mpn/x86/k7/invert_limb.asm: Use deflit for Darwin bug workaround.
+	Undo 2011-03-28 change.
+
+	* mpn/asm-defs.m4 (define_mpn): Use deflit.
 
 2011-04-10  Niels Möller  <nisse at lysator.liu.se>
 
diff -r 7fc68309cfb2 -r 24037ebc567a mpn/asm-defs.m4
--- a/mpn/asm-defs.m4	Mon Apr 11 14:30:24 2011 +0200
+++ b/mpn/asm-defs.m4	Mon Apr 11 21:58:44 2011 +0200
@@ -1302,7 +1302,7 @@
 
 define(define_mpn,
 m4_assert_numargs(1)
-`define(`mpn_$1',`MPN(`$1')')')
+`deflit(`mpn_$1',`MPN(`$1')')')
 
 define_mpn(add)
 define_mpn(add_1)
diff -r 7fc68309cfb2 -r 24037ebc567a mpn/x86/k7/invert_limb.asm
--- a/mpn/x86/k7/invert_limb.asm	Mon Apr 11 14:30:24 2011 +0200
+++ b/mpn/x86/k7/invert_limb.asm	Mon Apr 11 21:58:44 2011 +0200
@@ -52,7 +52,7 @@
 
 C Make approx_tab global to work around Apple relocation bug.
 ifdef(`DARWIN',`
-	define(`approx_tab', MPN(invert_limb_tab))
+	deflit(`approx_tab', MPN(invert_limb_tab))
 	GLOBL	approx_tab')
 
 	TEXT
@@ -71,7 +71,7 @@
 	LEA(	approx_tab, %ebx)
 	movzwl	-1024(%ebx, %eax, 2), %eax
 ',`
-	movzwl	-1024+approx_tab`'(%eax, %eax), %eax	C %eax = v0
+	movzwl	-1024+approx_tab(%eax, %eax), %eax	C %eax = v0
 ')
 
 	C v1 = (v0 << 4) - ((v0*v0*d_21) >> 32) - 1
diff -r 7fc68309cfb2 -r 24037ebc567a mpn/x86_64/invert_limb.asm
--- a/mpn/x86_64/invert_limb.asm	Mon Apr 11 14:30:24 2011 +0200
+++ b/mpn/x86_64/invert_limb.asm	Mon Apr 11 21:58:44 2011 +0200
@@ -41,12 +41,15 @@
 	mov	%rdi, %rax		C			 0	 0	 0
 	shr	$55, %rax		C			 1	 1	 1
 ifdef(`PIC',`
+ifdef(`DARWIN',`
 	mov	mpn_invert_limb_table at GOTPCREL(%rip), %r8
-	movzwl	-512(%r8,%rax,2), R32(%rcx)
+	add	$-512, %r8
 ',`
+	lea	-512+mpn_invert_limb_table(%rip), %r8
+')',`
 	movabs	$-512+mpn_invert_limb_table, %r8
-	movzwl	(%r8,%rax,2), R32(%rcx)
-')					C	%rcx = v0
+')
+	movzwl	(%r8,%rax,2), R32(%rcx)	C	%rcx = v0
 
 	C v1 = (v0 << 11) - (v0*v0*d40 >> 40) - 1
 	mov	%rdi, %rsi		C			 0	 0	 0


More information about the gmp-commit mailing list