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

mercurial at gmplib.org mercurial at gmplib.org
Mon Jan 16 13:47:59 CET 2012


details:   /var/hg/gmp-5.0/rev/a044683def62
changeset: 13492:a044683def62
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Tue Dec 06 11:45:30 2011 +0100
description:
FIx typo.

details:   /var/hg/gmp-5.0/rev/2b7b8ada8a20
changeset: 13493:2b7b8ada8a20
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Mon Jan 16 13:47:56 2012 +0100
description:
Merging configure changes from mainline repo.

diffstat:

 ChangeLog            |   59 +++++++
 acinclude.m4         |   30 ++-
 config.guess         |  154 ++++++++++++++----
 config.sub           |   11 +-
 configure.in         |  405 +++++++++++++++++++++++++-------------------------
 doc/gmp.texi         |    2 +-
 mpn/x86/fat/fat.c    |    8 +-
 mpn/x86_64/fat/fat.c |  242 +++++++++++++++++++++++++-----
 8 files changed, 610 insertions(+), 301 deletions(-)

diffs (truncated from 1376 to 300 lines):

diff -r 22d5620e07bb -r 2b7b8ada8a20 ChangeLog
--- a/ChangeLog	Thu Nov 24 22:11:10 2011 +0100
+++ b/ChangeLog	Mon Jan 16 13:47:56 2012 +0100
@@ -1,3 +1,15 @@
+2011-12-07  Torbjorn Granlund  <tege at gmplib.org>
+
+	* configure.in: Fix typo making HAVE_NATIVE_mpn_X fail for fat
+	functions.
+
+	* mpn/x86_64/fat/fat.c (__gmpn_cpuvec_init): Add a missing break.
+
+2011-11-25  Torbjorn Granlund  <tege at gmplib.org>
+
+	* configure.in: Overhaul x86/x86_64 support, merging three case
+	statements into one.
+
 2011-11-24  Torbjorn Granlund  <tege at gmplib.org>
 
 	* doc/gmp.texi (Formatted Output Strings): Clarify rules for mpf_t
@@ -7,15 +19,34 @@
 
 	* gmp-h.in (__GNU_MP_RELEASE): Renamed from typo name.
 
+2011-11-20  Torbjorn Granlund  <tege at gmplib.org>
+
+	* configure.in: Split x86 CPUs into more subtypes for more accurate
+	passing of gcc flags.
+
 2011-10-04  Torbjorn Granlund  <tege at gmplib.org>
 
 	* doc/gmp.texi (Custom Allocation): Rephrase a paragraph.
 
+2011-09-25  Torbjorn Granlund  <tege at gmplib.org>
+
+	* configure.in: Recognise sh3 and sh4.
+
 2011-07-14  Torbjorn Granlund  <tege at gmplib.org>
 
 	* mpn/generic/dcpi1_bdiv_q.c (mpn_dcpi1_bdiv_q): Get mpn_sub_1 size
 	argument right.
 
+2011-07-04  Torbjorn Granlund  <tege at gmplib.org>
+
+	* configure.in (x86_64 *-*-mingw*): Handle also cygwin here; clear out
+	extra_functions_64.
+
+2011-07-02  Torbjorn Granlund  <tege at gmplib.org>
+
+	* config.guess: Don't print newline in x86 cpuid function.
+	Rewrite x86-64 cpu recognition asm code to work under Windoze.
+
 2011-06-16  Torbjorn Granlund  <tege at gmplib.org>
 
 	* acinclude.m4 (GMP_ASM_RODATA): Fix typo in 2011-04-10 change.
@@ -31,6 +62,11 @@
 	* Makefile.am (LIBGMP_LT_*, LIBGMPXX_LT_*, LIBMP_LT_*):
 	Bump version info.
 
+2011-05-05  Marc Glisse  <marc.glisse at inria.fr>
+
+	* mpn/x86_64/fat/fat.c: Update for Sandy Bridge.
+	* config.guess: warning to keep it in sync with fat.c.
+
 2011-05-05  Torbjorn Granlund  <tege at gmplib.org>
 
 	* mpn/x86_64/fat/fat_entry.asm: (PIC_OR_DARWIN): New symbol.  Use it to
@@ -54,6 +90,11 @@
 	* doc/gmp.texi (mpf_urandomb): Explicit the fact that it does not
 	change the precision.
 
+2011-04-28  Torbjorn Granlund  <tege at gmplib.org>
+
+	* configure.in (x86_64): Support bobcat specifically.
+	(x86): Match bobcat and bulldozer, handle like k10.
+
 2011-04-27  Torbjorn Granlund  <tege at gmplib.org>
 
 	* tune/speed.h (speed_cyclecounter): Always use PIC variant when
@@ -64,6 +105,11 @@
 	* mpn/sparc32/sparc-defs.m4 (changecom): Don't redefine '!' as it
 	interferes with expressions.
 
+2011-04-10  Niels Möller  <nisse at lysator.liu.se>
+
+	* configure.in: Add invert_limb_table to extra_functions_64 on
+	x86_64.
+
 2011-04-10  Torbjorn Granlund  <tege at gmplib.org>
 
 	* acinclude.m4 (GMP_ASM_RODATA): Make 'foo' larger to avoid clang
