2009-12-26 Rodrigo Kumpera <rkumpera@novell.com>
[mono.git] / mono / mini / mini-x86.h
index b328bfcdadb2dc572ef6b42ac3bfca27f1ebf3d4..c149e9654fbb5afd2bf1a9e5db5882f5248d26b1 100644 (file)
@@ -3,7 +3,7 @@
 
 #include <mono/arch/x86/x86-codegen.h>
 #include <mono/utils/mono-sigcontext.h>
-#ifdef PLATFORM_WIN32
+#ifdef HOST_WIN32
 #include <windows.h>
 /* use SIG* defines if possible */
 #ifdef HAVE_SIGNAL_H
@@ -23,7 +23,7 @@ struct sigcontext {
        unsigned int eip;
 };
 
-typedef void (* MonoW32ExceptionHandler) (int);
+typedef void (* MonoW32ExceptionHandler) (int _dummy, EXCEPTION_RECORD *info, void *context);
 void win32_seh_init(void);
 void win32_seh_cleanup(void);
 void win32_seh_set_handler(int type, MonoW32ExceptionHandler handler);
@@ -42,7 +42,7 @@ void win32_seh_set_handler(int type, MonoW32ExceptionHandler handler);
 
 LONG CALLBACK seh_handler(EXCEPTION_POINTERS* ep);
 
-#endif /* PLATFORM_WIN32 */
+#endif /* HOST_WIN32 */
 
 #if defined( __linux__) || defined(__sun) || defined(__APPLE__) || defined(__NetBSD__) || defined(__FreeBSD__)
 #define MONO_ARCH_USE_SIGACTION
@@ -123,6 +123,9 @@ LONG CALLBACK seh_handler(EXCEPTION_POINTERS* ep);
 #define MONO_ARCH_RETREG1 X86_EAX
 #define MONO_ARCH_RETREG2 X86_EDX
 
+/*This is the max size of the locals area of a given frame. I think 1MB is a safe default for now*/
+#define MONO_ARCH_MAX_FRAME_SIZE 0x100000
+
 struct MonoLMF {
        /* 
         * If the lowest bit is set to 1, then this is a trampoline LMF frame.
@@ -267,7 +270,8 @@ typedef struct {
 #endif
 
 #define MONO_ARCH_GSHARED_SUPPORTED 1
-//#define MONO_ARCH_HAVE_LLVM_IMT_TRAMPOLINE 1
+#define MONO_ARCH_HAVE_LLVM_IMT_TRAMPOLINE 1
+#define MONO_ARCH_LLVM_SUPPORTED 1
 #define MONO_ARCH_SOFT_DEBUG_SUPPORTED 1
 #define MONO_ARCH_HAVE_FIND_JIT_INFO_EXT 1
 
@@ -294,5 +298,8 @@ extern MonoBreakpointInfo mono_breakpoint_info [MONO_BREAKPOINT_ARRAY_SIZE];
 guint8*
 mono_x86_emit_tls_get (guint8* code, int dreg, int tls_offset) MONO_INTERNAL;
 
+guint32
+mono_x86_get_this_arg_offset (MonoGenericSharingContext *gsctx, MonoMethodSignature *sig) MONO_INTERNAL;
+
 #endif /* __MONO_MINI_X86_H__ */