RetroArch
|
Go to the source code of this file.
Macros | |
#define | SWAP16(x) |
#define | SWAP32(x) |
#define | SWAP64(val) |
Functions | |
static INLINE uint8_t | is_little_endian (void) |
static INLINE uint64_t | swap_if_big64 (uint64_t val) |
static INLINE uint32_t | swap_if_big32 (uint32_t val) |
static INLINE uint64_t | swap_if_little64 (uint64_t val) |
static INLINE uint32_t | swap_if_little32 (uint32_t val) |
static INLINE uint16_t | swap_if_big16 (uint16_t val) |
static INLINE uint16_t | swap_if_little16 (uint16_t val) |
static INLINE void | store32be (uint32_t *addr, uint32_t data) |
static INLINE uint32_t | load32be (const uint32_t *addr) |
#define SWAP16 | ( | x | ) |
#define SWAP32 | ( | x | ) |
#define SWAP64 | ( | val | ) |
is_little_endian:
Checks if the system is little endian or big-endian.
Returns: greater than 0 if little-endian, otherwise big-endian.
load32be: : pointer to unsigned 32-bit buffer
Load value from address. Endian-safe.
Returns: value from address, byte-swapped if necessary.
store32be: : pointer to unsigned 32-bit buffer : unsigned 32-bit value to write
Write data to address. Endian-safe. Byteswaps the data first if necessary before storing it.
swap_if_big16: : unsigned 16-bit value
Byteswap unsigned 16-bit value if system is big-endian.
Returns: Byteswapped value in case system is big-endian, otherwise returns same value.
swap_if_big32: : unsigned 32-bit value
Byteswap unsigned 32-bit value if system is big-endian.
Returns: Byteswapped value in case system is big-endian, otherwise returns same value.
swap_if_big64: : unsigned 64-bit value
Byteswap unsigned 64-bit value if system is big-endian.
Returns: Byteswapped value in case system is big-endian, otherwise returns same value.
swap_if_little16: : unsigned 16-bit value
Byteswap unsigned 16-bit value if system is little-endian.
Returns: Byteswapped value in case system is little-endian, otherwise returns same value.
swap_if_little32: : unsigned 32-bit value
Byteswap unsigned 32-bit value if system is little-endian.
Returns: Byteswapped value in case system is little-endian, otherwise returns same value.
swap_if_little64: : unsigned 64-bit value
Byteswap unsigned 64-bit value if system is little-endian.
Returns: Byteswapped value in case system is little-endian, otherwise returns same value.