diff options
Diffstat (limited to 'gmp-impl.h')
-rw-r--r-- | gmp-impl.h | 15 |
1 files changed, 7 insertions, 8 deletions
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 \ { \ |