powerpc-gcc.h revision 178620
1188887Sdelphij/* $NetBSD: arm-gcc.h,v 1.2 2001/02/21 18:09:25 bjh21 Exp $ */
263790Ssheldonh/* $FreeBSD: head/lib/libc/powerpc/softfloat/powerpc-gcc.h 178620 2008-04-27 18:34:34Z marcel $ */
363790Ssheldonh
463437Ssheldonh/*
563437Ssheldonh-------------------------------------------------------------------------------
663437SsheldonhOne of the macros `BIGENDIAN' or `LITTLEENDIAN' must be defined.
763437Ssheldonh-------------------------------------------------------------------------------
863437Ssheldonh*/
963437Ssheldonh#define BIGENDIAN
1063437Ssheldonh
1163437Ssheldonh/*
1263437Ssheldonh-------------------------------------------------------------------------------
1363437SsheldonhThe macro `BITS64' can be defined to indicate that 64-bit integer types are
1463437Ssheldonhsupported by the compiler.
1563437Ssheldonh-------------------------------------------------------------------------------
1663437Ssheldonh*/
1763437Ssheldonh#define BITS64
1863437Ssheldonh
1963437Ssheldonh/*
2063437Ssheldonh-------------------------------------------------------------------------------
2163437SsheldonhEach of the following `typedef's defines the most convenient type that holds
2263437Ssheldonhintegers of at least as many bits as specified.  For example, `uint8' should
2363437Ssheldonhbe the most convenient type that can hold unsigned integers of as many as
2463437Ssheldonh8 bits.  The `flag' type must be able to hold either a 0 or 1.  For most
2563437Ssheldonhimplementations of C, `flag', `uint8', and `int8' should all be `typedef'ed
2663437Ssheldonhto the same as `int'.
2763437Ssheldonh-------------------------------------------------------------------------------
2863790Ssheldonh*/
2963790Ssheldonhtypedef int flag;
3063790Ssheldonhtypedef unsigned int uint8;
3163790Ssheldonhtypedef int int8;
3263790Ssheldonhtypedef unsigned int uint16;
3363437Ssheldonhtypedef int int16;
3463437Ssheldonhtypedef unsigned int uint32;
3563437Ssheldonhtypedef signed int int32;
3663437Ssheldonh#ifdef BITS64
3763437Ssheldonhtypedef unsigned long long int uint64;
3863437Ssheldonhtypedef signed long long int int64;
3963437Ssheldonh#endif
4063437Ssheldonh
4163437Ssheldonh/*
4263437Ssheldonh-------------------------------------------------------------------------------
43204654SsobomaxEach of the following `typedef's defines a type that holds integers
44204654Ssobomaxof _exactly_ the number of bits specified.  For instance, for most
4592922Simpimplementation of C, `bits16' and `sbits16' should be `typedef'ed to
4663437Ssheldonh`unsigned short int' and `signed short int' (or `short int'), respectively.
4763437Ssheldonh-------------------------------------------------------------------------------
4863437Ssheldonh*/
4963437Ssheldonhtypedef unsigned char bits8;
5063437Ssheldonhtypedef signed char sbits8;
5163437Ssheldonhtypedef unsigned short int bits16;
5263437Ssheldonhtypedef signed short int sbits16;
5363437Ssheldonhtypedef unsigned int bits32;
5463437Ssheldonhtypedef signed int sbits32;
5563437Ssheldonh#ifdef BITS64
5663437Ssheldonhtypedef unsigned long long int bits64;
57275585Sjillestypedef signed long long int sbits64;
58275585Sjilles#endif
5963437Ssheldonh
6063437Ssheldonh#ifdef BITS64
6163437Ssheldonh/*
62181279Scperciva-------------------------------------------------------------------------------
63188887SdelphijThe `LIT64' macro takes as its argument a textual integer literal and
6463817Ssheldonhif necessary ``marks'' the literal as having a 64-bit integer type.
6563816SsheldonhFor example, the GNU C Compiler (`gcc') requires that 64-bit literals be
6663437Ssheldonhappended with the letters `LL' standing for `long long', which is `gcc's
6763437Ssheldonhname for the 64-bit integer type.  Some compilers may allow `LIT64' to be
6863437Ssheldonhdefined as the identity macro:  `#define LIT64( a ) a'.
6963817Ssheldonh-------------------------------------------------------------------------------
7063437Ssheldonh*/
7163437Ssheldonh#define LIT64( a ) a##LL
7263817Ssheldonh#endif
7363437Ssheldonh
7463437Ssheldonh/*
7563437Ssheldonh-------------------------------------------------------------------------------
76275585SjillesThe macro `INLINE' can be used before functions that should be inlined.  If
77275585Sjillesa compiler does not support explicit inlining, this macro should be defined
78275585Sjillesto be `static'.
7963437Ssheldonh-------------------------------------------------------------------------------
8063437Ssheldonh*/
81275585Sjilles#define INLINE static __inline
82275585Sjilles
8363817Ssheldonh/*
8463437Ssheldonh-------------------------------------------------------------------------------
8563437SsheldonhThe ARM FPA is odd in that it stores doubles high-order word first, no matter
8663437Ssheldonhwhat the endianness of the CPU.  VFP is sane.
8763437Ssheldonh-------------------------------------------------------------------------------
8863437Ssheldonh*/
8963437Ssheldonh#if defined(SOFTFLOAT_FOR_GCC)
9063437Ssheldonh#define FLOAT64_DEMANGLE(a)	(a)
9163437Ssheldonh#define FLOAT64_MANGLE(a)	(a)
9263437Ssheldonh#endif
9363437Ssheldonh