948b91d8814f18ca5d653211dee4cfd859a82d90
[pcsx_rearmed.git] / libpcsxcore / new_dynarec / assem_arm64.h
1 #define HOST_IMM8 1
2
3 /* calling convention:
4    x0 -x17: caller-save
5    x18    : caller-save (platform reg)
6    x19-x29: callee-save */
7
8 #define HOST_REGS 29
9 #define EXCLUDE_REG -1
10
11 #define SP 31
12 #define WZR SP
13 #define XZR SP
14
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
26 #define CALLER_SAVE_REGS 0x0007ffff
27 #define PREFERRED_REG_FIRST 19
28 #define PREFERRED_REG_LAST  27
29
30 #define DRC_DBG_REGMASK 3 // others done by do_insn_cmp_arm64
31 #define do_insn_cmp do_insn_cmp_arm64
32
33 // stack space
34 #define SSP_CALLEE_REGS (8*12) // new_dyna_start caller's
35 #define SSP_CALLER_REGS (8*20)
36 #define SSP_ALL (SSP_CALLEE_REGS+SSP_CALLER_REGS)
37
38 #define TARGET_SIZE_2 24 // 2^24 = 16 megabytes
39
40 #ifndef __ASSEMBLER__
41
42 extern char *invc_ptr;
43
44 struct tramp_insns
45 {
46   u_int ldr;
47   u_int br;
48 };
49
50 static void clear_cache_arm64(char *start, char *end);
51
52 void do_memhandler_pre();
53 void do_memhandler_post();
54
55 #endif // !__ASSEMBLY__