-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy patharch_amd64.h
50 lines (46 loc) · 1.53 KB
/
arch_amd64.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#ifndef LICE_ARCH_AMD64_HDR
/*
* File: arch_amd64.h
* Isolates AMD64 / SystemV ABI specific details that are used in
* a variety of places of the compiler to target AMD64.
*/
/*
* Constants: Native type sizes
*
* The following are macros which describe the sizes of various native
* data types, they should reflect their true sizes on the given
* architecture unless mentioned otherwise by a specific ABI.
*
* ARCH_TYPE_SIZE_CHAR - Size of a char
* ARCH_TYPE_SIZE_LONG - Size of a long
* ARCH_TYPE_SIZE_LLONG - Size of a long long
* ARCH_TYPE_SIZE_INT - Size of a int
* ARCH_TYPE_SIZE_SHORT - Size of a short
* ARCH_TYPE_SIZE_FLOAT - Size of a float
* ARCH_TYPE_SIZE_DOUBLE - Size of a double
* ARCH_TYPE_SIZE_LDOUBLE - Size of a long double
* ARCH_TYPE_SIZE_POINTER - Size of a pointer
*/
#define ARCH_TYPE_SIZE_CHAR 1
#define ARCH_TYPE_SIZE_LONG 8
#define ARCH_TYPE_SIZE_LLONG 8
#define ARCH_TYPE_SIZE_INT 4
#define ARCH_TYPE_SIZE_SHORT 2
#define ARCH_TYPE_SIZE_FLOAT 4
#define ARCH_TYPE_SIZE_DOUBLE 8
#define ARCH_TYPE_SIZE_LDOUBLE 8
#define ARCH_TYPE_SIZE_POINTER 8
/*
* Macro: ARCH_ALIGNMENT
* The default alignment of structure elements (padding) for the given
* architecture / ABI
*/
#define ARCH_ALIGNMENT 16
/*
* Macro: ARCH_CALLREGISTERS
* The maximum number of registers to place a direct or indirect
* function call for the given architecture / ABI, after which stack
* space will be used.
*/
#define ARCH_CALLREGISTERS 6
#endif