drc: some more general cleanup
[pcsx_rearmed.git] / libpcsxcore / new_dynarec / assem_arm.h
CommitLineData
57871462 1#define HOST_REGS 13
2#define HOST_CCREG 10
3#define HOST_BTREG 8
4#define EXCLUDE_REG 11
5
6#define HOST_IMM8 1
7#define HAVE_CMOV_IMM 1
0bbd1454 8#define HAVE_CONDITIONAL_CALL 1
4cb76aa4 9#define RAM_SIZE 0x200000
3d624f89 10
57871462 11/* ARM calling convention:
12 r0-r3, r12: caller-save
13 r4-r11: callee-save */
14
57871462 15/* GCC register naming convention:
16 r10 = sl (base)
17 r11 = fp (frame pointer)
18 r12 = ip (scratch)
19 r13 = sp (stack pointer)
20 r14 = lr (link register)
21 r15 = pc (program counter) */
22
23#define FP 11
24#define LR 14
25#define HOST_TEMPREG 14
26
27// Note: FP is set to &dynarec_local when executing generated code.
28// Thus the local variables are actually global and not on the stack.
29
30extern char *invc_ptr;
31
57871462 32#define TARGET_SIZE_2 24 // 2^24 = 16 megabytes
33
bdeade46 34// Code generator target address
1e212a25 35#if defined(BASE_ADDR_FIXED)
36 // "round" address helpful for debug
37 // this produces best code, but not many platforms allow it,
38 // only use if you are sure this range is always free
643aeae3 39 #define BASE_ADDR_ 0x1000000
40 #define translation_cache (u_char *)BASE_ADDR_
1e212a25 41#elif defined(BASE_ADDR_DYNAMIC)
42 // for platforms that can't just use .bss buffer, like vita
43 // otherwise better to use the next option for closer branches
643aeae3 44 extern u_char *translation_cache;
bdeade46 45#else
1e212a25 46 // using a static buffer in .bss
643aeae3 47 extern u_char translation_cache[1 << TARGET_SIZE_2];
bdeade46 48#endif