Implement mono_arch_context_set_int_reg () for arm.
[mono.git] / mono / mini / exceptions-arm.c
index 971ca11ee91248b7675d4575950e078a904423b2..68b5a16be4054be1e01f089c01b5f63609f9b152 100644 (file)
@@ -530,6 +530,19 @@ handle_signal_exception (gpointer obj, gboolean test_only)
        restore_context (&ctx);
 }
 
+/*
+ * This works around a gcc 4.5 bug:
+ * https://bugs.launchpad.net/ubuntu/+source/gcc-4.5/+bug/721531
+ */
+#if defined(__GNUC__)
+__attribute__((noinline))
+#endif
+static gpointer
+get_handle_signal_exception_addr (void)
+{
+       return handle_signal_exception;
+}
+
 /*
  * This is the function called from the signal handler
  */
@@ -558,7 +571,7 @@ mono_arch_handle_exception (void *ctx, gpointer obj, gboolean test_only)
        sp -= 16;
        UCONTEXT_REG_SP (sigctx) = sp;
 
-       UCONTEXT_REG_PC (sigctx) = (gsize)handle_signal_exception;
+       UCONTEXT_REG_PC (sigctx) = (gsize)get_handle_signal_exception_addr ();
 #ifdef UCONTEXT_REG_CPSR
        if ((gsize)UCONTEXT_REG_PC (sigctx) & 1)
                /* Transition to thumb */
@@ -596,10 +609,3 @@ mono_arch_ip_from_context (void *sigctx)
        return (void*) UCONTEXT_REG_PC (my_uc);
 #endif
 }
-
-gboolean
-mono_arch_has_unwind_info (gconstpointer addr)
-{
-       return FALSE;
-}
-