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

mercurial at gmplib.org mercurial at gmplib.org
Thu Apr 18 23:22:32 UTC 2019


details:   /var/hg/gmp/rev/fb43756a3b9d
changeset: 17761:fb43756a3b9d
user:      Torbjorn Granlund <tg at gmplib.org>
date:      Fri Apr 19 01:20:34 2019 +0200
description:
Simplify mpn_invert_limb_table ref.

details:   /var/hg/gmp/rev/f89e6fed0536
changeset: 17762:f89e6fed0536
user:      Torbjorn Granlund <tg at gmplib.org>
date:      Fri Apr 19 01:20:54 2019 +0200
description:
(LEA): Use rip addressing for non-PIC.

details:   /var/hg/gmp/rev/5789380d46df
changeset: 17763:5789380d46df
user:      Torbjorn Granlund <tg at gmplib.org>
date:      Fri Apr 19 01:22:28 2019 +0200
description:
Trivial merge.

diffstat:

 ChangeLog                  |  5 +++++
 mpn/generic/jacobi.c       |  2 +-
 mpn/x86_64/invert_limb.asm |  5 +----
 mpn/x86_64/x86_64-defs.m4  |  8 +++++++-
 4 files changed, 14 insertions(+), 6 deletions(-)

diffs (65 lines):

diff -r 4cc1b97583aa -r 5789380d46df ChangeLog
--- a/ChangeLog	Tue Apr 02 12:57:14 2019 +0200
+++ b/ChangeLog	Fri Apr 19 01:22:28 2019 +0200
@@ -1,3 +1,8 @@
+2019-04-17  Niels Möller  <nisse at lysator.liu.se>
+
+	* mpn/generic/jacobi.c (mpn_jacobi_n): Use JACOBI_DC_THRESHOLD,
+	not GCD_DC_THRESHOLD. Inconsistency spotted by Seth Troisi.
+
 2019-04-02  Torbjörn Granlund  <tg at gmplib.org>
 
 	* mpn/x86_64/fat/fat.c (__gmpn_cpuvec_init):
diff -r 4cc1b97583aa -r 5789380d46df mpn/generic/jacobi.c
--- a/mpn/generic/jacobi.c	Tue Apr 02 12:57:14 2019 +0200
+++ b/mpn/generic/jacobi.c	Fri Apr 19 01:22:28 2019 +0200
@@ -174,7 +174,7 @@
      storage etc. */
   scratch = MPN_GCD_SUBDIV_STEP_ITCH(n);
 
-  if (ABOVE_THRESHOLD (n, GCD_DC_THRESHOLD))
+  if (ABOVE_THRESHOLD (n, JACOBI_DC_THRESHOLD))
     {
       mp_size_t hgcd_scratch;
       mp_size_t update_scratch;
diff -r 4cc1b97583aa -r 5789380d46df mpn/x86_64/invert_limb.asm
--- a/mpn/x86_64/invert_limb.asm	Tue Apr 02 12:57:14 2019 +0200
+++ b/mpn/x86_64/invert_limb.asm	Fri Apr 19 01:22:28 2019 +0200
@@ -56,14 +56,11 @@
 	FUNC_ENTRY(1)
 	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
+	lea	mpn_invert_limb_table(%rip), %r8
 	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
 
diff -r 4cc1b97583aa -r 5789380d46df mpn/x86_64/x86_64-defs.m4
--- a/mpn/x86_64/x86_64-defs.m4	Tue Apr 02 12:57:14 2019 +0200
+++ b/mpn/x86_64/x86_64-defs.m4	Fri Apr 19 01:22:28 2019 +0200
@@ -136,11 +136,17 @@
 
 define(ASSERT_counter,1)
 
+dnl LEA - load effective address
+dnl
+dnl FIXME: We should never create a GOT entry and therefore use the simpler 2nd
+dnl variant always. We need to understand what happens for not-yet-hidden
+dnl symbols first.
+dnl
 define(`LEA',`dnl
 ifdef(`PIC',
 	`mov	$1 at GOTPCREL(%rip), $2'
 ,
-	`movabs	`$'$1, $2')
+	`lea	$1(%rip), $2')
 ')
 
 


More information about the gmp-commit mailing list