|
KallistiOS git master
Independent SDK for the Sega Dreamcast
|
Byte-order management for the SH4 architecture More...
Files | |
| file | byteorder.h |
| Byte-order related macros. | |
Macros | |
| #define | BYTE_ORDER LITTLE_ENDIAN |
| Define the byte-order of the platform in use. | |
Functions | |
| arch_swap16 () is deprecated | |
| Swap the byte order of a 16-bit integer. | |
| use | __builtin_bswap16 ().") static inline uint16_t arch_swap16(uint16_t x) |
| arch_swap32 () is deprecated | |
| Swap the byte order of a 32-bit integer. | |
| use | __builtin_bswap32 ().") static inline uint32_t arch_swap32(uint32_t x) |
| arch_ntohs () is deprecated | |
| Convert network-to-host short. | |
| use | ntohs () from< arpa/inet.h >") static inline uint16_t arch_ntohs(uint16_t x) |
| arch_ntohl () is deprecated | |
| Convert network-to-host long. | |
| use | ntohl () from< arpa/inet.h >") static inline uint32_t arch_ntohl(uint32_t x) |
| arch_htons () is deprecated | |
| Convert host-to-network short. | |
| use | htons () from< arpa/inet.h >") static inline uint16_t arch_htons(uint16_t x) |
| arch_htonl () is deprecated | |
| Convert host-to-network long. | |
| use | htonl () from< arpa/inet.h >") static inline uint32_t arch_htonl(uint32_t x) |
Byte-order management for the SH4 architecture
| #define BYTE_ORDER LITTLE_ENDIAN |
Define the byte-order of the platform in use.
| use __builtin_bswap16 | ( | ) |
References __builtin_bswap16().
Referenced by __builtin_bswap16(), arch_htons(), arch_ntohs(), and htons().
| use __builtin_bswap32 | ( | ) |
References __builtin_bswap32().
Referenced by __builtin_bswap32(), arch_htonl(), arch_ntohl(), and htonl().
| arch_htonl | ( | ) |
Convert host-to-network long.
This macro converts a value in the host's native byte order to network byte order (big endian). On a little endian system (like the Dreamcast), this should just call arch_swap32(). On a big endian system, this should be a no-op.
| x | The value to be converted. This should be a uint32, or equivalent. |
References __builtin_bswap32().
| arch_htons | ( | ) |
Convert host-to-network short.
This macro converts a value in the host's native byte order to network byte order (big endian). On a little endian system (like the Dreamcast), this should just call arch_swap16(). On a big endian system, this should be a no-op.
| x | The value to be converted. This should be a uint16, or equivalent. |
References __builtin_bswap16().
| arch_ntohl | ( | ) |
Convert network-to-host long.
This macro converts a network byte order (big endian) value to the host's native byte order. On a little endian system (like the Dreamcast), this should just call arch_swap32(). On a big endian system, this should be a no-op.
| x | The value to be converted. This should be a uint32, or equivalent. |
References __builtin_bswap32().
| arch_ntohs | ( | ) |
Convert network-to-host short.
This macro converts a network byte order (big endian) value to the host's native byte order. On a little endian system (like the Dreamcast), this should just call arch_swap16(). On a big endian system, this should be a no-op.
| x | The value to be converted. This should be a uint16, or equivalent. |
References __builtin_bswap16().
| arch_swap16 | ( | ) |
Swap the byte order of a 16-bit integer.
This macro swaps the byte order of a 16-bit integer in an architecture- defined manner.
| x | The value to be byte-swapped. This should be a uint16, or equivalent. |
| arch_swap32 | ( | ) |
Swap the byte order of a 32-bit integer.
This macro swaps the byte order of a 32-bit integer in an architecture- defined manner.
| x | The value to be byte-swapped. This should be a uint32, or equivalent. |
| use htonl | ( | ) |
Referenced by ntohl().
| use htons | ( | ) |
Referenced by ntohs().
| use ntohl | ( | ) |
| use ntohs | ( | ) |