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 | |
3d624f89 |
11 | #define REG_SHIFT 2 |
57871462 |
12 | |
13 | /* ARM calling convention: |
14 | r0-r3, r12: caller-save |
15 | r4-r11: callee-save */ |
16 | |
17 | #define ARG1_REG 0 |
18 | #define ARG2_REG 1 |
19 | #define ARG3_REG 2 |
20 | #define ARG4_REG 3 |
21 | |
22 | /* GCC register naming convention: |
23 | r10 = sl (base) |
24 | r11 = fp (frame pointer) |
25 | r12 = ip (scratch) |
26 | r13 = sp (stack pointer) |
27 | r14 = lr (link register) |
28 | r15 = pc (program counter) */ |
29 | |
30 | #define FP 11 |
31 | #define LR 14 |
32 | #define HOST_TEMPREG 14 |
33 | |
34 | // Note: FP is set to &dynarec_local when executing generated code. |
35 | // Thus the local variables are actually global and not on the stack. |
36 | |
37 | extern char *invc_ptr; |
38 | |
57871462 |
39 | #define TARGET_SIZE_2 24 // 2^24 = 16 megabytes |
40 | |
bdeade46 |
41 | // Code generator target address |
1e212a25 |
42 | #if defined(BASE_ADDR_FIXED) |
43 | // "round" address helpful for debug |
44 | // this produces best code, but not many platforms allow it, |
45 | // only use if you are sure this range is always free |
46 | #define BASE_ADDR 0x1000000 |
47 | #define translation_cache (char *)BASE_ADDR |
48 | #elif defined(BASE_ADDR_DYNAMIC) |
49 | // for platforms that can't just use .bss buffer, like vita |
50 | // otherwise better to use the next option for closer branches |
51 | extern char *translation_cache; |
52 | #define BASE_ADDR (u_int)translation_cache |
bdeade46 |
53 | #else |
1e212a25 |
54 | // using a static buffer in .bss |
55 | extern char translation_cache[1 << TARGET_SIZE_2]; |
56 | #define BASE_ADDR (u_int)translation_cache |
bdeade46 |
57 | #endif |