50 #if defined(__WATCOMC__) && defined(__386__)
51 extern _inline
int _SDL_clz_watcom (Uint32);
52 #pragma aux _SDL_clz_watcom = \
57 modify exact [eax] nomemory;
63 #if defined(__GNUC__) && (__GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
70 return 31 - __builtin_clz(x);
71 #elif defined(__WATCOMC__) && defined(__386__)
75 return 31 - _SDL_clz_watcom(x);
81 const Uint32 b[] = {0x2, 0xC, 0xF0, 0xFF00, 0xFFFF0000};
82 const int S[] = {1, 2, 4, 8, 16};
91 for (i = 4; i >= 0; i--)
104 SDL_FORCE_INLINE SDL_bool
105 SDL_HasExactlyOneBitSet32(Uint32 x)
107 if (x && !(x & (x - 1))) {
SDL_FORCE_INLINE int SDL_MostSignificantBitIndex32(Uint32 x)
Definition: SDL_bits.h:61