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

mercurial at gmplib.org mercurial at gmplib.org
Wed Dec 5 11:11:47 CET 2012


details:   /var/hg/gmp/rev/7423a006c8ce
changeset: 15156:7423a006c8ce
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Wed Dec 05 11:05:21 2012 +0100
description:
Refine cpp test for vax.

details:   /var/hg/gmp/rev/c52440b68a97
changeset: 15157:c52440b68a97
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Wed Dec 05 11:11:33 2012 +0100
description:
(TESTS_REPS): Handle float GMP_CHECK_REPFACTOR.

diffstat:

 ChangeLog           |  12 ++++++++++++
 longlong.h          |   4 ++--
 tests/mpf/t-get_d.c |   2 +-
 tests/mpn/t-get_d.c |   4 ++--
 tests/mpq/t-get_d.c |   2 +-
 tests/mpz/t-cmp_d.c |   2 +-
 tests/mpz/t-get_d.c |   2 +-
 tests/tests.h       |   4 ++--
 8 files changed, 22 insertions(+), 10 deletions(-)

diffs (130 lines):

diff -r b505f9b2f0d2 -r c52440b68a97 ChangeLog
--- a/ChangeLog	Fri Nov 30 11:38:58 2012 +0100
+++ b/ChangeLog	Wed Dec 05 11:11:33 2012 +0100
@@ -1,3 +1,15 @@
+2012-12-05  Torbjorn Granlund  <tege at gmplib.org>
+
+	* tests/tests.h (TESTS_REPS): Handle float GMP_CHECK_REPFACTOR.
+
+	* longlong.h: Refine cpp test for vax.
+	* tests/mpn/t-get_d.c: Likewise.
+	* tests/mpz/t-get_d.c: Likewise.
+	* tests/mpz/t-cmp_d.c: Likewise.
+	* tests/mpz/t-get_d.c: Likewise.
+	* tests/mpq/t-get_d.c: Likewise.
+	* tests/mpf/t-get_d.c: Likewise.
+
 2012-11-30  Torbjorn Granlund  <tege at gmplib.org>
 
 	* gen-fac.c (gen_consts): Correct printf types.
diff -r b505f9b2f0d2 -r c52440b68a97 longlong.h
--- a/longlong.h	Fri Nov 30 11:38:58 2012 +0100
+++ b/longlong.h	Wed Dec 05 11:11:33 2012 +0100
@@ -1766,7 +1766,7 @@
 	   __CLOBBER_CC)
 #endif
 
-#if defined (__vax__) && W_TYPE_SIZE == 32
+#if (defined (__vax) || defined (__vax__)) && W_TYPE_SIZE == 32
 #define add_ssaaaa(sh, sl, ah, al, bh, bl) \
   __asm__ ("addl2 %5,%1\n\tadwc %3,%0"					\
 	   : "=g" (sh), "=&g" (sl)					\
@@ -1806,7 +1806,7 @@
 	     : "g" ((USItype) (x)));					\
   } while (0)
 #endif
-#endif /* __vax__ */
+#endif /* vax */
 
 #if defined (__z8000__) && W_TYPE_SIZE == 16
 #define add_ssaaaa(sh, sl, ah, al, bh, bl) \
diff -r b505f9b2f0d2 -r c52440b68a97 tests/mpf/t-get_d.c
--- a/tests/mpf/t-get_d.c	Fri Nov 30 11:38:58 2012 +0100
+++ b/tests/mpf/t-get_d.c	Wed Dec 05 11:11:33 2012 +0100
@@ -22,7 +22,7 @@
 #include "gmp.h"
 #include "tests.h"
 
-#if defined (__vax__)
+#if defined (__vax) || defined (__vax__)
 #define LOW_BOUND 1e-38
 #define HIGH_BOUND 8e37
 #endif
diff -r b505f9b2f0d2 -r c52440b68a97 tests/mpn/t-get_d.c
--- a/tests/mpn/t-get_d.c	Fri Nov 30 11:38:58 2012 +0100
+++ b/tests/mpn/t-get_d.c	Wed Dec 05 11:11:33 2012 +0100
@@ -71,7 +71,7 @@
   };
 
   /* FIXME: It'd be better to base this on the float format. */
-#ifdef __vax__
+#if defined (__vax) || defined (__vax__)
   int     limit = 127;  /* vax fp numbers have limited range */
 #else
   int     limit = 511;
@@ -495,7 +495,7 @@
   check_ieee_denorm ();
   check_ieee_overflow ();
   check_0x81c25113 ();
-#if ! __vax__
+#if ! (defined (__vax) || defined (__vax__))
   check_rand ();
 #endif
 
diff -r b505f9b2f0d2 -r c52440b68a97 tests/mpq/t-get_d.c
--- a/tests/mpq/t-get_d.c	Fri Nov 30 11:38:58 2012 +0100
+++ b/tests/mpq/t-get_d.c	Wed Dec 05 11:11:33 2012 +0100
@@ -31,7 +31,7 @@
 
 /* VAX D floats only have an 8 bit signed exponent, so anything 2^128 or
    bigger will overflow, that being 4 limbs. */
-#if defined (__vax__) && SIZE > 4
+#if defined (__vax) || defined (__vax__) && SIZE > 4
 #undef SIZE
 #define SIZE 4
 #define EPSIZE 3
diff -r b505f9b2f0d2 -r c52440b68a97 tests/mpz/t-cmp_d.c
--- a/tests/mpz/t-cmp_d.c	Fri Nov 30 11:38:58 2012 +0100
+++ b/tests/mpz/t-cmp_d.c	Wed Dec 05 11:11:33 2012 +0100
@@ -164,7 +164,7 @@
   mpz_init (x);
 
   /* FIXME: It'd be better to base this on the float format. */
-#ifdef __vax
+#if defined (__vax) || defined (__vax__)
 #define LIM 127			/* vax fp numbers have limited range */
 #else
 #define LIM 512
diff -r b505f9b2f0d2 -r c52440b68a97 tests/mpz/t-get_d.c
--- a/tests/mpz/t-get_d.c	Fri Nov 30 11:38:58 2012 +0100
+++ b/tests/mpz/t-get_d.c	Wed Dec 05 11:11:33 2012 +0100
@@ -31,7 +31,7 @@
   mpz_t   z;
   double  got, want;
   /* FIXME: It'd be better to base this on the float format. */
-#ifdef __vax
+#if defined (__vax) || defined (__vax__)
   int     limit = 127;  /* vax fp numbers have limited range */
 #else
   int     limit = 512;
diff -r b505f9b2f0d2 -r c52440b68a97 tests/tests.h
--- a/tests/tests.h	Fri Nov 30 11:38:58 2012 +0100
+++ b/tests/tests.h	Wed Dec 05 11:11:33 2012 +0100
@@ -407,7 +407,7 @@
 #define TESTS_REPS(count, argv, argc)					\
   do {									\
   char *envval, *end;							\
-  long repfactor;							\
+  double repfactor;							\
   int reps_nondefault = 0;						\
   if (argc > 1)								\
     {									\
@@ -424,7 +424,7 @@
   envval = getenv ("GMP_CHECK_REPFACTOR");				\
   if (envval != NULL)							\
     {									\
-      repfactor = strtol (envval, &end, 0);				\
+      repfactor = strtod (envval, &end, 0);				\
       if (*end || repfactor <= 0)					\
 	{								\
 	  fprintf (stderr, "Invalid repfactor: %ld.\n", repfactor);	\


More information about the gmp-commit mailing list