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

mercurial at gmplib.org mercurial at gmplib.org
Sat Sep 14 20:41:44 UTC 2019


details:   /var/hg/gmp/rev/97bec4a21f84
changeset: 17901:97bec4a21f84
user:      Torbjorn Granlund <tg at gmplib.org>
date:      Sat Sep 14 22:40:56 2019 +0200
description:
(alpha:Linux:*:*): Make sed command resilient to missing /proc/cpuinfo.

details:   /var/hg/gmp/rev/ed0b64412be7
changeset: 17902:ed0b64412be7
user:      Torbjorn Granlund <tg at gmplib.org>
date:      Sat Sep 14 22:41:40 2019 +0200
description:
Trivial merge.

diffstat:

 ChangeLog           |   6 ++++++
 configfsf.guess     |   2 +-
 mpn/generic/hgcd2.c |  12 ++++++------
 tune/hgcd2-1.c      |   4 ++--
 tune/hgcd2-2.c      |   4 ++--
 tune/hgcd2-3.c      |   4 ++--
 tune/tuneup.c       |   2 +-
 7 files changed, 20 insertions(+), 14 deletions(-)

diffs (129 lines):

diff -r 9e34fdf78075 -r ed0b64412be7 ChangeLog
--- a/ChangeLog	Sat Sep 14 17:41:49 2019 +0200
+++ b/ChangeLog	Sat Sep 14 22:41:40 2019 +0200
@@ -1,3 +1,9 @@
+2019-09-14  Niels Möller  <nisse at lysator.liu.se>
+
+	* mpn/generic/hgcd2.c (HGCD2_DIV1_METHOD): Rename, and change
+	default to 3. Updated all usage.
+	(HGCD2_METHOD): ... the old name, deleted.
+
 2019-09-14  Torbjörn Granlund  <tg at gmplib.org>
 
 	* configure.ac: Remove obsolete path-triggered invocation of
diff -r 9e34fdf78075 -r ed0b64412be7 configfsf.guess
--- a/configfsf.guess	Sat Sep 14 17:41:49 2019 +0200
+++ b/configfsf.guess	Sat Sep 14 22:41:40 2019 +0200
@@ -918,7 +918,7 @@
 	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
 	exit ;;
     alpha:Linux:*:*)
-	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null` in
 	  EV5)   UNAME_MACHINE=alphaev5 ;;
 	  EV56)  UNAME_MACHINE=alphaev56 ;;
 	  PCA56) UNAME_MACHINE=alphapca56 ;;
diff -r 9e34fdf78075 -r ed0b64412be7 mpn/generic/hgcd2.c
--- a/mpn/generic/hgcd2.c	Sat Sep 14 17:41:49 2019 +0200
+++ b/mpn/generic/hgcd2.c	Sat Sep 14 22:41:40 2019 +0200
@@ -36,8 +36,8 @@
 #include "gmp-impl.h"
 #include "longlong.h"
 
-#ifndef HGCD2_METHOD
-#define HGCD2_METHOD 2
+#ifndef HGCD2_DIV1_METHOD
+#define HGCD2_DIV1_METHOD 3
 #endif
 
 #if GMP_NAIL_BITS != 0
@@ -49,7 +49,7 @@
 static inline mp_double_limb_t
 div1 (mp_limb_t n0, mp_limb_t d0);
 
-#if HGCD2_METHOD == 1
+#if HGCD2_DIV1_METHOD == 1
 
 static inline mp_double_limb_t
 div1 (mp_limb_t n0, mp_limb_t d0)
@@ -61,7 +61,7 @@
   return res;
 }
 
-#elif HGCD2_METHOD == 2
+#elif HGCD2_DIV1_METHOD == 2
 
 static mp_double_limb_t
 div1 (mp_limb_t n0, mp_limb_t d0)
@@ -97,7 +97,7 @@
   return res;
 }
 
-#elif HGCD2_METHOD == 3
+#elif HGCD2_DIV1_METHOD == 3
 
 static inline mp_double_limb_t
 div1 (mp_limb_t n0, mp_limb_t d0)
@@ -135,7 +135,7 @@
   return res;
 }
 #else
-#error Unknown HGCD2_METHOD
+#error Unknown HGCD2_DIV1_METHOD
 #endif
 
 /* Two-limb division optimized for small quotients.  */
diff -r 9e34fdf78075 -r ed0b64412be7 tune/hgcd2-1.c
--- a/tune/hgcd2-1.c	Sat Sep 14 17:41:49 2019 +0200
+++ b/tune/hgcd2-1.c	Sat Sep 14 22:41:40 2019 +0200
@@ -30,8 +30,8 @@
 
 #include "gmp-impl.h"
 
-#undef HGCD2_METHOD
-#define HGCD2_METHOD 1
+#undef HGCD2_DIV1_METHOD
+#define HGCD2_DIV1_METHOD 1
 #define __gmpn_hgcd2 mpn_hgcd2_1
 /* Not used, but renamed to not get duplicate definitions */
 #define __gmpn_hgcd_mul_matrix1_vector mpn_hgcd_mul_matrix1_vector_1
diff -r 9e34fdf78075 -r ed0b64412be7 tune/hgcd2-2.c
--- a/tune/hgcd2-2.c	Sat Sep 14 17:41:49 2019 +0200
+++ b/tune/hgcd2-2.c	Sat Sep 14 22:41:40 2019 +0200
@@ -30,8 +30,8 @@
 
 #include "gmp-impl.h"
 
-#undef HGCD2_METHOD
-#define HGCD2_METHOD 2
+#undef HGCD2_DIV1_METHOD
+#define HGCD2_DIV1_METHOD 2
 #define __gmpn_hgcd2 mpn_hgcd2_2
 /* Not used, but renamed to not get duplicate definitions */
 #define __gmpn_hgcd_mul_matrix1_vector mpn_hgcd_mul_matrix1_vector_2
diff -r 9e34fdf78075 -r ed0b64412be7 tune/hgcd2-3.c
--- a/tune/hgcd2-3.c	Sat Sep 14 17:41:49 2019 +0200
+++ b/tune/hgcd2-3.c	Sat Sep 14 22:41:40 2019 +0200
@@ -30,8 +30,8 @@
 
 #include "gmp-impl.h"
 
-#undef HGCD2_METHOD
-#define HGCD2_METHOD 3
+#undef HGCD2_DIV1_METHOD
+#define HGCD2_DIV1_METHOD 3
 #define __gmpn_hgcd2 mpn_hgcd2_3
 /* Not used, but renamed to not get duplicate definitions */
 #define __gmpn_hgcd_mul_matrix1_vector mpn_hgcd_mul_matrix1_vector_3
diff -r 9e34fdf78075 -r ed0b64412be7 tune/tuneup.c
--- a/tune/tuneup.c	Sat Sep 14 17:41:49 2019 +0200
+++ b/tune/tuneup.c	Sat Sep 14 22:41:40 2019 +0200
@@ -1961,7 +1961,7 @@
     };
 
   s.size = 1;
-  one_method (3, f, "mpn_hgcd2", "HGCD2_METHOD", &param);
+  one_method (3, f, "mpn_hgcd2", "HGCD2_DIV1_METHOD", &param);
 }
 
 void


More information about the gmp-commit mailing list