return __builtin_bitreverse16(x);
#else
/* Assign the correct byte position. */
- x = bswap16(x);
+ x = __builtin_bswap16(x);
/* Assign the correct nibble position. */
x = ((x & 0xf0f0) >> 4)
| ((x & 0x0f0f) << 4);
return __builtin_bitreverse32(x);
#else
/* Assign the correct byte position. */
- x = bswap32(x);
+ x = __builtin_bswap32(x);
/* Assign the correct nibble position. */
x = ((x & 0xf0f0f0f0u) >> 4)
| ((x & 0x0f0f0f0fu) << 4);
return __builtin_bitreverse64(x);
#else
/* Assign the correct byte position. */
- x = bswap64(x);
+ x = __builtin_bswap64(x);
/* Assign the correct nibble position. */
x = ((x & 0xf0f0f0f0f0f0f0f0ull) >> 4)
| ((x & 0x0f0f0f0f0f0f0f0full) << 4);
#if __has_builtin(__builtin_bswap128)
return __builtin_bswap128(a);
#else
- return int128_make128(bswap64(int128_gethi(a)), bswap64(int128_getlo(a)));
+ return int128_make128(__builtin_bswap64(int128_gethi(a)),
+ __builtin_bswap64(int128_getlo(a)));
#endif
}
static inline Int128 bswap128(Int128 a)
{
- return int128_make128(bswap64(a.hi), bswap64(a.lo));
+ return int128_make128(__builtin_bswap64(a.hi), __builtin_bswap64(a.lo));
}
static inline int clz128(Int128 a)