+#if defined(MONO_ARCH_USE_SIGACTION) && defined(UCONTEXT_REG_Rn)
+ /*
+ * Handling the exception in the signal handler is problematic, since the original
+ * signal is disabled, and we could run arbitrary code though the debugger. So
+ * resume into the normal stack and do most work there if possible.
+ */
+ MonoJitTlsData *jit_tls = mono_native_tls_get_value (mono_jit_tls_id);
+ mgreg_t sp;
+ void *sigctx = ctx;
+ int frame_size;
+ void *uc = sigctx;
+
+ /* Pass the ctx parameter in TLS */
+ mono_arch_sigctx_to_monoctx (sigctx, &jit_tls->ex_ctx);
+ /* The others in registers */
+ UCONTEXT_REG_Rn (sigctx, PPC_FIRST_ARG_REG) = (gsize)obj;
+
+ /* Allocate a stack frame below the red zone */
+ /* Similar to mono_arch_handle_altstack_exception () */
+ frame_size = 224;
+ frame_size += 15;
+ frame_size &= ~15;
+ sp = (mgreg_t)(UCONTEXT_REG_Rn(uc, 1) & ~15);
+ sp = (mgreg_t)(sp - frame_size);
+ UCONTEXT_REG_Rn(uc, 1) = (mgreg_t)sp;
+ setup_ucontext_return (uc, handle_signal_exception);
+
+ return TRUE;
+#else