Simply do not use __builtin_bswap16() this causes all kinds of problems, use our own implementation
This commit is contained in:
@@ -45,17 +45,8 @@ u64 rotr64 (const u64 a, const u64 n)
|
||||
|
||||
u16 byte_swap_16 (const u16 n)
|
||||
{
|
||||
#if defined(__APPLE__)
|
||||
return (n & 0xff00) >> 8
|
||||
| (n & 0x00ff) << 8;
|
||||
#elif defined (_MSC_VER)
|
||||
return _byteswap_ushort (n);
|
||||
#elif defined (__clang__) || defined (__GNUC__)
|
||||
return __builtin_bswap16 (n);
|
||||
#else
|
||||
return (n & 0xff00) >> 8
|
||||
| (n & 0x00ff) << 8;
|
||||
#endif
|
||||
}
|
||||
|
||||
u32 byte_swap_32 (const u32 n)
|
||||
|
||||
Reference in New Issue
Block a user