{
abi_ulong handler = ka->sa._sa_handler;
abi_ulong retcode;
- int thumb = 0;
-#if defined(TARGET_CONFIG_CPU_32)
-#if 0
- abi_ulong cpsr = env->cpsr;
-
- /*
- * Maybe we need to deliver a 32-bit signal to a 26-bit task.
- */
- if (ka->sa.sa_flags & SA_THIRTYTWO)
- cpsr = (cpsr & ~MODE_MASK) | USR_MODE;
-
-#ifdef CONFIG_ARM_THUMB
- if (elf_hwcap & HWCAP_THUMB) {
- /*
- * The LSB of the handler determines if we're going to
- * be using THUMB or ARM mode for this signal handler.
- */
- thumb = handler & 1;
-
- if (thumb)
- cpsr |= T_BIT;
- else
- cpsr &= ~T_BIT;
- }
-#endif /* CONFIG_ARM_THUMB */
-#endif /* 0 */
-#endif /* TARGET_CONFIG_CPU_32 */
+ int thumb = handler & 1;
if (ka->sa.sa_flags & TARGET_SA_RESTORER) {
retcode = ka->sa.sa_restorer;
env->regs[13] = frame_addr;
env->regs[14] = retcode;
env->regs[15] = handler & (thumb ? ~1 : ~3);
+ env->thumb = thumb;
#if 0
#ifdef TARGET_CONFIG_CPU_32
__get_user_error(env->regs[15], &sc->arm_pc, err);
#ifdef TARGET_CONFIG_CPU_32
__get_user_error(cpsr, &sc->arm_cpsr, err);
- cpsr_write(env, cpsr, 0xffffffff);
+ cpsr_write(env, cpsr, CPSR_USER | CPSR_EXEC);
#endif
err |= !valid_user_regs(env);