13 #define __static_byteswap_16(x) ((_u16)( \ 14 (((_u16)(x) & (_u16)0x00FFU) << 8) | \ 15 (((_u16)(x) & (_u16)0xFF00U) >> 8))) 17 #define __static_byteswap_32(x) ((_u32)( \ 18 (((_u32)(x) & (_u32)0x000000FFUL) << 24) | \ 19 (((_u32)(x) & (_u32)0x0000FF00UL) << 8) | \ 20 (((_u32)(x) & (_u32)0x00FF0000UL) >> 8) | \ 21 (((_u32)(x) & (_u32)0xFF000000UL) >> 24))) 23 #define __static_byteswap_64(x) ((_u64)( \ 24 (((_u64)(x) & (_u64)0x00000000000000ffULL) << 56) | \ 25 (((_u64)(x) & (_u64)0x000000000000ff00ULL) << 40) | \ 26 (((_u64)(x) & (_u64)0x0000000000ff0000ULL) << 24) | \ 27 (((_u64)(x) & (_u64)0x00000000ff000000ULL) << 8) | \ 28 (((_u64)(x) & (_u64)0x000000ff00000000ULL) >> 8) | \ 29 (((_u64)(x) & (_u64)0x0000ff0000000000ULL) >> 24) | \ 30 (((_u64)(x) & (_u64)0x00ff000000000000ULL) >> 40) | \ 31 (((_u64)(x) & (_u64)0xff00000000000000ULL) >> 56))) 34 #define __fast_swap(a, b) do { (a) ^= (b); (b) ^= (a); (a) ^= (b); } while(0) 39 #ifdef __arch_byteswap_16 40 return __arch_byteswap_16(x);
48 #ifdef __arch_byteswap_32 49 return __arch_byteswap_32(x);
57 #ifdef __arch_byteswap_64 58 return __arch_byteswap_64(x);
66 static inline float __byteswap_float(
float x)
68 #ifdef __arch_byteswap_float 69 return __arch_byteswap_float(x);
81 static inline double __byteswap_double(
double x)
83 #ifdef __arch_byteswap_double 84 return __arch_byteswap_double(x);
static _u64 __byteswap_64(_u64 x)
#define __fast_swap(a, b)
#define __static_byteswap_64(x)
#define __static_byteswap_16(x)
static _u32 __byteswap_32(_u32 x)
#define __static_byteswap_32(x)
static _u16 __byteswap_16(_u16 x)