2015-01-06 Paul Eggert <eggert@cs.ucla.edu>
+ count-leading-zeros: use 64-bit intrinsics on 32-bit Windows
+ This reverts the last patch but one, as it shouldn't be needed now
+ that the typo is fixed.
+ * lib/count-leading-zeros.h (count_leading_zeros_ll):
+ * lib/count-trailing-zeros.h:
+ * lib/count-one-bits.h:
+ Go back to using 64-bit intrinsics.
+
count-leading-zeros: fix pragma typos
* lib/count-leading-zeros.h (_BitScanReverse, _BitScanReverse64):
Fix typos in declaration of intrinsics when _MSC_VER.
COUNT_LEADING_ZEROS_INLINE int
count_leading_zeros_ll (unsigned long long int x)
{
-# if _MSC_VER && ! defined _M_X64
- int count = count_leading_zeros (x >> 31 >> 1);
- return count < 32 ? count : 32 + count_leading_zeros (x);
-# else
COUNT_LEADING_ZEROS (__builtin_clzll, _BitScanReverse64,
unsigned long long int);
-# endif
}
#endif
COUNT_ONE_BITS_INLINE int
count_one_bits_ll (unsigned long long int x)
{
-# if _MSC_VER && ! defined _M_X64
- return count_one_bits (x >> 31 >> 1) + count_one_bits (x);
-# else
COUNT_ONE_BITS (__builtin_popcountll, __popcnt64, unsigned long long int);
-# endif
}
#endif
COUNT_TRAILING_ZEROS_INLINE int
count_trailing_zeros_ll (unsigned long long int x)
{
-# if _MSC_VER && ! defined _M_X64
- int count = count_trailing_zeros (x);
- return count < 32 ? count : 32 + count_trailing_zeros (x >> 31 >> 1);
-# else
COUNT_TRAILING_ZEROS (__builtin_ctzll, _BitScanForward64,
unsigned long long int);
-# endif
}
#endif