be516ebe |
1 | #define HOST_IMM8 1 |
be516ebe |
2 | |
be516ebe |
3 | /* calling convention: |
555d3b51 |
4 | x0 -x17: caller-save |
5 | x18 : caller-save (platform reg) |
6 | x19-x29: callee-save */ |
be516ebe |
7 | |
b7ec323c |
8 | #define HOST_REGS 29 |
b7ec323c |
9 | #define EXCLUDE_REG -1 |
10 | |
d1e4ebd9 |
11 | #define SP 31 |
12 | #define WZR SP |
13 | #define XZR SP |
687b4580 |
14 | |
be516ebe |
15 | #define LR 30 |
16 | #define HOST_TEMPREG LR |
17 | |
18 | // Note: FP is set to &dynarec_local when executing generated code. |
19 | // Thus the local variables are actually global and not on the stack. |
20 | #define FP 29 |
21 | #define rFP x29 |
22 | |
23 | #define HOST_CCREG 28 |
24 | #define rCC w28 |
25 | |
b7ec323c |
26 | #define CALLER_SAVE_REGS 0x0007ffff |
27 | #define PREFERRED_REG_FIRST 19 |
28 | #define PREFERRED_REG_LAST 27 |
29 | |
33a1eda1 |
30 | #define DRC_DBG_REGMASK 3 // others done by do_insn_cmp_arm64 |
31 | #define do_insn_cmp do_insn_cmp_arm64 |
32 | |
687b4580 |
33 | // stack space |
33a1eda1 |
34 | #define SSP_CALLEE_REGS (8*12) // new_dyna_start caller's |
687b4580 |
35 | #define SSP_CALLER_REGS (8*20) |
36 | #define SSP_ALL (SSP_CALLEE_REGS+SSP_CALLER_REGS) |
37 | |
2a014d73 |
38 | #define TARGET_SIZE_2 24 // 2^24 = 16 megabytes |
39 | |
be516ebe |
40 | #ifndef __ASSEMBLER__ |
41 | |
42 | extern char *invc_ptr; |
43 | |
2a014d73 |
44 | struct tramp_insns |
45 | { |
46 | u_int ldr; |
47 | u_int br; |
48 | }; |
be516ebe |
49 | |
2a014d73 |
50 | static void clear_cache_arm64(char *start, char *end); |
be516ebe |
51 | |
277718fa |
52 | void do_memhandler_pre(); |
53 | void do_memhandler_post(); |
54 | |
be516ebe |
55 | #endif // !__ASSEMBLY__ |