1 #ifndef __ASSEM_ARM_H__
2 #define __ASSEM_ARM_H__
10 #define HAVE_CMOV_IMM 1
11 #define HAVE_CONDITIONAL_CALL 1
12 #define RAM_SIZE 0x200000
16 /* ARM calling convention:
17 r0-r3, r12: caller-save
18 r4-r11: callee-save */
25 /* GCC register naming convention:
27 r11 = fp (frame pointer)
29 r13 = sp (stack pointer)
30 r14 = lr (link register)
31 r15 = pc (program counter) */
35 #define HOST_TEMPREG 14
37 // Note: FP is set to &dynarec_local when executing generated code.
38 // Thus the local variables are actually global and not on the stack.
40 extern char *invc_ptr;
42 #define TARGET_SIZE_2 24 // 2^24 = 16 megabytes
44 // Code generator target address
45 #if defined(BASE_ADDR_FIXED)
46 // "round" address helpful for debug
47 // this produces best code, but not many platforms allow it,
48 // only use if you are sure this range is always free
49 #define BASE_ADDR 0x1000000
50 #define translation_cache (char *)BASE_ADDR
51 #elif defined(BASE_ADDR_DYNAMIC)
52 // for platforms that can't just use .bss buffer, like vita
53 // otherwise better to use the next option for closer branches
54 extern char *translation_cache;
55 #define BASE_ADDR (u_int)translation_cache
57 // using a static buffer in .bss
58 extern char translation_cache[1 << TARGET_SIZE_2];
59 #define BASE_ADDR (u_int)translation_cache
62 #endif /* __ASSEM_ARM_H__ */