qemu-cr16/target
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
..
alpha target/alpha: Replace VMSTATE_UINTTL() -> VMSTATE_UINT64() 2025-10-16 10:33:34 +02:00
arm target/arm: Implement org.gnu.gdb.aarch64.tls XML feature in gdbstub 2025-10-23 13:35:04 +01:00
avr accel/tcg: Name gen_goto_tb()'s TB slot index as @tb_slot_idx 2025-10-16 10:33:33 +02:00
hexagon target/hexagon: Only indent on linux 2025-10-17 13:45:46 -07:00
hppa target/hppa: Set FPCR exception flag bits for non-trapped exceptions 2025-10-28 08:08:00 +01:00
i386 hw/i386/apic: Ensure own APIC use in apic_msr_{read,write} 2025-10-21 20:16:47 +02:00
loongarch target/loongarch: Add bit A/D checking in TLB entry with PTW supported 2025-10-23 19:43:48 +08:00
m68k target/m68k: Remove pointless @cpu_halted TCGv 2025-10-16 17:07:27 +02:00
microblaze target/microblaze: Convert CPUMBState::res_addr field to uint32_t type 2025-10-16 17:07:27 +02:00
mips accel/tcg: Name gen_goto_tb()'s TB slot index as @tb_slot_idx 2025-10-16 10:33:33 +02:00
openrisc target/openrisc: Replace target_ulong -> uint32_t 2025-10-16 17:07:28 +02:00
ppc target/ppc/kvm: Remove kvmppc_get_host_model() as unused 2025-10-23 17:37:32 +05:30
riscv target/riscv: Make PMP CSRs conform to WARL constraints 2025-10-24 09:24:08 +10:00
rx target/rx: Un-inline various helpers 2025-10-16 17:07:52 +02:00
s390x * Improve cache handling for the msys2 CI and the functional asset cache 2025-10-16 12:27:12 -07:00
sh4 target/sh4: Remove target_ulong use in gen_goto_tb() 2025-10-16 17:07:52 +02:00
sparc target/sparc: Reduce inclusions of 'exec/cpu-common.h' 2025-10-16 17:07:52 +02:00
tricore target/tricore: Expand TCGv type for 32-bit target 2025-10-16 17:07:52 +02:00
xtensa target/xtensa: Remove target_ulong use in xtensa_get_tb_cpu_state() 2025-10-16 17:07:52 +02:00
Kconfig target/cris: Remove the deprecated CRIS target 2024-09-13 20:11:13 +02:00
meson.build target/cris: Remove the deprecated CRIS target 2024-09-13 20:11:13 +02:00