1209878Snwhitehorn/* $NetBSD: arm-gcc.h,v 1.2 2001/02/21 18:09:25 bjh21 Exp $ */
2209878Snwhitehorn/* $FreeBSD$ */
3209878Snwhitehorn
4209878Snwhitehorn/*
5209878Snwhitehorn-------------------------------------------------------------------------------
6209878SnwhitehornOne of the macros `BIGENDIAN' or `LITTLEENDIAN' must be defined.
7209878Snwhitehorn-------------------------------------------------------------------------------
8209878Snwhitehorn*/
9209878Snwhitehorn#define BIGENDIAN
10209878Snwhitehorn
11209878Snwhitehorn/*
12209878Snwhitehorn-------------------------------------------------------------------------------
13209878SnwhitehornThe macro `BITS64' can be defined to indicate that 64-bit integer types are
14209878Snwhitehornsupported by the compiler.
15209878Snwhitehorn-------------------------------------------------------------------------------
16209878Snwhitehorn*/
17209878Snwhitehorn#define BITS64
18209878Snwhitehorn
19209878Snwhitehorn/*
20209878Snwhitehorn-------------------------------------------------------------------------------
21209878SnwhitehornEach of the following `typedef's defines the most convenient type that holds
22209878Snwhitehornintegers of at least as many bits as specified.  For example, `uint8' should
23209878Snwhitehornbe the most convenient type that can hold unsigned integers of as many as
24209878Snwhitehorn8 bits.  The `flag' type must be able to hold either a 0 or 1.  For most
25209878Snwhitehornimplementations of C, `flag', `uint8', and `int8' should all be `typedef'ed
26209878Snwhitehornto the same as `int'.
27209878Snwhitehorn-------------------------------------------------------------------------------
28209878Snwhitehorn*/
29209878Snwhitehorntypedef int flag;
30209878Snwhitehorntypedef unsigned int uint8;
31209878Snwhitehorntypedef int int8;
32209878Snwhitehorntypedef unsigned int uint16;
33209878Snwhitehorntypedef int int16;
34209878Snwhitehorntypedef unsigned int uint32;
35209878Snwhitehorntypedef signed int int32;
36209878Snwhitehorn#ifdef BITS64
37209878Snwhitehorntypedef unsigned long long int uint64;
38209878Snwhitehorntypedef signed long long int int64;
39209878Snwhitehorn#endif
40209878Snwhitehorn
41209878Snwhitehorn/*
42209878Snwhitehorn-------------------------------------------------------------------------------
43209878SnwhitehornEach of the following `typedef's defines a type that holds integers
44209878Snwhitehornof _exactly_ the number of bits specified.  For instance, for most
45209878Snwhitehornimplementation of C, `bits16' and `sbits16' should be `typedef'ed to
46209878Snwhitehorn`unsigned short int' and `signed short int' (or `short int'), respectively.
47209878Snwhitehorn-------------------------------------------------------------------------------
48209878Snwhitehorn*/
49209878Snwhitehorntypedef unsigned char bits8;
50209878Snwhitehorntypedef signed char sbits8;
51209878Snwhitehorntypedef unsigned short int bits16;
52209878Snwhitehorntypedef signed short int sbits16;
53209878Snwhitehorntypedef unsigned int bits32;
54209878Snwhitehorntypedef signed int sbits32;
55209878Snwhitehorn#ifdef BITS64
56209878Snwhitehorntypedef unsigned long long int bits64;
57209878Snwhitehorntypedef signed long long int sbits64;
58209878Snwhitehorn#endif
59209878Snwhitehorn
60209878Snwhitehorn#ifdef BITS64
61209878Snwhitehorn/*
62209878Snwhitehorn-------------------------------------------------------------------------------
63209878SnwhitehornThe `LIT64' macro takes as its argument a textual integer literal and
64209878Snwhitehornif necessary ``marks'' the literal as having a 64-bit integer type.
65209878SnwhitehornFor example, the GNU C Compiler (`gcc') requires that 64-bit literals be
66209878Snwhitehornappended with the letters `LL' standing for `long long', which is `gcc's
67209878Snwhitehornname for the 64-bit integer type.  Some compilers may allow `LIT64' to be
68209878Snwhitehorndefined as the identity macro:  `#define LIT64( a ) a'.
69209878Snwhitehorn-------------------------------------------------------------------------------
70209878Snwhitehorn*/
71209878Snwhitehorn#define LIT64( a ) a##LL
72209878Snwhitehorn#endif
73209878Snwhitehorn
74209878Snwhitehorn/*
75209878Snwhitehorn-------------------------------------------------------------------------------
76209878SnwhitehornThe macro `INLINE' can be used before functions that should be inlined.  If
77209878Snwhitehorna compiler does not support explicit inlining, this macro should be defined
78209878Snwhitehornto be `static'.
79209878Snwhitehorn-------------------------------------------------------------------------------
80209878Snwhitehorn*/
81209878Snwhitehorn#define INLINE static __inline
82209878Snwhitehorn
83209878Snwhitehorn/*
84209878Snwhitehorn-------------------------------------------------------------------------------
85209878SnwhitehornThe ARM FPA is odd in that it stores doubles high-order word first, no matter
86209878Snwhitehornwhat the endianness of the CPU.  VFP is sane.
87209878Snwhitehorn-------------------------------------------------------------------------------
88209878Snwhitehorn*/
89209878Snwhitehorn#if defined(SOFTFLOAT_FOR_GCC)
90209878Snwhitehorn#define FLOAT64_DEMANGLE(a)	(a)
91209878Snwhitehorn#define FLOAT64_MANGLE(a)	(a)
92209878Snwhitehorn#endif
93