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