Build the 5 per-opcode logic tests as a single executable, test_msa_logic.c, to reduce the number of test binaries. Each opcode reports one TAP line.
Signed-off-by: Philippe Mathieu-Daudé <[email protected]> Reviewed-by: Pierrick Bouvier <[email protected]> --- tests/tcg/mips/test_msa_logic.c | 57 +++++++++++++++++++++++++++++++++ tests/tcg/mips/meson.build | 6 +--- 2 files changed, 58 insertions(+), 5 deletions(-) create mode 100644 tests/tcg/mips/test_msa_logic.c diff --git a/tests/tcg/mips/test_msa_logic.c b/tests/tcg/mips/test_msa_logic.c new file mode 100644 index 000000000000..4e96c3ebf0e9 --- /dev/null +++ b/tests/tcg/mips/test_msa_logic.c @@ -0,0 +1,57 @@ +/* + * MIPS MSA tests: Logic and Move instructions + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +#include "../include/tap.h" + +#define main test_msa_and_v +#include "user/ase/msa/logic/test_msa_and_v.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_nor_v +#include "user/ase/msa/logic/test_msa_nor_v.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_or_v +#include "user/ase/msa/logic/test_msa_or_v.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_xor_v +#include "user/ase/msa/logic/test_msa_xor_v.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_move_v +#include "user/ase/msa/move/test_msa_move_v.c" +#undef main +#undef TEST_COUNT_TOTAL + + +static const struct { + const char *name; + int32_t (*fn)(void); +} msa_tests[] = { + { "and.v", test_msa_and_v }, + { "nor.v", test_msa_nor_v }, + { "or.v", test_msa_or_v }, + { "xor.v", test_msa_xor_v }, + { "move.v", test_msa_move_v }, +}; + +int main(void) +{ + unsigned i; + + TAP_START(); + for (i = 0; i < sizeof(msa_tests) / sizeof(msa_tests[0]); i++) { + tap_report(!msa_tests[i].fn(), "MSA %s %s", + "Logic and Move", msa_tests[i].name); + } + + return tap_done(); +} diff --git a/tests/tcg/mips/meson.build b/tests/tcg/mips/meson.build index cc94623f8f20..ae2c2fa6aa48 100644 --- a/tests/tcg/mips/meson.build +++ b/tests/tcg/mips/meson.build @@ -16,6 +16,7 @@ tests_mips_msa_groups = [ '../mips/test_msa_int_multiply.c', '../mips/test_msa_int_subtract.c', '../mips/test_msa_interleave.c', + '../mips/test_msa_logic.c', ] tests += tcg_tests['multiarch-linux-user']['tests'] @@ -73,9 +74,4 @@ tests_mips_msa = [ '../mips/user/ase/msa/shift/test_msa_srar_w.c', '../mips/user/ase/msa/shift/test_msa_srlr_b.c', '../mips/user/ase/msa/shift/test_msa_srlr_w.c', - '../mips/user/ase/msa/logic/test_msa_or_v.c', - '../mips/user/ase/msa/logic/test_msa_nor_v.c', - '../mips/user/ase/msa/logic/test_msa_and_v.c', - '../mips/user/ase/msa/logic/test_msa_xor_v.c', - '../mips/user/ase/msa/move/test_msa_move_v.c', ] -- 2.55.0
