-
Notifications
You must be signed in to change notification settings - Fork 104
Open
Description
x86 MSVC doesn't support _BitScanReverse64, but adding something like this should fill in:
#ifndef _M_X64
static __inline unsigned char _BitScanReverse64(
unsigned long *index,
unsigned __int64 value)
{
unsigned long hi, lo;
hi = (unsigned long)(value >> 32);
lo = (unsigned long)(value & 0xFFFFFFFFu);
if (hi) {
// If high part is nonzero, MSB is in the upper 32 bits
_BitScanReverse(index, hi);
*index += 32;
return 1;
} else if (lo) {
_BitScanReverse(index, lo);
return 1;
} else {
return 0; // value == 0
}
}
#endifMetadata
Metadata
Assignees
Labels
No labels