1178620Smarcel/* $NetBSD: arm-gcc.h,v 1.2 2001/02/21 18:09:25 bjh21 Exp $ */ 2178620Smarcel/* $FreeBSD$ */ 3178620Smarcel 4178620Smarcel/* 5178620Smarcel------------------------------------------------------------------------------- 6178620SmarcelOne of the macros `BIGENDIAN' or `LITTLEENDIAN' must be defined. 7178620Smarcel------------------------------------------------------------------------------- 8178620Smarcel*/ 9178620Smarcel#define BIGENDIAN 10178620Smarcel 11178620Smarcel/* 12178620Smarcel------------------------------------------------------------------------------- 13178620SmarcelThe macro `BITS64' can be defined to indicate that 64-bit integer types are 14178620Smarcelsupported by the compiler. 15178620Smarcel------------------------------------------------------------------------------- 16178620Smarcel*/ 17178620Smarcel#define BITS64 18178620Smarcel 19178620Smarcel/* 20178620Smarcel------------------------------------------------------------------------------- 21178620SmarcelEach of the following `typedef's defines the most convenient type that holds 22178620Smarcelintegers of at least as many bits as specified. For example, `uint8' should 23178620Smarcelbe the most convenient type that can hold unsigned integers of as many as 24178620Smarcel8 bits. The `flag' type must be able to hold either a 0 or 1. For most 25178620Smarcelimplementations of C, `flag', `uint8', and `int8' should all be `typedef'ed 26178620Smarcelto the same as `int'. 27178620Smarcel------------------------------------------------------------------------------- 28178620Smarcel*/ 29178620Smarceltypedef int flag; 30178620Smarceltypedef unsigned int uint8; 31178620Smarceltypedef int int8; 32178620Smarceltypedef unsigned int uint16; 33178620Smarceltypedef int int16; 34178620Smarceltypedef unsigned int uint32; 35178620Smarceltypedef signed int int32; 36178620Smarcel#ifdef BITS64 37178620Smarceltypedef unsigned long long int uint64; 38178620Smarceltypedef signed long long int int64; 39178620Smarcel#endif 40178620Smarcel 41178620Smarcel/* 42178620Smarcel------------------------------------------------------------------------------- 43178620SmarcelEach of the following `typedef's defines a type that holds integers 44178620Smarcelof _exactly_ the number of bits specified. For instance, for most 45178620Smarcelimplementation of C, `bits16' and `sbits16' should be `typedef'ed to 46178620Smarcel`unsigned short int' and `signed short int' (or `short int'), respectively. 47178620Smarcel------------------------------------------------------------------------------- 48178620Smarcel*/ 49178620Smarceltypedef unsigned char bits8; 50178620Smarceltypedef signed char sbits8; 51178620Smarceltypedef unsigned short int bits16; 52178620Smarceltypedef signed short int sbits16; 53178620Smarceltypedef unsigned int bits32; 54178620Smarceltypedef signed int sbits32; 55178620Smarcel#ifdef BITS64 56178620Smarceltypedef unsigned long long int bits64; 57178620Smarceltypedef signed long long int sbits64; 58178620Smarcel#endif 59178620Smarcel 60178620Smarcel#ifdef BITS64 61178620Smarcel/* 62178620Smarcel------------------------------------------------------------------------------- 63178620SmarcelThe `LIT64' macro takes as its argument a textual integer literal and 64178620Smarcelif necessary ``marks'' the literal as having a 64-bit integer type. 65178620SmarcelFor example, the GNU C Compiler (`gcc') requires that 64-bit literals be 66178620Smarcelappended with the letters `LL' standing for `long long', which is `gcc's 67178620Smarcelname for the 64-bit integer type. Some compilers may allow `LIT64' to be 68178620Smarceldefined as the identity macro: `#define LIT64( a ) a'. 69178620Smarcel------------------------------------------------------------------------------- 70178620Smarcel*/ 71178620Smarcel#define LIT64( a ) a##LL 72178620Smarcel#endif 73178620Smarcel 74178620Smarcel/* 75178620Smarcel------------------------------------------------------------------------------- 76178620SmarcelThe macro `INLINE' can be used before functions that should be inlined. If 77178620Smarcela compiler does not support explicit inlining, this macro should be defined 78178620Smarcelto be `static'. 79178620Smarcel------------------------------------------------------------------------------- 80178620Smarcel*/ 81178620Smarcel#define INLINE static __inline 82178620Smarcel 83178620Smarcel/* 84178620Smarcel------------------------------------------------------------------------------- 85178620SmarcelThe ARM FPA is odd in that it stores doubles high-order word first, no matter 86178620Smarcelwhat the endianness of the CPU. VFP is sane. 87178620Smarcel------------------------------------------------------------------------------- 88178620Smarcel*/ 89178620Smarcel#if defined(SOFTFLOAT_FOR_GCC) 90178620Smarcel#define FLOAT64_DEMANGLE(a) (a) 91178620Smarcel#define FLOAT64_MANGLE(a) (a) 92178620Smarcel#endif 93