@@ -101,6 +147,14 @@
 	* mpn/x86_64/core2/popcount.asm: Add a MULFUNC_PROLOGUE.
 	* mpn/x86_64/pentium4/popcount.asm: Likewise.
 
+2011-01-31  Torbjorn Granlund  <tege at gmplib.org>
+
+	* config.guess: Recognise new Intel processors.
+
+	* config.guess: Support 'coreinhm' and 'coreisbr'.
+	* config.sub: Likewise.
+	* configure.in: Likewise.
+
 2011-01-25 Marco Bodrato <bodrato at mail.dm.unipi.it>
 
 	* mpz/mul.c: Remove redundant size computation.
@@ -110,6 +164,11 @@
 	* mpn/x86_64/atom/aors_n.asm: Don't rely on ZF after 'bt' insn.
 	Use 64-bit 'test' to support operands of 2^32 limbs and more.
 
+2010-11-09  Torbjorn Granlund  <tege at gmplib.org>
+
+	* configure.in (AC_INIT): Amend bug reporting address with manual
+	reference.
+
 2010-11-06  Torbjorn Granlund  <tege at gmplib.org>
 
 	* mpn/x86_64/aors_n.asm: Rewrite not to rely on ZF after 'bt' insn.
diff -r 22d5620e07bb -r 2b7b8ada8a20 acinclude.m4
--- a/acinclude.m4	Thu Nov 24 22:11:10 2011 +0100
+++ b/acinclude.m4	Mon Jan 16 13:47:56 2012 +0100
@@ -1,8 +1,8 @@
 dnl  GMP specific autoconf macros
 
 
-dnl  Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 Free Software
-dnl  Foundation, Inc.
+dnl  Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009, 2011 Free
+dnl  Software Foundation, Inc.
 dnl
 dnl  This file is part of the GNU MP Library.
 dnl
@@ -47,7 +47,7 @@
 [[i?86*-*-* | k[5-8]*-*-* | pentium*-*-* | athlon-*-* | viac3*-*-* | geode*-*-* | atom-*-*]])
 
 define(X86_64_PATTERN,
-[[athlon64-*-* | pentium4-*-* | atom-*-* | core2-*-* | corei-*-* | x86_64-*-* | nano-*-*]])
+[[athlon64-*-* | k8-*-* | k10-*-* | bobcat-*-* | bulldozer-*-* | pentium4-*-* | atom-*-* | core2-*-* | corei*-*-* | x86_64-*-* | nano-*-*]])
 
 dnl  GMP_FAT_SUFFIX(DSTVAR, DIRECTORY)
 dnl  ---------------------------------
@@ -3093,14 +3093,17 @@
 dnl  Determine the floating point format.
 dnl
 dnl  The object file is grepped, in order to work when cross compiling.  A
-dnl  start and end sequence is included to avoid false matches, and
-dnl  allowance is made for the desired data crossing an "od -b" line
-dnl  boundary.  The test number is a small integer so it should appear
-dnl  exactly, no rounding or truncation etc.
+dnl  start and end sequence is included to avoid false matches, and allowance
+dnl  is made for the desired data crossing an "od -b" line boundary.  The test
+dnl  number is a small integer so it should appear exactly, no rounding or
+dnl  truncation etc.
 dnl
 dnl  "od -b", incidentally, is supported even by Unix V7, and the awk script
 dnl  used doesn't have functions or anything, so even an "old" awk should
 dnl  suffice.
