qemu/target/ppc
John Platts d18b065286 target/ppc: Fix bugs in VSX_CVT_FP_TO_INT and VSX_CVT_FP_TO_INT2 macros
The patch below fixes a bug in the VSX_CVT_FP_TO_INT and VSX_CVT_FP_TO_INT2
macros in target/ppc/fpu_helper.c where a non-NaN floating point value from the
source vector is incorrectly converted to 0, 0x80000000, or 0x8000000000000000
instead of the expected value if a preceding source floating point value from
the same source vector was a NaN.

The bug in the VSX_CVT_FP_TO_INT and VSX_CVT_FP_TO_INT2 macros in
target/ppc/fpu_helper.c was introduced with commit c3f24257e3.

This patch also adds a new vsx_f2i_nan test in tests/tcg/ppc64 that checks that
the VSX xvcvspsxws, xvcvspuxws, xvcvspsxds, xvcvspuxds, xvcvdpsxws, xvcvdpuxws,
xvcvdpsxds, and xvcvdpuxds instructions correctly convert non-NaN floating point
values to integer values if the source vector contains NaN floating point values.

Fixes: c3f24257e3 ("target/ppc: Clear fpstatus flags on helpers missing it")
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1941
Signed-off-by: John Platts <john_platts@hotmail.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
2023-11-21 08:39:58 +01:00
..
translate
arch_dump.c
compat.c
cpu_init.c
cpu-models.c
cpu-models.h
cpu-param.h
cpu-qom.h target/ppc: Move powerpc_input_t definition to 'cpu.h' 2023-11-07 12:13:28 +01:00
cpu.c
cpu.h target/ppc: Move powerpc_input_t definition to 'cpu.h' 2023-11-07 12:13:28 +01:00
dfp_helper.c
excp_helper.c target/ppc: Use env_archcpu() in helper_book3s_msgsndp() 2023-11-07 12:13:27 +01:00
fpu_helper.c target/ppc: Fix bugs in VSX_CVT_FP_TO_INT and VSX_CVT_FP_TO_INT2 macros 2023-11-21 08:39:58 +01:00
gdbstub.c
helper_regs.c
helper_regs.h
helper.h
insn32.decode
insn64.decode
int_helper.c
internal.h target/ppc: Define powerpc_pm_insn_t in 'internal.h' 2023-11-07 12:13:28 +01:00
Kconfig
kvm_ppc.h target/ppc: Prohibit target specific KVM prototypes on user emulation 2023-11-07 12:13:28 +01:00
kvm.c sysemu/kvm: Restrict kvmppc_get_radix_page_info() to ppc targets 2023-11-07 12:13:28 +01:00
machine.c
mem_helper.c
meson.build target/ppc: Restrict KVM objects to system emulation 2023-11-07 12:13:28 +01:00
misc_helper.c
mmu_common.c
mmu_helper.c
mmu-book3s-v3.c
mmu-book3s-v3.h
mmu-books.h
mmu-hash32.c
mmu-hash32.h
mmu-hash64.c
mmu-hash64.h
mmu-radix64.c
mmu-radix64.h
power8-pmu-regs.c.inc
power8-pmu.c
power8-pmu.h
ppc-qmp-cmds.c
spr_common.h
tcg-stub.c
timebase_helper.c
trace-events
trace.h
translate.c
user_only_helper.c