qemu/tests/tcg/ppc64
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
..
bcdsub.c tests/tcg: unify ppc64 and ppc64le Makefiles 2022-10-06 11:53:40 +01:00
byte_reverse.c tests/tcg: unify ppc64 and ppc64le Makefiles 2022-10-06 11:53:40 +01:00
Makefile.target 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
mffsce.c tests/tcg: unify ppc64 and ppc64le Makefiles 2022-10-06 11:53:40 +01:00
mtfsf.c tests/tcg: unify ppc64 and ppc64le Makefiles 2022-10-06 11:53:40 +01:00
non_signalling_xscv.c tests/tcg: unify ppc64 and ppc64le Makefiles 2022-10-06 11:53:40 +01:00
signal_save_restore_xer.c tests/tcg: unify ppc64 and ppc64le Makefiles 2022-10-06 11:53:40 +01:00
test-aes.c tests/multiarch: Add test-aes 2023-07-08 07:30:17 +01:00
vector.c tests: tcg: ppc64: Add tests for Vector Extract Mask Instructions 2023-05-05 12:34:22 -03:00
vsx_f2i_nan.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
xxspltw.c tests/tcg: unify ppc64 and ppc64le Makefiles 2022-10-06 11:53:40 +01:00