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

mercurial at gmplib.org mercurial at gmplib.org
Sun Mar 3 16:23:18 CET 2013


details:   /var/hg/gmp/rev/d0e077c4513c
changeset: 15507:d0e077c4513c
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Sun Mar 03 15:23:32 2013 +0100
description:
Update a comment.

details:   /var/hg/gmp/rev/b3a8e1007f13
changeset: 15508:b3a8e1007f13
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Sun Mar 03 16:15:11 2013 +0100
description:
Trivial merge.

details:   /var/hg/gmp/rev/e161fd33b17a
changeset: 15509:e161fd33b17a
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Sun Mar 03 16:18:20 2013 +0100
description:
Rework tmp file handling to resemble configfsf.guess's.

details:   /var/hg/gmp/rev/17f7990d7583
changeset: 15510:17f7990d7583
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Sun Mar 03 16:20:14 2013 +0100
description:
Make files executable

details:   /var/hg/gmp/rev/c6ae98ed90c4
changeset: 15511:c6ae98ed90c4
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Sun Mar 03 16:21:04 2013 +0100
description:
Add basic arm tabselect.

details:   /var/hg/gmp/rev/fa36717b09b3
changeset: 15512:fa36717b09b3
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Sun Mar 03 16:22:35 2013 +0100
description:
Software pipeline.

details:   /var/hg/gmp/rev/7ed9a2831799
changeset: 15513:7ed9a2831799
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Sun Mar 03 16:22:54 2013 +0100
description:
ChangeLog

diffstat:

 ChangeLog               |   17 ++++
 config.guess            |  164 ++++++++++++++++++++++++-----------------------
 doc/gmp.texi            |   75 +++++++++++++++++++++-
 mpn/arm/copyd.asm       |   33 ++++++---
 mpn/arm/copyi.asm       |   29 +++++--
 mpn/arm/tabselect.asm   |   94 +++++++++++++++++++++++++++
 mpn/generic/tabselect.c |    3 +-
 mpz/roinit_n.c          |    5 +-
 8 files changed, 317 insertions(+), 103 deletions(-)

diffs (truncated from 764 to 300 lines):

diff -r af4ce4cd36a9 -r 7ed9a2831799 ChangeLog
--- a/ChangeLog	Thu Feb 28 13:51:37 2013 +0100
+++ b/ChangeLog	Sun Mar 03 16:22:54 2013 +0100
@@ -1,3 +1,20 @@
+2013-03-03  Torbjorn Granlund  <tege at gmplib.org>
+
+	* mpn/arm/copyi.asm: Software pipeline.
+	* mpn/arm/copyd.asm: Likewise.
+
+	* mpn/arm/tabselect.asm: New file.
+
+	* config.guess: Rework tmp file handling to resemble configfsf.guess's.
+
+2013-03-03  Niels Möller  <nisse at lysator.liu.se>
+
+	* doc/gmp.texi (Integer Special Functions): Document
+	mpz_limbs_read, mpz_limbs_write, mpz_limbs_modify,
+	mpz_limbs_finish, mpz_roinit_n and MPZ_ROINIT_N.
+
+	* mpz/roinit_n.c (mpz_roinit_n): Normalize the input.
+
 2013-02-27  Niels Möller  <nisse at lysator.liu.se>
 
 	* tune/common.c (speed_measure): Increase repetition count if we
diff -r af4ce4cd36a9 -r 7ed9a2831799 config.guess
--- a/config.guess	Thu Feb 28 13:51:37 2013 +0100
+++ b/config.guess	Sun Mar 03 16:22:54 2013 +0100
@@ -3,8 +3,8 @@
 # GMP config.guess wrapper.
 
 
-# Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2008, 2011, 2012 Free
-# Software Foundation, Inc.
+# Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2008, 2011, 2012, 2013
+# Free Software Foundation, Inc.
 #
 # This file is part of the GNU MP Library.
 #
@@ -78,36 +78,46 @@
 # files, since lame C compilers generate these even when not asked.
 #
 
-dummy=dummy-$$
-trap 'rm -f $dummy.c $dummy.o $dummy.core $dummy ${dummy}1.s ${dummy}2.c ; exit 1' 1 2 15
+# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
+# compiler to aid in system detection is discouraged as it requires
+# temporary files to be created and, as you can see below, it is a
+# headache to deal with in a portable fashion.
 
