drc: prefer callee-saved regs on alloc
[pcsx_rearmed.git] / libpcsxcore / new_dynarec / assem_arm64.h
1 #define HOST_IMM8 1
2
3 /* calling convention:
4    r0 -r17: caller-save
5    r19-r29: callee-save */
6
7 #define HOST_REGS 29
8 #define HOST_BTREG 27
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 // stack space
31 #define SSP_CALLEE_REGS (8*12)
32 #define SSP_CALLER_REGS (8*20)
33 #define SSP_ALL (SSP_CALLEE_REGS+SSP_CALLER_REGS)
34
35 #define TARGET_SIZE_2 24 // 2^24 = 16 megabytes
36
37 #ifndef __ASSEMBLER__
38
39 extern char *invc_ptr;
40
41 struct tramp_insns
42 {
43   u_int ldr;
44   u_int br;
45 };
46
47 static void clear_cache_arm64(char *start, char *end);
48
49 #endif // !__ASSEMBLY__