4#include <machine/endian.h>
11static inline uint16_t __bswap_16(uint16_t x)
13 return __builtin_bswap16(x);
20static inline uint32_t __bswap_32(uint32_t x)
22 return __builtin_bswap32(x);
29static inline uint64_t __bswap_64(uint64_t x)
31 return __builtin_bswap64(x);
34#ifdef CONFIG_ENDIAN_BIG
35 #define htobe16(x) (x)
36 #define htole16(x) __bswap_16 (x)
37 #define be16toh(x) (x)
38 #define le16toh(x) __bswap_16 (x)
40 #define htobe32(x) (x)
41 #define htole32(x) __bswap_32 (x)
42 #define be32toh(x) (x)
43 #define le32toh(x) __bswap_32 (x)
45 #define htobe64(x) (x)
46 #define htole64(x) __bswap_64 (x)
47 #define be64toh(x) (x)
48 #define le64toh(x) __bswap_64 (x)
50 #define htobe16(x) __bswap_16 (x)
51 #define htole16(x) (x)
52 #define be16toh(x) __bswap_16 (x)
53 #define le16toh(x) (x)
55 #define htobe32(x) __bswap_32 (x)
56 #define htole32(x) (x)
57 #define be32toh(x) __bswap_32 (x)
58 #define le32toh(x) (x)
60 #define htobe64(x) __bswap_64 (x)
61 #define htole64(x) (x)
62 #define be64toh(x) __bswap_64 (x)
63 #define le64toh(x) (x)