drc: arm64 wip
[pcsx_rearmed.git] / libpcsxcore / new_dynarec / assem_arm64.h
CommitLineData
be516ebe 1#define HOST_REGS 29
2#define HOST_BTREG 27
3#define EXCLUDE_REG -1
4
5#define HOST_IMM8 1
be516ebe 6#define RAM_SIZE 0x200000
7
be516ebe 8/* calling convention:
9 r0 -r17: caller-save
10 r19-r29: callee-save */
11
d1e4ebd9 12#define SP 31
13#define WZR SP
14#define XZR SP
687b4580 15
be516ebe 16#define LR 30
17#define HOST_TEMPREG LR
18
19// Note: FP is set to &dynarec_local when executing generated code.
20// Thus the local variables are actually global and not on the stack.
21#define FP 29
22#define rFP x29
23
24#define HOST_CCREG 28
25#define rCC w28
26
687b4580 27// stack space
28#define SSP_CALLEE_REGS (8*12)
29#define SSP_CALLER_REGS (8*20)
30#define SSP_ALL (SSP_CALLEE_REGS+SSP_CALLER_REGS)
31
be516ebe 32#ifndef __ASSEMBLER__
33
34extern char *invc_ptr;
35
36#define TARGET_SIZE_2 24 // 2^24 = 16 megabytes
37
38// Code generator target address
39#if defined(BASE_ADDR_DYNAMIC)
40 // for platforms that can't just use .bss buffer (are there any on arm64?)
41 extern u_char *translation_cache;
42#else
43 // using a static buffer in .bss
44 extern u_char translation_cache[1 << TARGET_SIZE_2];
45#endif
46
47#endif // !__ASSEMBLY__