]> wimlib.net Git - wimlib/blobdiff - include/wimlib/compiler.h
bitops: use builtins directly
[wimlib] / include / wimlib / compiler.h
index ddb7a0e6f3d7be7056e47897ed2e0c506a422750..7f48e4fe8ea7ca213963f09b4a5d10e2374f0209 100644 (file)
 #  define compiler_bswap64 __builtin_bswap64
 #endif
 
-/* (Optional) Find Last Set bit and Find First Set bit macros.  */
-#define compiler_bsr32(n)      (31 - __builtin_clz(n))
-#define compiler_bsr64(n)      (63 - __builtin_clzll(n))
-#define compiler_bsf32(n)      __builtin_ctz(n)
-#define compiler_bsf64(n)      __builtin_ctzll(n)
-
 /* Optional definitions for checking with 'sparse'.  */
 #ifdef __CHECKER__
 #  define _bitwise_attr        __attribute__((bitwise))