2008-02-08 Zoltan Varga <vargaz@gmail.com>
[mono.git] / mono / mini / mini-ia64.h
index 977f2af47373f76424713d44a3aaf14211d76136..f90e8a2d46eb7958e541050dd5ab80397d79636d 100644 (file)
@@ -51,6 +51,9 @@ struct MonoLMF {
 
 typedef struct MonoContext {
        unw_cursor_t cursor;
+       /* Whenever the ip in 'cursor' points to the ip where the exception happened */
+       /* This is true for the initial context for exceptions thrown from signal handlers */
+       gboolean precise_ip;
 } MonoContext;
 
 typedef struct MonoCompileArch {
@@ -84,8 +87,12 @@ mono_ia64_context_get_ip (MonoContext *ctx)
        err = unw_get_reg (&ctx->cursor, UNW_IA64_IP, &ip);
        g_assert (err == 0);
 
-       /* Subtrack 1 so ip points into the actual instruction */
-       return ip - 1;
+       if (ctx->precise_ip) {
+               return ip;
+       } else {
+               /* Subtrack 1 so ip points into the actual instruction */
+               return ip - 1;
+       }
 }
 
 static inline unw_word_t
@@ -179,11 +186,12 @@ unw_dyn_region_info_t* mono_ia64_create_unwind_region (Ia64CodegenState *code);
 #define MONO_ARCH_HAVE_INVALIDATE_METHOD 1
 #define MONO_ARCH_HAVE_THROW_CORLIB_EXCEPTION 1
 #define MONO_ARCH_HAVE_CREATE_TRAMPOLINE_FROM_TOKEN 1
-#define MONO_ARCH_HAVE_CREATE_SPECIFIC_TRAMPOLINE 1
+#define MONO_ARCH_HAVE_CREATE_DELEGATE_TRAMPOLINE 1
 #define MONO_ARCH_HAVE_SAVE_UNWIND_INFO 1
 #define MONO_ARCH_HAVE_CREATE_VARS 1
 #define MONO_ARCH_HAVE_ATOMIC_EXCHANGE 1
 #define MONO_ARCH_HAVE_IMT 1
 #define MONO_ARCH_COMMON_VTABLE_TRAMPOLINE 1
+#define MONO_ARCH_ENABLE_NORMALIZE_OPCODES 1
 
 #endif /* __MONO_MINI_IA64_H__ */