]>
git.proxmox.com Git - mirror_edk2.git/blob - StdLib/Include/Aarch64/arm-gcc.h
3 Copyright (c) 2014, ARM Limited. All rights reserved.
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
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.
15 /* $NetBSD: arm-gcc.h,v 1.4 2013/01/26 07:08:14 matt Exp $ */
18 -------------------------------------------------------------------------------
19 One of the macros `BIGENDIAN' or `LITTLEENDIAN' must be defined.
20 -------------------------------------------------------------------------------
25 -------------------------------------------------------------------------------
26 The macro `BITS64' can be defined to indicate that 64-bit integer types are
27 supported by the compiler.
28 -------------------------------------------------------------------------------
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
40 -------------------------------------------------------------------------------
47 typedef unsigned int uint32
;
48 typedef signed int int32
;
50 typedef unsigned long long int uint64
;
51 typedef signed long long int int64
;
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 -------------------------------------------------------------------------------
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
;
69 typedef unsigned long long int bits64
;
70 typedef signed long long int sbits64
;
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 -------------------------------------------------------------------------------
84 #define LIT64( a ) a##ULL
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
92 -------------------------------------------------------------------------------
94 #define INLINE static inline
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 -------------------------------------------------------------------------------
102 #if defined(SOFTFLOAT_FOR_GCC)
103 #if defined(__VFP_FP__)
104 #define FLOAT64_DEMANGLE(a) (a)
105 #define FLOAT64_MANGLE(a) (a)
107 #define FLOAT64_DEMANGLE(a) (((a) << 32) | ((a) >> 32))
108 #define FLOAT64_MANGLE(a) FLOAT64_DEMANGLE(a)