summaryrefslogtreecommitdiff
path: root/mpn/generic/udiv_w_sdiv.c
diff options
context:
space:
mode:
Diffstat (limited to 'mpn/generic/udiv_w_sdiv.c')
-rw-r--r--mpn/generic/udiv_w_sdiv.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/mpn/generic/udiv_w_sdiv.c b/mpn/generic/udiv_w_sdiv.c
index f876aa573..c01f95847 100644
--- a/mpn/generic/udiv_w_sdiv.c
+++ b/mpn/generic/udiv_w_sdiv.c
@@ -42,7 +42,7 @@ mpn_udiv_w_sdiv (rp, a1, a0, d)
if ((mp_limb_signed_t) d >= 0)
{
- if (a1 < d - a1 - (a0 >> (BITS_PER_MP_LIMB - 1)))
+ if (a1 < d - a1 - (a0 >> (GMP_LIMB_BITS - 1)))
{
/* dividend, divisor, and quotient are nonnegative */
sdiv_qrnnd (q, r, a1, a0, d);
@@ -50,18 +50,18 @@ mpn_udiv_w_sdiv (rp, a1, a0, d)
else
{
/* Compute c1*2^32 + c0 = a1*2^32 + a0 - 2^31*d */
- sub_ddmmss (c1, c0, a1, a0, d >> 1, d << (BITS_PER_MP_LIMB - 1));
+ sub_ddmmss (c1, c0, a1, a0, d >> 1, d << (GMP_LIMB_BITS - 1));
/* Divide (c1*2^32 + c0) by d */
sdiv_qrnnd (q, r, c1, c0, d);
/* Add 2^31 to quotient */
- q += (mp_limb_t) 1 << (BITS_PER_MP_LIMB - 1);
+ q += (mp_limb_t) 1 << (GMP_LIMB_BITS - 1);
}
}
else
{
b1 = d >> 1; /* d/2, between 2^30 and 2^31 - 1 */
c1 = a1 >> 1; /* A/2 */
- c0 = (a1 << (BITS_PER_MP_LIMB - 1)) + (a0 >> 1);
+ c0 = (a1 << (GMP_LIMB_BITS - 1)) + (a0 >> 1);
if (a1 < b1) /* A < 2^32*b1, so A/2 < 2^31*b1 */
{