Fri Nov 28 16:36:29 CET 2003 Paolo Molaro <lupus@ximian.com>
[mono.git] / mono / mini / mini-ppc.h
1 #ifndef __MONO_MINI_PPC_H__
2 #define __MONO_MINI_PPC_H__
3
4 #include <mono/arch/x86/x86-codegen.h>
5 #include <mono/arch/ppc/ppc-codegen.h>
6
7 #define MONO_MAX_IREGS 32
8 #define MONO_MAX_FREGS 32
9
10 #define MONO_ARCH_FRAME_ALIGNMENT 4
11
12 /* fixme: align to 16byte instead of 32byte (we align to 32byte to get 
13  * reproduceable results for benchmarks */
14 #define MONO_ARCH_CODE_ALIGNMENT 32
15
16 #define MONO_ARCH_BASEREG X86_EBP
17 #define MONO_ARCH_RETREG1 ppc_r3
18 #define MONO_ARCH_RETREG2 ppc_r4
19
20 struct MonoLMF {
21         gpointer    previous_lmf;
22         gpointer    lmf_addr;
23         MonoMethod *method;
24         guint32     ebp;
25         guint32     eip;
26 };
27
28 #define MONO_ARCH_EMULATE_FCONV_TO_I8 1
29 #define MONO_ARCH_EMULATE_LCONV_TO_R8 1
30 #define MONO_ARCH_EMULATE_LCONV_TO_R8_UN 1
31 #define MONO_ARCH_EMULATE_FREM 1
32
33 /* deal with some of the ABI differences here */
34 #ifdef __APPLE__
35 #define PPC_RET_ADDR_OFFSET 8
36 #define PPC_STACK_ALIGNMENT 16
37 #define PPC_STACK_PARAM_OFFSET 24
38 #define PPC_MINIMAL_STACK_SIZE 24
39 #else
40 /* Linux */
41 #define PPC_RET_ADDR_OFFSET 4
42 #define PPC_STACK_ALIGNMENT 16
43 #define PPC_STACK_PARAM_OFFSET 8
44 #define PPC_MINIMAL_STACK_SIZE 8
45 #endif
46
47
48 #endif /* __MONO_MINI_PPC_H__ */