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