]> pd.if.org Git - lice/blob - arch_amd64.h
autocommit for files dated 2014-11-17 20:15:26
[lice] / arch_amd64.h
1 #ifndef LICE_ARCH_AMD64_HDR
2 /*
3  * File: arch_amd64.h
4  *  Isolates AMD64 / SystemV ABI specific details that are used in
5  *  a variety of places of the compiler to target AMD64.
6  */
7
8 /*
9  * Constants: Native type sizes
10  *
11  *  The following are macros which describe the sizes of various native
12  *  data types, they should reflect their true sizes on the given
13  *  architecture unless mentioned otherwise by a specific ABI.
14  *
15  *  ARCH_TYPE_SIZE_CHAR     - Size of a char
16  *  ARCH_TYPE_SIZE_LONG     - Size of a long
17  *  ARCH_TYPE_SIZE_LLONG    - Size of a long long
18  *  ARCH_TYPE_SIZE_INT      - Size of a int
19  *  ARCH_TYPE_SIZE_SHORT    - Size of a short
20  *  ARCH_TYPE_SIZE_FLOAT    - Size of a float
21  *  ARCH_TYPE_SIZE_DOUBLE   - Size of a double
22  *  ARCH_TYPE_SIZE_LDOUBLE  - Size of a long double
23  *  ARCH_TYPE_SIZE_POINTER  - Size of a pointer
24  */
25 #define ARCH_TYPE_SIZE_CHAR      1
26 #define ARCH_TYPE_SIZE_LONG      8
27 #define ARCH_TYPE_SIZE_LLONG     8
28 #define ARCH_TYPE_SIZE_INT       4
29 #define ARCH_TYPE_SIZE_SHORT     2
30 #define ARCH_TYPE_SIZE_FLOAT     4
31 #define ARCH_TYPE_SIZE_DOUBLE    8
32 #define ARCH_TYPE_SIZE_LDOUBLE   8
33 #define ARCH_TYPE_SIZE_POINTER   8
34
35 /*
36  * Macro: ARCH_ALIGNMENT
37  *  The default alignment of structure elements (padding) for the given
38  *  architecture / ABI
39  */
40 #define ARCH_ALIGNMENT           16
41
42 #endif