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