+dnl
+dnl  The C code here declares the variable foo as extern; without that, some
+dnl  C++ compilers will not put foo in the object file.
 
 AC_DEFUN([GMP_C_DOUBLE_FORMAT],
 [AC_REQUIRE([AC_PROG_CC])
@@ -3109,11 +3112,13 @@
                 gmp_cv_c_double_format,
 [gmp_cv_c_double_format=unknown
 cat >conftest.c <<\EOF
-[struct {
+[struct foo {
   char    before[8];
   double  x;
   char    after[8];
-} foo = {
+};
+extern struct foo foo;
+struct foo foo = {
   { '\001', '\043', '\105', '\147', '\211', '\253', '\315', '\357' },
   -123456789.0,
   { '\376', '\334', '\272', '\230', '\166', '\124', '\062', '\020' },
@@ -3523,7 +3528,7 @@
   AC_CACHE_CHECK([whether vsnprintf works],
                  gmp_cv_func_vsnprintf,
   [gmp_cv_func_vsnprintf=yes
-   for i in 'check ("hello world");' 'int n; check ("%nhello world", &n);'; do
+   for i in 'return check ("hello world");' 'int n; return check ("%nhello world", &n);'; do
      AC_TRY_RUN([
 #include <string.h>  /* for strcmp */
 #include <stdio.h>   /* for vsnprintf */
@@ -3557,11 +3562,11 @@
   ret = vsnprintf (buf, 4, fmt, ap);
 
   if (strcmp (buf, "hel") != 0)
-    exit (1);
+    return 1;
 
   /* allowed return values */
   if (ret != -1 && ret != 3 && ret != 11)
-    exit (2);
+    return 2;
 
   return 0;
 }
@@ -3570,7 +3575,6 @@
 main ()
 {
 $i
-  exit (0);
 }
 ],
       [:],
diff -r 22d5620e07bb -r 2b7b8ada8a20 config.guess
--- a/config.guess	Thu Nov 24 22:11:10 2011 +0100
+++ b/config.guess	Mon Jan 16 13:47:56 2012 +0100
@@ -3,7 +3,7 @@
 # GMP config.guess wrapper.
 
 
-# Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2008 Free Software
+# Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2008, 2011 Free Software
 # Foundation, Inc.
 #
 # This file is part of the GNU MP Library.
@@ -454,6 +454,9 @@
 #ifdef POWER_6
   case POWER_6:    puts ("power6"); break;
 #endif
+#ifdef POWER_7
+  case POWER_7:    puts ("power7"); break;
+#endif
   default:
     if (_system_configuration.architecture == POWER_RS)
       puts ("power");
@@ -539,8 +542,11 @@
     elif grep 'cpu.*MB86904' /proc/cpuinfo >/dev/null; then
       # actually MicroSPARC-II
       exact_cpu=microsparc
+    elif grep 'cpu.*UltraSparc T3' /proc/cpuinfo >/dev/null; then
+      exact_cpu="ultrasparct3"
+    elif grep 'cpu.*UltraSparc T2' /proc/cpuinfo >/dev/null; then
+      exact_cpu="ultrasparct2"
     elif grep 'cpu.*UltraSparc T1' /proc/cpuinfo >/dev/null; then
-      # this grep pattern has not been tested against any Linux
       exact_cpu="ultrasparct1"
     elif grep 'cpu.*UltraSparc III' /proc/cpuinfo >/dev/null; then
       exact_cpu="ultrasparc3"
@@ -595,7 +601,11 @@
   for prtconfopt in "" "-vp"; do
     if test -z "$exact_cpu"; then
       if $SHELL -c "/usr/sbin/prtconf $prtconfopt" 2>/dev/null >conftest.dat; then
-	if grep 'SUNW,UltraSPARC-T1' conftest.dat >/dev/null; then
+	if grep 'SUNW,UltraSPARC-T3' conftest.dat >/dev/null; then
+	  exact_cpu=ultrasparct3
+	elif grep 'SUNW,UltraSPARC-T2' conftest.dat >/dev/null; then
+	  exact_cpu=ultrasparct2
+	elif grep 'SUNW,UltraSPARC-T1' conftest.dat >/dev/null; then
 	  exact_cpu=ultrasparct1
 	elif grep 'SUNW,UltraSPARC-III' conftest.dat >/dev/null; then
 	  exact_cpu=ultrasparc3
@@ -630,16 +640,19 @@
   #
   if test -z "$exact_cpu"; then
     if $SHELL -c "/sbin/sysctl hw.model" 2>/dev/null >conftest.dat; then
-      if grep 'UltraSparc-T1' conftest.dat >/dev/null; then
-	# this grep pattern has not been tested against any BSD
+      if grep -i 'UltraSparc-T3' conftest.dat >/dev/null; then
+        exact_cpu=ultrasparct3
+      elif grep -i 'UltraSparc-T2' conftest.dat >/dev/null; then
+        exact_cpu=ultrasparct2
+      elif grep -i 'UltraSparc-T1' conftest.dat >/dev/null; then
         exact_cpu=ultrasparct1
-      elif grep 'UltraSparc-III' conftest.dat >/dev/null; then
+      elif grep -i 'UltraSparc-III' conftest.dat >/dev/null; then
         exact_cpu=ultrasparc3
-      elif grep 'UltraSparc-IIi' conftest.dat >/dev/null; then
+      elif grep -i 'UltraSparc-IIi' conftest.dat >/dev/null; then
         exact_cpu=ultrasparc2i
-      elif grep 'UltraSparc-II' conftest.dat >/dev/null; then
+      elif grep -i 'UltraSparc-II' conftest.dat >/dev/null; then
         exact_cpu=ultrasparc2
-      elif grep 'UltraSparc' conftest.dat >/dev/null; then
+      elif grep -i 'UltraSparc' conftest.dat >/dev/null; then
         exact_cpu=ultrasparc
       elif grep 'TMS390Z5.' conftest.dat >/dev/null; then
         # TMS390Z50 and TMS390Z55
@@ -666,6 +679,12 @@
   fi
   ;;
 
+
+# Recognise x86 processors using a tricky cpuid with 4 arguments, repeating
+# arguments; for x86-64 we effectively pass the 1st in rdx and the 2nd in rcx.
+# This allows the same asm to work for both standard and Windoze calling
+# conventions.
+
 i?86-*-* | amd64-*-* | x86_64-*-*)
   cat <<EOF >${dummy}0.s
 	.globl cpuid
@@ -674,10 +693,10 @@
 _cpuid:
 	pushl %esi
 	pushl %ebx


More information about the gmp-commit mailing list