39#if defined(__WATCOMC__) && defined(__386__)
40extern __inline
int _SDL_bsr_watcom(
Uint32);
41#pragma aux _SDL_bsr_watcom = \
45 modify exact [eax] nomemory;
68#if defined(__GNUC__) && (__GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
75 return 31 - __builtin_clz(x);
76#elif defined(__WATCOMC__) && defined(__386__)
80 return _SDL_bsr_watcom(x);
81#elif defined(_MSC_VER) && _MSC_VER >= 1400
83 if (_BitScanReverse(&index, x)) {
92 const Uint32 b[] = {0x2, 0xC, 0xF0, 0xFF00, 0xFFFF0000};
93 const int S[] = {1, 2, 4, 8, 16};
102 for (i = 4; i >= 0; i--)
135 if (x && !(x & (x - 1))) {
SDL_FORCE_INLINE int SDL_MostSignificantBitIndex32(Uint32 x)
SDL_FORCE_INLINE bool SDL_HasExactlyOneBitSet32(Uint32 x)