Browse Source

add nonstandard GNU endian.h

master
Lephenixnoir 7 months ago
parent
commit
ed8134970b
Signed by: Lephenixnoir GPG Key ID: 1BBA026E13FC0495
  1. 21
      include/target/sh-generic/endian.h

21
include/target/sh-generic/endian.h

@ -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…
Cancel
Save