Enable prefetch and bswap buitins for clang.
This commit is contained in:
@@ -404,12 +404,12 @@ static inline T ROR(const T x, const uint8 n)
|
||||
*/
|
||||
static inline uint32 BSWAP32(uint32 x)
|
||||
{
|
||||
#if !defined(__ICC) && defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && __GNUC_MINOR__ >= 3))
|
||||
#if !defined(__ICC) && (defined(__GNUC__) || defined(__clang__))
|
||||
/* GCC >= 4.3 provides a builtin, resulting in faster code */
|
||||
return (uint32)__builtin_bswap32((int32)x);
|
||||
#else
|
||||
return ((x >> 24) & 0xFF) | ((x >> 8) & 0xFF00) | ((x << 8) & 0xFF0000) | ((x << 24) & 0xFF000000);
|
||||
#endif /* defined(__GNUC__) */
|
||||
#endif /* __GNUC__ || __clang__ */
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user