Static tramp v5 (#624)
[platform/upstream/libffi.git] / src / x86 / internal64.h
1 #define UNIX64_RET_VOID         0
2 #define UNIX64_RET_UINT8        1
3 #define UNIX64_RET_UINT16       2
4 #define UNIX64_RET_UINT32       3
5 #define UNIX64_RET_SINT8        4
6 #define UNIX64_RET_SINT16       5
7 #define UNIX64_RET_SINT32       6
8 #define UNIX64_RET_INT64        7
9 #define UNIX64_RET_XMM32        8
10 #define UNIX64_RET_XMM64        9
11 #define UNIX64_RET_X87          10
12 #define UNIX64_RET_X87_2        11
13 #define UNIX64_RET_ST_XMM0_RAX  12
14 #define UNIX64_RET_ST_RAX_XMM0  13
15 #define UNIX64_RET_ST_XMM0_XMM1 14
16 #define UNIX64_RET_ST_RAX_RDX   15
17
18 #define UNIX64_RET_LAST         15
19
20 #define UNIX64_FLAG_RET_IN_MEM  (1 << 10)
21 #define UNIX64_FLAG_XMM_ARGS    (1 << 11)
22 #define UNIX64_SIZE_SHIFT       12
23
24 #if defined(FFI_EXEC_STATIC_TRAMP)
25 /*
26  * For the trampoline code table mapping, a mapping size of 4K (base page size)
27  * is chosen.
28  */
29 #define UNIX64_TRAMP_MAP_SHIFT  12
30 #define UNIX64_TRAMP_MAP_SIZE   (1 << UNIX64_TRAMP_MAP_SHIFT)
31 #ifdef ENDBR_PRESENT
32 #define UNIX64_TRAMP_SIZE       40
33 #else
34 #define UNIX64_TRAMP_SIZE       32
35 #endif
36 #endif