1 #ifndef __MONO_MINI_PPC_H__
2 #define __MONO_MINI_PPC_H__
4 #include <mono/arch/ppc/ppc-codegen.h>
6 #define MONO_MAX_IREGS 32
7 #define MONO_MAX_FREGS 32
9 #define MONO_ARCH_FRAME_ALIGNMENT 4
11 /* fixme: align to 16byte instead of 32byte (we align to 32byte to get
12 * reproduceable results for benchmarks */
13 #define MONO_ARCH_CODE_ALIGNMENT 32
15 void ppc_patch (guchar *code, guchar *target);
18 gpointer previous_lmf;
23 gulong iregs [19]; /* 13..31 */
24 gdouble fregs [20]; /* 14..31 */
27 typedef struct MonoCompileArch {
30 #define MONO_ARCH_EMULATE_FCONV_TO_I8 1
31 #define MONO_ARCH_EMULATE_LCONV_TO_R8 1
32 #define MONO_ARCH_EMULATE_LCONV_TO_R4 1
33 #define MONO_ARCH_EMULATE_LCONV_TO_R8_UN 1
34 #define MONO_ARCH_EMULATE_FREM 1
35 #define MONO_ARCH_BIGMUL_INTRINS 1
37 /* deal with some of the ABI differences here */
39 #define PPC_RET_ADDR_OFFSET 8
40 #define PPC_STACK_ALIGNMENT 16
41 #define PPC_STACK_PARAM_OFFSET 24
42 #define PPC_MINIMAL_STACK_SIZE 24
43 #define PPC_FIRST_ARG_REG ppc_r3
44 #define PPC_LAST_ARG_REG ppc_r10
45 #define PPC_FIRST_FPARG_REG ppc_f1
46 #define PPC_LAST_FPARG_REG ppc_f13
47 #define PPC_PASS_STRUCTS_BY_VALUE 1
50 #define PPC_RET_ADDR_OFFSET 4
51 #define PPC_STACK_ALIGNMENT 16
52 #define PPC_STACK_PARAM_OFFSET 8
53 #define PPC_MINIMAL_STACK_SIZE 8
54 #define PPC_FIRST_ARG_REG ppc_r3
55 #define PPC_LAST_ARG_REG ppc_r10
56 #define PPC_FIRST_FPARG_REG ppc_f1
57 #define PPC_LAST_FPARG_REG ppc_f8
58 /* set the next to 0 once inssel-ppc.brg is updated */
59 #define PPC_PASS_STRUCTS_BY_VALUE 1
60 #define PPC_SMALL_RET_STRUCT_IN_REG 1
62 #define MONO_ARCH_USE_SIGACTION 1
66 #define PPC_NUM_REG_ARGS (PPC_LAST_ARG_REG-PPC_FIRST_ARG_REG+1)
67 #define PPC_NUM_REG_FPARGS (PPC_LAST_FPARG_REG-PPC_FIRST_FPARG_REG+1)
69 #endif /* __MONO_MINI_PPC_H__ */