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