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 tcg: Rename cpu_env to tcg_env 2023-10-03 08:01:02 -07:00
arch_dump.c target: ppc: Use MSR_HVB bit to get the target endianness for memory dump 2023-07-07 04:46:12 -03:00
compat.c spapr: Fix machine reset deadlock from replay-record 2023-09-06 11:19:33 +02:00
cpu_init.c accel/tcg: Remove cpu_set_cpustate_pointers 2023-10-04 11:03:54 -07:00
cpu-models.c target/ppc: Add POWER9 DD2.2 model 2023-05-28 13:25:11 -03:00
cpu-models.h ppc: spelling fixes 2023-09-20 07:54:34 +03:00
cpu-param.h target/ppc: Remove NB_MMU_MODES define 2023-03-13 06:44:37 -07:00
cpu-qom.h target/ppc: Move powerpc_input_t definition to 'cpu.h' 2023-11-07 12:13:28 +01:00
cpu.c target/ppc: Flush inputs to zero with NJ in ppc_store_vscr 2023-09-06 11:19:33 +02:00
cpu.h target/ppc: Move powerpc_input_t definition to 'cpu.h' 2023-11-07 12:13:28 +01:00
dfp_helper.c target/ppc: Fix warning with clang-15 2023-02-27 22:29:01 +01:00
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 target/ppc: Remove references to gdb_has_xml 2023-10-11 08:46:33 +01:00
helper_regs.c target: Widen pc/cs_base in cpu_get_tb_cpu_state 2023-06-26 17:32:59 +02:00
helper_regs.h target/ppc: Fix PMU hflags calculation 2023-06-10 10:19:24 -03:00
helper.h target/ppc: Implement watchpoint debug facility for v2.07S 2023-09-06 11:19:32 +02:00
insn32.decode target/ppc: Fix fallback to MFSS for MFFS* instructions on pre 3.0 ISAs 2023-05-27 08:25:19 -03:00
insn64.decode target/ppc: Implemented [pm]xvbf16ger2* 2022-05-26 17:11:33 -03:00
int_helper.c target/ppc: Rename variables to avoid local variable shadowing in VUPKPX 2023-10-06 10:56:54 +02:00
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 target/ppc: Fix CPU reservation migration for record-replay 2023-09-06 11:19:33 +02:00
mem_helper.c target/helpers: Remove unnecessary 'qemu/main-loop.h' header 2023-08-31 19:47:43 +02:00
meson.build target/ppc: Restrict KVM objects to system emulation 2023-11-07 12:13:28 +01:00
misc_helper.c target/ppc: Implement watchpoint debug facility for v2.07S 2023-09-06 11:19:32 +02:00
mmu_common.c target/helpers: Remove unnecessary 'qemu/main-loop.h' header 2023-08-31 19:47:43 +02:00
mmu_helper.c target/helpers: Remove unnecessary 'qemu/main-loop.h' header 2023-08-31 19:47:43 +02:00
mmu-book3s-v3.c ppc: Check partition and process table alignment 2022-07-18 13:59:43 -03:00
mmu-book3s-v3.h target/ppc: Implement ISA 3.00 tlbie[l] 2022-07-18 13:59:43 -03:00
mmu-books.h
mmu-hash32.c bulk: Rename TARGET_FMT_plx -> HWADDR_FMT_plx 2023-01-18 11:14:34 +01:00
mmu-hash32.h
mmu-hash64.c target/ppc: Fix VRMA page size for ISA v3.0 2023-08-04 12:22:03 -03:00
mmu-hash64.h target/ppc: Fix VRMA page size for ISA v3.0 2023-08-04 12:22:03 -03:00
mmu-radix64.c target/ppc: Generate storage interrupts for radix RC changes 2023-09-06 11:19:32 +02:00
mmu-radix64.h
power8-pmu-regs.c.inc tcg: Rename cpu_env to tcg_env 2023-10-03 08:01:02 -07:00
power8-pmu.c target/helpers: Remove unnecessary 'qemu/main-loop.h' header 2023-08-31 19:47:43 +02:00
power8-pmu.h target/ppc: Fix PMU hflags calculation 2023-06-10 10:19:24 -03:00
ppc-qmp-cmds.c ppc: spapr: cleanup cr get/set with helpers. 2023-05-05 12:34:22 -03:00
spr_common.h target/ppc: Implement watchpoint debug facility for v2.07S 2023-09-06 11:19:32 +02:00
tcg-stub.c
timebase_helper.c target/ppc: Add TFMR SPR implementation with read and write helpers 2023-07-07 04:18:26 -03:00
trace-events target/ppc: Improve KVM hypercall trace 2022-04-20 18:00:30 -03:00
trace.h
translate.c accel/tcg: Replace CPUState.env_ptr with cpu_env() 2023-10-04 11:03:54 -07:00
user_only_helper.c