[Gmp-commit] /home/hgfiles/gmp: 3 new changesets

mercurial at gmplib.org mercurial at gmplib.org
Fri Apr 30 19:27:57 CEST 2010


details:   /home/hgfiles/gmp/rev/2f1f03cd812e
changeset: 13583:2f1f03cd812e
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Fri Apr 30 09:13:38 2010 +0200
description:
Fix alignment on AIX.

details:   /home/hgfiles/gmp/rev/2f9bdad0dbc1
changeset: 13584:2f9bdad0dbc1
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Fri Apr 30 09:15:20 2010 +0200
description:
Support CPU specific mode-less subdirs.

details:   /home/hgfiles/gmp/rev/c2615a31960d
changeset: 13585:c2615a31960d
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Fri Apr 30 19:27:41 2010 +0200
description:
Trivial merge.

diffstat:

 ChangeLog                   |  12 ++++++++++++
 configure.in                |  15 ++++++++++++---
 mpn/generic/jacobi_lehmer.c |  13 ++++++++++---
 mpn/powerpc64/aix.m4        |   6 +++---
 4 files changed, 37 insertions(+), 9 deletions(-)

diffs (124 lines):

diff -r d8d2e4c965cc -r c2615a31960d ChangeLog
--- a/ChangeLog	Thu Apr 29 23:00:38 2010 +0200
+++ b/ChangeLog	Fri Apr 30 19:27:41 2010 +0200
@@ -1,3 +1,15 @@
+2010-04-30  Torbjorn Granlund  <tege at gmplib.org>
+
+	* configure.in (powerpc64): Support CPU specific mode-less subdirs.
+
+	* mpn/powerpc64/aix.m4 (PROLOGUE_cpu): Use "named csect" making
+	requested aignment actually honoured.
+
+2010-04-30  Niels Möller  <nisse at lysator.liu.se>
+
+	* mpn/generic/jacobi_lehmer.c (mpn_jacobi_2): Fixed handling of
+	the case bl == 1. Fixed missing application of reciprocity.
+
 2010-04-29  Niels Möller  <nisse at lysator.liu.se>
 
 	* configure.in (gmp_mpn_functions): Deleted gcdext_subdiv_step.
diff -r d8d2e4c965cc -r c2615a31960d configure.in
--- a/configure.in	Thu Apr 29 23:00:38 2010 +0200
+++ b/configure.in	Fri Apr 30 19:27:41 2010 +0200
@@ -980,7 +980,10 @@
 	    ar_aix64_flags="-X64"
 	    nm_aix64_flags="-X64"
 	    path_aix64=""
-	    for i in $cpu_path; do path_aix64="${path_aix64}powerpc64/mode64/$i "; done
+	    for i in $cpu_path
+	      do path_aix64="${path_aix64}powerpc64/mode64/$i "
+	      	 path_aix64="${path_aix64}powerpc64/$i "
+	      done
             path_aix64="${path_aix64}powerpc64/mode64 $vmx_path powerpc64"
             # grab this object, though it's not a true cycle counter routine
             SPEED_CYCLECOUNTER_OBJ_aix64=powerpc64.lo
@@ -1020,7 +1023,10 @@
 	    gcc_mode64_cflags_optlist="cpu opt"
 	    gcc_mode64_cflags_opt="-O3 -O2 -O1"
 	    path_mode64=""
-	    for i in $cpu_path; do path_mode64="${path_mode64}powerpc64/mode64/$i "; done
+	    for i in $cpu_path
+	      do path_mode64="${path_mode64}powerpc64/mode64/$i "
+	      	 path_mode64="${path_mode64}powerpc64/$i "
+	      done
 	    path_mode64="${path_mode64}powerpc64/mode64 $vmx_path powerpc64"
             SPEED_CYCLECOUNTER_OBJ_mode64=powerpc64.lo
             cyclecounter_size_mode64=0
@@ -1053,7 +1059,10 @@
 	    gcc_mode64_cflags_optlist="cpu opt"
 	    gcc_mode64_cflags_opt="-O3 -O2 -O1"
 	    path_mode64=""
-	    for i in $cpu_path; do path_mode64="${path_mode64}powerpc64/mode64/$i "; done
+	    for i in $cpu_path
+	      do path_mode64="${path_mode64}powerpc64/mode64/$i "
+	      	 path_mode64="${path_mode64}powerpc64/$i "
+	      done
 	    path_mode64="${path_mode64}powerpc64/mode64 $vmx_path powerpc64"
             SPEED_CYCLECOUNTER_OBJ_mode64=powerpc64.lo
             cyclecounter_size_mode64=0
diff -r d8d2e4c965cc -r c2615a31960d mpn/generic/jacobi_lehmer.c
--- a/mpn/generic/jacobi_lehmer.c	Thu Apr 29 23:00:38 2010 +0200
+++ b/mpn/generic/jacobi_lehmer.c	Fri Apr 30 19:27:41 2010 +0200
@@ -444,13 +444,14 @@
 	      al = bl;
 	      bl = ah >> c;
 	      ah = bh;
+
+	      bit ^= al & bl;
 	      goto b_reduced;
 	    }
 	  count_trailing_zeros (c, al);
 	  bit ^= (c << 1) & (bl ^ (bl >> 1));
 	  al = ((ah << (GMP_NUMB_BITS - c)) & GMP_NUMB_MASK) | (al >> c);
 	  ah >>= c;
-
 	}
       if (ah == bh)
 	goto cancel_hi;
@@ -513,7 +514,11 @@
 
  b_reduced:
   /* Compute (a|b), with b a single limb. */
-  ASSERT (bl > 1);
+  ASSERT (bl & 1);
+
+  if (bl == 1)
+    /* (a|1) = 1 */
+    return 1 - (bit & 2);
 
   while (ah > 0)
     {
@@ -535,7 +540,9 @@
       bit ^= (c << 1) & (bl ^ (bl >> 1));      
     }
  ab_reduced:
-  ASSERT (bl > 0);
+  ASSERT (bl & 1);
+  ASSERT (bl > 1);
+
   return mpn_jacobi_base (al, bl, bit);
 }
 #else
diff -r d8d2e4c965cc -r c2615a31960d mpn/powerpc64/aix.m4
--- a/mpn/powerpc64/aix.m4	Thu Apr 29 23:00:38 2010 +0200
+++ b/mpn/powerpc64/aix.m4	Fri Apr 30 19:27:41 2010 +0200
@@ -1,7 +1,8 @@
 divert(-1)
 dnl  m4 macros for AIX 64-bit assembly.
 
-dnl  Copyright 2000, 2001, 2002, 2005, 2006 Free Software Foundation, Inc.
+dnl  Copyright 2000, 2001, 2002, 2005, 2006, 2010 Free Software Foundation,
+dnl  Inc.
 dnl
 dnl  This file is part of the GNU MP Library.
 dnl
@@ -35,8 +36,7 @@
 	.csect	[DS], 3
 $1:
 	.llong	.$1, TOC[tc0], 0
-	.csect	[PR]
-	.align	5
+	.csect	.$1[PR], 6
 .$1:')
 
 define(`EPILOGUE_cpu',


More information about the gmp-commit mailing list