mirror of
https://git.planet-casio.com/Vhex-Kernel-Core/fxlibc.git
synced 2024-12-29 13:03:38 +01:00
add nonstandard GNU endian.h
This commit is contained in:
parent
009a2eef6e
commit
ed8134970b
1 changed files with 21 additions and 0 deletions
21
include/target/sh-generic/endian.h
Normal file
21
include/target/sh-generic/endian.h
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
#ifndef __ENDIAN_H__
|
||||||
|
# define __ENDIAN_H__
|
||||||
|
|
||||||
|
/* CASIO calculators are configured as big-endian. */
|
||||||
|
|
||||||
|
#define htobe16(x) (x)
|
||||||
|
#define htole16(x) (__builtin_bswap16(x))
|
||||||
|
#define be16toh(x) (x)
|
||||||
|
#define le16toh(x) (__builtin_bswap16(x))
|
||||||
|
|
||||||
|
#define htobe32(x) (x)
|
||||||
|
#define htole32(x) (__builtin_bswap32(x))
|
||||||
|
#define be32toh(x) (x)
|
||||||
|
#define le32toh(x) (__builtin_bswap32(x))
|
||||||
|
|
||||||
|
#define htobe64(x) (x)
|
||||||
|
#define htole64(x) (__builtin_bswap64(x))
|
||||||
|
#define be64toh(x) (x)
|
||||||
|
#define le64toh(x) (__builtin_bswap64(x))
|
||||||
|
|
||||||
|
#endif /*__ENDIAN_H__*/
|
Loading…
Reference in a new issue