summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authortege <tege@gmplib.org>2001-12-25 03:44:34 +0100
committertege <tege@gmplib.org>2001-12-25 03:44:34 +0100
commitbdba4dcbfd2fa8cd73ce96c8e806217f7b4176e3 (patch)
treed02737bc4d0251d738ff18d768da2bffceeb46ff /tests
parentc2ebf186e639660cf8b38ff6c35d4859f91572ef (diff)
downloadgmp-bdba4dcbfd2fa8cd73ce96c8e806217f7b4176e3.tar.gz
Remove CLOCK settings.
Add FIXED_XLIMB.
Diffstat (limited to 'tests')
-rw-r--r--tests/devel/addmul_1.c22
-rw-r--r--tests/devel/mul_1.c24
-rw-r--r--tests/devel/submul_1.c24
3 files changed, 9 insertions, 61 deletions
diff --git a/tests/devel/addmul_1.c b/tests/devel/addmul_1.c
index b39bb6f5e..893af7232 100644
--- a/tests/devel/addmul_1.c
+++ b/tests/devel/addmul_1.c
@@ -52,28 +52,8 @@ cputime ()
#define M * 1000000
#ifndef CLOCK
-#if defined (__m88k__)
-#define CLOCK 20 M
-#elif defined (__i386__)
-#define CLOCK (16666667)
-#elif defined (__m68k__)
-#define CLOCK (20 M)
-#elif defined (_IBMR2)
-#define CLOCK (25 M)
-#elif defined (__sparc__)
-#define CLOCK (20 M)
-#elif defined (__sun__)
-#define CLOCK (20 M)
-#elif defined (__mips)
-#define CLOCK (40 M)
-#elif defined (__hppa__)
-#define CLOCK (50 M)
-#elif defined (__alpha)
-#define CLOCK (133 M)
-#else
#error "Don't know CLOCK of your machine"
#endif
-#endif
#ifndef OPS
#define OPS (CLOCK/5)
@@ -166,7 +146,7 @@ main (argc, argv)
dy[0] = 0x87654321;
#ifdef FIXED_XLIMB
- xlimb = ~((~(mp_limb_t)0) / 3);
+ xlimb = FIXED_XLIMB;
#else
mpn_random2 (&xlimb, 1);
#endif
diff --git a/tests/devel/mul_1.c b/tests/devel/mul_1.c
index 030a630a8..8caa971bb 100644
--- a/tests/devel/mul_1.c
+++ b/tests/devel/mul_1.c
@@ -52,28 +52,8 @@ cputime ()
#define M * 1000000
#ifndef CLOCK
-#if defined (__m88k__)
-#define CLOCK 20 M
-#elif defined (__i386__)
-#define CLOCK (16666667)
-#elif defined (__m68k__)
-#define CLOCK (20 M)
-#elif defined (_IBMR2)
-#define CLOCK (25 M)
-#elif defined (__sparc__)
-#define CLOCK (20 M)
-#elif defined (__sun__)
-#define CLOCK (20 M)
-#elif defined (__mips)
-#define CLOCK (40 M)
-#elif defined (__hppa__)
-#define CLOCK (50 M)
-#elif defined (__alpha)
-#define CLOCK (133 M)
-#else
#error "Don't know CLOCK of your machine"
#endif
-#endif
#ifndef OPS
#define OPS (CLOCK/5)
@@ -161,7 +141,11 @@ main (argc, argv)
dy[size+1] = 0x12345678;
dy[0] = 0x87654321;
+#ifdef FIXED_XLIMB
+ xlimb = FIXED_XLIMB;
+#else
mpn_random2 (&xlimb, 1);
+#endif
#if TIMES != 1
mpn_random (s1, size);
diff --git a/tests/devel/submul_1.c b/tests/devel/submul_1.c
index d97d61f4f..87ec32556 100644
--- a/tests/devel/submul_1.c
+++ b/tests/devel/submul_1.c
@@ -52,28 +52,8 @@ cputime ()
#define M * 1000000
#ifndef CLOCK
-#if defined (__m88k__)
-#define CLOCK 20 M
-#elif defined (__i386__)
-#define CLOCK (16666667)
-#elif defined (__m68k__)
-#define CLOCK (20 M)
-#elif defined (_IBMR2)
-#define CLOCK (25 M)
-#elif defined (__sparc__)
-#define CLOCK (20 M)
-#elif defined (__sun__)
-#define CLOCK (20 M)
-#elif defined (__mips)
-#define CLOCK (40 M)
-#elif defined (__hppa__)
-#define CLOCK (50 M)
-#elif defined (__alpha)
-#define CLOCK (133 M)
-#else
#error "Don't know CLOCK of your machine"
#endif
-#endif
#ifndef OPS
#define OPS (CLOCK/5)
@@ -165,7 +145,11 @@ main (argc, argv)
dy[size+1] = 0x12345678;
dy[0] = 0x87654321;
+#ifdef FIXED_XLIMB
+ xlimb = FIXED_XLIMB;
+#else
mpn_random2 (&xlimb, 1);
+#endif
#if TIMES != 1
mpn_random (s1, size);