Merge pull request #1991 from esdrubal/seq_test_fix
[mono.git] / mono / mini / mini-ppc.h
index 2a9af123de4d3d816136fb52c5d504b2e09c7517..45e5dc3e60acc2d8147222b66a121de57e5a22b0 100644 (file)
@@ -4,12 +4,13 @@
 #include <mono/arch/ppc/ppc-codegen.h>
 #include <mono/utils/mono-sigcontext.h>
 #include <mono/utils/mono-context.h>
+#include <mono/metadata/object.h>
 #include <glib.h>
 
 #ifdef __mono_ppc64__
-#define MONO_ARCH_CPU_SPEC ppc64_cpu_desc
+#define MONO_ARCH_CPU_SPEC mono_ppc64_cpu_desc
 #else
-#define MONO_ARCH_CPU_SPEC ppcg4
+#define MONO_ARCH_CPU_SPEC mono_ppcg4
 #endif
 
 #define MONO_MAX_IREGS 32
@@ -78,19 +79,10 @@ typedef struct MonoCompileArch {
 
 #ifndef __mono_ilp32__
 #define MONO_ARCH_HAVE_TLS_GET 1
-#define MONO_ARCH_ENABLE_MONITOR_IL_FASTPATH 1
 #endif
 
 #else /* must be __mono_ppc__ */
 
-#if 0
-/* enabling this for PPC32 causes hangs in the thread/delegate tests.
-   So disable for now. */
-#if defined(__linux__)
-#define MONO_ARCH_ENABLE_MONITOR_IL_FASTPATH 1
-#endif
-#endif
-
 #define MONO_ARCH_HAVE_TLS_GET 1
 #define MONO_ARCH_EMULATE_FCONV_TO_I8 1
 #define MONO_ARCH_EMULATE_LCONV_TO_R8 1
@@ -147,12 +139,20 @@ typedef struct MonoCompileArch {
 /* Linux */
 #ifdef __mono_ppc64__
 #define PPC_RET_ADDR_OFFSET 16
-#define PPC_STACK_PARAM_OFFSET 48
-#define PPC_MINIMAL_STACK_SIZE 48
+ // Power LE abvi2
+ #if (_CALL_ELF == 2)
+  #define PPC_STACK_PARAM_OFFSET 32
+  #define PPC_MINIMAL_STACK_SIZE 32
+ #else
+  #define PPC_STACK_PARAM_OFFSET 48
+  #define PPC_MINIMAL_STACK_SIZE 48
+ #endif
+#define MONO_ARCH_HAVE_SETUP_ASYNC_CALLBACK 1
 #define PPC_MINIMAL_PARAM_AREA_SIZE 64
 #define PPC_LAST_FPARG_REG ppc_f13
 #define PPC_PASS_STRUCTS_BY_VALUE 1
 #define PPC_THREAD_PTR_REG ppc_r13
+#define MONO_ARCH_HAVE_SIGCTX_TO_MONOCTX 1
 #else
 #define PPC_RET_ADDR_OFFSET 4
 #define PPC_STACK_PARAM_OFFSET 8
@@ -174,7 +174,6 @@ typedef struct MonoCompileArch {
 #define MONO_ARCH_SIGNAL_STACK_SIZE (12 * 1024)
 #endif /* HAVE_WORKING_SIGALTSTACK */
 
-#define MONO_ARCH_HAVE_CREATE_DELEGATE_TRAMPOLINE
 #define MONO_ARCH_IMT_REG ppc_r11
 
 #define MONO_ARCH_VTABLE_REG   ppc_r11
@@ -271,7 +270,7 @@ typedef struct {
 } MonoPPCFunctionDescriptor;
 
 #define PPC_FTNPTR_SIZE                        sizeof (MonoPPCFunctionDescriptor)
-extern guint8* mono_ppc_create_pre_code_ftnptr (guint8 *code) MONO_INTERNAL;
+extern guint8* mono_ppc_create_pre_code_ftnptr (guint8 *code);
 #else
 #define PPC_FTNPTR_SIZE                        0
 #define mono_ppc_create_pre_code_ftnptr(c)     c
@@ -303,13 +302,13 @@ extern guint8* mono_ppc_create_pre_code_ftnptr (guint8 *code) MONO_INTERNAL;
 #endif
 
 gboolean
-mono_ppc_tail_call_supported (MonoMethodSignature *caller_sig, MonoMethodSignature *callee_sig) MONO_INTERNAL;
+mono_ppc_tail_call_supported (MonoMethodSignature *caller_sig, MonoMethodSignature *callee_sig);
 
 void
-mono_ppc_patch (guchar *code, const guchar *target) MONO_INTERNAL;
+mono_ppc_patch (guchar *code, const guchar *target);
 
 void
-mono_ppc_throw_exception (MonoObject *exc, unsigned long eip, unsigned long esp, mgreg_t *int_regs, gdouble *fp_regs, gboolean rethrow) MONO_INTERNAL;
+mono_ppc_throw_exception (MonoObject *exc, unsigned long eip, unsigned long esp, mgreg_t *int_regs, gdouble *fp_regs, gboolean rethrow);
 
 #ifdef __mono_ppc64__
 #define MONO_PPC_32_64_CASE(c32,c64)   c64
@@ -318,10 +317,10 @@ extern void mono_ppc_emitted (guint8 *code, gint64 length, const char *format, .
 #define MONO_PPC_32_64_CASE(c32,c64)   c32
 #endif
 
-gboolean mono_ppc_is_direct_call_sequence (guint32 *code) MONO_INTERNAL;
+gboolean mono_ppc_is_direct_call_sequence (guint32 *code);
 
-void mono_ppc_patch_plt_entry (guint8 *code, gpointer *got, mgreg_t *regs, guint8 *addr) MONO_INTERNAL;
+void mono_ppc_patch_plt_entry (guint8 *code, gpointer *got, mgreg_t *regs, guint8 *addr);
 
-void mono_ppc_set_func_into_sigctx (void *sigctx, void *func) MONO_INTERNAL;
+void mono_ppc_set_func_into_sigctx (void *sigctx, void *func);
 
 #endif /* __MONO_MINI_PPC_H__ */