target/ppc: fix xxspltw for big endian hosts
PATCH 1/1 target/ppc: fix xxspltw for big endian hosts
From: Matheus Ferst <[email protected]>
Fix a typo in the host endianness macro and add a simple test to detect regressions.
Fixes 9bb0048ec6f8 ("target/ppc: convert xxspltw to vector operations")
Signed-off-by Matheus Ferst <[email protected]>
--- target/ppc/translate/vsx-impl.c.inc | 2 +- tests/tcg/ppc64/Makefile.target | 1 + tests/tcg/ppc64le/Makefile.target | 1 + tests/tcg/ppc64le/xxspltw.c | 46 +++++++++++++++++++++++++++++ 4 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 tests/tcg/ppc64le/xxspltw.c
target/ppc/translate/vsx-impl.c.inc +1 -1
@@ -1552,7 +1552,7 @@ static bool trans_XXSPLTW(DisasContext *ctx, arg_XX2_uim2 *a) tofs = vsr_full_offset(a->xt); bofs = vsr_full_offset(a->xb); bofs += a->uim << MO_32; -#ifndef HOST_WORDS_BIG_ENDIAN +#ifndef HOST_WORDS_BIGENDIAN bofs ^= 8 | 4; #endif
tests/tcg/ppc64/Makefile.target +1 -0
@@ -27,5 +27,6 @@ run-sha512-vector: QEMU_OPTS+=-cpu POWER10 run-plugin-sha512-vector-with-%: QEMU_OPTS+=-cpu POWER10 PPC64_TESTS += signal_save_restore_xer +PPC64_TESTS += xxspltw TESTS += $(PPC64_TESTS)
tests/tcg/ppc64le/Makefile.target +1 -0
@@ -25,5 +25,6 @@ run-plugin-sha512-vector-with-%: QEMU_OPTS+=-cpu POWER10 PPC64LE_TESTS += mtfsf PPC64LE_TESTS += signal_save_restore_xer +PPC64LE_TESTS += xxspltw TESTS += $(PPC64LE_TESTS)
tests/tcg/ppc64le/xxspltw.c new file +46 -0
46 lines not on this page · raw message
Signature · 1 line
2.25.1
Quoted 7 lines · On 3/10/22 09:20, [email protected] wrote:
From: Matheus Ferst<[email protected]>
Fix a typo in the host endianness macro and add a simple test to detect regressions.
Fixes 9bb0048ec6f8 ("target/ppc: convert xxspltw to vector operations")Signed-off-by Matheus Ferst<[email protected]>
Quoted 7 lines
--- target/ppc/translate/vsx-impl.c.inc | 2 +- tests/tcg/ppc64/Makefile.target | 1 + tests/tcg/ppc64le/Makefile.target | 1 + tests/tcg/ppc64le/xxspltw.c | 46 +++++++++++++++++++++++++++++ 4 files changed, 49 insertions(+), 1 deletion(-)create mode 100644
tests/tcg/ppc64le/xxspltw.c
Reviewed-by Richard Henderson <[email protected]>
r~
Quoted 7 lines · On 3/10/22 18:20, [email protected] wrote:
From: Matheus Ferst <[email protected]>
Fix a typo in the host endianness macro and add a simple test to detect regressions.
Fixes 9bb0048ec6f8 ("target/ppc: convert xxspltw to vector operations")Signed-off-by Matheus Ferst <[email protected]>
Quoted 8 lines
--- target/ppc/translate/vsx-impl.c.inc | 2 +- tests/tcg/ppc64/Makefile.target | 1 + tests/tcg/ppc64le/Makefile.target | 1 + tests/tcg/ppc64le/xxspltw.c | 46 +++++++++++++++++++++++++++++ 4 files changed, 49 insertions(+), 1 deletion(-)create mode 100644
tests/tcg/ppc64le/xxspltw.c
Queued for 7.0
Thanks,
C.