summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortege <tege@gmplib.org>2002-05-07 00:44:57 +0200
committertege <tege@gmplib.org>2002-05-07 00:44:57 +0200
commit22e0fa4ddb1eea76c13ce8a71100d44d1ad30ec6 (patch)
tree0742fc212f7667204819c0748fd7706112c087cc
parentd72ab290f81d0af3b9e9fe8112bbdcb60a50e0fa (diff)
downloadgmp-22e0fa4ddb1eea76c13ce8a71100d44d1ad30ec6.tar.gz
Rename MP_LIMB_T_HIGHBIT => GMP_LIMB_HIGHBIT
-rw-r--r--gmp-impl.h2
-rw-r--r--mpfr/add1.c14
-rw-r--r--mpfr/add_one_ulp.c2
-rw-r--r--mpfr/div.c4
-rw-r--r--mpfr/exceptions.c2
-rw-r--r--mpfr/mul.c2
-rw-r--r--mpfr/mul_ui.c4
-rw-r--r--mpfr/print_raw.c2
-rw-r--r--mpfr/rint.c8
-rw-r--r--mpfr/round_prec.c2
-rw-r--r--mpfr/set.c2
-rw-r--r--mpfr/set_si.c2
-rw-r--r--mpfr/set_ui.c2
-rw-r--r--mpfr/set_z.c4
-rw-r--r--mpfr/sqrt.c4
-rw-r--r--mpfr/sub1.c6
-rw-r--r--mpn/generic/divrem_1.c2
-rw-r--r--mpn/generic/mod_1.c2
-rw-r--r--mpn/generic/pow_1.c4
-rw-r--r--mpn/generic/pre_mod_1.c2
-rw-r--r--mpq/set_f.c2
-rw-r--r--tests/refmpn.c6
-rw-r--r--tests/t-constants.c2
-rw-r--r--tune/common.c2
-rw-r--r--tune/modlinv.c6
-rw-r--r--tune/speed.h10
-rw-r--r--tune/tuneup.c2
27 files changed, 51 insertions, 51 deletions
diff --git a/gmp-impl.h b/gmp-impl.h
index 8bb53a75f..963c71a53 100644
--- a/gmp-impl.h
+++ b/gmp-impl.h
@@ -367,7 +367,7 @@ void __gmp_tmp_debug_free _PROTO ((const char *, int, int,
#define ULONG_HIGHBIT (ULONG_MAX ^ ((unsigned long) ULONG_MAX >> 1))
#define UINT_HIGHBIT (UINT_MAX ^ ((unsigned) UINT_MAX >> 1))
#define USHRT_HIGHBIT ((unsigned short) (USHRT_MAX ^ ((unsigned short) USHRT_MAX >> 1)))
-#define MP_LIMB_T_HIGHBIT (MP_LIMB_T_MAX ^ (MP_LIMB_T_MAX >> 1))
+#define GMP_LIMB_HIGHBIT (MP_LIMB_T_MAX ^ (MP_LIMB_T_MAX >> 1))
#ifndef LONG_MIN
#define LONG_MIN ((long) ULONG_HIGHBIT)
diff --git a/mpfr/add1.c b/mpfr/add1.c
index 31c77fe1d..1118d663f 100644
--- a/mpfr/add1.c
+++ b/mpfr/add1.c
@@ -180,7 +180,7 @@ mpfr_add1 (mpfr_ptr a, mpfr_srcptr b, mpfr_srcptr c,
fb = 1;
}
mpn_rshift(ap, ap, an, 1);
- ap[an-1] += MP_LIMB_T_HIGHBIT;
+ ap[an-1] += GMP_LIMB_HIGHBIT;
if (sh && fb < 0)
goto rounding;
} /* cc */
@@ -247,7 +247,7 @@ mpfr_add1 (mpfr_ptr a, mpfr_srcptr b, mpfr_srcptr c,
if (rb < 0) /* rb not initialized yet */
{
rb = bb >> (BITS_PER_MP_LIMB - 1);
- bb |= MP_LIMB_T_HIGHBIT;
+ bb |= GMP_LIMB_HIGHBIT;
}
fb = 1;
if (bb != MP_LIMB_T_MAX)
@@ -308,7 +308,7 @@ mpfr_add1 (mpfr_ptr a, mpfr_srcptr b, mpfr_srcptr c,
goto end_of_add;
}
MPFR_EXP(a)++;
- ap[an-1] = MP_LIMB_T_HIGHBIT;
+ ap[an-1] = GMP_LIMB_HIGHBIT;
rb = 0;
}
@@ -362,7 +362,7 @@ mpfr_add1 (mpfr_ptr a, mpfr_srcptr b, mpfr_srcptr c,
goto end_of_add;
}
MPFR_EXP(a)++;
- ap[an-1] = MP_LIMB_T_HIGHBIT;
+ ap[an-1] = GMP_LIMB_HIGHBIT;
}
} /* bb < cc */
@@ -405,7 +405,7 @@ mpfr_add1 (mpfr_ptr a, mpfr_srcptr b, mpfr_srcptr c,
if (rb < 0) /* rb not initialized yet */
{
rb = bb >> (BITS_PER_MP_LIMB - 1);
- bb &= ~MP_LIMB_T_HIGHBIT;
+ bb &= ~GMP_LIMB_HIGHBIT;
}
fb = bb != 0;
} /* fb < 0 */
@@ -459,7 +459,7 @@ mpfr_add1 (mpfr_ptr a, mpfr_srcptr b, mpfr_srcptr c,
if (rb < 0)
{
rb = cc >> (BITS_PER_MP_LIMB - 1);
- cc &= ~MP_LIMB_T_HIGHBIT;
+ cc &= ~GMP_LIMB_HIGHBIT;
}
while (cc == 0)
{
@@ -538,7 +538,7 @@ mpfr_add1 (mpfr_ptr a, mpfr_srcptr b, mpfr_srcptr c,
else
{
MPFR_EXP(a)++;
- ap[an-1] = MP_LIMB_T_HIGHBIT;
+ ap[an-1] = GMP_LIMB_HIGHBIT;
}
}
diff --git a/mpfr/add_one_ulp.c b/mpfr/add_one_ulp.c
index 8baadaf8f..c4c5c2754 100644
--- a/mpfr/add_one_ulp.c
+++ b/mpfr/add_one_ulp.c
@@ -49,7 +49,7 @@ mpfr_add_one_ulp (mpfr_ptr x, mp_rnd_t rnd_mode)
else
{
MPFR_EXP(x)++;
- xp[xn-1] = MP_LIMB_T_HIGHBIT;
+ xp[xn-1] = GMP_LIMB_HIGHBIT;
}
}
return 0;
diff --git a/mpfr/div.c b/mpfr/div.c
index bf9826f2e..9ece931a6 100644
--- a/mpfr/div.c
+++ b/mpfr/div.c
@@ -337,7 +337,7 @@ mpfr_div (mpfr_ptr q, mpfr_srcptr u, mpfr_srcptr v, mp_rnd_t rnd_mode)
/* Hack : qp[qsize] is 0, 1 or 2, hence if not 0, = 2^(qp[qsize] - 1). */
{
near = mpn_rshift(qp, qp, qsize, qp[qsize]);
- qp[qsize - 1] |= MP_LIMB_T_HIGHBIT; qexp += qp[qsize];
+ qp[qsize - 1] |= GMP_LIMB_HIGHBIT; qexp += qp[qsize];
}
else
{
@@ -430,7 +430,7 @@ mpfr_div (mpfr_ptr q, mpfr_srcptr u, mpfr_srcptr v, mp_rnd_t rnd_mode)
if (cc)
{
mpn_rshift (qp, qp, qsize, 1);
- qp[qsize-1] |= MP_LIMB_T_HIGHBIT;
+ qp[qsize-1] |= GMP_LIMB_HIGHBIT;
qexp++;
}
}
diff --git a/mpfr/exceptions.c b/mpfr/exceptions.c
index a8519992f..63adb5a7c 100644
--- a/mpfr/exceptions.c
+++ b/mpfr/exceptions.c
@@ -182,7 +182,7 @@ mpfr_set_underflow (mpfr_ptr x, mp_rnd_t rnd_mode, int sign)
MPFR_EXP(x) = __mpfr_emin;
xn = (MPFR_PREC(x)-1)/BITS_PER_MP_LIMB;
xp = MPFR_MANT(x);
- xp[xn] = MP_LIMB_T_HIGHBIT;
+ xp[xn] = GMP_LIMB_HIGHBIT;
MPN_ZERO(xp, xn);
inex = 1;
}
diff --git a/mpfr/mul.c b/mpfr/mul.c
index 0a81e36ca..6b9ceb04a 100644
--- a/mpfr/mul.c
+++ b/mpfr/mul.c
@@ -160,7 +160,7 @@ mpfr_mul (mpfr_ptr a, mpfr_srcptr b, mpfr_srcptr c, mp_rnd_t rnd_mode)
cc = mpfr_round_raw (ap, tmp, bq + cq, sign_product < 0, aq,
rnd_mode, &inexact);
if (cc) /* cc = 1 ==> result is a power of two */
- ap[an-1] = MP_LIMB_T_HIGHBIT;
+ ap[an-1] = GMP_LIMB_HIGHBIT;
TMP_FREE(marker);
diff --git a/mpfr/mul_ui.c b/mpfr/mul_ui.c
index 2527ae215..f655071a5 100644
--- a/mpfr/mul_ui.c
+++ b/mpfr/mul_ui.c
@@ -85,7 +85,7 @@ mpfr_mul_ui (mpfr_ptr y, mpfr_srcptr x, unsigned long int u, mp_rnd_t rnd_mode)
/* since the case u=1 was treated above, we have u >= 2, thus
yp[xn] >= 1 since x was msb-normalized */
MPFR_ASSERTN(yp[xn] != 0);
- if ((yp[xn] & MP_LIMB_T_HIGHBIT) == 0)
+ if ((yp[xn] & GMP_LIMB_HIGHBIT) == 0)
{
count_leading_zeros(cnt, yp[xn]);
mpn_lshift (yp, yp, xn + 1, cnt);
@@ -105,7 +105,7 @@ mpfr_mul_ui (mpfr_ptr y, mpfr_srcptr x, unsigned long int u, mp_rnd_t rnd_mode)
if (c) /* rounded result is 1.0000000000000000... */
{
- old_yp[yn-1] = MP_LIMB_T_HIGHBIT;
+ old_yp[yn-1] = GMP_LIMB_HIGHBIT;
cnt++;
}
diff --git a/mpfr/print_raw.c b/mpfr/print_raw.c
index d5af87013..0fece2f70 100644
--- a/mpfr/print_raw.c
+++ b/mpfr/print_raw.c
@@ -44,7 +44,7 @@ mpfr_get_str_raw (char *digit_ptr, mpfr_srcptr x)
for (k = sx - 1; k >= 0 ; k--)
{
wd = mx[k];
- t = MP_LIMB_T_HIGHBIT;
+ t = GMP_LIMB_HIGHBIT;
for (l = BITS_PER_MP_LIMB - 1; l>=0; l--)
{
if (wd & t)
diff --git a/mpfr/rint.c b/mpfr/rint.c
index 9475b67b0..f549ea40b 100644
--- a/mpfr/rint.c
+++ b/mpfr/rint.c
@@ -68,7 +68,7 @@ mpfr_rint (mpfr_ptr r, mpfr_srcptr u, mp_rnd_t rnd_mode)
rp = MPFR_MANT(r);
rm = (MPFR_PREC(r) - 1) / BITS_PER_MP_LIMB;
- rp[rm] = MP_LIMB_T_HIGHBIT;
+ rp[rm] = GMP_LIMB_HIGHBIT;
MPN_ZERO(rp, rm);
MPFR_EXP(r) = 1; /* |r| = 1 */
MPFR_RET(sign > 0 ? 2 : -2);
@@ -134,7 +134,7 @@ mpfr_rint (mpfr_ptr r, mpfr_srcptr u, mp_rnd_t rnd_mode)
is 0, change the rounding mode to GMP_RNDZ. */
if (rnd_mode == GMP_RNDN &&
((sh != 0 && (rp[0] & (MP_LIMB_T_ONE << (sh - 1))) == 0) ||
- (sh == 0 && (up[un - rn - 1] & MP_LIMB_T_HIGHBIT) == 0)))
+ (sh == 0 && (up[un - rn - 1] & GMP_LIMB_HIGHBIT) == 0)))
rnd_mode = GMP_RNDZ;
if (uflags == 0)
{ /* u is an integer; determine if it is representable */
@@ -193,7 +193,7 @@ mpfr_rint (mpfr_ptr r, mpfr_srcptr u, mp_rnd_t rnd_mode)
((ush != 0 &&
(up[uj] & (MP_LIMB_T_ONE << (ush - 1))) == 0) ||
(ush == 0 &&
- (uj == 0 || (up[uj - 1] & MP_LIMB_T_HIGHBIT) == 0))))
+ (uj == 0 || (up[uj - 1] & GMP_LIMB_HIGHBIT) == 0))))
rnd_mode = GMP_RNDZ; /* rounding bit is 0 */
}
if (sh != 0)
@@ -218,7 +218,7 @@ mpfr_rint (mpfr_ptr r, mpfr_srcptr u, mp_rnd_t rnd_mode)
else
{
MPFR_EXP(r)++;
- rp[rn-1] = MP_LIMB_T_HIGHBIT;
+ rp[rn-1] = GMP_LIMB_HIGHBIT;
}
}
diff --git a/mpfr/round_prec.c b/mpfr/round_prec.c
index 95c4889a2..2ecf972d5 100644
--- a/mpfr/round_prec.c
+++ b/mpfr/round_prec.c
@@ -198,7 +198,7 @@ mpfr_round_prec (mpfr_ptr x, mp_rnd_t rnd_mode, mp_prec_t prec)
else
{
MPFR_EXP(x)++;
- xp[nw - 1] = MP_LIMB_T_HIGHBIT;
+ xp[nw - 1] = GMP_LIMB_HIGHBIT;
if (nw - 1 > 0)
MPN_ZERO(xp, nw - 1);
}
diff --git a/mpfr/set.c b/mpfr/set.c
index 4c23da284..ca5822367 100644
--- a/mpfr/set.c
+++ b/mpfr/set.c
@@ -66,7 +66,7 @@ mpfr_set4 (mpfr_ptr a, mpfr_srcptr b, mp_rnd_t rnd_mode, int signb)
return mpfr_set_overflow(a, rnd_mode, signb);
MPFR_EXP(a)++;
- ap[(MPFR_PREC(a)-1)/BITS_PER_MP_LIMB] = MP_LIMB_T_HIGHBIT;
+ ap[(MPFR_PREC(a)-1)/BITS_PER_MP_LIMB] = GMP_LIMB_HIGHBIT;
}
}
diff --git a/mpfr/set_si.c b/mpfr/set_si.c
index e0786d549..965830c56 100644
--- a/mpfr/set_si.c
+++ b/mpfr/set_si.c
@@ -73,7 +73,7 @@ mpfr_set_si (mpfr_ptr x, long i, mp_rnd_t rnd_mode)
return mpfr_set_overflow(x, rnd_mode, (i < 0 ? -1 : 1));
MPFR_EXP(x)++;
- xp[xn] = MP_LIMB_T_HIGHBIT;
+ xp[xn] = GMP_LIMB_HIGHBIT;
}
}
diff --git a/mpfr/set_ui.c b/mpfr/set_ui.c
index 1f225425c..9aead7e65 100644
--- a/mpfr/set_ui.c
+++ b/mpfr/set_ui.c
@@ -66,7 +66,7 @@ mpfr_set_ui (mpfr_ptr x, unsigned long i, mp_rnd_t rnd_mode)
return mpfr_set_overflow(x, rnd_mode, 1);
MPFR_EXP(x)++;
- xp[xn] = MP_LIMB_T_HIGHBIT;
+ xp[xn] = GMP_LIMB_HIGHBIT;
}
}
}
diff --git a/mpfr/set_z.c b/mpfr/set_z.c
index b23275db0..fff0c6818 100644
--- a/mpfr/set_z.c
+++ b/mpfr/set_z.c
@@ -107,7 +107,7 @@ mpfr_set_z (mpfr_ptr f, mpz_srcptr z, mp_rnd_t rnd_mode)
MPFR_ASSERTN(cc == 0);
if (dif > 0)
cc = zp[--dif] << k;
- if ((cc & MP_LIMB_T_HIGHBIT) == 0)
+ if ((cc & GMP_LIMB_HIGHBIT) == 0)
rnd_mode = GMP_RNDZ; /* rounding bit is 0 */
else
cc <<= 1;
@@ -143,7 +143,7 @@ mpfr_set_z (mpfr_ptr f, mpz_srcptr z, mp_rnd_t rnd_mode)
else
{
exp++;
- fp[fn-1] = MP_LIMB_T_HIGHBIT;
+ fp[fn-1] = GMP_LIMB_HIGHBIT;
}
}
inex = sign_z;
diff --git a/mpfr/sqrt.c b/mpfr/sqrt.c
index b1b4c44da..1f6baf0f7 100644
--- a/mpfr/sqrt.c
+++ b/mpfr/sqrt.c
@@ -117,7 +117,7 @@ mpfr_sqrt (mpfr_ptr r, mpfr_srcptr u, mp_rnd_t rnd_mode)
{
up = TMP_ALLOC((usize + 1) * BYTES_PER_MP_LIMB);
if (mpn_rshift(up + 1, MPFR_MANT(u), usize, 1))
- up[0] = MP_LIMB_T_HIGHBIT;
+ up[0] = GMP_LIMB_HIGHBIT;
else
up[0] = 0;
usize++;
@@ -263,7 +263,7 @@ mpfr_sqrt (mpfr_ptr r, mpfr_srcptr u, mp_rnd_t rnd_mode)
{
/* Is a shift necessary here? Isn't the result 1.0000...? */
mpn_rshift (rp, rp, rrsize, 1);
- rp[rrsize-1] |= MP_LIMB_T_HIGHBIT;
+ rp[rrsize-1] |= GMP_LIMB_HIGHBIT;
MPFR_EXP(r)++;
}
diff --git a/mpfr/sub1.c b/mpfr/sub1.c
index eb3ae9e21..0385a4f78 100644
--- a/mpfr/sub1.c
+++ b/mpfr/sub1.c
@@ -268,7 +268,7 @@ mpfr_sub1 (mpfr_ptr a, mpfr_srcptr b, mpfr_srcptr c, mp_rnd_t rnd_mode,
if ((rnd_mode == GMP_RNDN) && !k && sh == 0)
{
- mp_limb_t half = MP_LIMB_T_HIGHBIT;
+ mp_limb_t half = GMP_LIMB_HIGHBIT;
is_exact = (bb == cc);
@@ -371,7 +371,7 @@ mpfr_sub1 (mpfr_ptr a, mpfr_srcptr b, mpfr_srcptr c, mp_rnd_t rnd_mode,
add_one_ulp: /* add one unit in last place to a */
if (mpn_add_1 (ap, ap, an, MP_LIMB_T_ONE << sh)) /* result is a power of 2 */
{
- ap[an-1] = MP_LIMB_T_HIGHBIT;
+ ap[an-1] = GMP_LIMB_HIGHBIT;
add_exp = 1;
}
inexact = 1; /* result larger than exact value */
@@ -379,7 +379,7 @@ mpfr_sub1 (mpfr_ptr a, mpfr_srcptr b, mpfr_srcptr c, mp_rnd_t rnd_mode,
truncate:
if ((ap[an-1] >> (BITS_PER_MP_LIMB - 1)) == 0) /* case 1 - epsilon */
{
- ap[an-1] = MP_LIMB_T_HIGHBIT;
+ ap[an-1] = GMP_LIMB_HIGHBIT;
add_exp = 1;
}
diff --git a/mpn/generic/divrem_1.c b/mpn/generic/divrem_1.c
index 1b98fb041..13dd1e30f 100644
--- a/mpn/generic/divrem_1.c
+++ b/mpn/generic/divrem_1.c
@@ -100,7 +100,7 @@ mpn_divrem_1 (mp_ptr qp, mp_size_t qxn,
qp += (n - 1); /* Make qp point at most significant quotient limb */
- if ((d & MP_LIMB_T_HIGHBIT) != 0)
+ if ((d & GMP_LIMB_HIGHBIT) != 0)
{
if (un != 0)
{
diff --git a/mpn/generic/mod_1.c b/mpn/generic/mod_1.c
index 17596cdd1..8ba20467b 100644
--- a/mpn/generic/mod_1.c
+++ b/mpn/generic/mod_1.c
@@ -71,7 +71,7 @@ mpn_mod_1 (mp_srcptr up, mp_size_t un, mp_limb_t d)
d <<= GMP_NAIL_BITS;
- if ((d & MP_LIMB_T_HIGHBIT) != 0)
+ if ((d & GMP_LIMB_HIGHBIT) != 0)
{
/* High limb is initial remainder, possibly with one subtract of
d to get r<d. */
diff --git a/mpn/generic/pow_1.c b/mpn/generic/pow_1.c
index f9ae61a82..b9a6af950 100644
--- a/mpn/generic/pow_1.c
+++ b/mpn/generic/pow_1.c
@@ -62,7 +62,7 @@ mpn_pow_1 (mp_ptr rp, mp_srcptr bp, mp_size_t bn, mp_limb_t exp, mp_ptr tp)
for (i = GMP_LIMB_BITS - cnt - 1;;)
{
exp <<= 1;
- if ((exp & MP_LIMB_T_HIGHBIT) != 0)
+ if ((exp & GMP_LIMB_HIGHBIT) != 0)
{
rp[rn] = mpn_mul_1 (rp, rp, rn, bl);
rn += rp[rn] != 0;
@@ -87,7 +87,7 @@ mpn_pow_1 (mp_ptr rp, mp_srcptr bp, mp_size_t bn, mp_limb_t exp, mp_ptr tp)
for (i = GMP_LIMB_BITS - cnt - 1;;)
{
exp <<= 1;
- if ((exp & MP_LIMB_T_HIGHBIT) != 0)
+ if ((exp & GMP_LIMB_HIGHBIT) != 0)
{
rn = rn + bn - (mpn_mul (tp, rp, rn, bp, bn) == 0);
MP_PTR_SWAP (rp, tp);
diff --git a/mpn/generic/pre_mod_1.c b/mpn/generic/pre_mod_1.c
index 639cd1f4e..02ec16d0a 100644
--- a/mpn/generic/pre_mod_1.c
+++ b/mpn/generic/pre_mod_1.c
@@ -42,7 +42,7 @@ mpn_preinv_mod_1 (mp_srcptr dividend_ptr, mp_size_t dividend_size,
mp_limb_t dummy;
ASSERT (dividend_size >= 1);
- ASSERT (divisor_limb & MP_LIMB_T_HIGHBIT);
+ ASSERT (divisor_limb & GMP_LIMB_HIGHBIT);
r = dividend_ptr[dividend_size-1];
if (r >= divisor_limb)
diff --git a/mpq/set_f.c b/mpq/set_f.c
index af1f21045..f89fbda33 100644
--- a/mpq/set_f.c
+++ b/mpq/set_f.c
@@ -92,7 +92,7 @@ mpq_set_f (mpq_ptr q, mpf_srcptr f)
abs_fsize -= (num_ptr[abs_fsize-1] == 0);
MPN_ZERO (den_ptr, den_size);
- den_ptr[den_size] = MP_LIMB_T_HIGHBIT >> (shift-1);
+ den_ptr[den_size] = GMP_LIMB_HIGHBIT >> (shift-1);
}
q->_mp_num._mp_size = fsize >= 0 ? abs_fsize : -abs_fsize;
diff --git a/tests/refmpn.c b/tests/refmpn.c
index e5174b0c3..2e0be7291 100644
--- a/tests/refmpn.c
+++ b/tests/refmpn.c
@@ -1006,7 +1006,7 @@ mp_limb_t
refmpn_invert_limb (mp_limb_t d)
{
mp_limb_t r;
- ASSERT (d & MP_LIMB_T_HIGHBIT);
+ ASSERT (d & GMP_LIMB_HIGHBIT);
return refmpn_udiv_qrnnd (&r, -d-1, -1, d);
}
@@ -1177,7 +1177,7 @@ refmpn_count_leading_zeros (mp_limb_t x)
ASSERT (x != 0);
- while ((x & MP_LIMB_T_HIGHBIT) == 0)
+ while ((x & GMP_LIMB_HIGHBIT) == 0)
{
x <<= 1;
n++;
@@ -1395,7 +1395,7 @@ refmpn_sb_divrem_mn (mp_ptr qp,
ASSERT (nsize >= dsize);
/* ASSERT (dsize > 2); */
ASSERT (dsize >= 2);
- ASSERT (dp[dsize-1] & MP_LIMB_T_HIGHBIT);
+ ASSERT (dp[dsize-1] & GMP_LIMB_HIGHBIT);
ASSERT (! refmpn_overlap_p (qp, nsize-dsize, np, nsize) || qp+dsize >= np);
ASSERT_MPN (np, nsize);
ASSERT_MPN (dp, dsize);
diff --git a/tests/t-constants.c b/tests/t-constants.c
index 779e73f9b..455412ce7 100644
--- a/tests/t-constants.c
+++ b/tests/t-constants.c
@@ -215,7 +215,7 @@ main (int argc, char *argv[])
CHECK_BITS (BITS_PER_MP_LIMB, mp_limb_t);
CHECK_BITS (BITS_PER_ULONG, unsigned long);
- CHECK_HIGHBIT (MP_LIMB_T_HIGHBIT, mp_limb_t, LL("0x%lX","0x%lX"));
+ CHECK_HIGHBIT (GMP_LIMB_HIGHBIT, mp_limb_t, LL("0x%lX","0x%lX"));
CHECK_HIGHBIT (ULONG_HIGHBIT, unsigned long, "0x%lX");
CHECK_HIGHBIT (UINT_HIGHBIT, unsigned int, "0x%X");
CHECK_HIGHBIT (USHRT_HIGHBIT, unsigned short, "0x%hX");
diff --git a/tune/common.c b/tune/common.c
index 016c5638f..802a75fdd 100644
--- a/tune/common.c
+++ b/tune/common.c
@@ -1710,7 +1710,7 @@ speed_routine_count_zeros_setup (struct speed_params *s,
if (! zero)
for (i = 0; i < SPEED_BLOCK_SIZE; i++)
if (xp[i] == 0)
- xp[i] = leading ? 1 : MP_LIMB_T_HIGHBIT;
+ xp[i] = leading ? 1 : GMP_LIMB_HIGHBIT;
}
else if (s->r == 1)
{
diff --git a/tune/modlinv.c b/tune/modlinv.c
index bc6a7cdcd..863c49d12 100644
--- a/tune/modlinv.c
+++ b/tune/modlinv.c
@@ -98,7 +98,7 @@ MA 02111-1307, USA.
do { \
mp_limb_t __n = (n); \
mp_limb_t __rem = (1 - __n) >> 1; \
- mp_limb_t __inv = MP_LIMB_T_HIGHBIT; \
+ mp_limb_t __inv = GMP_LIMB_HIGHBIT; \
int __count; \
\
ASSERT ((__n & 1) == 1); \
@@ -109,7 +109,7 @@ MA 02111-1307, USA.
__inv >>= 1; \
if (__rem & 1) \
{ \
- __inv |= MP_LIMB_T_HIGHBIT; \
+ __inv |= GMP_LIMB_HIGHBIT; \
__rem -= __n; \
} \
__rem >>= 1; \
@@ -128,7 +128,7 @@ MA 02111-1307, USA.
do { \
mp_limb_t __n = (n); \
mp_limb_t __rem = (1 - __n) >> 1; \
- mp_limb_t __inv = MP_LIMB_T_HIGHBIT; \
+ mp_limb_t __inv = GMP_LIMB_HIGHBIT; \
mp_limb_t __lowbit; \
int __count; \
\
diff --git a/tune/speed.h b/tune/speed.h
index d780569c9..296f8f494 100644
--- a/tune/speed.h
+++ b/tune/speed.h
@@ -927,7 +927,7 @@ int speed_routine_count_zeros_setup _PROTO ((struct speed_params *s,
mp_limb_t dummy = 0; \
\
SPEED_RESTRICT_COND (s->size >= 0); \
- SPEED_RESTRICT_COND (s->r & MP_LIMB_T_HIGHBIT); \
+ SPEED_RESTRICT_COND (s->r & GMP_LIMB_HIGHBIT); \
\
invert_limb (inv, s->r); \
speed_operand_src (s, s->xp, s->size); \
@@ -967,7 +967,7 @@ int speed_routine_count_zeros_setup _PROTO ((struct speed_params *s,
MPN_COPY (d, s->yp, s->size); \
\
/* normalize the data */ \
- d[s->size-1] |= MP_LIMB_T_HIGHBIT; \
+ d[s->size-1] |= GMP_LIMB_HIGHBIT; \
a[2*s->size-1] = d[s->size-1] - 1; \
\
speed_operand_src (s, a, 2*s->size); \
@@ -1016,7 +1016,7 @@ int speed_routine_count_zeros_setup _PROTO ((struct speed_params *s,
\
d = SPEED_TMP_ALLOC_LIMBS (3, s->align_yp); \
MPN_COPY (d, s->yp, 3); \
- d[2] |= MP_LIMB_T_HIGHBIT; \
+ d[2] |= GMP_LIMB_HIGHBIT; \
\
qsize = s->size - 3; \
q = SPEED_TMP_ALLOC_LIMBS (qsize, s->align_wp); \
@@ -1699,7 +1699,7 @@ int speed_routine_count_zeros_setup _PROTO ((struct speed_params *s,
\
/* divisor must be normalized */ \
MPN_COPY (yp, s->yp_block, 2); \
- yp[1] |= MP_LIMB_T_HIGHBIT; \
+ yp[1] |= GMP_LIMB_HIGHBIT; \
\
speed_operand_src (s, xp, s->size); \
speed_operand_src (s, yp, 2); \
@@ -2004,7 +2004,7 @@ int speed_routine_count_zeros_setup _PROTO ((struct speed_params *s,
do \
{ \
d = dinv ^ xp[j]; \
- d |= MP_LIMB_T_HIGHBIT; \
+ d |= GMP_LIMB_HIGHBIT; \
do { call; } while (0); \
} \
while (--j != 0); \
diff --git a/tune/tuneup.c b/tune/tuneup.c
index fed507d99..1b26b1526 100644
--- a/tune/tuneup.c
+++ b/tune/tuneup.c
@@ -183,7 +183,7 @@ randlimb_norm (void)
{
mp_limb_t n;
mpn_random (&n, 1);
- n |= MP_LIMB_T_HIGHBIT;
+ n |= GMP_LIMB_HIGHBIT;
return n;
}