drc: inv: fix ram ofset and mirror handling
[pcsx_rearmed.git] / libpcsxcore / new_dynarec / assem_arm.h
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
8 #define CORTEX_A8_BRANCH_PREDICTION_HACK 1
9 #define USE_MINI_HT 1
10 //#define REG_PREFETCH 1
11 #define HAVE_CONDITIONAL_CALL 1
12 #define DISABLE_TLB 1
13 //#define MUPEN64
14 #define FORCE32 1
15 #define DISABLE_COP1 1
16 #define PCSX 1
17 #define RAM_SIZE 0x200000
18
19 #ifndef __ARM_ARCH_7A__
20 #define ARMv5_ONLY
21 //#undef CORTEX_A8_BRANCH_PREDICTION_HACK
22 //#undef USE_MINI_HT
23 #endif
24
25 #ifndef BASE_ADDR_FIXED
26 #ifndef __ANDROID__
27 #define BASE_ADDR_FIXED 1
28 #else
29 #define BASE_ADDR_FIXED 0
30 #endif
31 #endif
32
33 #ifdef FORCE32
34 #define REG_SHIFT 2
35 #else
36 #define REG_SHIFT 3
37 #endif
38
39 /* ARM calling convention:
40    r0-r3, r12: caller-save
41    r4-r11: callee-save */
42
43 #define ARG1_REG 0
44 #define ARG2_REG 1
45 #define ARG3_REG 2
46 #define ARG4_REG 3
47
48 /* GCC register naming convention:
49    r10 = sl (base)
50    r11 = fp (frame pointer)
51    r12 = ip (scratch)
52    r13 = sp (stack pointer)
53    r14 = lr (link register)
54    r15 = pc (program counter) */
55
56 #define FP 11
57 #define LR 14
58 #define HOST_TEMPREG 14
59
60 // Note: FP is set to &dynarec_local when executing generated code.
61 // Thus the local variables are actually global and not on the stack.
62
63 extern char *invc_ptr;
64
65 #define TARGET_SIZE_2 24 // 2^24 = 16 megabytes
66
67 // Code generator target address
68 #if BASE_ADDR_FIXED
69 // "round" address helpful for debug
70 #define BASE_ADDR 0x1000000
71 #else
72 extern char translation_cache[1 << TARGET_SIZE_2];
73 #define BASE_ADDR translation_cache
74 #endif