From 71012cd4a255d580c8b1d5a9a9a80d1c09cd0865 Mon Sep 17 00:00:00 2001 From: tege Date: Wed, 10 Apr 2002 00:55:58 +0200 Subject: (GMP_NUMB_MASK): Comment out, now in gmp.h. (mpn_incr_u): Don't assume `incr' is non-zero. (mpn_decr_u): Similarly. --- gmp-impl.h | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'gmp-impl.h') diff --git a/gmp-impl.h b/gmp-impl.h index d8280f1aa..94a9f12bb 100644 --- a/gmp-impl.h +++ b/gmp-impl.h @@ -396,7 +396,7 @@ void __gmp_tmp_debug_free _PROTO ((const char *, int, int, #define SHRT_HIGHBIT SHRT_MIN -#define GMP_NUMB_MASK (MP_LIMB_T_MAX >> GMP_NAIL_BITS) + /* #define GMP_NUMB_MASK (MP_LIMB_T_MAX >> GMP_NAIL_BITS) */ #define GMP_NAIL_MASK (~ GMP_NUMB_MASK) #define GMP_NUMB_HIGHBIT (CNST_LIMB(1) << (GMP_NUMB_BITS-1)) #define GMP_NUMB_MAX GMP_NUMB_MASK @@ -407,7 +407,6 @@ void __gmp_tmp_debug_free _PROTO ((const char *, int, int, #define GMP_NAIL_LOWBIT (CNST_LIMB(1) << GMP_NUMB_BITS) #endif - /* Swap macros. */ #define MP_LIMB_T_SWAP(x, y) \ @@ -1561,9 +1560,9 @@ void mpn_xnor_n _PROTO ((mp_ptr, mp_srcptr, mp_srcptr, mp_size_t)); } \ else \ { \ - __x = (*__p + (incr)) & GMP_NUMB_MASK; \ - *__p = __x; \ - if (__x == 0) \ + __x = (*__p + (incr)); \ + *__p++ = __x & GMP_NUMB_MASK; \ + if (__x >> GMP_NUMB_BITS != 0) \ { \ do \ { \ @@ -1591,9 +1590,9 @@ void mpn_xnor_n _PROTO ((mp_ptr, mp_srcptr, mp_srcptr, mp_size_t)); } \ else \ { \ - __x = *__p; \ - *__p = (__x - (incr)) & GMP_NUMB_MASK; \ - if (__x == 0) \ + __x = *__p - (incr); \ + *__p++ = __x & GMP_NUMB_MASK; \ + if (__x >> GMP_NUMB_BITS != 0) \ { \ do \ { \ -- cgit v1.2.1