[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 05/59] linux-user/arm: Do not fill in si_code for fpa11 exceptions
From: |
Laurent Vivier |
Subject: |
[PULL 05/59] linux-user/arm: Do not fill in si_code for fpa11 exceptions |
Date: |
Tue, 18 May 2021 07:30:37 +0200 |
From: Richard Henderson <richard.henderson@linaro.org>
There is no such decoding in linux/arch/arm/nwfpe/fpmodule.c.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20210423165413.338259-4-richard.henderson@linaro.org>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
linux-user/arm/cpu_loop.c | 26 ++++++--------------------
1 file changed, 6 insertions(+), 20 deletions(-)
diff --git a/linux-user/arm/cpu_loop.c b/linux-user/arm/cpu_loop.c
index e2a1496b9fe7..5f61d25717c3 100644
--- a/linux-user/arm/cpu_loop.c
+++ b/linux-user/arm/cpu_loop.c
@@ -262,29 +262,15 @@ static bool emulate_arm_fpa11(CPUARMState *env, uint32_t
opcode)
/* Exception enabled? */
FPSR fpsr = ts->fpa.fpsr;
if (fpsr & (arm_fpe << 16)) {
- target_siginfo_t info;
+ target_siginfo_t info = { };
+ /*
+ * The kernel's nwfpe emulator does not pass a real si_code.
+ * It merely uses send_sig(SIGFPE, current, 1).
+ */
info.si_signo = TARGET_SIGFPE;
- info.si_errno = 0;
-
- /* ordered by priority, least first */
- if (arm_fpe & BIT_IXC) {
- info.si_code = TARGET_FPE_FLTRES;
- }
- if (arm_fpe & BIT_UFC) {
- info.si_code = TARGET_FPE_FLTUND;
- }
- if (arm_fpe & BIT_OFC) {
- info.si_code = TARGET_FPE_FLTOVF;
- }
- if (arm_fpe & BIT_DZC) {
- info.si_code = TARGET_FPE_FLTDIV;
- }
- if (arm_fpe & BIT_IOC) {
- info.si_code = TARGET_FPE_FLTINV;
- }
+ info.si_code = TARGET_SI_KERNEL;
- info._sifields._sigfault._addr = env->regs[15];
queue_signal(env, info.si_signo, QEMU_SI_FAULT, &info);
} else {
env->regs[15] += 4;
--
2.31.1
- [PULL 54/59] linux-user: Honor TARGET_ARCH_HAS_SA_RESTORER in do_syscall, (continued)
- [PULL 54/59] linux-user: Honor TARGET_ARCH_HAS_SA_RESTORER in do_syscall, Laurent Vivier, 2021/05/17
- [PULL 59/59] linux-user/elfload: add s390x core dumping support, Laurent Vivier, 2021/05/17
- [PULL 47/59] linux-user/s390x: Handle vector regs in signal stack, Laurent Vivier, 2021/05/17
- [PULL 49/59] linux-user: Fix erroneous conversion in copy_file_range, Laurent Vivier, 2021/05/17
- [PULL 53/59] linux-user: Pass ka_restorer to do_sigaction, Laurent Vivier, 2021/05/17
- [PULL 57/59] linux-user: Tidy TARGET_NR_rt_sigaction, Laurent Vivier, 2021/05/17
- [PULL 38/59] linux-user/s390x: Fix sigcontext sregs value, Laurent Vivier, 2021/05/17
- Re: [PULL 00/59] Linux user for 6.1 patches, no-reply, 2021/05/17
- [PULL 00/59] Linux user for 6.1 patches, Laurent Vivier, 2021/05/18
- [PULL 05/59] linux-user/arm: Do not fill in si_code for fpa11 exceptions,
Laurent Vivier <=
- [PULL 07/59] linux-user: Add strace support for printing arguments of llseek, Laurent Vivier, 2021/05/18
- [PULL 04/59] linux-user/arm: Do not emulate fpa11 in thumb mode, Laurent Vivier, 2021/05/18
- [PULL 03/59] linux-user/arm: Split out emulate_arm_fpa11, Laurent Vivier, 2021/05/18
- [PULL 02/59] linux-user: strace now handles unshare syscall args correctly, Laurent Vivier, 2021/05/18
- [PULL 09/59] linux-user: Use target_restore_altstack in all sigreturn, Laurent Vivier, 2021/05/18
- [PULL 06/59] linux-user/arm: Simplify accumulating and raising fpa11 exceptions, Laurent Vivier, 2021/05/18
- [PULL 10/59] linux-user: Pass CPUArchState to do_sigaltstack, Laurent Vivier, 2021/05/18
- [PULL 11/59] linux-user: Pass CPUArchState to target_restore_altstack, Laurent Vivier, 2021/05/18
- [PULL 15/59] linux-user/sparc: Merge sparc64 target_elf.h, Laurent Vivier, 2021/05/18
- [PULL 12/59] linux-user/sparc: Include TARGET_STACK_BIAS in get_sp_from_cpustate, Laurent Vivier, 2021/05/18