summaryrefslogtreecommitdiff
path: root/mono/mini/exceptions-ppc.c
diff options
context:
space:
mode:
Diffstat (limited to 'mono/mini/exceptions-ppc.c')
-rw-r--r--mono/mini/exceptions-ppc.c22
1 files changed, 6 insertions, 16 deletions
diff --git a/mono/mini/exceptions-ppc.c b/mono/mini/exceptions-ppc.c
index d439b26c94..80bbb3f919 100644
--- a/mono/mini/exceptions-ppc.c
+++ b/mono/mini/exceptions-ppc.c
@@ -316,12 +316,8 @@ mono_arch_get_call_filter (MonoTrampInfo **info, gboolean aot)
void
mono_ppc_throw_exception (MonoObject *exc, unsigned long eip, unsigned long esp, mgreg_t *int_regs, gdouble *fp_regs, gboolean rethrow)
{
- static void (*restore_context) (MonoContext *);
MonoContext ctx;
- if (!restore_context)
- restore_context = mono_get_restore_context ();
-
/* adjust eip so that it point into the call instruction */
eip -= 4;
@@ -339,7 +335,7 @@ mono_ppc_throw_exception (MonoObject *exc, unsigned long eip, unsigned long esp,
mono_ex->stack_trace = NULL;
}
mono_handle_exception (&ctx, exc);
- restore_context (&ctx);
+ mono_restore_context (&ctx);
g_assert_not_reached ();
}
@@ -540,7 +536,7 @@ mono_arch_find_jit_info (MonoDomain *domain, MonoJitTlsData *jit_tls,
sframe = (MonoPPCStackFrame*)MONO_CONTEXT_GET_SP (ctx);
MONO_CONTEXT_SET_BP (new_ctx, sframe->sp);
- if (ji->method->save_lmf) {
+ if (jinfo_get_method (ji)->save_lmf) {
/* sframe->sp points just past the end of the LMF */
guint8 *lmf_addr = (guint8*)sframe->sp - sizeof (MonoLMF);
memcpy (&new_ctx->fregs, lmf_addr + G_STRUCT_OFFSET (MonoLMF, fregs), sizeof (double) * MONO_SAVED_FREGS);
@@ -669,13 +665,11 @@ mono_ppc_set_func_into_sigctx (void *sigctx, void *func)
static void
altstack_handle_and_restore (void *sigctx, gpointer obj)
{
- void (*restore_context) (MonoContext *);
MonoContext mctx;
- restore_context = mono_get_restore_context ();
mono_arch_sigctx_to_monoctx (sigctx, &mctx);
mono_handle_exception (&mctx, obj);
- restore_context (&mctx);
+ mono_restore_context (&mctx);
}
void
@@ -695,8 +689,8 @@ mono_arch_handle_altstack_exception (void *sigctx, gpointer fault_addr, gboolean
const char *method;
/* we don't do much now, but we can warn the user with a useful message */
fprintf (stderr, "Stack overflow: IP: %p, SP: %p\n", mono_arch_ip_from_context (sigctx), (gpointer)UCONTEXT_REG_Rn(uc, 1));
- if (ji && ji->method)
- method = mono_method_full_name (ji->method, TRUE);
+ if (ji && jinfo_get_method (ji))
+ method = mono_method_full_name (jinfo_get_method (ji), TRUE);
else
method = "Unmanaged";
fprintf (stderr, "At %s\n", method);
@@ -754,16 +748,12 @@ handle_signal_exception (gpointer obj)
{
MonoJitTlsData *jit_tls = mono_native_tls_get_value (mono_jit_tls_id);
MonoContext ctx;
- static void (*restore_context) (MonoContext *);
-
- if (!restore_context)
- restore_context = mono_get_restore_context ();
memcpy (&ctx, &jit_tls->ex_ctx, sizeof (MonoContext));
mono_handle_exception (&ctx, obj);
- restore_context (&ctx);
+ mono_restore_context (&ctx);
}
static void