qemu-cr16/target/hppa
Peter Maydell 1a8ffd6172 target/hppa: Set FPCR exception flag bits for non-trapped exceptions
In commit ebd394948d ("target/hppa: Fix FPE exceptions") when
we added the code for setting up the registers correctly on trapping
FP exceptions, we accidentally broke the handling of the flag bits
for non-trapping exceptions.

In update_fr0_op() we incorrectly zero out the flag bits and the C
bit, so any fp operation would clear previously set flag bits. We
also stopped setting the flag bits when the fp operation raises
an exception and the trap is not enabled.

Adjust the code so that we set the Flag bits for every exception that
happened and where the trap is not enabled.  (This is the correct
behaviour for the case where an instruction triggers two exceptions,
one of which traps and one of which does not; that can only happen
for inexact + underflow or inexact + overflow.)

Cc: qemu-stable@nongnu.org
Fixes: ebd394948d ("target/hppa: Fix FPE exceptions")
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/3158
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Helge Deller <deller@gmx.de>
Tested-by: Helge Deller <deller@gmx.de>
Message-ID: <20251017085350.895681-1-peter.maydell@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
2025-10-28 08:08:00 +01:00
..
cpu-param.h tcg: Remove the TCG_GUEST_DEFAULT_MO definition globally 2025-04-23 15:07:32 -07:00
cpu-qom.h target: Move ArchCPUClass definition to 'cpu.h' 2023-11-07 13:08:48 +01:00
cpu.c add cpu_test_interrupt()/cpu_set_interrupt() helpers and use them tree wide 2025-08-29 12:48:14 +02:00
cpu.h target/hppa: Have hppa_form_gva*() return vaddr type 2025-10-16 17:07:27 +02:00
fpu_helper.c target/hppa: Set FPCR exception flag bits for non-trapped exceptions 2025-10-28 08:08:00 +01:00
gdbstub.c linux-user/hppa: Force all code addresses to PRIV_USER 2024-05-15 10:03:44 +02:00
helper.c target/hppa: Have hppa_form_gva*() return vaddr type 2025-10-16 17:07:27 +02:00
helper.h target/hppa: Implement space register hashing for 64-bit HP-UX 2025-01-31 10:05:24 +01:00
insns.decode target/hppa: correct size bit parity for fmpyadd 2025-10-16 17:07:27 +02:00
int_helper.c target/hppa: Copy instruction code into fr1 on FPU assist fault 2025-05-17 13:12:07 +02:00
Kconfig meson: Introduce target-specific Kconfig 2021-07-09 18:21:34 +02:00
machine.c target/migration: Inline VMSTATE_CPU() 2025-05-08 14:22:12 +02:00
mem_helper.c target/hppa: Have hppa_form_gva*() return vaddr type 2025-10-16 17:07:27 +02:00
meson.build meson: Rename target_softmmu_arch -> target_system_arch 2023-10-07 19:03:07 +02:00
op_helper.c include: Remove 'exec/exec-all.h' 2025-04-30 12:45:05 -07:00
sys_helper.c include: Remove 'exec/exec-all.h' 2025-04-30 12:45:05 -07:00
trace-events target/hppa: Use hwaddr type for HPPATLBEntry::pa 2025-10-16 17:07:27 +02:00
trace.h trace: switch position of headers to what Meson requires 2020-08-21 06:18:24 -04:00
translate.c target/hppa: Replace MO_TE -> MO_BE 2025-10-16 17:07:27 +02:00