32 #if defined(__clang__) 38 #if __has_builtin(__builtin_flsl) 39 return __builtin_flsl(mask);
40 #elif __has_builtin(__builtin_clzl) 48 return ((
int)
sizeof(mask) << 3) - __builtin_clzl((
unsigned long)mask);
54 for(bit = 1; mask != 1; bit++)
55 mask = (
unsigned long)mask >> 1;
60 #else // not __clang__ 71 return ((
int)
sizeof(mask) << 3) - __builtin_clzl((
unsigned long)mask);
int flsl(long mask)
Finds the last (most significant) bit set in the given mask.