1*dc9b124dSJustin Hibbits /* $NetBSD: arm-gcc.h,v 1.2 2001/02/21 18:09:25 bjh21 Exp $ */ 2*dc9b124dSJustin Hibbits 3*dc9b124dSJustin Hibbits /* 4*dc9b124dSJustin Hibbits ------------------------------------------------------------------------------- 5*dc9b124dSJustin Hibbits One of the macros `BIGENDIAN' or `LITTLEENDIAN' must be defined. 6*dc9b124dSJustin Hibbits ------------------------------------------------------------------------------- 7*dc9b124dSJustin Hibbits */ 8*dc9b124dSJustin Hibbits #define BIGENDIAN 9*dc9b124dSJustin Hibbits 10*dc9b124dSJustin Hibbits /* 11*dc9b124dSJustin Hibbits ------------------------------------------------------------------------------- 12*dc9b124dSJustin Hibbits The macro `BITS64' can be defined to indicate that 64-bit integer types are 13*dc9b124dSJustin Hibbits supported by the compiler. 14*dc9b124dSJustin Hibbits ------------------------------------------------------------------------------- 15*dc9b124dSJustin Hibbits */ 16*dc9b124dSJustin Hibbits #define BITS64 17*dc9b124dSJustin Hibbits 18*dc9b124dSJustin Hibbits /* 19*dc9b124dSJustin Hibbits ------------------------------------------------------------------------------- 20*dc9b124dSJustin Hibbits Each of the following `typedef's defines the most convenient type that holds 21*dc9b124dSJustin Hibbits integers of at least as many bits as specified. For example, `uint8' should 22*dc9b124dSJustin Hibbits be the most convenient type that can hold unsigned integers of as many as 23*dc9b124dSJustin Hibbits 8 bits. The `flag' type must be able to hold either a 0 or 1. For most 24*dc9b124dSJustin Hibbits implementations of C, `flag', `uint8', and `int8' should all be `typedef'ed 25*dc9b124dSJustin Hibbits to the same as `int'. 26*dc9b124dSJustin Hibbits ------------------------------------------------------------------------------- 27*dc9b124dSJustin Hibbits */ 28*dc9b124dSJustin Hibbits typedef int flag; 29*dc9b124dSJustin Hibbits typedef unsigned int uint8; 30*dc9b124dSJustin Hibbits typedef int int8; 31*dc9b124dSJustin Hibbits typedef unsigned int uint16; 32*dc9b124dSJustin Hibbits typedef int int16; 33*dc9b124dSJustin Hibbits typedef unsigned int uint32; 34*dc9b124dSJustin Hibbits typedef signed int int32; 35*dc9b124dSJustin Hibbits #ifdef BITS64 36*dc9b124dSJustin Hibbits typedef unsigned long long int uint64; 37*dc9b124dSJustin Hibbits typedef signed long long int int64; 38*dc9b124dSJustin Hibbits #endif 39*dc9b124dSJustin Hibbits 40*dc9b124dSJustin Hibbits /* 41*dc9b124dSJustin Hibbits ------------------------------------------------------------------------------- 42*dc9b124dSJustin Hibbits Each of the following `typedef's defines a type that holds integers 43*dc9b124dSJustin Hibbits of _exactly_ the number of bits specified. For instance, for most 44*dc9b124dSJustin Hibbits implementation of C, `bits16' and `sbits16' should be `typedef'ed to 45*dc9b124dSJustin Hibbits `unsigned short int' and `signed short int' (or `short int'), respectively. 46*dc9b124dSJustin Hibbits ------------------------------------------------------------------------------- 47*dc9b124dSJustin Hibbits */ 48*dc9b124dSJustin Hibbits typedef unsigned char bits8; 49*dc9b124dSJustin Hibbits typedef signed char sbits8; 50*dc9b124dSJustin Hibbits typedef unsigned short int bits16; 51*dc9b124dSJustin Hibbits typedef signed short int sbits16; 52*dc9b124dSJustin Hibbits typedef unsigned int bits32; 53*dc9b124dSJustin Hibbits typedef signed int sbits32; 54*dc9b124dSJustin Hibbits #ifdef BITS64 55*dc9b124dSJustin Hibbits typedef unsigned long long int bits64; 56*dc9b124dSJustin Hibbits typedef signed long long int sbits64; 57*dc9b124dSJustin Hibbits #endif 58*dc9b124dSJustin Hibbits 59*dc9b124dSJustin Hibbits #ifdef BITS64 60*dc9b124dSJustin Hibbits /* 61*dc9b124dSJustin Hibbits ------------------------------------------------------------------------------- 62*dc9b124dSJustin Hibbits The `LIT64' macro takes as its argument a textual integer literal and 63*dc9b124dSJustin Hibbits if necessary ``marks'' the literal as having a 64-bit integer type. 64*dc9b124dSJustin Hibbits For example, the GNU C Compiler (`gcc') requires that 64-bit literals be 65*dc9b124dSJustin Hibbits appended with the letters `LL' standing for `long long', which is `gcc's 66*dc9b124dSJustin Hibbits name for the 64-bit integer type. Some compilers may allow `LIT64' to be 67*dc9b124dSJustin Hibbits defined as the identity macro: `#define LIT64( a ) a'. 68*dc9b124dSJustin Hibbits ------------------------------------------------------------------------------- 69*dc9b124dSJustin Hibbits */ 70*dc9b124dSJustin Hibbits #define LIT64( a ) a##LL 71*dc9b124dSJustin Hibbits #endif 72*dc9b124dSJustin Hibbits 73*dc9b124dSJustin Hibbits /* 74*dc9b124dSJustin Hibbits ------------------------------------------------------------------------------- 75*dc9b124dSJustin Hibbits The macro `INLINE' can be used before functions that should be inlined. If 76*dc9b124dSJustin Hibbits a compiler does not support explicit inlining, this macro should be defined 77*dc9b124dSJustin Hibbits to be `static'. 78*dc9b124dSJustin Hibbits ------------------------------------------------------------------------------- 79*dc9b124dSJustin Hibbits */ 80*dc9b124dSJustin Hibbits #define INLINE static __inline 81*dc9b124dSJustin Hibbits 82*dc9b124dSJustin Hibbits /* 83*dc9b124dSJustin Hibbits ------------------------------------------------------------------------------- 84*dc9b124dSJustin Hibbits The ARM FPA is odd in that it stores doubles high-order word first, no matter 85*dc9b124dSJustin Hibbits what the endianness of the CPU. VFP is sane. 86*dc9b124dSJustin Hibbits ------------------------------------------------------------------------------- 87*dc9b124dSJustin Hibbits */ 88*dc9b124dSJustin Hibbits #if defined(SOFTFLOAT_FOR_GCC) 89*dc9b124dSJustin Hibbits #define FLOAT64_DEMANGLE(a) (a) 90*dc9b124dSJustin Hibbits #define FLOAT64_MANGLE(a) (a) 91*dc9b124dSJustin Hibbits #endif 92