-# Use $HOST_CC if defined. $CC may point to a cross-compiler
-if test x"$CC_FOR_BUILD" = x; then
-  if test x"$HOST_CC" != x; then
-    CC_FOR_BUILD="$HOST_CC"
-  else
-    if test x"$CC" != x; then
-      CC_FOR_BUILD="$CC"
-    else
-      echo 'dummy(){}' >$dummy.c
-      for c in cc gcc c89 c99; do
-	  ($c $dummy.c -c) >/dev/null 2>&1
-	  if test $? = 0; then
-	      CC_FOR_BUILD="$c"; break
-	  fi
-      done
-      rm -f $dummy.c $dummy.o
-      if test x"$CC_FOR_BUILD" = x; then
-	CC_FOR_BUILD=no_compiler_found
-      fi
-    fi
-  fi
-fi
+# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
+# use `HOST_CC' if defined, but it is deprecated.
+
+# Portable tmp directory creation inspired by the Autoconf team.
+
+set_cc_for_build='
+trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
+trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
+: ${TMPDIR=/tmp} ;
+ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
+ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
+ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
+dummy=$tmp/dummy ;
+tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy $dummy.core ${dummy}0.s ${dummy}1.s ${dummy}2.c" ;
+case $CC_FOR_BUILD,$HOST_CC,$CC in
+ ,,)    echo "int x;" > $dummy.c ;
+	for c in cc gcc c89 c99 ; do
+	  if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
+	     CC_FOR_BUILD="$c"; break ;
+	  fi ;
+	done ;
+	if test x"$CC_FOR_BUILD" = x ; then
+	  CC_FOR_BUILD=no_compiler_found ;
+	fi
+	;;
+ ,,*)   CC_FOR_BUILD=$CC ;;
+ ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
+esac ; set_cc_for_build= ;'
 
 
 case "$guess_full" in
 
 alpha-*-*)
+  eval $set_cc_for_build
   # configfsf.guess detects exact alpha cpu types for OSF and GNU/Linux, but
   # not for *BSD and other systems.  We try to get an exact type for any
   # plain "alpha" it leaves.
@@ -140,7 +150,7 @@
 EOF
   $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
   if test "$?" = 0 ; then
-    case `./$dummy` in
+    case `$dummy` in
     0-0)	exact_cpu=alpha      ;;
     1-0)	exact_cpu=alphaev5   ;;
     1-1)	exact_cpu=alphaev56  ;;
@@ -150,7 +160,6 @@
     2-1307)	exact_cpu=alphaev68  ;;
     esac
   fi
-  rm -f $dummy.s $dummy.o $dummy
   ;;
 
 arm*-*-*)
@@ -185,6 +194,7 @@
   ;;
 
 ia64*-*-*)
+  eval $set_cc_for_build
   # CPUID[3] bits 24 to 31 is the processor family.  itanium2 is documented
   # as 0x1f, plain itanium has been seen returning 0x07 on two systems, but
   # haven't found any documentation on it as such.
@@ -195,7 +205,7 @@
   # "unsigned long long" is always 64 bits, in fact on hpux in ilp32 mode
   # (which is the default there), it's the only 64-bit type.
   #
-  cat >${dummy}a.s <<EOF
+  cat >${dummy}1.s <<EOF
 	.text
 	.global	_getcpuid
 	.proc	_getcpuid
@@ -210,7 +220,7 @@
 	br.ret.sptk.many rp ;;
 	.endp	getcpuid
 EOF
-  cat >${dummy}b.c <<EOF
+  cat >${dummy}2.c <<EOF
 #include <stdio.h>
 unsigned long long getcpuid ();
 int
@@ -228,10 +238,9 @@
   return 0;
 }
 EOF
-  if $CC_FOR_BUILD ${dummy}a.s ${dummy}b.c -o $dummy >/dev/null 2>&1; then
-    exact_cpu=`./$dummy`
+  if $CC_FOR_BUILD ${dummy}1.s ${dummy}2.c -o $dummy >/dev/null 2>&1; then
+    exact_cpu=`$dummy`
   fi
-  rm -f ${dummy}a.s ${dummy}a.o ${dummy}b.c ${dummy}b.o $dummy $dummy.core core
   ;;
 
 mips-*-irix[6789]*)
@@ -240,6 +249,7 @@
   ;;
 
 m68k-*-*)
+  eval $set_cc_for_build
   # NetBSD (and presumably other *BSD) "sysctl hw.model" gives for example
   #   hw.model = Apple Macintosh Quadra 610  (68040)
   exact_cpu=`(sysctl hw.model) 2>/dev/null | sed -n 's/^.*\(680[012346]0\).*$/m\1/p'`
@@ -263,9 +273,10 @@
 	.byte	0x70, 0x00
 	.byte	0x4e, 0x75
 EOF
-    if ($CC_FOR_BUILD $dummy.s -o $dummy && ./$dummy) >/dev/null 2>&1; then
 
-      # $SHELL -c is used to execute ./$dummy below, since (./$dummy)
+    if ($CC_FOR_BUILD $dummy.s -o $dummy && $dummy) >/dev/null 2>&1; then
+
+      # $SHELL -c is used to execute $dummy below, since ($dummy)
       # 2>/dev/null still prints the SIGILL message on some shells.
       #
         # Try: movel #0,%d0
