]>
Commit | Line | Data |
---|---|---|
1dbda2b4 AB |
1 | /** @file\r |
2 | \r | |
3 | Copyright (c) 2014, ARM Limited. All rights reserved.\r | |
4 | \r | |
4059386c | 5 | SPDX-License-Identifier: BSD-2-Clause-Patent\r |
1dbda2b4 AB |
6 | \r |
7 | **/\r | |
8 | \r | |
9 | /* $NetBSD: arm-gcc.h,v 1.4 2013/01/26 07:08:14 matt Exp $ */\r | |
10 | \r | |
11 | /*\r | |
12 | -------------------------------------------------------------------------------\r | |
13 | One of the macros `BIGENDIAN' or `LITTLEENDIAN' must be defined.\r | |
14 | -------------------------------------------------------------------------------\r | |
15 | */\r | |
16 | #ifdef __ARMEB__\r | |
17 | #define BIGENDIAN\r | |
18 | #else\r | |
19 | #define LITTLEENDIAN\r | |
20 | #endif\r | |
21 | \r | |
22 | /*\r | |
23 | -------------------------------------------------------------------------------\r | |
24 | The macro `BITS64' can be defined to indicate that 64-bit integer types are\r | |
25 | supported by the compiler.\r | |
26 | -------------------------------------------------------------------------------\r | |
27 | */\r | |
28 | #define BITS64\r | |
29 | \r | |
30 | /*\r | |
31 | -------------------------------------------------------------------------------\r | |
32 | Each of the following `typedef's defines the most convenient type that holds\r | |
33 | integers of at least as many bits as specified. For example, `uint8' should\r | |
34 | be the most convenient type that can hold unsigned integers of as many as\r | |
35 | 8 bits. The `flag' type must be able to hold either a 0 or 1. For most\r | |
36 | implementations of C, `flag', `uint8', and `int8' should all be `typedef'ed\r | |
37 | to the same as `int'.\r | |
38 | -------------------------------------------------------------------------------\r | |
39 | */\r | |
40 | typedef int flag;\r | |
41 | typedef int uint8;\r | |
42 | typedef int int8;\r | |
43 | typedef int uint16;\r | |
44 | typedef int int16;\r | |
45 | typedef unsigned int uint32;\r | |
46 | typedef signed int int32;\r | |
47 | #ifdef BITS64\r | |
48 | typedef unsigned long long int uint64;\r | |
49 | typedef signed long long int int64;\r | |
50 | #endif\r | |
51 | \r | |
52 | /*\r | |
53 | -------------------------------------------------------------------------------\r | |
54 | Each of the following `typedef's defines a type that holds integers\r | |
55 | of _exactly_ the number of bits specified. For instance, for most\r | |
56 | implementation of C, `bits16' and `sbits16' should be `typedef'ed to\r | |
57 | `unsigned short int' and `signed short int' (or `short int'), respectively.\r | |
58 | -------------------------------------------------------------------------------\r | |
59 | */\r | |
60 | typedef unsigned char bits8;\r | |
61 | typedef signed char sbits8;\r | |
62 | typedef unsigned short int bits16;\r | |
63 | typedef signed short int sbits16;\r | |
64 | typedef unsigned int bits32;\r | |
65 | typedef signed int sbits32;\r | |
66 | #ifdef BITS64\r | |
67 | typedef unsigned long long int bits64;\r | |
68 | typedef signed long long int sbits64;\r | |
69 | #endif\r | |
70 | \r | |
71 | #ifdef BITS64\r | |
72 | /*\r | |
73 | -------------------------------------------------------------------------------\r | |
74 | The `LIT64' macro takes as its argument a textual integer literal and\r | |
75 | if necessary ``marks'' the literal as having a 64-bit integer type.\r | |
76 | For example, the GNU C Compiler (`gcc') requires that 64-bit literals be\r | |
77 | appended with the letters `LL' standing for `long long', which is `gcc's\r | |
78 | name for the 64-bit integer type. Some compilers may allow `LIT64' to be\r | |
79 | defined as the identity macro: `#define LIT64( a ) a'.\r | |
80 | -------------------------------------------------------------------------------\r | |
81 | */\r | |
82 | #define LIT64( a ) a##ULL\r | |
83 | #endif\r | |
84 | \r | |
85 | /*\r | |
86 | -------------------------------------------------------------------------------\r | |
87 | The macro `INLINE' can be used before functions that should be inlined. If\r | |
88 | a compiler does not support explicit inlining, this macro should be defined\r | |
89 | to be `static'.\r | |
90 | -------------------------------------------------------------------------------\r | |
91 | */\r | |
92 | #define INLINE static inline\r | |
93 | \r | |
94 | /*\r | |
95 | -------------------------------------------------------------------------------\r | |
96 | The ARM FPA is odd in that it stores doubles high-order word first, no matter\r | |
97 | what the endianness of the CPU. VFP is sane.\r | |
98 | -------------------------------------------------------------------------------\r | |
99 | */\r | |
100 | #if defined(SOFTFLOAT_FOR_GCC)\r | |
101 | #if defined(__VFP_FP__) || defined(__ARMEB__)\r | |
102 | #define FLOAT64_DEMANGLE(a) (a)\r | |
103 | #define FLOAT64_MANGLE(a) (a)\r | |
104 | #else\r | |
105 | #define FLOAT64_DEMANGLE(a) (((a) << 32) | ((a) >> 32))\r | |
106 | #define FLOAT64_MANGLE(a) FLOAT64_DEMANGLE(a)\r | |
107 | #endif\r | |
108 | #endif\r |