UCONTEXT_REG_SP (sigctx) = sp;
UCONTEXT_REG_PC (sigctx) = (gsize)handle_signal_exception;
+#ifdef UCONTEXT_REG_CPSR
+ if ((gsize)UCONTEXT_REG_PC (sigctx) | 1)
+ /* Transition to thumb */
+ UCONTEXT_REG_CPSR (sigctx) |= (1 << 5);
+#endif
return TRUE;
#else
#define UCONTEXT_REG_R10(ctx) (((arm_ucontext*)(ctx))->sig_ctx.arm_r10)
#define UCONTEXT_REG_R11(ctx) (((arm_ucontext*)(ctx))->sig_ctx.arm_fp)
#define UCONTEXT_REG_R12(ctx) (((arm_ucontext*)(ctx))->sig_ctx.arm_ip)
+ #define UCONTEXT_REG_CPSR(ctx) (((arm_ucontext*)(ctx))->sig_ctx.arm_cpsr)
#endif
#elif defined(__s390x__)