swap_endianness.h File Reference
Go to the source code of this file.
Defines | |
| #define | __swap_endianness_16(x) ((((x) >> 8) & 0xff) | (((x) & 0xff) << 8)) |
| #define | __swap_endianness_32(x) |
| #define | __swap_endianness_64(x) |
Define Documentation
| #define __swap_endianness_16 | ( | x | ) | ((((x) >> 8) & 0xff) | (((x) & 0xff) << 8)) |
| #define __swap_endianness_32 | ( | x | ) |
Value:
((((x) & 0xff000000) >> 24) | (((x) & 0x00ff0000) >> 8) | \
(((x) & 0x0000ff00) << 8) | (((x) & 0x000000ff) << 24))
| #define __swap_endianness_64 | ( | x | ) |
Value:
((((x) & 0xff00000000000000ull) >> 56) | \
(((x) & 0x00ff000000000000ull) >> 40) | \
(((x) & 0x0000ff0000000000ull) >> 24) | \
(((x) & 0x000000ff00000000ull) >> 8) | \
(((x) & 0x00000000ff000000ull) << 8) | \
(((x) & 0x0000000000ff0000ull) << 24) | \
(((x) & 0x000000000000ff00ull) << 40) | \
(((x) & 0x00000000000000ffull) << 56))