28 #if V8_TARGET_ARCH_ARM64
41 ASSERT((width == 32) || (width == 64));
43 uint64_t bit_test = 1UL << (width - 1);
44 while ((count < width) && ((bit_test & value) == 0)) {
54 ASSERT((width == 32) || (width == 64));
65 ASSERT((width == 32) || (width == 64));
67 while ((count < width) && (((value >> count) & 1) == 0)) {
77 ASSERT((width == 32) || (width == 64));
80 value &= (0xffffffffffffffffUL >> (64-width));
93 value = ((value >> 1) & 0x5555555555555555) + (value & 0x5555555555555555);
94 value = ((value >> 2) & 0x3333333333333333) + (value & 0x3333333333333333);
95 value = ((value >> 4) & 0x0f0f0f0f0f0f0f0f) + (value & 0x0f0f0f0f0f0f0f0f);
96 value = ((value >> 8) & 0x00ff00ff00ff00ff) + (value & 0x00ff00ff00ff00ff);
97 value = ((value >> 16) & 0x0000ffff0000ffff) + (value & 0x0000ffff0000ffff);
98 value = ((value >> 32) & 0x00000000ffffffff) + (value & 0x00000000ffffffff);
112 #endif // V8_TARGET_ARCH_ARM64
int CountLeadingZeros(uint64_t value, int width)
int CountLeadingSignBits(int64_t value, int width)
int MaskToBit(uint64_t mask)
#define ASSERT(condition)
int CountSetBits(uint64_t value, int width)
int CountTrailingZeros(uint64_t value, int width)