return FALSE;
}
-/*
- * This is the function called from the signal handler
- */
-void
-mono_arch_sigctx_to_monoctx (void *ctx, MonoContext *mctx)
-{
-#ifdef MONO_CROSS_COMPILE
- g_assert_not_reached ();
-#else
- os_ucontext *uc = ctx;
-
- mctx->sc_ir = UCONTEXT_REG_NIP(uc);
- mctx->sc_sp = UCONTEXT_REG_Rn(uc, 1);
- memcpy (&mctx->regs, &UCONTEXT_REG_Rn(uc, 13), sizeof (mgreg_t) * MONO_SAVED_GREGS);
- memcpy (&mctx->fregs, &UCONTEXT_REG_FPRn(uc, 14), sizeof (double) * MONO_SAVED_FREGS);
-#endif
-}
-
-void
-mono_arch_monoctx_to_sigctx (MonoContext *mctx, void *ctx)
-{
-#ifdef MONO_CROSS_COMPILE
- g_assert_not_reached ();
-#else
- os_ucontext *uc = ctx;
-
- UCONTEXT_REG_NIP(uc) = mctx->sc_ir;
- UCONTEXT_REG_Rn(uc, 1) = mctx->sc_sp;
- memcpy (&UCONTEXT_REG_Rn(uc, 13), &mctx->regs, sizeof (mgreg_t) * MONO_SAVED_GREGS);
- memcpy (&UCONTEXT_REG_FPRn(uc, 14), &mctx->fregs, sizeof (double) * MONO_SAVED_FREGS);
-#endif
-}
-
gpointer
mono_arch_ip_from_context (void *sigctx)
{
{
MonoContext mctx;
- mono_arch_sigctx_to_monoctx (sigctx, &mctx);
+ mono_sigctx_to_monoctx (sigctx, &mctx);
mono_handle_exception (&mctx, obj);
mono_restore_context (&mctx);
}
void *uc = sigctx;
/* Pass the ctx parameter in TLS */
- mono_arch_sigctx_to_monoctx (sigctx, &jit_tls->ex_ctx);
+ mono_sigctx_to_monoctx (sigctx, &jit_tls->ex_ctx);
/* The others in registers */
UCONTEXT_REG_Rn (sigctx, PPC_FIRST_ARG_REG) = (gsize)obj;
MonoContext mctx;
gboolean result;
- mono_arch_sigctx_to_monoctx (ctx, &mctx);
+ mono_sigctx_to_monoctx (ctx, &mctx);
result = mono_handle_exception (&mctx, obj);
/* restore the context so that returning from the signal handler will invoke
* the catch clause
*/
- mono_arch_monoctx_to_sigctx (&mctx, ctx);
+ mono_monoctx_to_sigctx (&mctx, ctx);
return result;
#endif
}