@@ -280,7 +291,7 @@
 	.byte	0x4e, 0x74, 0x00, 0x00
 EOF
         if $CC_FOR_BUILD $dummy.s -o $dummy >/dev/null 2>&1; then
-          $SHELL -c ./$dummy >/dev/null 2>&1
+          $SHELL -c $dummy >/dev/null 2>&1
 	  if test $? != 0; then
             exact_cpu=m68000    # because rtd didn't work
           fi
@@ -304,7 +315,7 @@
 	.byte	0x4e, 0x75
 EOF
         if $CC_FOR_BUILD $dummy.s -o $dummy >/dev/null 2>&1; then
-          $SHELL -c ./$dummy >/dev/null 2>&1
+          $SHELL -c $dummy >/dev/null 2>&1
 	  if test $? != 0; then
             exact_cpu=m68010    # because trapf didn't work
           fi
@@ -326,7 +337,7 @@
 	.byte	0x4e, 0x75
 EOF
         if $CC_FOR_BUILD $dummy.s -o $dummy >/dev/null 2>&1; then
-          $SHELL -c ./$dummy >/dev/null 2>&1
+          $SHELL -c $dummy >/dev/null 2>&1
 	  if test $? != 0; then
             exact_cpu=m68360  # cpu32, because bfffo didn't work
           fi
@@ -338,7 +349,6 @@
         exact_cpu=m68020
       fi
     fi
-    rm -f $dummy.s $dummy.o $dummy $dummy.core core
   fi
   if test -z "$exact_cpu"; then
     case "$guess_full" in
@@ -368,6 +378,7 @@
   # a function descriptor, not actual code.  But this doesn't matter since
   # AIX doesn't allow mfpvr anyway.
   #
+  eval $set_cc_for_build
   cat >$dummy.c <<\EOF
 #include <stdio.h>
 struct {
@@ -414,13 +425,12 @@
 EOF
   if ($CC_FOR_BUILD $dummy.c -o $dummy) >/dev/null 2>&1; then
     # This style construct is needed on AIX 4.3 to suppress the SIGILL error
-    # from (*fun)().  Using $SHELL -c ./$dummy 2>/dev/null doesn't work.
-    { x=`./$dummy`; } 2>/dev/null
+    # from (*fun)().  Using $SHELL -c $dummy 2>/dev/null doesn't work.
+    { x=`$dummy`; } 2>/dev/null
     if test -n "$x"; then
       exact_cpu=$x
     fi
   fi
-  rm -f $dummy.c $dummy.o $dummy $dummy.core
 
   # Grep the linux kernel /proc/cpuinfo pseudo-file.
   # Anything unrecognised is ignored, since of course we mustn't spit out
@@ -498,12 +508,11 @@
 }
 EOF
     if ($CC_FOR_BUILD $dummy.c -o $dummy) >/dev/null 2>&1; then
-      x=`./$dummy`
+      x=`$dummy`
       if test -n "$x"; then
         exact_cpu=$x
       fi
     fi
-    rm -f $dummy.c $dummy.o $dummy
   fi
 
   if test -z "$exact_cpu"; then
@@ -542,12 +551,11 @@
 }
 EOF
     if ($CC_FOR_BUILD $dummy.c -o $dummy) >/dev/null 2>&1; then
-      x=`./$dummy`
+      x=`$dummy`
       if test -n "$x"; then
         exact_cpu=$x
       fi
     fi
-    rm -f $dummy.c $dummy.o $dummy
   fi
   ;;
 
@@ -597,18 +605,17 @@
   #
   if test -z "$exact_cpu"; then
     for i in sysinfo /usr/kvm/sysinfo; do
-      if $SHELL -c $i 2>/dev/null >conftest.dat; then
-        if grep 'cpu0 is a "SuperSPARC' conftest.dat >/dev/null; then
+      if $SHELL -c $i 2>/dev/null >dummy; then
+        if grep 'cpu0 is a "SuperSPARC' dummy >/dev/null; then
           exact_cpu=supersparc
           break
-        elif grep 'cpu0 is a .*TMS390Z5.' conftest.dat >/dev/null; then
+        elif grep 'cpu0 is a .*TMS390Z5.' dummy >/dev/null; then
           # TMS390Z50 and TMS390Z55
           exact_cpu=supersparc
           break
         fi
       fi
     done
-    rm -f conftest.dat
   fi
 
   # Grep the output from prtconf on Solaris.
@@ -631,35 +638,34 @@
   #
   for prtconfopt in "" "-vp"; do
     if test -z "$exact_cpu"; then
-      if $SHELL -c "/usr/sbin/prtconf $prtconfopt" 2>/dev/null >conftest.dat; then


More information about the gmp-commit mailing list