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