1999-04-07 22:42:40 +08:00
|
|
|
#ifndef __IEEE_BIG_ENDIAN
|
|
|
|
#ifndef __IEEE_LITTLE_ENDIAN
|
|
|
|
|
1999-06-21 23:42:12 +08:00
|
|
|
#ifdef __alpha__
|
|
|
|
#define __IEEE_LITTLE_ENDIAN
|
|
|
|
#endif
|
|
|
|
|
2002-03-18 00:18:53 +08:00
|
|
|
#if defined(__arm__) || defined(__thumb__)
|
1999-04-07 22:42:40 +08:00
|
|
|
/* ARM always has big-endian words. Within those words the byte ordering
|
2002-03-18 00:18:53 +08:00
|
|
|
will be big or little endian depending upon the target. */
|
1999-04-07 22:42:40 +08:00
|
|
|
#define __IEEE_BIG_ENDIAN
|
2002-03-18 00:18:53 +08:00
|
|
|
#ifdef __ARMEL__
|
|
|
|
#define __IEEE_BYTES_LITTLE_ENDIAN
|
|
|
|
#endif
|
1999-04-07 22:42:40 +08:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef __hppa__
|
|
|
|
#define __IEEE_BIG_ENDIAN
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined (__sparc) || defined (__sparc__)
|
|
|
|
#define __IEEE_BIG_ENDIAN
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined(__m68k__) || defined(__mc68000__)
|
|
|
|
#define __IEEE_BIG_ENDIAN
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined (__H8300__) || defined (__H8300H__)
|
|
|
|
#define __IEEE_BIG_ENDIAN
|
|
|
|
#define __SMALL_BITFIELDS
|
|
|
|
#define _DOUBLE_IS_32BITS
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef __H8500__
|
|
|
|
#define __IEEE_BIG_ENDIAN
|
|
|
|
#define __SMALL_BITFIELDS
|
|
|
|
#define _DOUBLE_IS_32BITS
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef __sh__
|
|
|
|
#ifdef __LITTLE_ENDIAN__
|
|
|
|
#define __IEEE_LITTLE_ENDIAN
|
|
|
|
#else
|
|
|
|
#define __IEEE_BIG_ENDIAN
|
|
|
|
#endif
|
2000-06-24 03:53:33 +08:00
|
|
|
|
1999-04-07 22:42:40 +08:00
|
|
|
#ifdef __SH3E__
|
|
|
|
#define _DOUBLE_IS_32BITS
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef _AM29K
|
|
|
|
#define __IEEE_BIG_ENDIAN
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef __i386__
|
|
|
|
#define __IEEE_LITTLE_ENDIAN
|
|
|
|
#endif
|
|
|
|
|
2002-07-19 22:41:15 +08:00
|
|
|
#ifdef __x86_64__
|
|
|
|
#define __IEEE_LITTLE_ENDIAN
|
|
|
|
#endif
|
|
|
|
|
1999-04-07 22:42:40 +08:00
|
|
|
#ifdef __i960__
|
|
|
|
#define __IEEE_LITTLE_ENDIAN
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef __MIPSEL__
|
|
|
|
#define __IEEE_LITTLE_ENDIAN
|
|
|
|
#endif
|
2000-06-24 03:53:33 +08:00
|
|
|
|
1999-04-07 22:42:40 +08:00
|
|
|
#ifdef __MIPSEB__
|
|
|
|
#define __IEEE_BIG_ENDIAN
|
|
|
|
#endif
|
|
|
|
|
1999-10-02 23:44:24 +08:00
|
|
|
#ifdef __pj__
|
|
|
|
#ifdef __pjl__
|
|
|
|
#define __IEEE_LITTLE_ENDIAN
|
|
|
|
#else
|
|
|
|
#define __IEEE_BIG_ENDIAN
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
1999-04-07 22:42:40 +08:00
|
|
|
/* necv70 was __IEEE_LITTLE_ENDIAN. */
|
|
|
|
|
|
|
|
#ifdef __W65__
|
|
|
|
#define __IEEE_LITTLE_ENDIAN
|
|
|
|
#define __SMALL_BITFIELDS
|
|
|
|
#define _DOUBLE_IS_32BITS
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined(__Z8001__) || defined(__Z8002__)
|
|
|
|
#define __IEEE_BIG_ENDIAN
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef __m88k__
|
|
|
|
#define __IEEE_BIG_ENDIAN
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef __v800
|
|
|
|
#define __IEEE_LITTLE_ENDIAN
|
|
|
|
#endif
|
|
|
|
|
2002-01-02 23:58:39 +08:00
|
|
|
#if defined (__PPC__) || defined (__ppc__)
|
2002-01-02 23:07:16 +08:00
|
|
|
#if (defined(_BIG_ENDIAN) && _BIG_ENDIAN) || (defined(_AIX) && _AIX) \
|
|
|
|
|| defined (__APPLE__)
|
1999-04-07 22:42:40 +08:00
|
|
|
#define __IEEE_BIG_ENDIAN
|
|
|
|
#else
|
|
|
|
#if (defined(_LITTLE_ENDIAN) && _LITTLE_ENDIAN) || (defined(__sun__) && __sun__) || (defined(__WIN32__) && __WIN32__)
|
|
|
|
#define __IEEE_LITTLE_ENDIAN
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
2000-06-24 03:53:33 +08:00
|
|
|
#ifdef __fr30__
|
|
|
|
#define __IEEE_BIG_ENDIAN
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef __mcore__
|
|
|
|
#define __IEEE_BIG_ENDIAN
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef __ia64__
|
|
|
|
#ifdef __BIG_ENDIAN__
|
|
|
|
#define __IEEE_BIG_ENDIAN
|
|
|
|
#else
|
|
|
|
#define __IEEE_LITTLE_ENDIAN
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
2002-04-29 12:15:57 +08:00
|
|
|
#ifdef __s390__
|
|
|
|
#define __IEEE_BIG_ENDIAN
|
|
|
|
#endif
|
|
|
|
|
1999-04-07 22:42:40 +08:00
|
|
|
#ifndef __IEEE_BIG_ENDIAN
|
|
|
|
#ifndef __IEEE_LITTLE_ENDIAN
|
|
|
|
#error Endianess not declared!!
|
|
|
|
#endif /* not __IEEE_LITTLE_ENDIAN */
|
|
|
|
#endif /* not __IEEE_BIG_ENDIAN */
|
|
|
|
|
|
|
|
#endif /* not __IEEE_LITTLE_ENDIAN */
|
|
|
|
#endif /* not __IEEE_BIG_ENDIAN */
|
|
|
|
|