summaryrefslogtreecommitdiff
path: root/gmp-impl.h
diff options
context:
space:
mode:
authortege <tege@gmplib.org>2002-04-10 00:55:58 +0200
committertege <tege@gmplib.org>2002-04-10 00:55:58 +0200
commit71012cd4a255d580c8b1d5a9a9a80d1c09cd0865 (patch)
tree87ceffb2f3f0befd39e0af885ef74a517495fc0a /gmp-impl.h
parentd3ada09a3573e8c14748693efbad40606471381e (diff)
downloadgmp-71012cd4a255d580c8b1d5a9a9a80d1c09cd0865.tar.gz
(GMP_NUMB_MASK): Comment out, now in gmp.h.
(mpn_incr_u): Don't assume `incr' is non-zero. (mpn_decr_u): Similarly.
Diffstat (limited to 'gmp-impl.h')
-rw-r--r--gmp-impl.h15
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 \
{ \