[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 29/29] linux-user/arm/signal.c: Drop TARGET_CONFIG_CPU_32
From: |
Peter Maydell |
Subject: |
[PULL 29/29] linux-user/arm/signal.c: Drop TARGET_CONFIG_CPU_32 |
Date: |
Thu, 21 May 2020 20:16:10 +0100 |
The Arm signal-handling code has some parts ifdeffed with a
TARGET_CONFIG_CPU_32, which is always defined. This is a leftover
from when this code's structure was based on the Linux kernel
signal handling code, where it was intended to support 26-bit
Arm CPUs. The kernel dropped its CONFIG_CPU_32 in kernel commit
4da8b8208eded0ba21e3 in 2009.
QEMU has never had 26-bit CPU support and is unlikely to ever
add it; we certainly aren't going to support 26-bit Linux
binaries via linux-user mode. The ifdef is just unhelpful
noise, so remove it entirely.
Signed-off-by: Peter Maydell <address@hidden>
Reviewed-by: Richard Henderson <address@hidden>
Message-id: address@hidden
---
linux-user/arm/signal.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/linux-user/arm/signal.c b/linux-user/arm/signal.c
index 698985a647e..f21d1535e4d 100644
--- a/linux-user/arm/signal.c
+++ b/linux-user/arm/signal.c
@@ -126,8 +126,6 @@ struct rt_sigframe_v2
abi_ulong retcode[4];
};
-#define TARGET_CONFIG_CPU_32 1
-
/*
* For ARM syscalls, we encode the syscall number into the instruction.
*/
@@ -187,9 +185,7 @@ setup_sigcontext(struct target_sigcontext *sc, /*struct
_fpstate *fpstate,*/
__put_user(env->regs[13], &sc->arm_sp);
__put_user(env->regs[14], &sc->arm_lr);
__put_user(env->regs[15], &sc->arm_pc);
-#ifdef TARGET_CONFIG_CPU_32
__put_user(cpsr_read(env), &sc->arm_cpsr);
-#endif
__put_user(/* current->thread.trap_no */ 0, &sc->trap_no);
__put_user(/* current->thread.error_code */ 0, &sc->error_code);
@@ -549,11 +545,9 @@ restore_sigcontext(CPUARMState *env, struct
target_sigcontext *sc)
__get_user(env->regs[13], &sc->arm_sp);
__get_user(env->regs[14], &sc->arm_lr);
__get_user(env->regs[15], &sc->arm_pc);
-#ifdef TARGET_CONFIG_CPU_32
__get_user(cpsr, &sc->arm_cpsr);
cpsr_write(env, cpsr, CPSR_USER | CPSR_EXEC, CPSRWriteByInstr);
arm_rebuild_hflags(env);
-#endif
err |= !valid_user_regs(env);
--
2.20.1
- [PULL 19/29] hw/arm/fsl-imx7: Connect watchdog interrupts, (continued)
- [PULL 19/29] hw/arm/fsl-imx7: Connect watchdog interrupts, Peter Maydell, 2020/05/21
- [PULL 20/29] hw/arm/integratorcp: Replace hw_error() by qemu_log_mask(), Peter Maydell, 2020/05/21
- [PULL 21/29] hw/arm/pxa2xx: Replace hw_error() by qemu_log_mask(), Peter Maydell, 2020/05/21
- [PULL 22/29] hw/char/xilinx_uartlite: Replace hw_error() by qemu_log_mask(), Peter Maydell, 2020/05/21
- [PULL 23/29] hw/timer/exynos4210_mct: Replace hw_error() by qemu_log_mask(), Peter Maydell, 2020/05/21
- [PULL 25/29] target/arm: Use tcg_gen_gvec_mov for clear_vec_high, Peter Maydell, 2020/05/21
- [PULL 24/29] ARM: PL061: Introduce N_GPIOS, Peter Maydell, 2020/05/21
- [PULL 26/29] target/arm: Use clear_vec_high more effectively, Peter Maydell, 2020/05/21
- [PULL 27/29] target/arm: Allow user-mode code to write CPSR.E via MSR, Peter Maydell, 2020/05/21
- [PULL 28/29] linux-user/arm: Reset CPSR_E when entering a signal handler, Peter Maydell, 2020/05/21
- [PULL 29/29] linux-user/arm/signal.c: Drop TARGET_CONFIG_CPU_32,
Peter Maydell <=