Cthulhu
0.2.10
Cthulhu compiler collection
|
#include <ctu_endian_api.h>
#include "core/analyze.h"
#include "core/compiler.h"
#include <stdint.h>
#include "endian.inc"
Go to the source code of this file.
Macros | |
#define | CT_BIG_ENDIAN __ORDER_BIG_ENDIAN__ |
the big endian byte order More... | |
#define | CT_LITTLE_ENDIAN __ORDER_LITTLE_ENDIAN__ |
the little endian byte order More... | |
#define | CT_BYTE_ORDER __BYTE_ORDER__ |
the native byte order More... | |
#define | ENDIAN(id, name, v) id = (v), |
Enumerations | |
enum | endian_t { eEndianCount } |
endianess enum More... | |
Functions | |
CT_NODISCARD CT_CONSTFN CT_ENDIAN_API uint16_t | endian_swap16 (uint16_t value) |
swap the endianess of a 16-bit value More... | |
CT_NODISCARD CT_CONSTFN CT_ENDIAN_API uint32_t | endian_swap32 (uint32_t value) |
swap the endianess of a 32-bit value More... | |
CT_NODISCARD CT_CONSTFN CT_ENDIAN_API uint64_t | endian_swap64 (uint64_t value) |
swap the endianess of a 64-bit value More... | |
CT_NODISCARD CT_CONSTFN CT_ENDIAN_API uint16_t | native_order16 (uint16_t value, endian_t order) |
convert a 16-bit value of a given endianess to the native endianess More... | |
CT_NODISCARD CT_CONSTFN CT_ENDIAN_API uint32_t | native_order32 (uint32_t value, endian_t order) |
convert a 32-bit value of a given endianess to the native endianess More... | |
CT_NODISCARD CT_CONSTFN CT_ENDIAN_API uint64_t | native_order64 (uint64_t value, endian_t order) |
convert a 64-bit value of a given endianess to the native endianess More... | |