0.3.1
|
Macros | |
#define | cpu_htobe16(x) ((uint16_t)(x)) |
Convert from host byte order to big-endian order. | |
#define | cpu_htole16(x) cpu_bswap16((x)) |
Convert from host byte order to little-endian order. | |
#define | cpu_be16toh(x) ((uint16_t)(x)) |
Convert from big-endian order to host byte order. | |
#define | cpu_le16toh(x) cpu_bswap16((x)) |
Convert from little-endian order to host byte order. | |
#define | cpu_htobe32(x) ((uint32_t)(x)) |
Convert from host byte order to big-endian order. | |
#define | cpu_htole32(x) cpu_bswap32((x)) |
Convert from host byte order to little-endian order. | |
#define | cpu_be32toh(x) ((uint32_t)(x)) |
Convert from big-endian order to host byte order. | |
#define | cpu_le32toh(x) cpu_bswap32((x)) |
Convert from little-endian order to host byte order. | |
Functions | |
static uint16_t | cpu_bswap16 (uint16_t x) |
Swap the upper and lower bytes of a 2-byte value. | |
static uint32_t | cpu_bswap32 (uint32_t x) |
Swap the upper and lower 2-bytes of a 4-byte value. | |
Description goes here.
Swap the upper and lower bytes of a 2-byte value.
The __builtin_bswap16()
function that GCC emits does not use the swap.b
instruction.
x | Value to be swapped. |