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