memcpy (&ctx.regs, int_regs, sizeof (mgreg_t) * MONO_SAVED_GREGS);
memcpy (&ctx.fregs, fp_regs, sizeof (double) * MONO_SAVED_FREGS);
- if (mono_object_isinst (exc, mono_defaults.exception_class, &error)) {
+ if (mono_object_isinst_checked (exc, mono_defaults.exception_class, &error)) {
MonoException *mono_ex = (MonoException*)exc;
if (!rethrow) {
mono_ex->stack_trace = NULL;
abort ();
}
if (!ji)
- mono_handle_native_sigsegv (SIGSEGV, sigctx, siginfo);
+ mono_handle_native_sigsegv ("SIGSEGV", sigctx, siginfo);
/* setup a call frame on the real stack so that control is returned there
* and exception handling can continue.
* The frame looks like:
}
#else
UCONTEXT_REG_NIP(uc) = (unsigned long)altstack_handle_and_restore;
+#if _CALL_ELF == 2
+ /* ELF v2 ABI calling convention requires to put the target address into
+ * r12 if we use the global entry point of a function. */
+ UCONTEXT_REG_Rn(uc, 12) = (unsigned long) altstack_handle_and_restore;
+#endif
#endif
UCONTEXT_REG_Rn(uc, 1) = (unsigned long)sp;
UCONTEXT_REG_Rn(uc, PPC_FIRST_ARG_REG) = (unsigned long)(sp + 16);
}
#else
UCONTEXT_REG_NIP(uc) = (unsigned long)func;
+#if _CALL_ELF == 2
+ /* ELF v2 ABI calling convention requires to put the target address into
+ * r12 if we use the global entry point of a function. */
+ UCONTEXT_REG_Rn(uc, 12) = (unsigned long) func;
+#endif
#endif
#endif
}