diff options
author | Marco Bodrato <bodrato@mail.dm.unipi.it> | 2019-11-10 11:06:56 +0100 |
---|---|---|
committer | Marco Bodrato <bodrato@mail.dm.unipi.it> | 2019-11-10 11:06:56 +0100 |
commit | 33a300ab81b348ac9c20a879f12f93fe94be10bf (patch) | |
tree | cc66576218fea89a1431e22ce9fdecfea31953cd /mini-gmp/mini-gmp.c | |
parent | 59c97c6d078fd00c4e893143b131312eb3326a74 (diff) | |
download | gmp-33a300ab81b348ac9c20a879f12f93fe94be10bf.tar.gz |
mini-gmp/mini-gmp.c: Use already defined constants.
Diffstat (limited to 'mini-gmp/mini-gmp.c')
-rw-r--r-- | mini-gmp/mini-gmp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mini-gmp/mini-gmp.c b/mini-gmp/mini-gmp.c index bb12acb07..041adda13 100644 --- a/mini-gmp/mini-gmp.c +++ b/mini-gmp/mini-gmp.c @@ -96,7 +96,7 @@ see https://www.gnu.org/licenses/. */ mp_limb_t __clz_x = (x); \ unsigned __clz_c = 0; \ int LOCAL_SHIFT_BITS = 8; \ - if (sizeof(mp_limb_t) * CHAR_BIT > LOCAL_SHIFT_BITS) \ + if (GMP_LIMB_BITS > LOCAL_SHIFT_BITS) \ for (; \ (__clz_x & ((mp_limb_t) 0xff << (GMP_LIMB_BITS - 8))) == 0; \ __clz_c += 8) \ @@ -4000,7 +4000,7 @@ gmp_popcount_limb (mp_limb_t x) w = (w >> 4) + w; w = ((w >> 8) & 0x000f) + (w & 0x000f); c += w; - if (sizeof(mp_limb_t) * CHAR_BIT > LOCAL_SHIFT_BITS) + if (GMP_LIMB_BITS > LOCAL_SHIFT_BITS) x >>= LOCAL_SHIFT_BITS; else x = 0; |