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