tests/tcg: Massage MIPS tests for easier maintenance
v2 cover tests/tcg: Massage MIPS tests for easier maintenance
I'm glad we have many MIPS tests but they are in too many files, taking time to get compiled. In particular on Aarch64 host via x86_64 docker image... Group the test in order to reduce CI build time.
But per v1 review "We can't trade usability for faster compilation", so convert to run one test at a time -- not exiting on the first assert() -- and use TAP protocol to get integrated with meson. For example we can now list each opcode as a TAP subtest with:
$ meson test --suite tcg-mipsel -v
Now as a maintainer I can relax a bit :)
Since v1:
- TAP (pbo)
- no more assert (pbo)
- split per group
- MSA ld/st tests
Based-on: <[email protected]>
Philippe Mathieu-Daudé (31):
tests/tcg/mips: Group DSP acc tests tests/tcg/mips: Group DSP arith tests tests/tcg/mips: Group DSP cmp tests tests/tcg/mips: Group DSP ctrl tests tests/tcg/mips: Group DSP dot tests tests/tcg/mips: Group DSP mul tests tests/tcg/mips: Group DSP pack tests tests/tcg/mips: Group DSP shift tests tests/tcg/mips: Group Release 6 bitops tests tests/tcg/mips: Group Release 6 crc tests tests/tcg/mips: Group Release 6 logic tests tests/tcg/mips: Group Release 6 multiply tests tests/tcg/mips: Group Release 6 shift tests tests/tcg/mips: Group MSA bit-count tests tests/tcg/mips: Group MSA bit-move tests tests/tcg/mips: Group MSA bit-set tests tests/tcg/mips: Group MSA fixed-multiply tests tests/tcg/mips: Group MSA float-max-min tests tests/tcg/mips: Group MSA int-add tests tests/tcg/mips: Group MSA int-average tests tests/tcg/mips: Group MSA int-compare tests tests/tcg/mips: Group MSA int-div-mod tests tests/tcg/mips: Group MSA int-dot-product tests tests/tcg/mips: Group MSA int-max-min tests tests/tcg/mips: Group MSA int-multiply tests tests/tcg/mips: Group MSA int-subtract tests tests/tcg/mips: Group MSA interleave tests tests/tcg/mips: Group MSA logic tests tests/tcg/mips: Group MSA pack tests tests/tcg/mips: Group MSA shift tests tests/tcg/mips: Add MSA load/store tests
tests/tcg/mips/include/test_utils_128.h | 2 +- tests/tcg/mips/include/test_utils_64.h | 6 +- tests/tcg/mipsel/test_dsp_runner.h | 39 +++ tests/tcg/mips/test_msa_bit_count.c | 103 +++++++ tests/tcg/mips/test_msa_bit_move.c | 97 ++++++ tests/tcg/mips/test_msa_bit_set.c | 103 +++++++ tests/tcg/mips/test_msa_fixed_multiply.c | 103 +++++++ tests/tcg/mips/test_msa_float_max_min.c | 79 +++++ tests/tcg/mips/test_msa_int_add.c | 187 ++++++++++++ tests/tcg/mips/test_msa_int_average.c | 127 ++++++++ tests/tcg/mips/test_msa_int_compare.c | 151 ++++++++++ tests/tcg/mips/test_msa_int_div_mod.c | 127 ++++++++ tests/tcg/mips/test_msa_int_dot_product.c | 139 +++++++++ tests/tcg/mips/test_msa_int_max_min.c | 175 +++++++++++ tests/tcg/mips/test_msa_int_multiply.c | 103 +++++++ tests/tcg/mips/test_msa_int_subtract.c | 235 +++++++++++++++ tests/tcg/mips/test_msa_interleave.c | 127 ++++++++ tests/tcg/mips/test_msa_load_store.c | 166 +++++++++++ tests/tcg/mips/test_msa_logic.c | 61 ++++ tests/tcg/mips/test_msa_pack.c | 103 +++++++ tests/tcg/mips/test_msa_shift.c | 151 ++++++++++ tests/tcg/mips64/test_mips64r6_bitops.c | 62 ++++ tests/tcg/mips64/test_mips64r6_crc.c | 74 +++++ tests/tcg/mips64/test_mips64r6_logic.c | 50 ++++ tests/tcg/mips64/test_mips64r6_multiply.c | 74 +++++ tests/tcg/mips64/test_mips64r6_shift.c | 62 ++++ tests/tcg/mipsel/test_dsp_acc.c | 112 +++++++ tests/tcg/mipsel/test_dsp_arith.c | 182 ++++++++++++ tests/tcg/mipsel/test_dsp_cmp.c | 87 ++++++ tests/tcg/mipsel/test_dsp_ctrl.c | 47 +++ tests/tcg/mipsel/test_dsp_dot.c | 157 ++++++++++ tests/tcg/mipsel/test_dsp_mul.c | 67 +++++ tests/tcg/mipsel/test_dsp_pack.c | 152 ++++++++++ tests/tcg/mipsel/test_dsp_r1_absq_s_ph.c | 1 - tests/tcg/mipsel/test_dsp_r1_absq_s_w.c | 1 - tests/tcg/mipsel/test_dsp_r1_addq_ph.c | 1 - tests/tcg/mipsel/test_dsp_r1_addq_s_ph.c | 1 - tests/tcg/mipsel/test_dsp_r1_addq_s_w.c | 1 - tests/tcg/mipsel/test_dsp_r1_addsc.c | 1 - tests/tcg/mipsel/test_dsp_r1_addu_qb.c | 1 - tests/tcg/mipsel/test_dsp_r1_addu_s_qb.c | 1 - tests/tcg/mipsel/test_dsp_r1_addwc.c | 1 - tests/tcg/mipsel/test_dsp_r1_bitrev.c | 1 - tests/tcg/mipsel/test_dsp_r1_bposge32.c | 1 - tests/tcg/mipsel/test_dsp_r1_cmp_eq_ph.c | 1 - tests/tcg/mipsel/test_dsp_r1_cmp_le_ph.c | 1 - tests/tcg/mipsel/test_dsp_r1_cmp_lt_ph.c | 1 - tests/tcg/mipsel/test_dsp_r1_cmpgu_eq_qb.c | 1 - tests/tcg/mipsel/test_dsp_r1_cmpgu_le_qb.c | 1 - tests/tcg/mipsel/test_dsp_r1_cmpgu_lt_qb.c | 1 - tests/tcg/mipsel/test_dsp_r1_cmpu_eq_qb.c | 1 - tests/tcg/mipsel/test_dsp_r1_cmpu_le_qb.c | 1 - tests/tcg/mipsel/test_dsp_r1_cmpu_lt_qb.c | 1 - tests/tcg/mipsel/test_dsp_r1_dpaq_s_w_ph.c | 1 - tests/tcg/mipsel/test_dsp_r1_dpaq_sa_l_w.c | 1 - tests/tcg/mipsel/test_dsp_r1_dpau_h_qbl.c | 1 - tests/tcg/mipsel/test_dsp_r1_dpau_h_qbr.c | 1 - tests/tcg/mipsel/test_dsp_r1_dpsq_s_w_ph.c | 1 - tests/tcg/mipsel/test_dsp_r1_dpsq_sa_l_w.c | 1 - tests/tcg/mipsel/test_dsp_r1_dpsu_h_qbl.c | 1 - tests/tcg/mipsel/test_dsp_r1_dpsu_h_qbr.c | 1 - tests/tcg/mipsel/test_dsp_r1_extp.c | 1 - tests/tcg/mipsel/test_dsp_r1_extpdp.c | 1 - tests/tcg/mipsel/test_dsp_r1_extpdpv.c | 1 - tests/tcg/mipsel/test_dsp_r1_extpv.c | 1 - tests/tcg/mipsel/test_dsp_r1_extr_r_w.c | 1 - tests/tcg/mipsel/test_dsp_r1_extr_rs_w.c | 1 - tests/tcg/mipsel/test_dsp_r1_extr_s_h.c | 1 - tests/tcg/mipsel/test_dsp_r1_extr_w.c | 1 - tests/tcg/mipsel/test_dsp_r1_extrv_r_w.c | 1 - tests/tcg/mipsel/test_dsp_r1_extrv_rs_w.c | 1 - tests/tcg/mipsel/test_dsp_r1_extrv_s_h.c | 1 - tests/tcg/mipsel/test_dsp_r1_extrv_w.c | 1 - tests/tcg/mipsel/test_dsp_r1_insv.c | 1 - tests/tcg/mipsel/test_dsp_r1_lbux.c | 1 - tests/tcg/mipsel/test_dsp_r1_lhx.c | 1 - tests/tcg/mipsel/test_dsp_r1_lwx.c | 1 - tests/tcg/mipsel/test_dsp_r1_madd.c | 1 - tests/tcg/mipsel/test_dsp_r1_maddu.c | 1 - tests/tcg/mipsel/test_dsp_r1_main.c | 6 - tests/tcg/mipsel/test_dsp_r1_maq_s_w_phl.c | 1 - tests/tcg/mipsel/test_dsp_r1_maq_s_w_phr.c | 1 - tests/tcg/mipsel/test_dsp_r1_maq_sa_w_phl.c | 1 - tests/tcg/mipsel/test_dsp_r1_maq_sa_w_phr.c | 1 - tests/tcg/mipsel/test_dsp_r1_mfhi.c | 1 - tests/tcg/mipsel/test_dsp_r1_mflo.c | 1 - tests/tcg/mipsel/test_dsp_r1_modsub.c | 1 - tests/tcg/mipsel/test_dsp_r1_msub.c | 1 - tests/tcg/mipsel/test_dsp_r1_msubu.c | 1 - tests/tcg/mipsel/test_dsp_r1_mthi.c | 1 - tests/tcg/mipsel/test_dsp_r1_mthlip.c | 1 - tests/tcg/mipsel/test_dsp_r1_mtlo.c | 1 - tests/tcg/mipsel/test_dsp_r1_muleq_s_w_phl.c | 1 - tests/tcg/mipsel/test_dsp_r1_muleq_s_w_phr.c | 1 - tests/tcg/mipsel/test_dsp_r1_muleu_s_ph_qbl.c | 1 - tests/tcg/mipsel/test_dsp_r1_muleu_s_ph_qbr.c | 1 - tests/tcg/mipsel/test_dsp_r1_mulq_rs_ph.c | 1 - tests/tcg/mipsel/test_dsp_r1_mult.c | 1 - tests/tcg/mipsel/test_dsp_r1_multu.c | 1 - tests/tcg/mipsel/test_dsp_r1_packrl_ph.c | 1 - tests/tcg/mipsel/test_dsp_r1_pick_ph.c | 1 - tests/tcg/mipsel/test_dsp_r1_pick_qb.c | 1 - tests/tcg/mipsel/test_dsp_r1_preceq_w_phl.c | 1 - tests/tcg/mipsel/test_dsp_r1_preceq_w_phr.c | 1 - tests/tcg/mipsel/test_dsp_r1_precequ_ph_qbl.c | 1 - .../tcg/mipsel/test_dsp_r1_precequ_ph_qbla.c | 1 - tests/tcg/mipsel/test_dsp_r1_precequ_ph_qbr.c | 1 - .../tcg/mipsel/test_dsp_r1_precequ_ph_qbra.c | 1 - tests/tcg/mipsel/test_dsp_r1_preceu_ph_qbl.c | 1 - tests/tcg/mipsel/test_dsp_r1_preceu_ph_qbla.c | 1 - tests/tcg/mipsel/test_dsp_r1_preceu_ph_qbr.c | 1 - tests/tcg/mipsel/test_dsp_r1_preceu_ph_qbra.c | 1 - tests/tcg/mipsel/test_dsp_r1_precrq_ph_w.c | 1 - tests/tcg/mipsel/test_dsp_r1_precrq_qb_ph.c | 1 - tests/tcg/mipsel/test_dsp_r1_precrq_rs_ph_w.c | 1 - .../tcg/mipsel/test_dsp_r1_precrqu_s_qb_ph.c | 1 - tests/tcg/mipsel/test_dsp_r1_raddu_w_qb.c | 1 - tests/tcg/mipsel/test_dsp_r1_rddsp.c | 1 - tests/tcg/mipsel/test_dsp_r1_repl_ph.c | 1 - tests/tcg/mipsel/test_dsp_r1_repl_qb.c | 1 - tests/tcg/mipsel/test_dsp_r1_replv_ph.c | 1 - tests/tcg/mipsel/test_dsp_r1_replv_qb.c | 1 - tests/tcg/mipsel/test_dsp_r1_shilo.c | 1 - tests/tcg/mipsel/test_dsp_r1_shilov.c | 1 - tests/tcg/mipsel/test_dsp_r1_shll_ph.c | 1 - tests/tcg/mipsel/test_dsp_r1_shll_qb.c | 1 - tests/tcg/mipsel/test_dsp_r1_shll_s_ph.c | 1 - tests/tcg/mipsel/test_dsp_r1_shll_s_w.c | 1 - tests/tcg/mipsel/test_dsp_r1_shllv_ph.c | 1 - tests/tcg/mipsel/test_dsp_r1_shllv_qb.c | 1 - tests/tcg/mipsel/test_dsp_r1_shllv_s_ph.c | 1 - tests/tcg/mipsel/test_dsp_r1_shllv_s_w.c | 1 - tests/tcg/mipsel/test_dsp_r1_shra_ph.c | 1 - tests/tcg/mipsel/test_dsp_r1_shra_r_ph.c | 1 - tests/tcg/mipsel/test_dsp_r1_shra_r_w.c | 1 - tests/tcg/mipsel/test_dsp_r1_shrav_ph.c | 1 - tests/tcg/mipsel/test_dsp_r1_shrav_r_ph.c | 1 - tests/tcg/mipsel/test_dsp_r1_shrav_r_w.c | 1 - tests/tcg/mipsel/test_dsp_r1_shrl_qb.c | 1 - tests/tcg/mipsel/test_dsp_r1_shrlv_qb.c | 1 - tests/tcg/mipsel/test_dsp_r1_subq_ph.c | 1 - tests/tcg/mipsel/test_dsp_r1_subq_s_ph.c | 1 - tests/tcg/mipsel/test_dsp_r1_subq_s_w.c | 1 - tests/tcg/mipsel/test_dsp_r1_subu_qb.c | 1 - tests/tcg/mipsel/test_dsp_r1_subu_s_qb.c | 1 - tests/tcg/mipsel/test_dsp_r1_wrdsp.c | 1 - tests/tcg/mipsel/test_dsp_r2_absq_s_qb.c | 1 - tests/tcg/mipsel/test_dsp_r2_addqh_ph.c | 1 - tests/tcg/mipsel/test_dsp_r2_addqh_r_ph.c | 1 - tests/tcg/mipsel/test_dsp_r2_addqh_r_w.c | 1 - tests/tcg/mipsel/test_dsp_r2_addqh_w.c | 1 - tests/tcg/mipsel/test_dsp_r2_addu_ph.c | 1 - tests/tcg/mipsel/test_dsp_r2_addu_s_ph.c | 1 - tests/tcg/mipsel/test_dsp_r2_adduh_qb.c | 1 - tests/tcg/mipsel/test_dsp_r2_adduh_r_qb.c | 1 - tests/tcg/mipsel/test_dsp_r2_append.c | 1 - tests/tcg/mipsel/test_dsp_r2_balign.c | 1 - tests/tcg/mipsel/test_dsp_r2_cmpgdu_eq_qb.c | 1 - tests/tcg/mipsel/test_dsp_r2_cmpgdu_le_qb.c | 1 - tests/tcg/mipsel/test_dsp_r2_cmpgdu_lt_qb.c | 1 - tests/tcg/mipsel/test_dsp_r2_dpa_w_ph.c | 1 - tests/tcg/mipsel/test_dsp_r2_dpaqx_s_w_ph.c | 1 - tests/tcg/mipsel/test_dsp_r2_dpaqx_sa_w_ph.c | 1 - tests/tcg/mipsel/test_dsp_r2_dpax_w_ph.c | 1 - tests/tcg/mipsel/test_dsp_r2_dps_w_ph.c | 1 - tests/tcg/mipsel/test_dsp_r2_dpsqx_s_w_ph.c | 1 - tests/tcg/mipsel/test_dsp_r2_dpsqx_sa_w_ph.c | 1 - tests/tcg/mipsel/test_dsp_r2_dpsx_w_ph.c | 1 - tests/tcg/mipsel/test_dsp_r2_mul_ph.c | 1 - tests/tcg/mipsel/test_dsp_r2_mul_s_ph.c | 1 - tests/tcg/mipsel/test_dsp_r2_mulq_rs_w.c | 1 - tests/tcg/mipsel/test_dsp_r2_mulq_s_ph.c | 1 - tests/tcg/mipsel/test_dsp_r2_mulq_s_w.c | 1 - tests/tcg/mipsel/test_dsp_r2_mulsa_w_ph.c | 1 - tests/tcg/mipsel/test_dsp_r2_mulsaq_s_w_ph.c | 1 - tests/tcg/mipsel/test_dsp_r2_precr_qb_ph.c | 1 - tests/tcg/mipsel/test_dsp_r2_precr_sra_ph_w.c | 1 - .../tcg/mipsel/test_dsp_r2_precr_sra_r_ph_w.c | 1 - tests/tcg/mipsel/test_dsp_r2_prepend.c | 1 - tests/tcg/mipsel/test_dsp_r2_shra_qb.c | 1 - tests/tcg/mipsel/test_dsp_r2_shra_r_qb.c | 1 - tests/tcg/mipsel/test_dsp_r2_shrav_qb.c | 1 - tests/tcg/mipsel/test_dsp_r2_shrav_r_qb.c | 1 - tests/tcg/mipsel/test_dsp_r2_shrl_ph.c | 1 - tests/tcg/mipsel/test_dsp_r2_shrlv_ph.c | 1 - tests/tcg/mipsel/test_dsp_r2_subqh_ph.c | 1 - tests/tcg/mipsel/test_dsp_r2_subqh_r_ph.c | 1 - tests/tcg/mipsel/test_dsp_r2_subqh_r_w.c | 1 - tests/tcg/mipsel/test_dsp_r2_subqh_w.c | 1 - tests/tcg/mipsel/test_dsp_r2_subu_ph.c | 1 - tests/tcg/mipsel/test_dsp_r2_subu_s_ph.c | 1 - tests/tcg/mipsel/test_dsp_r2_subuh_qb.c | 1 - tests/tcg/mipsel/test_dsp_r2_subuh_r_qb.c | 1 - tests/tcg/mipsel/test_dsp_shift.c | 127 ++++++++ tests/tcg/mips/meson.build | 277 ------------------ tests/tcg/mips64/meson.build | 63 ++-- tests/tcg/mipsel/meson.build | 193 ++---------- 197 files changed, 3694 insertions(+), 641 deletions(-) create mode 100644 tests/tcg/mipsel/test_dsp_runner.h create mode 100644 tests/tcg/mips/test_msa_bit_count.c create mode 100644 tests/tcg/mips/test_msa_bit_move.c create mode 100644 tests/tcg/mips/test_msa_bit_set.c create mode 100644 tests/tcg/mips/test_msa_fixed_multiply.c create mode 100644 tests/tcg/mips/test_msa_float_max_min.c create mode 100644 tests/tcg/mips/test_msa_int_add.c create mode 100644 tests/tcg/mips/test_msa_int_average.c create mode 100644 tests/tcg/mips/test_msa_int_compare.c create mode 100644 tests/tcg/mips/test_msa_int_div_mod.c create mode 100644 tests/tcg/mips/test_msa_int_dot_product.c create mode 100644 tests/tcg/mips/test_msa_int_max_min.c create mode 100644 tests/tcg/mips/test_msa_int_multiply.c create mode 100644 tests/tcg/mips/test_msa_int_subtract.c create mode 100644 tests/tcg/mips/test_msa_interleave.c create mode 100644 tests/tcg/mips/test_msa_load_store.c create mode 100644 tests/tcg/mips/test_msa_logic.c create mode 100644 tests/tcg/mips/test_msa_pack.c create mode 100644 tests/tcg/mips/test_msa_shift.c create mode 100644 tests/tcg/mips64/test_mips64r6_bitops.c create mode 100644 tests/tcg/mips64/test_mips64r6_crc.c create mode 100644 tests/tcg/mips64/test_mips64r6_logic.c create mode 100644 tests/tcg/mips64/test_mips64r6_multiply.c create mode 100644 tests/tcg/mips64/test_mips64r6_shift.c create mode 100644 tests/tcg/mipsel/test_dsp_acc.c create mode 100644 tests/tcg/mipsel/test_dsp_arith.c create mode 100644 tests/tcg/mipsel/test_dsp_cmp.c create mode 100644 tests/tcg/mipsel/test_dsp_ctrl.c create mode 100644 tests/tcg/mipsel/test_dsp_dot.c create mode 100644 tests/tcg/mipsel/test_dsp_mul.c create mode 100644 tests/tcg/mipsel/test_dsp_pack.c delete mode 100644 tests/tcg/mipsel/test_dsp_r1_main.c create mode 100644 tests/tcg/mipsel/test_dsp_shift.c
Signature · 1 line
2.55.0
PATCH v2 1/31 tests/tcg/mips: Group DSP acc tests
Build the 19 per-opcode acc tests as a single executable, test_dsp_acc.c, to reduce the number of test binaries. Each opcode reports one TAP line.
Add test_dsp_runner.h: assert() only counts failures, and RUN_TEST() resets DSPControl and reports each test in TAP. Drop the unused hello-world test.
--- tests/tcg/mipsel/test_dsp_runner.h | 39 ++++++++ tests/tcg/mipsel/test_dsp_acc.c | 112 ++++++++++++++++++++++ tests/tcg/mipsel/test_dsp_r1_extp.c | 1 - tests/tcg/mipsel/test_dsp_r1_extpdp.c | 1 - tests/tcg/mipsel/test_dsp_r1_extpdpv.c | 1 - tests/tcg/mipsel/test_dsp_r1_extpv.c | 1 - tests/tcg/mipsel/test_dsp_r1_extr_r_w.c | 1 - tests/tcg/mipsel/test_dsp_r1_extr_rs_w.c | 1 - tests/tcg/mipsel/test_dsp_r1_extr_s_h.c | 1 - tests/tcg/mipsel/test_dsp_r1_extr_w.c | 1 - tests/tcg/mipsel/test_dsp_r1_extrv_r_w.c | 1 - tests/tcg/mipsel/test_dsp_r1_extrv_rs_w.c | 1 - tests/tcg/mipsel/test_dsp_r1_extrv_s_h.c | 1 - tests/tcg/mipsel/test_dsp_r1_extrv_w.c | 1 - tests/tcg/mipsel/test_dsp_r1_main.c | 6 -- tests/tcg/mipsel/test_dsp_r1_mfhi.c | 1 - tests/tcg/mipsel/test_dsp_r1_mflo.c | 1 - tests/tcg/mipsel/test_dsp_r1_mthi.c | 1 - tests/tcg/mipsel/test_dsp_r1_mthlip.c | 1 - tests/tcg/mipsel/test_dsp_r1_mtlo.c | 1 - tests/tcg/mipsel/test_dsp_r1_shilo.c | 1 - tests/tcg/mipsel/test_dsp_r1_shilov.c | 1 - tests/tcg/mipsel/meson.build | 21 +--- 23 files changed, 152 insertions(+), 45 deletions(-) create mode 100644 tests/tcg/mipsel/test_dsp_runner.h create mode 100644 tests/tcg/mipsel/test_dsp_acc.c delete mode 100644 tests/tcg/mipsel/test_dsp_r1_main.c
tests/tcg/mipsel/test_dsp_runner.h new file +39 -0
@@ -0,0 +1,39 @@ +/* +* Helpers to run several DSP ASE tests from the same process: assert() +* only counts failures, and RUN_TEST() reports one status line per test, +* after resetting DSPControl, in TAP format. A test calling RUN_TEST() must +* end with DSP_TAP_PLAN(). +* +* SPDX-License-Identifier: GPL-2.0-or-later +*/ +#ifndef TEST_DSP_RUNNER_H +#define TEST_DSP_RUNNER_H + +#include <stdio.h> + +static int dsp_failures; +static int dsp_tests; + +#undef assert +#define assert (cond) \ + do { \ + if (!(cond)) { \ + printf("# FAIL %s:%d: %s\n", __FILE__, __LINE__, #cond); \ + dsp_failures++; \ + } \ + } while (0) + +#define RUN_TEST (fn) \ + do { \ + int ret_; \ + dsp_failures = 0; \ + __asm__ volatile("wrdsp $zero, 0x3f\n\t"); \ + ret_ = fn(); \ + printf("%s %d - %s\n", (ret_ || dsp_failures) ? "not ok" : "ok", \ + ++dsp_tests, #fn); \ + ret |= ret_ || dsp_failures; \ + } while (0) + +#define DSP_TAP_PLAN () printf("1..%d\n", dsp_tests) + +#endif
tests/tcg/mipsel/test_dsp_acc.c new file +112 -0
112 lines not on this page · raw message
tests/tcg/mipsel/test_dsp_r1_extp.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r1_extpdp.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r1_extpdpv.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r1_extpv.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r1_extr_r_w.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r1_extr_rs_w.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r1_extr_s_h.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r1_extr_w.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r1_extrv_r_w.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r1_extrv_rs_w.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r1_extrv_s_h.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r1_extrv_w.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r1_main.c deleted +0 -6
@@ -1,6 +0,0 @@ -#include <stdio.h> - -int main () -{ -printf ("hello world\n" ); -}
tests/tcg/mipsel/test_dsp_r1_mfhi.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r1_mflo.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r1_mthi.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r1_mthlip.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r1_mtlo.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r1_shilo.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r1_shilov.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/meson.build +1 -20
@@ -4,6 +4,7 @@ tests = [] tests += tcg_tests['multiarch-linux-user']['tests'] tests_dsp = [ + 'test_dsp_acc.c', 'test_dsp_r1_absq_s_ph.c', 'test_dsp_r1_absq_s_w.c', 'test_dsp_r1_addq_ph.c',
@@ -32,37 +33,19 @@ tests_dsp = [ 'test_dsp_r1_dpsq_sa_l_w.c', 'test_dsp_r1_dpsu_h_qbl.c', 'test_dsp_r1_dpsu_h_qbr.c', - 'test_dsp_r1_extp.c', - 'test_dsp_r1_extpdp.c', - 'test_dsp_r1_extpdpv.c', - 'test_dsp_r1_extpv.c', - 'test_dsp_r1_extr_r_w.c', - 'test_dsp_r1_extr_rs_w.c', - 'test_dsp_r1_extr_s_h.c', - 'test_dsp_r1_extr_w.c', - 'test_dsp_r1_extrv_r_w.c', - 'test_dsp_r1_extrv_rs_w.c', - 'test_dsp_r1_extrv_s_h.c', - 'test_dsp_r1_extrv_w.c', 'test_dsp_r1_insv.c', 'test_dsp_r1_lbux.c', 'test_dsp_r1_lhx.c', 'test_dsp_r1_lwx.c', 'test_dsp_r1_madd.c', 'test_dsp_r1_maddu.c', - 'test_dsp_r1_main.c', 'test_dsp_r1_maq_s_w_phl.c', 'test_dsp_r1_maq_s_w_phr.c', 'test_dsp_r1_maq_sa_w_phl.c', 'test_dsp_r1_maq_sa_w_phr.c', - 'test_dsp_r1_mfhi.c', - 'test_dsp_r1_mflo.c', 'test_dsp_r1_modsub.c', 'test_dsp_r1_msub.c', 'test_dsp_r1_msubu.c', - 'test_dsp_r1_mthi.c', - 'test_dsp_r1_mthlip.c', - 'test_dsp_r1_mtlo.c', 'test_dsp_r1_muleq_s_w_phl.c', 'test_dsp_r1_muleq_s_w_phr.c', 'test_dsp_r1_muleu_s_ph_qbl.c',
@@ -93,8 +76,6 @@ tests_dsp = [ 'test_dsp_r1_repl_qb.c', 'test_dsp_r1_replv_ph.c', 'test_dsp_r1_replv_qb.c', - 'test_dsp_r1_shilo.c', - 'test_dsp_r1_shilov.c', 'test_dsp_r1_shll_ph.c', 'test_dsp_r1_shll_qb.c', 'test_dsp_r1_shll_s_ph.c',
Signature · 1 line
2.55.0
PATCH v2 2/31 tests/tcg/mips: Group DSP arith tests
In reply to Philippe Mathieu-DaudéBuild the 33 per-opcode arith tests as a single executable, test_dsp_arith.c, to reduce the number of test binaries. Each opcode reports one TAP line.
--- tests/tcg/mipsel/test_dsp_arith.c | 182 ++++++++++++++++++++++ tests/tcg/mipsel/test_dsp_r1_absq_s_ph.c | 1 - tests/tcg/mipsel/test_dsp_r1_absq_s_w.c | 1 - tests/tcg/mipsel/test_dsp_r1_addq_ph.c | 1 - tests/tcg/mipsel/test_dsp_r1_addq_s_ph.c | 1 - tests/tcg/mipsel/test_dsp_r1_addq_s_w.c | 1 - tests/tcg/mipsel/test_dsp_r1_addsc.c | 1 - tests/tcg/mipsel/test_dsp_r1_addu_qb.c | 1 - tests/tcg/mipsel/test_dsp_r1_addu_s_qb.c | 1 - tests/tcg/mipsel/test_dsp_r1_addwc.c | 1 - tests/tcg/mipsel/test_dsp_r1_modsub.c | 1 - tests/tcg/mipsel/test_dsp_r1_raddu_w_qb.c | 1 - tests/tcg/mipsel/test_dsp_r1_subq_ph.c | 1 - tests/tcg/mipsel/test_dsp_r1_subq_s_ph.c | 1 - tests/tcg/mipsel/test_dsp_r1_subq_s_w.c | 1 - tests/tcg/mipsel/test_dsp_r1_subu_qb.c | 1 - tests/tcg/mipsel/test_dsp_r1_subu_s_qb.c | 1 - tests/tcg/mipsel/test_dsp_r2_absq_s_qb.c | 1 - tests/tcg/mipsel/test_dsp_r2_addqh_ph.c | 1 - tests/tcg/mipsel/test_dsp_r2_addqh_r_ph.c | 1 - tests/tcg/mipsel/test_dsp_r2_addqh_r_w.c | 1 - tests/tcg/mipsel/test_dsp_r2_addqh_w.c | 1 - tests/tcg/mipsel/test_dsp_r2_addu_ph.c | 1 - tests/tcg/mipsel/test_dsp_r2_addu_s_ph.c | 1 - tests/tcg/mipsel/test_dsp_r2_adduh_qb.c | 1 - tests/tcg/mipsel/test_dsp_r2_adduh_r_qb.c | 1 - tests/tcg/mipsel/test_dsp_r2_subqh_ph.c | 1 - tests/tcg/mipsel/test_dsp_r2_subqh_r_ph.c | 1 - tests/tcg/mipsel/test_dsp_r2_subqh_r_w.c | 1 - tests/tcg/mipsel/test_dsp_r2_subqh_w.c | 1 - tests/tcg/mipsel/test_dsp_r2_subu_ph.c | 1 - tests/tcg/mipsel/test_dsp_r2_subu_s_ph.c | 1 - tests/tcg/mipsel/test_dsp_r2_subuh_qb.c | 1 - tests/tcg/mipsel/test_dsp_r2_subuh_r_qb.c | 1 - tests/tcg/mipsel/meson.build | 34 +--- 35 files changed, 183 insertions(+), 66 deletions(-) create mode 100644 tests/tcg/mipsel/test_dsp_arith.c
tests/tcg/mipsel/test_dsp_arith.c new file +182 -0
@@ -0,0 +1,182 @@ +/* +* MIPS DSP ASE tests: Add, Subtract and Absolute value instructions +* +* SPDX-License-Identifier: GPL-2.0-or-later +*/ + +#include "test_dsp_runner.h" + +#define main test_dsp_r1_absq_s_ph +#include "test_dsp_r1_absq_s_ph.c" +#undef main + +#define main test_dsp_r1_absq_s_w +#include "test_dsp_r1_absq_s_w.c" +#undef main + +#define main test_dsp_r1_addq_ph +#include "test_dsp_r1_addq_ph.c" +#undef main + +#define main test_dsp_r1_addq_s_ph +#include "test_dsp_r1_addq_s_ph.c" +#undef main + +#define main test_dsp_r1_addq_s_w +#include "test_dsp_r1_addq_s_w.c" +#undef main + +#define main test_dsp_r1_addsc +#include "test_dsp_r1_addsc.c" +#undef main + +#define main test_dsp_r1_addu_qb +#include "test_dsp_r1_addu_qb.c" +#undef main + +#define main test_dsp_r1_addu_s_qb +#include "test_dsp_r1_addu_s_qb.c" +#undef main + +#define main test_dsp_r1_addwc +#include "test_dsp_r1_addwc.c" +#undef main + +#define main test_dsp_r1_modsub +#include "test_dsp_r1_modsub.c" +#undef main + +#define main test_dsp_r1_raddu_w_qb +#include "test_dsp_r1_raddu_w_qb.c" +#undef main + +#define main test_dsp_r1_subq_ph +#include "test_dsp_r1_subq_ph.c" +#undef main + +#define main test_dsp_r1_subq_s_ph +#include "test_dsp_r1_subq_s_ph.c" +#undef main + +#define main test_dsp_r1_subq_s_w +#include "test_dsp_r1_subq_s_w.c" +#undef main + +#define main test_dsp_r1_subu_qb +#include "test_dsp_r1_subu_qb.c" +#undef main + +#define main test_dsp_r1_subu_s_qb +#include "test_dsp_r1_subu_s_qb.c" +#undef main + +#define main test_dsp_r2_absq_s_qb +#include "test_dsp_r2_absq_s_qb.c" +#undef main + +#define main test_dsp_r2_addqh_ph +#include "test_dsp_r2_addqh_ph.c" +#undef main + +#define main test_dsp_r2_addqh_r_ph +#include "test_dsp_r2_addqh_r_ph.c" +#undef main + +#define main test_dsp_r2_addqh_r_w +#include "test_dsp_r2_addqh_r_w.c" +#undef main + +#define main test_dsp_r2_addqh_w +#include "test_dsp_r2_addqh_w.c" +#undef main + +#define main test_dsp_r2_addu_ph +#include "test_dsp_r2_addu_ph.c" +#undef main + +#define main test_dsp_r2_addu_s_ph +#include "test_dsp_r2_addu_s_ph.c" +#undef main + +#define main test_dsp_r2_adduh_qb +#include "test_dsp_r2_adduh_qb.c" +#undef main + +#define main test_dsp_r2_adduh_r_qb +#include "test_dsp_r2_adduh_r_qb.c" +#undef main + +#define main test_dsp_r2_subqh_ph +#include "test_dsp_r2_subqh_ph.c" +#undef main + +#define main test_dsp_r2_subqh_r_ph +#include "test_dsp_r2_subqh_r_ph.c" +#undef main + +#define main test_dsp_r2_subqh_r_w +#include "test_dsp_r2_subqh_r_w.c" +#undef main + +#define main test_dsp_r2_subqh_w +#include "test_dsp_r2_subqh_w.c" +#undef main + +#define main test_dsp_r2_subu_ph +#include "test_dsp_r2_subu_ph.c" +#undef main + +#define main test_dsp_r2_subu_s_ph +#include "test_dsp_r2_subu_s_ph.c" +#undef main + +#define main test_dsp_r2_subuh_qb +#include "test_dsp_r2_subuh_qb.c" +#undef main + +#define main test_dsp_r2_subuh_r_qb +#include "test_dsp_r2_subuh_r_qb.c" +#undef main + +int main (void ) +{ +int ret =0 ; + +RUN_TEST (test_dsp_r1_absq_s_ph); +RUN_TEST (test_dsp_r1_absq_s_w); +RUN_TEST (test_dsp_r1_addq_ph); +RUN_TEST (test_dsp_r1_addq_s_ph); +RUN_TEST (test_dsp_r1_addq_s_w); +RUN_TEST (test_dsp_r1_addsc); +RUN_TEST (test_dsp_r1_addu_qb); +RUN_TEST (test_dsp_r1_addu_s_qb); +RUN_TEST (test_dsp_r1_addwc); +RUN_TEST (test_dsp_r1_modsub); +RUN_TEST (test_dsp_r1_raddu_w_qb); +RUN_TEST (test_dsp_r1_subq_ph); +RUN_TEST (test_dsp_r1_subq_s_ph); +RUN_TEST (test_dsp_r1_subq_s_w); +RUN_TEST (test_dsp_r1_subu_qb); +RUN_TEST (test_dsp_r1_subu_s_qb); +RUN_TEST (test_dsp_r2_absq_s_qb); +RUN_TEST (test_dsp_r2_addqh_ph); +RUN_TEST (test_dsp_r2_addqh_r_ph); +RUN_TEST (test_dsp_r2_addqh_r_w); +RUN_TEST (test_dsp_r2_addqh_w); +RUN_TEST (test_dsp_r2_addu_ph); +RUN_TEST (test_dsp_r2_addu_s_ph); +RUN_TEST (test_dsp_r2_adduh_qb); +RUN_TEST (test_dsp_r2_adduh_r_qb); +RUN_TEST (test_dsp_r2_subqh_ph); +RUN_TEST (test_dsp_r2_subqh_r_ph); +RUN_TEST (test_dsp_r2_subqh_r_w); +RUN_TEST (test_dsp_r2_subqh_w); +RUN_TEST (test_dsp_r2_subu_ph); +RUN_TEST (test_dsp_r2_subu_s_ph); +RUN_TEST (test_dsp_r2_subuh_qb); +RUN_TEST (test_dsp_r2_subuh_r_qb); + +DSP_TAP_PLAN (); + +return ret; +}
tests/tcg/mipsel/test_dsp_r1_absq_s_ph.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main ()
tests/tcg/mipsel/test_dsp_r1_absq_s_w.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r1_addq_ph.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r1_addq_s_ph.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r1_addq_s_w.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main ()
tests/tcg/mipsel/test_dsp_r1_addsc.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r1_addu_qb.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r1_addu_s_qb.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r1_addwc.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r1_modsub.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r1_raddu_w_qb.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r1_subq_ph.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r1_subq_s_ph.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r1_subq_s_w.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r1_subu_qb.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r1_subu_s_qb.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r2_absq_s_qb.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r2_addqh_ph.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r2_addqh_r_ph.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r2_addqh_r_w.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r2_addqh_w.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r2_addu_ph.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r2_addu_s_ph.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r2_adduh_qb.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r2_adduh_r_qb.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r2_subqh_ph.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r2_subqh_r_ph.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r2_subqh_r_w.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r2_subqh_w.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r2_subu_ph.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r2_subu_s_ph.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r2_subuh_qb.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r2_subuh_r_qb.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/meson.build +1 -33
@@ -5,15 +5,7 @@ tests += tcg_tests['multiarch-linux-user']['tests'] tests_dsp = [ 'test_dsp_acc.c', - 'test_dsp_r1_absq_s_ph.c', - 'test_dsp_r1_absq_s_w.c', - 'test_dsp_r1_addq_ph.c', - 'test_dsp_r1_addq_s_ph.c', - 'test_dsp_r1_addq_s_w.c', - 'test_dsp_r1_addsc.c', - 'test_dsp_r1_addu_qb.c', - 'test_dsp_r1_addu_s_qb.c', - 'test_dsp_r1_addwc.c', + 'test_dsp_arith.c', 'test_dsp_r1_bitrev.c', 'test_dsp_r1_bposge32.c', 'test_dsp_r1_cmp_eq_ph.c',
@@ -43,7 +35,6 @@ tests_dsp = [ 'test_dsp_r1_maq_s_w_phr.c', 'test_dsp_r1_maq_sa_w_phl.c', 'test_dsp_r1_maq_sa_w_phr.c', - 'test_dsp_r1_modsub.c', 'test_dsp_r1_msub.c', 'test_dsp_r1_msubu.c', 'test_dsp_r1_muleq_s_w_phl.c',
@@ -70,7 +61,6 @@ tests_dsp = [ 'test_dsp_r1_precrq_qb_ph.c', 'test_dsp_r1_precrq_rs_ph_w.c', 'test_dsp_r1_precrqu_s_qb_ph.c', - 'test_dsp_r1_raddu_w_qb.c', 'test_dsp_r1_rddsp.c', 'test_dsp_r1_repl_ph.c', 'test_dsp_r1_repl_qb.c',
@@ -92,21 +82,7 @@ tests_dsp = [ 'test_dsp_r1_shrav_r_w.c', 'test_dsp_r1_shrl_qb.c', 'test_dsp_r1_shrlv_qb.c', - 'test_dsp_r1_subq_ph.c', - 'test_dsp_r1_subq_s_ph.c', - 'test_dsp_r1_subq_s_w.c', - 'test_dsp_r1_subu_qb.c', - 'test_dsp_r1_subu_s_qb.c', 'test_dsp_r1_wrdsp.c', - 'test_dsp_r2_absq_s_qb.c', - 'test_dsp_r2_addqh_ph.c', - 'test_dsp_r2_addqh_r_ph.c', - 'test_dsp_r2_addqh_r_w.c', - 'test_dsp_r2_addqh_w.c', - 'test_dsp_r2_addu_ph.c', - 'test_dsp_r2_addu_s_ph.c', - 'test_dsp_r2_adduh_qb.c', - 'test_dsp_r2_adduh_r_qb.c', 'test_dsp_r2_append.c', 'test_dsp_r2_balign.c', 'test_dsp_r2_cmpgdu_eq_qb.c',
@@ -137,14 +113,6 @@ tests_dsp = [ 'test_dsp_r2_shrav_r_qb.c', 'test_dsp_r2_shrl_ph.c', 'test_dsp_r2_shrlv_ph.c', - 'test_dsp_r2_subqh_ph.c', - 'test_dsp_r2_subqh_r_ph.c', - 'test_dsp_r2_subqh_r_w.c', - 'test_dsp_r2_subqh_w.c', - 'test_dsp_r2_subu_ph.c', - 'test_dsp_r2_subu_s_ph.c', - 'test_dsp_r2_subuh_qb.c', - 'test_dsp_r2_subuh_r_qb.c', ] foreach src: tests_dsp
Signature · 1 line
2.55.0
PATCH v2 3/31 tests/tcg/mips: Group DSP cmp tests
In reply to Philippe Mathieu-DaudéBuild the 14 per-opcode cmp tests as a single executable, test_dsp_cmp.c, to reduce the number of test binaries. Each opcode reports one TAP line.
--- tests/tcg/mipsel/test_dsp_cmp.c | 87 +++++++++++++++++++++ tests/tcg/mipsel/test_dsp_r1_cmp_eq_ph.c | 1 - tests/tcg/mipsel/test_dsp_r1_cmp_le_ph.c | 1 - tests/tcg/mipsel/test_dsp_r1_cmp_lt_ph.c | 1 - tests/tcg/mipsel/test_dsp_r1_cmpgu_eq_qb.c | 1 - tests/tcg/mipsel/test_dsp_r1_cmpgu_le_qb.c | 1 - tests/tcg/mipsel/test_dsp_r1_cmpgu_lt_qb.c | 1 - tests/tcg/mipsel/test_dsp_r1_cmpu_eq_qb.c | 1 - tests/tcg/mipsel/test_dsp_r1_cmpu_le_qb.c | 1 - tests/tcg/mipsel/test_dsp_r1_cmpu_lt_qb.c | 1 - tests/tcg/mipsel/test_dsp_r1_pick_ph.c | 1 - tests/tcg/mipsel/test_dsp_r1_pick_qb.c | 1 - tests/tcg/mipsel/test_dsp_r2_cmpgdu_eq_qb.c | 1 - tests/tcg/mipsel/test_dsp_r2_cmpgdu_le_qb.c | 1 - tests/tcg/mipsel/test_dsp_r2_cmpgdu_lt_qb.c | 1 - tests/tcg/mipsel/meson.build | 15 +--- 16 files changed, 88 insertions(+), 28 deletions(-) create mode 100644 tests/tcg/mipsel/test_dsp_cmp.c
tests/tcg/mipsel/test_dsp_cmp.c new file +87 -0
@@ -0,0 +1,87 @@ +/* +* MIPS DSP ASE tests: Compare and Pick instructions +* +* SPDX-License-Identifier: GPL-2.0-or-later +*/ + +#include "test_dsp_runner.h" + +#define main test_dsp_r1_cmp_eq_ph +#include "test_dsp_r1_cmp_eq_ph.c" +#undef main + +#define main test_dsp_r1_cmp_le_ph +#include "test_dsp_r1_cmp_le_ph.c" +#undef main + +#define main test_dsp_r1_cmp_lt_ph +#include "test_dsp_r1_cmp_lt_ph.c" +#undef main + +#define main test_dsp_r1_cmpgu_eq_qb +#include "test_dsp_r1_cmpgu_eq_qb.c" +#undef main + +#define main test_dsp_r1_cmpgu_le_qb +#include "test_dsp_r1_cmpgu_le_qb.c" +#undef main + +#define main test_dsp_r1_cmpgu_lt_qb +#include "test_dsp_r1_cmpgu_lt_qb.c" +#undef main + +#define main test_dsp_r1_cmpu_eq_qb +#include "test_dsp_r1_cmpu_eq_qb.c" +#undef main + +#define main test_dsp_r1_cmpu_le_qb +#include "test_dsp_r1_cmpu_le_qb.c" +#undef main + +#define main test_dsp_r1_cmpu_lt_qb +#include "test_dsp_r1_cmpu_lt_qb.c" +#undef main + +#define main test_dsp_r1_pick_ph +#include "test_dsp_r1_pick_ph.c" +#undef main + +#define main test_dsp_r1_pick_qb +#include "test_dsp_r1_pick_qb.c" +#undef main + +#define main test_dsp_r2_cmpgdu_eq_qb +#include "test_dsp_r2_cmpgdu_eq_qb.c" +#undef main + +#define main test_dsp_r2_cmpgdu_le_qb +#include "test_dsp_r2_cmpgdu_le_qb.c" +#undef main + +#define main test_dsp_r2_cmpgdu_lt_qb +#include "test_dsp_r2_cmpgdu_lt_qb.c" +#undef main + +int main (void ) +{ +int ret =0 ; + +RUN_TEST (test_dsp_r1_cmp_eq_ph); +RUN_TEST (test_dsp_r1_cmp_le_ph); +RUN_TEST (test_dsp_r1_cmp_lt_ph); +RUN_TEST (test_dsp_r1_cmpgu_eq_qb); +RUN_TEST (test_dsp_r1_cmpgu_le_qb); +RUN_TEST (test_dsp_r1_cmpgu_lt_qb); +RUN_TEST (test_dsp_r1_cmpu_eq_qb); +RUN_TEST (test_dsp_r1_cmpu_le_qb); +RUN_TEST (test_dsp_r1_cmpu_lt_qb); +RUN_TEST (test_dsp_r1_pick_ph); +RUN_TEST (test_dsp_r1_pick_qb); +RUN_TEST (test_dsp_r2_cmpgdu_eq_qb); +RUN_TEST (test_dsp_r2_cmpgdu_le_qb); +RUN_TEST (test_dsp_r2_cmpgdu_lt_qb); + +DSP_TAP_PLAN (); + +return ret; +}
tests/tcg/mipsel/test_dsp_r1_cmp_eq_ph.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r1_cmp_le_ph.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r1_cmp_lt_ph.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r1_cmpgu_eq_qb.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r1_cmpgu_le_qb.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r1_cmpgu_lt_qb.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r1_cmpu_eq_qb.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r1_cmpu_le_qb.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r1_cmpu_lt_qb.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r1_pick_ph.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r1_pick_qb.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r2_cmpgdu_eq_qb.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r2_cmpgdu_le_qb.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r2_cmpgdu_lt_qb.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/meson.build +1 -14
@@ -6,17 +6,9 @@ tests += tcg_tests['multiarch-linux-user']['tests'] tests_dsp = [ 'test_dsp_acc.c', 'test_dsp_arith.c', + 'test_dsp_cmp.c', 'test_dsp_r1_bitrev.c', 'test_dsp_r1_bposge32.c', - 'test_dsp_r1_cmp_eq_ph.c', - 'test_dsp_r1_cmp_le_ph.c', - 'test_dsp_r1_cmp_lt_ph.c', - 'test_dsp_r1_cmpgu_eq_qb.c', - 'test_dsp_r1_cmpgu_le_qb.c', - 'test_dsp_r1_cmpgu_lt_qb.c', - 'test_dsp_r1_cmpu_eq_qb.c', - 'test_dsp_r1_cmpu_le_qb.c', - 'test_dsp_r1_cmpu_lt_qb.c', 'test_dsp_r1_dpaq_s_w_ph.c', 'test_dsp_r1_dpaq_sa_l_w.c', 'test_dsp_r1_dpau_h_qbl.c',
@@ -45,8 +37,6 @@ tests_dsp = [ 'test_dsp_r1_mult.c', 'test_dsp_r1_multu.c', 'test_dsp_r1_packrl_ph.c', - 'test_dsp_r1_pick_ph.c', - 'test_dsp_r1_pick_qb.c', 'test_dsp_r1_preceq_w_phl.c', 'test_dsp_r1_preceq_w_phr.c', 'test_dsp_r1_precequ_ph_qbl.c',
@@ -85,9 +75,6 @@ tests_dsp = [ 'test_dsp_r1_wrdsp.c', 'test_dsp_r2_append.c', 'test_dsp_r2_balign.c', - 'test_dsp_r2_cmpgdu_eq_qb.c', - 'test_dsp_r2_cmpgdu_le_qb.c', - 'test_dsp_r2_cmpgdu_lt_qb.c', 'test_dsp_r2_dpa_w_ph.c', 'test_dsp_r2_dpaqx_s_w_ph.c', 'test_dsp_r2_dpaqx_sa_w_ph.c',
Signature · 1 line
2.55.0
PATCH v2 4/31 tests/tcg/mips: Group DSP ctrl tests
In reply to Philippe Mathieu-DaudéBuild the 6 per-opcode ctrl tests as a single executable, test_dsp_ctrl.c, to reduce the number of test binaries. Each opcode reports one TAP line.
--- tests/tcg/mipsel/test_dsp_ctrl.c | 47 +++++++++++++++++++++++++ tests/tcg/mipsel/test_dsp_r1_bposge32.c | 1 - tests/tcg/mipsel/test_dsp_r1_lbux.c | 1 - tests/tcg/mipsel/test_dsp_r1_lhx.c | 1 - tests/tcg/mipsel/test_dsp_r1_lwx.c | 1 - tests/tcg/mipsel/test_dsp_r1_rddsp.c | 1 - tests/tcg/mipsel/test_dsp_r1_wrdsp.c | 1 - tests/tcg/mipsel/meson.build | 7 +--- 8 files changed, 48 insertions(+), 12 deletions(-) create mode 100644 tests/tcg/mipsel/test_dsp_ctrl.c
tests/tcg/mipsel/test_dsp_ctrl.c new file +47 -0
@@ -0,0 +1,47 @@ +/* +* MIPS DSP ASE tests: Indexed Load and DSPControl access instructions +* +* SPDX-License-Identifier: GPL-2.0-or-later +*/ + +#include "test_dsp_runner.h" + +#define main test_dsp_r1_bposge32 +#include "test_dsp_r1_bposge32.c" +#undef main + +#define main test_dsp_r1_lbux +#include "test_dsp_r1_lbux.c" +#undef main + +#define main test_dsp_r1_lhx +#include "test_dsp_r1_lhx.c" +#undef main + +#define main test_dsp_r1_lwx +#include "test_dsp_r1_lwx.c" +#undef main + +#define main test_dsp_r1_rddsp +#include "test_dsp_r1_rddsp.c" +#undef main + +#define main test_dsp_r1_wrdsp +#include "test_dsp_r1_wrdsp.c" +#undef main + +int main (void ) +{ +int ret =0 ; + +RUN_TEST (test_dsp_r1_bposge32); +RUN_TEST (test_dsp_r1_lbux); +RUN_TEST (test_dsp_r1_lhx); +RUN_TEST (test_dsp_r1_lwx); +RUN_TEST (test_dsp_r1_rddsp); +RUN_TEST (test_dsp_r1_wrdsp); + +DSP_TAP_PLAN (); + +return ret; +}
tests/tcg/mipsel/test_dsp_r1_bposge32.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r1_lbux.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main (void ) {
tests/tcg/mipsel/test_dsp_r1_lhx.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main (void ) {
tests/tcg/mipsel/test_dsp_r1_lwx.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main (void ) {
tests/tcg/mipsel/test_dsp_r1_rddsp.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r1_wrdsp.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/meson.build +1 -6
@@ -7,8 +7,8 @@ tests_dsp = [ 'test_dsp_acc.c', 'test_dsp_arith.c', 'test_dsp_cmp.c', + 'test_dsp_ctrl.c', 'test_dsp_r1_bitrev.c', - 'test_dsp_r1_bposge32.c', 'test_dsp_r1_dpaq_s_w_ph.c', 'test_dsp_r1_dpaq_sa_l_w.c', 'test_dsp_r1_dpau_h_qbl.c',
@@ -18,9 +18,6 @@ tests_dsp = [ 'test_dsp_r1_dpsu_h_qbl.c', 'test_dsp_r1_dpsu_h_qbr.c', 'test_dsp_r1_insv.c', - 'test_dsp_r1_lbux.c', - 'test_dsp_r1_lhx.c', - 'test_dsp_r1_lwx.c', 'test_dsp_r1_madd.c', 'test_dsp_r1_maddu.c', 'test_dsp_r1_maq_s_w_phl.c',
@@ -51,7 +48,6 @@ tests_dsp = [ 'test_dsp_r1_precrq_qb_ph.c', 'test_dsp_r1_precrq_rs_ph_w.c', 'test_dsp_r1_precrqu_s_qb_ph.c', - 'test_dsp_r1_rddsp.c', 'test_dsp_r1_repl_ph.c', 'test_dsp_r1_repl_qb.c', 'test_dsp_r1_replv_ph.c',
@@ -72,7 +68,6 @@ tests_dsp = [ 'test_dsp_r1_shrav_r_w.c', 'test_dsp_r1_shrl_qb.c', 'test_dsp_r1_shrlv_qb.c', - 'test_dsp_r1_wrdsp.c', 'test_dsp_r2_append.c', 'test_dsp_r2_balign.c', 'test_dsp_r2_dpa_w_ph.c',
Signature · 1 line
2.55.0
PATCH v2 5/31 tests/tcg/mips: Group DSP dot tests
In reply to Philippe Mathieu-DaudéBuild the 28 per-opcode dot tests as a single executable, test_dsp_dot.c, to reduce the number of test binaries. Each opcode reports one TAP line.
--- tests/tcg/mipsel/test_dsp_dot.c | 157 +++++++++++++++++++ tests/tcg/mipsel/test_dsp_r1_dpaq_s_w_ph.c | 1 - tests/tcg/mipsel/test_dsp_r1_dpaq_sa_l_w.c | 1 - tests/tcg/mipsel/test_dsp_r1_dpau_h_qbl.c | 1 - tests/tcg/mipsel/test_dsp_r1_dpau_h_qbr.c | 1 - tests/tcg/mipsel/test_dsp_r1_dpsq_s_w_ph.c | 1 - tests/tcg/mipsel/test_dsp_r1_dpsq_sa_l_w.c | 1 - tests/tcg/mipsel/test_dsp_r1_dpsu_h_qbl.c | 1 - tests/tcg/mipsel/test_dsp_r1_dpsu_h_qbr.c | 1 - tests/tcg/mipsel/test_dsp_r1_madd.c | 1 - tests/tcg/mipsel/test_dsp_r1_maddu.c | 1 - tests/tcg/mipsel/test_dsp_r1_maq_s_w_phl.c | 1 - tests/tcg/mipsel/test_dsp_r1_maq_s_w_phr.c | 1 - tests/tcg/mipsel/test_dsp_r1_maq_sa_w_phl.c | 1 - tests/tcg/mipsel/test_dsp_r1_maq_sa_w_phr.c | 1 - tests/tcg/mipsel/test_dsp_r1_msub.c | 1 - tests/tcg/mipsel/test_dsp_r1_msubu.c | 1 - tests/tcg/mipsel/test_dsp_r1_mult.c | 1 - tests/tcg/mipsel/test_dsp_r1_multu.c | 1 - tests/tcg/mipsel/test_dsp_r2_dpa_w_ph.c | 1 - tests/tcg/mipsel/test_dsp_r2_dpaqx_s_w_ph.c | 1 - tests/tcg/mipsel/test_dsp_r2_dpaqx_sa_w_ph.c | 1 - tests/tcg/mipsel/test_dsp_r2_dpax_w_ph.c | 1 - tests/tcg/mipsel/test_dsp_r2_dps_w_ph.c | 1 - tests/tcg/mipsel/test_dsp_r2_dpsqx_s_w_ph.c | 1 - tests/tcg/mipsel/test_dsp_r2_dpsqx_sa_w_ph.c | 1 - tests/tcg/mipsel/test_dsp_r2_dpsx_w_ph.c | 1 - tests/tcg/mipsel/test_dsp_r2_mulsa_w_ph.c | 1 - tests/tcg/mipsel/test_dsp_r2_mulsaq_s_w_ph.c | 1 - tests/tcg/mipsel/meson.build | 29 +--- 30 files changed, 158 insertions(+), 56 deletions(-) create mode 100644 tests/tcg/mipsel/test_dsp_dot.c
tests/tcg/mipsel/test_dsp_dot.c new file +157 -0
@@ -0,0 +1,157 @@ +/* +* MIPS DSP ASE tests: Dot Product and Multiply-Accumulate instructions +* +* SPDX-License-Identifier: GPL-2.0-or-later +*/ + +#include "test_dsp_runner.h" + +#define main test_dsp_r1_dpaq_s_w_ph +#include "test_dsp_r1_dpaq_s_w_ph.c" +#undef main + +#define main test_dsp_r1_dpaq_sa_l_w +#include "test_dsp_r1_dpaq_sa_l_w.c" +#undef main + +#define main test_dsp_r1_dpau_h_qbl +#include "test_dsp_r1_dpau_h_qbl.c" +#undef main + +#define main test_dsp_r1_dpau_h_qbr +#include "test_dsp_r1_dpau_h_qbr.c" +#undef main + +#define main test_dsp_r1_dpsq_s_w_ph +#include "test_dsp_r1_dpsq_s_w_ph.c" +#undef main + +#define main test_dsp_r1_dpsq_sa_l_w +#include "test_dsp_r1_dpsq_sa_l_w.c" +#undef main + +#define main test_dsp_r1_dpsu_h_qbl +#include "test_dsp_r1_dpsu_h_qbl.c" +#undef main + +#define main test_dsp_r1_dpsu_h_qbr +#include "test_dsp_r1_dpsu_h_qbr.c" +#undef main + +#define main test_dsp_r1_maq_s_w_phl +#include "test_dsp_r1_maq_s_w_phl.c" +#undef main + +#define main test_dsp_r1_maq_s_w_phr +#include "test_dsp_r1_maq_s_w_phr.c" +#undef main + +#define main test_dsp_r1_maq_sa_w_phl +#include "test_dsp_r1_maq_sa_w_phl.c" +#undef main + +#define main test_dsp_r1_maq_sa_w_phr +#include "test_dsp_r1_maq_sa_w_phr.c" +#undef main + +#define main test_dsp_r1_madd +#include "test_dsp_r1_madd.c" +#undef main + +#define main test_dsp_r1_maddu +#include "test_dsp_r1_maddu.c" +#undef main + +#define main test_dsp_r1_msub +#include "test_dsp_r1_msub.c" +#undef main + +#define main test_dsp_r1_msubu +#include "test_dsp_r1_msubu.c" +#undef main + +#define main test_dsp_r1_mult +#include "test_dsp_r1_mult.c" +#undef main + +#define main test_dsp_r1_multu +#include "test_dsp_r1_multu.c" +#undef main + +#define main test_dsp_r2_dpa_w_ph +#include "test_dsp_r2_dpa_w_ph.c" +#undef main + +#define main test_dsp_r2_dpaqx_s_w_ph +#include "test_dsp_r2_dpaqx_s_w_ph.c" +#undef main + +#define main test_dsp_r2_dpaqx_sa_w_ph +#include "test_dsp_r2_dpaqx_sa_w_ph.c" +#undef main + +#define main test_dsp_r2_dpax_w_ph +#include "test_dsp_r2_dpax_w_ph.c" +#undef main + +#define main test_dsp_r2_dps_w_ph +#include "test_dsp_r2_dps_w_ph.c" +#undef main + +#define main test_dsp_r2_dpsqx_s_w_ph +#include "test_dsp_r2_dpsqx_s_w_ph.c" +#undef main + +#define main test_dsp_r2_dpsqx_sa_w_ph +#include "test_dsp_r2_dpsqx_sa_w_ph.c" +#undef main + +#define main test_dsp_r2_dpsx_w_ph +#include "test_dsp_r2_dpsx_w_ph.c" +#undef main + +#define main test_dsp_r2_mulsa_w_ph +#include "test_dsp_r2_mulsa_w_ph.c" +#undef main + +#define main test_dsp_r2_mulsaq_s_w_ph +#include "test_dsp_r2_mulsaq_s_w_ph.c" +#undef main + +int main (void ) +{ +int ret =0 ; + +RUN_TEST (test_dsp_r1_dpaq_s_w_ph); +RUN_TEST (test_dsp_r1_dpaq_sa_l_w); +RUN_TEST (test_dsp_r1_dpau_h_qbl); +RUN_TEST (test_dsp_r1_dpau_h_qbr); +RUN_TEST (test_dsp_r1_dpsq_s_w_ph); +RUN_TEST (test_dsp_r1_dpsq_sa_l_w); +RUN_TEST (test_dsp_r1_dpsu_h_qbl); +RUN_TEST (test_dsp_r1_dpsu_h_qbr); +RUN_TEST (test_dsp_r1_maq_s_w_phl); +RUN_TEST (test_dsp_r1_maq_s_w_phr); +RUN_TEST (test_dsp_r1_maq_sa_w_phl); +RUN_TEST (test_dsp_r1_maq_sa_w_phr); +RUN_TEST (test_dsp_r1_madd); +RUN_TEST (test_dsp_r1_maddu); +RUN_TEST (test_dsp_r1_msub); +RUN_TEST (test_dsp_r1_msubu); +RUN_TEST (test_dsp_r1_mult); +RUN_TEST (test_dsp_r1_multu); +RUN_TEST (test_dsp_r2_dpa_w_ph); +RUN_TEST (test_dsp_r2_dpaqx_s_w_ph); +RUN_TEST (test_dsp_r2_dpaqx_sa_w_ph); +RUN_TEST (test_dsp_r2_dpax_w_ph); +RUN_TEST (test_dsp_r2_dps_w_ph); +RUN_TEST (test_dsp_r2_dpsqx_s_w_ph); +RUN_TEST (test_dsp_r2_dpsqx_sa_w_ph); +RUN_TEST (test_dsp_r2_dpsx_w_ph); +RUN_TEST (test_dsp_r2_mulsa_w_ph); +RUN_TEST (test_dsp_r2_mulsaq_s_w_ph); + +DSP_TAP_PLAN (); + +return ret; +}
tests/tcg/mipsel/test_dsp_r1_dpaq_s_w_ph.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r1_dpaq_sa_l_w.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r1_dpau_h_qbl.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r1_dpau_h_qbr.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r1_dpsq_s_w_ph.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r1_dpsq_sa_l_w.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r1_dpsu_h_qbl.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r1_dpsu_h_qbr.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r1_madd.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r1_maddu.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r1_maq_s_w_phl.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r1_maq_s_w_phr.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r1_maq_sa_w_phl.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r1_maq_sa_w_phr.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r1_msub.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r1_msubu.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r1_mult.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r1_multu.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r2_dpa_w_ph.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r2_dpaqx_s_w_ph.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r2_dpaqx_sa_w_ph.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r2_dpax_w_ph.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r2_dps_w_ph.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r2_dpsqx_s_w_ph.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r2_dpsqx_sa_w_ph.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r2_dpsx_w_ph.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r2_mulsa_w_ph.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r2_mulsaq_s_w_ph.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/meson.build +1 -28
@@ -8,31 +8,14 @@ tests_dsp = [ 'test_dsp_arith.c', 'test_dsp_cmp.c', 'test_dsp_ctrl.c', + 'test_dsp_dot.c', 'test_dsp_r1_bitrev.c', - 'test_dsp_r1_dpaq_s_w_ph.c', - 'test_dsp_r1_dpaq_sa_l_w.c', - 'test_dsp_r1_dpau_h_qbl.c', - 'test_dsp_r1_dpau_h_qbr.c', - 'test_dsp_r1_dpsq_s_w_ph.c', - 'test_dsp_r1_dpsq_sa_l_w.c', - 'test_dsp_r1_dpsu_h_qbl.c', - 'test_dsp_r1_dpsu_h_qbr.c', 'test_dsp_r1_insv.c', - 'test_dsp_r1_madd.c', - 'test_dsp_r1_maddu.c', - 'test_dsp_r1_maq_s_w_phl.c', - 'test_dsp_r1_maq_s_w_phr.c', - 'test_dsp_r1_maq_sa_w_phl.c', - 'test_dsp_r1_maq_sa_w_phr.c', - 'test_dsp_r1_msub.c', - 'test_dsp_r1_msubu.c', 'test_dsp_r1_muleq_s_w_phl.c', 'test_dsp_r1_muleq_s_w_phr.c', 'test_dsp_r1_muleu_s_ph_qbl.c', 'test_dsp_r1_muleu_s_ph_qbr.c', 'test_dsp_r1_mulq_rs_ph.c', - 'test_dsp_r1_mult.c', - 'test_dsp_r1_multu.c', 'test_dsp_r1_packrl_ph.c', 'test_dsp_r1_preceq_w_phl.c', 'test_dsp_r1_preceq_w_phr.c',
@@ -70,21 +53,11 @@ tests_dsp = [ 'test_dsp_r1_shrlv_qb.c', 'test_dsp_r2_append.c', 'test_dsp_r2_balign.c', - 'test_dsp_r2_dpa_w_ph.c', - 'test_dsp_r2_dpaqx_s_w_ph.c', - 'test_dsp_r2_dpaqx_sa_w_ph.c', - 'test_dsp_r2_dpax_w_ph.c', - 'test_dsp_r2_dps_w_ph.c', - 'test_dsp_r2_dpsqx_s_w_ph.c', - 'test_dsp_r2_dpsqx_sa_w_ph.c', - 'test_dsp_r2_dpsx_w_ph.c', 'test_dsp_r2_mul_ph.c', 'test_dsp_r2_mul_s_ph.c', 'test_dsp_r2_mulq_rs_w.c', 'test_dsp_r2_mulq_s_ph.c', 'test_dsp_r2_mulq_s_w.c', - 'test_dsp_r2_mulsa_w_ph.c', - 'test_dsp_r2_mulsaq_s_w_ph.c', 'test_dsp_r2_precr_qb_ph.c', 'test_dsp_r2_precr_sra_ph_w.c', 'test_dsp_r2_precr_sra_r_ph_w.c',
Signature · 1 line
2.55.0
PATCH v2 6/31 tests/tcg/mips: Group DSP mul tests
In reply to Philippe Mathieu-DaudéBuild the 10 per-opcode mul tests as a single executable, test_dsp_mul.c, to reduce the number of test binaries. Each opcode reports one TAP line.
--- tests/tcg/mipsel/test_dsp_mul.c | 67 +++++++++++++++++++ tests/tcg/mipsel/test_dsp_r1_muleq_s_w_phl.c | 1 - tests/tcg/mipsel/test_dsp_r1_muleq_s_w_phr.c | 1 - tests/tcg/mipsel/test_dsp_r1_muleu_s_ph_qbl.c | 1 - tests/tcg/mipsel/test_dsp_r1_muleu_s_ph_qbr.c | 1 - tests/tcg/mipsel/test_dsp_r1_mulq_rs_ph.c | 1 - tests/tcg/mipsel/test_dsp_r2_mul_ph.c | 1 - tests/tcg/mipsel/test_dsp_r2_mul_s_ph.c | 1 - tests/tcg/mipsel/test_dsp_r2_mulq_rs_w.c | 1 - tests/tcg/mipsel/test_dsp_r2_mulq_s_ph.c | 1 - tests/tcg/mipsel/test_dsp_r2_mulq_s_w.c | 1 - tests/tcg/mipsel/meson.build | 11 +-- 12 files changed, 68 insertions(+), 20 deletions(-) create mode 100644 tests/tcg/mipsel/test_dsp_mul.c
tests/tcg/mipsel/test_dsp_mul.c new file +67 -0
@@ -0,0 +1,67 @@ +/* +* MIPS DSP ASE tests: Multiply instructions +* +* SPDX-License-Identifier: GPL-2.0-or-later +*/ + +#include "test_dsp_runner.h" + +#define main test_dsp_r1_muleq_s_w_phl +#include "test_dsp_r1_muleq_s_w_phl.c" +#undef main + +#define main test_dsp_r1_muleq_s_w_phr +#include "test_dsp_r1_muleq_s_w_phr.c" +#undef main + +#define main test_dsp_r1_muleu_s_ph_qbl +#include "test_dsp_r1_muleu_s_ph_qbl.c" +#undef main + +#define main test_dsp_r1_muleu_s_ph_qbr +#include "test_dsp_r1_muleu_s_ph_qbr.c" +#undef main + +#define main test_dsp_r1_mulq_rs_ph +#include "test_dsp_r1_mulq_rs_ph.c" +#undef main + +#define main test_dsp_r2_mul_ph +#include "test_dsp_r2_mul_ph.c" +#undef main + +#define main test_dsp_r2_mul_s_ph +#include "test_dsp_r2_mul_s_ph.c" +#undef main + +#define main test_dsp_r2_mulq_rs_w +#include "test_dsp_r2_mulq_rs_w.c" +#undef main + +#define main test_dsp_r2_mulq_s_ph +#include "test_dsp_r2_mulq_s_ph.c" +#undef main + +#define main test_dsp_r2_mulq_s_w +#include "test_dsp_r2_mulq_s_w.c" +#undef main + +int main (void ) +{ +int ret =0 ; + +RUN_TEST (test_dsp_r1_muleq_s_w_phl); +RUN_TEST (test_dsp_r1_muleq_s_w_phr); +RUN_TEST (test_dsp_r1_muleu_s_ph_qbl); +RUN_TEST (test_dsp_r1_muleu_s_ph_qbr); +RUN_TEST (test_dsp_r1_mulq_rs_ph); +RUN_TEST (test_dsp_r2_mul_ph); +RUN_TEST (test_dsp_r2_mul_s_ph); +RUN_TEST (test_dsp_r2_mulq_rs_w); +RUN_TEST (test_dsp_r2_mulq_s_ph); +RUN_TEST (test_dsp_r2_mulq_s_w); + +DSP_TAP_PLAN (); + +return ret; +}
tests/tcg/mipsel/test_dsp_r1_muleq_s_w_phl.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r1_muleq_s_w_phr.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r1_muleu_s_ph_qbl.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r1_muleu_s_ph_qbr.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r1_mulq_rs_ph.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r2_mul_ph.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r2_mul_s_ph.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r2_mulq_rs_w.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r2_mulq_s_ph.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r2_mulq_s_w.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/meson.build +1 -10
@@ -9,13 +9,9 @@ tests_dsp = [ 'test_dsp_cmp.c', 'test_dsp_ctrl.c', 'test_dsp_dot.c', + 'test_dsp_mul.c', 'test_dsp_r1_bitrev.c', 'test_dsp_r1_insv.c', - 'test_dsp_r1_muleq_s_w_phl.c', - 'test_dsp_r1_muleq_s_w_phr.c', - 'test_dsp_r1_muleu_s_ph_qbl.c', - 'test_dsp_r1_muleu_s_ph_qbr.c', - 'test_dsp_r1_mulq_rs_ph.c', 'test_dsp_r1_packrl_ph.c', 'test_dsp_r1_preceq_w_phl.c', 'test_dsp_r1_preceq_w_phr.c',
@@ -53,11 +49,6 @@ tests_dsp = [ 'test_dsp_r1_shrlv_qb.c', 'test_dsp_r2_append.c', 'test_dsp_r2_balign.c', - 'test_dsp_r2_mul_ph.c', - 'test_dsp_r2_mul_s_ph.c', - 'test_dsp_r2_mulq_rs_w.c', - 'test_dsp_r2_mulq_s_ph.c', - 'test_dsp_r2_mulq_s_w.c', 'test_dsp_r2_precr_qb_ph.c', 'test_dsp_r2_precr_sra_ph_w.c', 'test_dsp_r2_precr_sra_r_ph_w.c',
Signature · 1 line
2.55.0
PATCH v2 7/31 tests/tcg/mips: Group DSP pack tests
In reply to Philippe Mathieu-DaudéBuild the 27 per-opcode pack tests as a single executable, test_dsp_pack.c, to reduce the number of test binaries. Each opcode reports one TAP line.
--- tests/tcg/mipsel/test_dsp_pack.c | 152 ++++++++++++++++++ tests/tcg/mipsel/test_dsp_r1_bitrev.c | 1 - tests/tcg/mipsel/test_dsp_r1_insv.c | 1 - tests/tcg/mipsel/test_dsp_r1_packrl_ph.c | 1 - tests/tcg/mipsel/test_dsp_r1_preceq_w_phl.c | 1 - tests/tcg/mipsel/test_dsp_r1_preceq_w_phr.c | 1 - tests/tcg/mipsel/test_dsp_r1_precequ_ph_qbl.c | 1 - .../tcg/mipsel/test_dsp_r1_precequ_ph_qbla.c | 1 - tests/tcg/mipsel/test_dsp_r1_precequ_ph_qbr.c | 1 - .../tcg/mipsel/test_dsp_r1_precequ_ph_qbra.c | 1 - tests/tcg/mipsel/test_dsp_r1_preceu_ph_qbl.c | 1 - tests/tcg/mipsel/test_dsp_r1_preceu_ph_qbla.c | 1 - tests/tcg/mipsel/test_dsp_r1_preceu_ph_qbr.c | 1 - tests/tcg/mipsel/test_dsp_r1_preceu_ph_qbra.c | 1 - tests/tcg/mipsel/test_dsp_r1_precrq_ph_w.c | 1 - tests/tcg/mipsel/test_dsp_r1_precrq_qb_ph.c | 1 - tests/tcg/mipsel/test_dsp_r1_precrq_rs_ph_w.c | 1 - .../tcg/mipsel/test_dsp_r1_precrqu_s_qb_ph.c | 1 - tests/tcg/mipsel/test_dsp_r1_repl_ph.c | 1 - tests/tcg/mipsel/test_dsp_r1_repl_qb.c | 1 - tests/tcg/mipsel/test_dsp_r1_replv_ph.c | 1 - tests/tcg/mipsel/test_dsp_r1_replv_qb.c | 1 - tests/tcg/mipsel/test_dsp_r2_append.c | 1 - tests/tcg/mipsel/test_dsp_r2_balign.c | 1 - tests/tcg/mipsel/test_dsp_r2_precr_qb_ph.c | 1 - tests/tcg/mipsel/test_dsp_r2_precr_sra_ph_w.c | 1 - .../tcg/mipsel/test_dsp_r2_precr_sra_r_ph_w.c | 1 - tests/tcg/mipsel/test_dsp_r2_prepend.c | 1 - tests/tcg/mipsel/meson.build | 28 +--- 29 files changed, 153 insertions(+), 54 deletions(-) create mode 100644 tests/tcg/mipsel/test_dsp_pack.c
tests/tcg/mipsel/test_dsp_pack.c new file +152 -0
@@ -0,0 +1,152 @@ +/* +* MIPS DSP ASE tests: Precision, Pack, Replicate and bit Insert instructions +* +* SPDX-License-Identifier: GPL-2.0-or-later +*/ + +#include "test_dsp_runner.h" + +#define main test_dsp_r1_bitrev +#include "test_dsp_r1_bitrev.c" +#undef main + +#define main test_dsp_r1_insv +#include "test_dsp_r1_insv.c" +#undef main + +#define main test_dsp_r1_packrl_ph +#include "test_dsp_r1_packrl_ph.c" +#undef main + +#define main test_dsp_r1_preceq_w_phl +#include "test_dsp_r1_preceq_w_phl.c" +#undef main + +#define main test_dsp_r1_preceq_w_phr +#include "test_dsp_r1_preceq_w_phr.c" +#undef main + +#define main test_dsp_r1_precequ_ph_qbl +#include "test_dsp_r1_precequ_ph_qbl.c" +#undef main + +#define main test_dsp_r1_precequ_ph_qbla +#include "test_dsp_r1_precequ_ph_qbla.c" +#undef main + +#define main test_dsp_r1_precequ_ph_qbr +#include "test_dsp_r1_precequ_ph_qbr.c" +#undef main + +#define main test_dsp_r1_precequ_ph_qbra +#include "test_dsp_r1_precequ_ph_qbra.c" +#undef main + +#define main test_dsp_r1_preceu_ph_qbl +#include "test_dsp_r1_preceu_ph_qbl.c" +#undef main + +#define main test_dsp_r1_preceu_ph_qbla +#include "test_dsp_r1_preceu_ph_qbla.c" +#undef main + +#define main test_dsp_r1_preceu_ph_qbr +#include "test_dsp_r1_preceu_ph_qbr.c" +#undef main + +#define main test_dsp_r1_preceu_ph_qbra +#include "test_dsp_r1_preceu_ph_qbra.c" +#undef main + +#define main test_dsp_r1_precrq_ph_w +#include "test_dsp_r1_precrq_ph_w.c" +#undef main + +#define main test_dsp_r1_precrq_qb_ph +#include "test_dsp_r1_precrq_qb_ph.c" +#undef main + +#define main test_dsp_r1_precrq_rs_ph_w +#include "test_dsp_r1_precrq_rs_ph_w.c" +#undef main + +#define main test_dsp_r1_precrqu_s_qb_ph +#include "test_dsp_r1_precrqu_s_qb_ph.c" +#undef main + +#define main test_dsp_r1_repl_ph +#include "test_dsp_r1_repl_ph.c" +#undef main + +#define main test_dsp_r1_repl_qb +#include "test_dsp_r1_repl_qb.c" +#undef main + +#define main test_dsp_r1_replv_ph +#include "test_dsp_r1_replv_ph.c" +#undef main + +#define main test_dsp_r1_replv_qb +#include "test_dsp_r1_replv_qb.c" +#undef main + +#define main test_dsp_r2_append +#include "test_dsp_r2_append.c" +#undef main + +#define main test_dsp_r2_balign +#include "test_dsp_r2_balign.c" +#undef main + +#define main test_dsp_r2_precr_qb_ph +#include "test_dsp_r2_precr_qb_ph.c" +#undef main + +#define main test_dsp_r2_precr_sra_ph_w +#include "test_dsp_r2_precr_sra_ph_w.c" +#undef main + +#define main test_dsp_r2_precr_sra_r_ph_w +#include "test_dsp_r2_precr_sra_r_ph_w.c" +#undef main + +#define main test_dsp_r2_prepend +#include "test_dsp_r2_prepend.c" +#undef main + +int main (void ) +{ +int ret =0 ; + +RUN_TEST (test_dsp_r1_bitrev); +RUN_TEST (test_dsp_r1_insv); +RUN_TEST (test_dsp_r1_packrl_ph); +RUN_TEST (test_dsp_r1_preceq_w_phl); +RUN_TEST (test_dsp_r1_preceq_w_phr); +RUN_TEST (test_dsp_r1_precequ_ph_qbl); +RUN_TEST (test_dsp_r1_precequ_ph_qbla); +RUN_TEST (test_dsp_r1_precequ_ph_qbr); +RUN_TEST (test_dsp_r1_precequ_ph_qbra); +RUN_TEST (test_dsp_r1_preceu_ph_qbl); +RUN_TEST (test_dsp_r1_preceu_ph_qbla); +RUN_TEST (test_dsp_r1_preceu_ph_qbr); +RUN_TEST (test_dsp_r1_preceu_ph_qbra); +RUN_TEST (test_dsp_r1_precrq_ph_w); +RUN_TEST (test_dsp_r1_precrq_qb_ph); +RUN_TEST (test_dsp_r1_precrq_rs_ph_w); +RUN_TEST (test_dsp_r1_precrqu_s_qb_ph); +RUN_TEST (test_dsp_r1_repl_ph); +RUN_TEST (test_dsp_r1_repl_qb); +RUN_TEST (test_dsp_r1_replv_ph); +RUN_TEST (test_dsp_r1_replv_qb); +RUN_TEST (test_dsp_r2_append); +RUN_TEST (test_dsp_r2_balign); +RUN_TEST (test_dsp_r2_precr_qb_ph); +RUN_TEST (test_dsp_r2_precr_sra_ph_w); +RUN_TEST (test_dsp_r2_precr_sra_r_ph_w); +RUN_TEST (test_dsp_r2_prepend); + +DSP_TAP_PLAN (); + +return ret; +}
tests/tcg/mipsel/test_dsp_r1_bitrev.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r1_insv.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r1_packrl_ph.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r1_preceq_w_phl.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r1_preceq_w_phr.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r1_precequ_ph_qbl.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r1_precequ_ph_qbla.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r1_precequ_ph_qbr.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r1_precequ_ph_qbra.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r1_preceu_ph_qbl.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r1_preceu_ph_qbla.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r1_preceu_ph_qbr.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r1_preceu_ph_qbra.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r1_precrq_ph_w.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r1_precrq_qb_ph.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r1_precrq_rs_ph_w.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r1_precrqu_s_qb_ph.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r1_repl_ph.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r1_repl_qb.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r1_replv_ph.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r1_replv_qb.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r2_append.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r2_balign.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r2_precr_qb_ph.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r2_precr_sra_ph_w.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r2_precr_sra_r_ph_w.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r2_prepend.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/meson.build +1 -27
@@ -10,27 +10,7 @@ tests_dsp = [ 'test_dsp_ctrl.c', 'test_dsp_dot.c', 'test_dsp_mul.c', - 'test_dsp_r1_bitrev.c', - 'test_dsp_r1_insv.c', - 'test_dsp_r1_packrl_ph.c', - 'test_dsp_r1_preceq_w_phl.c', - 'test_dsp_r1_preceq_w_phr.c', - 'test_dsp_r1_precequ_ph_qbl.c', - 'test_dsp_r1_precequ_ph_qbla.c', - 'test_dsp_r1_precequ_ph_qbr.c', - 'test_dsp_r1_precequ_ph_qbra.c', - 'test_dsp_r1_preceu_ph_qbl.c', - 'test_dsp_r1_preceu_ph_qbla.c', - 'test_dsp_r1_preceu_ph_qbr.c', - 'test_dsp_r1_preceu_ph_qbra.c', - 'test_dsp_r1_precrq_ph_w.c', - 'test_dsp_r1_precrq_qb_ph.c', - 'test_dsp_r1_precrq_rs_ph_w.c', - 'test_dsp_r1_precrqu_s_qb_ph.c', - 'test_dsp_r1_repl_ph.c', - 'test_dsp_r1_repl_qb.c', - 'test_dsp_r1_replv_ph.c', - 'test_dsp_r1_replv_qb.c', + 'test_dsp_pack.c', 'test_dsp_r1_shll_ph.c', 'test_dsp_r1_shll_qb.c', 'test_dsp_r1_shll_s_ph.c',
@@ -47,12 +27,6 @@ tests_dsp = [ 'test_dsp_r1_shrav_r_w.c', 'test_dsp_r1_shrl_qb.c', 'test_dsp_r1_shrlv_qb.c', - 'test_dsp_r2_append.c', - 'test_dsp_r2_balign.c', - 'test_dsp_r2_precr_qb_ph.c', - 'test_dsp_r2_precr_sra_ph_w.c', - 'test_dsp_r2_precr_sra_r_ph_w.c', - 'test_dsp_r2_prepend.c', 'test_dsp_r2_shra_qb.c', 'test_dsp_r2_shra_r_qb.c', 'test_dsp_r2_shrav_qb.c',
Signature · 1 line
2.55.0
PATCH v2 8/31 tests/tcg/mips: Group DSP shift tests
In reply to Philippe Mathieu-DaudéBuild the 22 per-opcode shift tests as a single executable, test_dsp_shift.c, to reduce the number of test binaries. Each opcode reports one TAP line.
All DSP tests now emit TAP: select it in the meson setup.
--- tests/tcg/mipsel/test_dsp_r1_shll_ph.c | 1 - tests/tcg/mipsel/test_dsp_r1_shll_qb.c | 1 - tests/tcg/mipsel/test_dsp_r1_shll_s_ph.c | 1 - tests/tcg/mipsel/test_dsp_r1_shll_s_w.c | 1 - tests/tcg/mipsel/test_dsp_r1_shllv_ph.c | 1 - tests/tcg/mipsel/test_dsp_r1_shllv_qb.c | 1 - tests/tcg/mipsel/test_dsp_r1_shllv_s_ph.c | 1 - tests/tcg/mipsel/test_dsp_r1_shllv_s_w.c | 1 - tests/tcg/mipsel/test_dsp_r1_shra_ph.c | 1 - tests/tcg/mipsel/test_dsp_r1_shra_r_ph.c | 1 - tests/tcg/mipsel/test_dsp_r1_shra_r_w.c | 1 - tests/tcg/mipsel/test_dsp_r1_shrav_ph.c | 1 - tests/tcg/mipsel/test_dsp_r1_shrav_r_ph.c | 1 - tests/tcg/mipsel/test_dsp_r1_shrav_r_w.c | 1 - tests/tcg/mipsel/test_dsp_r1_shrl_qb.c | 1 - tests/tcg/mipsel/test_dsp_r1_shrlv_qb.c | 1 - tests/tcg/mipsel/test_dsp_r2_shra_qb.c | 1 - tests/tcg/mipsel/test_dsp_r2_shra_r_qb.c | 1 - tests/tcg/mipsel/test_dsp_r2_shrav_qb.c | 1 - tests/tcg/mipsel/test_dsp_r2_shrav_r_qb.c | 1 - tests/tcg/mipsel/test_dsp_r2_shrl_ph.c | 1 - tests/tcg/mipsel/test_dsp_r2_shrlv_ph.c | 1 - tests/tcg/mipsel/test_dsp_shift.c | 127 ++++++++++++++++++++++ tests/tcg/mipsel/meson.build | 24 +--- 24 files changed, 129 insertions(+), 44 deletions(-) create mode 100644 tests/tcg/mipsel/test_dsp_shift.c
tests/tcg/mipsel/test_dsp_r1_shll_ph.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r1_shll_qb.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r1_shll_s_ph.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r1_shll_s_w.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r1_shllv_ph.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r1_shllv_qb.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r1_shllv_s_ph.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r1_shllv_s_w.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r1_shra_ph.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r1_shra_r_ph.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r1_shra_r_w.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r1_shrav_ph.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r1_shrav_r_ph.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r1_shrav_r_w.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r1_shrl_qb.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r1_shrlv_qb.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r2_shra_qb.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r2_shra_r_qb.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r2_shrav_qb.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r2_shrav_r_qb.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r2_shrl_ph.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_r2_shrlv_ph.c +0 -1
@@ -1,5 +1,4 @@#include <stdio.h> -#include <assert.h> int main () {
tests/tcg/mipsel/test_dsp_shift.c new file +127 -0
127 lines not on this page · raw message
tests/tcg/mipsel/meson.build +2 -22
@@ -11,28 +11,7 @@ tests_dsp = [ 'test_dsp_dot.c', 'test_dsp_mul.c', 'test_dsp_pack.c', - 'test_dsp_r1_shll_ph.c', - 'test_dsp_r1_shll_qb.c', - 'test_dsp_r1_shll_s_ph.c', - 'test_dsp_r1_shll_s_w.c', - 'test_dsp_r1_shllv_ph.c', - 'test_dsp_r1_shllv_qb.c', - 'test_dsp_r1_shllv_s_ph.c', - 'test_dsp_r1_shllv_s_w.c', - 'test_dsp_r1_shra_ph.c', - 'test_dsp_r1_shra_r_ph.c', - 'test_dsp_r1_shra_r_w.c', - 'test_dsp_r1_shrav_ph.c', - 'test_dsp_r1_shrav_r_ph.c', - 'test_dsp_r1_shrav_r_w.c', - 'test_dsp_r1_shrl_qb.c', - 'test_dsp_r1_shrlv_qb.c', - 'test_dsp_r2_shra_qb.c', - 'test_dsp_r2_shra_r_qb.c', - 'test_dsp_r2_shrav_qb.c', - 'test_dsp_r2_shrav_r_qb.c', - 'test_dsp_r2_shrl_ph.c', - 'test_dsp_r2_shrlv_ph.c', + 'test_dsp_shift.c', ] foreach src: tests_dsp
@@ -41,6 +20,7 @@ foreach src: tests_dsp 'cflags': ['-EL', '-mabi=32', '-march=mips32r2', '-mgp32', '-mdsp', '-mdspr2', '-Wno-unused-but-set-variable', '-Wno-unused-variable'], 'qemu_args': ['-cpu', '74Kf'], + 'protocol': 'tap', } } endforeach
Signature · 1 line
2.55.0
PATCH v2 9/31 tests/tcg/mips: Group Release 6 bitops tests
In reply to Philippe Mathieu-DaudéBuild the 6 per-opcode bitops tests as a single executable, test_mips64r6_bitops.c, to reduce the number of test binaries. Each opcode reports one TAP line.
Prefix the per-case output of test_utils_64.h with '# ' so TAP parsers treat it as a comment.
--- tests/tcg/mips/include/test_utils_64.h | 6 +-- tests/tcg/mips64/test_mips64r6_bitops.c | 62 +++++++++++++++++++++++++ tests/tcg/mips64/meson.build | 7 +-- 3 files changed, 66 insertions(+), 9 deletions(-) create mode 100644 tests/tcg/mips64/test_mips64r6_bitops.c
tests/tcg/mips/include/test_utils_64.h +3 -3
@@ -58,7 +58,7 @@ static inline int32_t check_results_64(const char *isa_ase_name,uint32_t pass_count =0 ;uint32_t fail_count =0 ; -printf ("| %-10s \t| %-20s\t| %-16s \t|" , +printf ("# %-10s \t| %-20s\t| %-16s \t|" , isa_ase_name, group_name, instruction_name);for (i =0 ; i < test_count; i++) {if (b64_result[i] == b64_expect[i]) {
@@ -92,10 +92,10 @@ static inline bool check_binary_op_64_with_input(binary_op_64 op, const char *opuint64_t expected = expect[i * cols + j];uint64_t res =0 ;op (&input1, &input2, &res); -printf ("assert(0x%" PRIx64" == %s(0x%" PRIx64", 0x%" PRIx64"));\n" , +printf ("# assert(0x%" PRIx64" == %s(0x%" PRIx64", 0x%" PRIx64"));\n" , res, op_str, input1, input2);if (expected != res) { -printf ("// error: expected 0x%" PRIx64"\n" , expected); +printf ("# error: expected 0x%" PRIx64"\n" , expected); ret = false; } }
tests/tcg/mips64/test_mips64r6_bitops.c new file +62 -0
62 lines not on this page · raw message
tests/tcg/mips64/meson.build +1 -6
@@ -28,10 +28,8 @@ endif tests = [] tests_mips64r6 = [ + '../mips64/test_mips64r6_bitops.c', '../mips64/test_mips64r6_and.c', - '../mips64/test_mips64r6_bitswap.c', - '../mips64/test_mips64r6_clo.c', - '../mips64/test_mips64r6_clz.c', '../mips64/test_mips64r6_crc32b.c', '../mips64/test_mips64r6_crc32cb.c', '../mips64/test_mips64r6_crc32cd.c',
@@ -40,9 +38,6 @@ tests_mips64r6 = [ '../mips64/test_mips64r6_crc32d.c', '../mips64/test_mips64r6_crc32h.c', '../mips64/test_mips64r6_crc32w.c', - '../mips64/test_mips64r6_dbitswap.c', - '../mips64/test_mips64r6_dclo.c', - '../mips64/test_mips64r6_dclz.c', '../mips64/test_mips64r6_dmuh.c', '../mips64/test_mips64r6_dmuhu.c', '../mips64/test_mips64r6_dmul.c',
Signature · 1 line
2.55.0
PATCH v2 10/31 tests/tcg/mips: Group Release 6 crc tests
In reply to Philippe Mathieu-DaudéBuild the 8 per-opcode crc tests as a single executable, test_mips64r6_crc.c, to reduce the number of test binaries. Each opcode reports one TAP line.
--- tests/tcg/mips64/test_mips64r6_crc.c | 74 ++++++++++++++++++++++++++++ tests/tcg/mips64/meson.build | 9 +--- 2 files changed, 75 insertions(+), 8 deletions(-) create mode 100644 tests/tcg/mips64/test_mips64r6_crc.c
tests/tcg/mips64/test_mips64r6_crc.c new file +74 -0
@@ -0,0 +1,74 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +/* MIPS64R6 tests: CRC32 */ + +#define main test_mips64r6_crc32b +#include "test_mips64r6_crc32b.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_mips64r6_crc32h +#include "test_mips64r6_crc32h.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_mips64r6_crc32w +#include "test_mips64r6_crc32w.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_mips64r6_crc32d +#include "test_mips64r6_crc32d.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_mips64r6_crc32cb +#include "test_mips64r6_crc32cb.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_mips64r6_crc32ch +#include "test_mips64r6_crc32ch.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_mips64r6_crc32cw +#include "test_mips64r6_crc32cw.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_mips64r6_crc32cd +#include "test_mips64r6_crc32cd.c" +#undef main +#undef TEST_COUNT_TOTAL + +static const struct { +const char *name; +int32_t (*fn)(void ); +} r6_tests[] = { + {"crc32b" , test_mips64r6_crc32b }, + {"crc32h" , test_mips64r6_crc32h }, + {"crc32w" , test_mips64r6_crc32w }, + {"crc32d" , test_mips64r6_crc32d }, + {"crc32cb" , test_mips64r6_crc32cb }, + {"crc32ch" , test_mips64r6_crc32ch }, + {"crc32cw" , test_mips64r6_crc32cw }, + {"crc32cd" , test_mips64r6_crc32cd }, +}; + +int main (void ) +{ +unsigned count =sizeof (r6_tests) /sizeof (r6_tests[0 ]); +int fail =0 ; +unsigned i; + +printf ("TAP version 14\n1..%u\n" , count); +for (i =0 ; i < count; i++) { +int r = r6_tests[i].fn (); + +printf ("%s %u - MIPS64R6 CRC32 %s\n" , r ?"not ok" :"ok" , i +1 , + r6_tests[i].name); + fail |= r; + } + +return fail ?1 :0 ; +}
tests/tcg/mips64/meson.build +1 -8
@@ -29,15 +29,8 @@ tests = [] tests_mips64r6 = [ '../mips64/test_mips64r6_bitops.c', + '../mips64/test_mips64r6_crc.c', '../mips64/test_mips64r6_and.c', - '../mips64/test_mips64r6_crc32b.c', - '../mips64/test_mips64r6_crc32cb.c', - '../mips64/test_mips64r6_crc32cd.c', - '../mips64/test_mips64r6_crc32ch.c', - '../mips64/test_mips64r6_crc32cw.c', - '../mips64/test_mips64r6_crc32d.c', - '../mips64/test_mips64r6_crc32h.c', - '../mips64/test_mips64r6_crc32w.c', '../mips64/test_mips64r6_dmuh.c', '../mips64/test_mips64r6_dmuhu.c', '../mips64/test_mips64r6_dmul.c',
Signature · 1 line
2.55.0
PATCH v2 11/31 tests/tcg/mips: Group Release 6 logic tests
In reply to Philippe Mathieu-DaudéBuild the 4 per-opcode logic tests as a single executable, test_mips64r6_logic.c, to reduce the number of test binaries. Each opcode reports one TAP line.
--- tests/tcg/mips64/test_mips64r6_logic.c | 50 ++++++++++++++++++++++++++ tests/tcg/mips64/meson.build | 5 +-- 2 files changed, 51 insertions(+), 4 deletions(-) create mode 100644 tests/tcg/mips64/test_mips64r6_logic.c
tests/tcg/mips64/test_mips64r6_logic.c new file +50 -0
@@ -0,0 +1,50 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +/* MIPS64R6 tests: logical */ + +#define main test_mips64r6_and +#include "test_mips64r6_and.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_mips64r6_nor +#include "test_mips64r6_nor.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_mips64r6_or +#include "test_mips64r6_or.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_mips64r6_xor +#include "test_mips64r6_xor.c" +#undef main +#undef TEST_COUNT_TOTAL + +static const struct { +const char *name; +int32_t (*fn)(void ); +} r6_tests[] = { + {"and" , test_mips64r6_and }, + {"nor" , test_mips64r6_nor }, + {"or" , test_mips64r6_or }, + {"xor" , test_mips64r6_xor }, +}; + +int main (void ) +{ +unsigned count =sizeof (r6_tests) /sizeof (r6_tests[0 ]); +int fail =0 ; +unsigned i; + +printf ("TAP version 14\n1..%u\n" , count); +for (i =0 ; i < count; i++) { +int r = r6_tests[i].fn (); + +printf ("%s %u - MIPS64R6 logical %s\n" , r ?"not ok" :"ok" , i +1 , + r6_tests[i].name); + fail |= r; + } + +return fail ?1 :0 ; +}
tests/tcg/mips64/meson.build +1 -4
@@ -30,7 +30,7 @@ tests = [] tests_mips64r6 = [ '../mips64/test_mips64r6_bitops.c', '../mips64/test_mips64r6_crc.c', - '../mips64/test_mips64r6_and.c', + '../mips64/test_mips64r6_logic.c', '../mips64/test_mips64r6_dmuh.c', '../mips64/test_mips64r6_dmuhu.c', '../mips64/test_mips64r6_dmul.c',
@@ -42,12 +42,9 @@ tests_mips64r6 = [ '../mips64/test_mips64r6_muhu.c', '../mips64/test_mips64r6_mul.c', '../mips64/test_mips64r6_mulu.c', - '../mips64/test_mips64r6_nor.c', - '../mips64/test_mips64r6_or.c', '../mips64/test_mips64r6_sllv.c', '../mips64/test_mips64r6_srav.c', '../mips64/test_mips64r6_srlv.c', - '../mips64/test_mips64r6_xor.c', ] foreach src: tests_mips64r6
Signature · 1 line
2.55.0
PATCH v2 12/31 tests/tcg/mips: Group Release 6 multiply tests
In reply to Philippe Mathieu-DaudéBuild the 8 per-opcode multiply tests as a single executable, test_mips64r6_multiply.c, to reduce the number of test binaries. Each opcode reports one TAP line.
--- tests/tcg/mips64/test_mips64r6_multiply.c | 74 +++++++++++++++++++++++ tests/tcg/mips64/meson.build | 9 +-- 2 files changed, 75 insertions(+), 8 deletions(-) create mode 100644 tests/tcg/mips64/test_mips64r6_multiply.c
tests/tcg/mips64/test_mips64r6_multiply.c new file +74 -0
@@ -0,0 +1,74 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +/* MIPS64R6 tests: multiply */ + +#define main test_mips64r6_mul +#include "test_mips64r6_mul.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_mips64r6_muh +#include "test_mips64r6_muh.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_mips64r6_mulu +#include "test_mips64r6_mulu.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_mips64r6_muhu +#include "test_mips64r6_muhu.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_mips64r6_dmul +#include "test_mips64r6_dmul.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_mips64r6_dmuh +#include "test_mips64r6_dmuh.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_mips64r6_dmulu +#include "test_mips64r6_dmulu.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_mips64r6_dmuhu +#include "test_mips64r6_dmuhu.c" +#undef main +#undef TEST_COUNT_TOTAL + +static const struct { +const char *name; +int32_t (*fn)(void ); +} r6_tests[] = { + {"mul" , test_mips64r6_mul }, + {"muh" , test_mips64r6_muh }, + {"mulu" , test_mips64r6_mulu }, + {"muhu" , test_mips64r6_muhu }, + {"dmul" , test_mips64r6_dmul }, + {"dmuh" , test_mips64r6_dmuh }, + {"dmulu" , test_mips64r6_dmulu }, + {"dmuhu" , test_mips64r6_dmuhu }, +}; + +int main (void ) +{ +unsigned count =sizeof (r6_tests) /sizeof (r6_tests[0 ]); +int fail =0 ; +unsigned i; + +printf ("TAP version 14\n1..%u\n" , count); +for (i =0 ; i < count; i++) { +int r = r6_tests[i].fn (); + +printf ("%s %u - MIPS64R6 multiply %s\n" , r ?"not ok" :"ok" , i +1 , + r6_tests[i].name); + fail |= r; + } + +return fail ?1 :0 ; +}
tests/tcg/mips64/meson.build +1 -8
@@ -31,17 +31,10 @@ tests_mips64r6 = [ '../mips64/test_mips64r6_bitops.c', '../mips64/test_mips64r6_crc.c', '../mips64/test_mips64r6_logic.c', - '../mips64/test_mips64r6_dmuh.c', - '../mips64/test_mips64r6_dmuhu.c', - '../mips64/test_mips64r6_dmul.c', - '../mips64/test_mips64r6_dmulu.c', + '../mips64/test_mips64r6_multiply.c', '../mips64/test_mips64r6_dsllv.c', '../mips64/test_mips64r6_dsrav.c', '../mips64/test_mips64r6_dsrlv.c', - '../mips64/test_mips64r6_muh.c', - '../mips64/test_mips64r6_muhu.c', - '../mips64/test_mips64r6_mul.c', - '../mips64/test_mips64r6_mulu.c', '../mips64/test_mips64r6_sllv.c', '../mips64/test_mips64r6_srav.c', '../mips64/test_mips64r6_srlv.c',
Signature · 1 line
2.55.0
PATCH v2 13/31 tests/tcg/mips: Group Release 6 shift tests
In reply to Philippe Mathieu-DaudéBuild the 6 per-opcode shift tests as a single executable, test_mips64r6_shift.c, to reduce the number of test binaries. Each opcode reports one TAP line.
All Release 6 tests now emit TAP: select it in the meson setup.
--- tests/tcg/mips64/test_mips64r6_shift.c | 62 ++++++++++++++++++++++++++ tests/tcg/mips64/meson.build | 9 +--- 2 files changed, 64 insertions(+), 7 deletions(-) create mode 100644 tests/tcg/mips64/test_mips64r6_shift.c
tests/tcg/mips64/test_mips64r6_shift.c new file +62 -0
@@ -0,0 +1,62 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +/* MIPS64R6 tests: variable shift */ + +#define main test_mips64r6_sllv +#include "test_mips64r6_sllv.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_mips64r6_srav +#include "test_mips64r6_srav.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_mips64r6_srlv +#include "test_mips64r6_srlv.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_mips64r6_dsllv +#include "test_mips64r6_dsllv.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_mips64r6_dsrav +#include "test_mips64r6_dsrav.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_mips64r6_dsrlv +#include "test_mips64r6_dsrlv.c" +#undef main +#undef TEST_COUNT_TOTAL + +static const struct { +const char *name; +int32_t (*fn)(void ); +} r6_tests[] = { + {"sllv" , test_mips64r6_sllv }, + {"srav" , test_mips64r6_srav }, + {"srlv" , test_mips64r6_srlv }, + {"dsllv" , test_mips64r6_dsllv }, + {"dsrav" , test_mips64r6_dsrav }, + {"dsrlv" , test_mips64r6_dsrlv }, +}; + +int main (void ) +{ +unsigned count =sizeof (r6_tests) /sizeof (r6_tests[0 ]); +int fail =0 ; +unsigned i; + +printf ("TAP version 14\n1..%u\n" , count); +for (i =0 ; i < count; i++) { +int r = r6_tests[i].fn (); + +printf ("%s %u - MIPS64R6 variable shift %s\n" , r ?"not ok" :"ok" , i +1 , + r6_tests[i].name); + fail |= r; + } + +return fail ?1 :0 ; +}
tests/tcg/mips64/meson.build +2 -7
@@ -32,16 +32,11 @@ tests_mips64r6 = [ '../mips64/test_mips64r6_crc.c', '../mips64/test_mips64r6_logic.c', '../mips64/test_mips64r6_multiply.c', - '../mips64/test_mips64r6_dsllv.c', - '../mips64/test_mips64r6_dsrav.c', - '../mips64/test_mips64r6_dsrlv.c', - '../mips64/test_mips64r6_sllv.c', - '../mips64/test_mips64r6_srav.c', - '../mips64/test_mips64r6_srlv.c', + '../mips64/test_mips64r6_shift.c', ] foreach src: tests_mips64r6 - tests += {src: {'cflags': '-march=mips64r6'}} + tests += {src: {'cflags': '-march=mips64r6', 'protocol': 'tap'}} endforeach foreach src: tests_mips_msa
Signature · 1 line
2.55.0
PATCH v2 14/31 tests/tcg/mips: Group MSA bit-count tests
In reply to Philippe Mathieu-DaudéBuild the 12 per-opcode bit-count tests as a single executable, test_msa_bit_count.c, to reduce the number of test binaries. Each opcode reports one TAP line.
Prefix the per-instruction summary of test_utils_128.h with '# ' so TAP parsers treat it as a comment.
--- tests/tcg/mips/include/test_utils_128.h | 2 +- tests/tcg/mips/test_msa_bit_count.c | 103 ++++++++++++++++++++++++ tests/tcg/mips/meson.build | 12 --- tests/tcg/mips64/meson.build | 6 +- tests/tcg/mipsel/meson.build | 6 +- 5 files changed, 114 insertions(+), 15 deletions(-) create mode 100644 tests/tcg/mips/test_msa_bit_count.c
tests/tcg/mips/include/test_utils_128.h +1 -1
@@ -59,7 +59,7 @@ static inline int32_t check_results_128(const char *isa_ase_name,uint32_t pass_count =0 ;uint32_t fail_count =0 ; -printf ("| %-10s \t| %-20s\t| %-16s \t|" , +printf ("# %-10s \t| %-20s\t| %-16s \t|" , isa_ase_name, group_name, instruction_name);for (i =0 ; i < test_count; i++) { if ((b128_result[2 * i] == b128_expect[2 * i]) &&
tests/tcg/mips/test_msa_bit_count.c new file +103 -0
103 lines not on this page · raw message
tests/tcg/mips/meson.build +0 -12
@@ -93,18 +93,6 @@ tests_mips_msa = [ '../mips/user/ase/msa/int-divide/test_msa_div_u_w.c', '../mips/user/ase/msa/int-divide/test_msa_div_u_h.c', '../mips/user/ase/msa/int-divide/test_msa_div_u_d.c', - '../mips/user/ase/msa/bit-count/test_msa_pcnt_h.c', - '../mips/user/ase/msa/bit-count/test_msa_pcnt_b.c', - '../mips/user/ase/msa/bit-count/test_msa_nloc_h.c', - '../mips/user/ase/msa/bit-count/test_msa_pcnt_w.c', - '../mips/user/ase/msa/bit-count/test_msa_nlzc_h.c', - '../mips/user/ase/msa/bit-count/test_msa_pcnt_d.c', - '../mips/user/ase/msa/bit-count/test_msa_nloc_d.c', - '../mips/user/ase/msa/bit-count/test_msa_nloc_w.c', - '../mips/user/ase/msa/bit-count/test_msa_nloc_b.c', - '../mips/user/ase/msa/bit-count/test_msa_nlzc_d.c', - '../mips/user/ase/msa/bit-count/test_msa_nlzc_w.c', - '../mips/user/ase/msa/bit-count/test_msa_nlzc_b.c', '../mips/user/ase/msa/int-add/test_msa_addv_d.c', '../mips/user/ase/msa/int-add/test_msa_adds_a_h.c', '../mips/user/ase/msa/int-add/test_msa_add_a_h.c',
tests/tcg/mips64/meson.build +5 -1
@@ -39,7 +39,11 @@ foreach src: tests_mips64r6 tests += {src: {'cflags': '-march=mips64r6', 'protocol': 'tap'}} endforeach -foreach src: tests_mips_msa +tests_mips_msa_groups = [ + '../mips/test_msa_bit_count.c', +] + +foreach src: tests_mips_msa + tests_mips_msa_groups tests += { src: { 'cflags': ['-march=mips64r6', '-mmsa'],
tests/tcg/mipsel/meson.build +5 -1
@@ -40,7 +40,11 @@ endif tests = [] -foreach src: tests_mips_msa +tests_mips_msa_groups = [ + '../mips/test_msa_bit_count.c', +] + +foreach src: tests_mips_msa + tests_mips_msa_groups tests += { src: { 'cflags': ['-mabi=32', '-march=mips32r5', '-mmsa', '-mno-odd-spreg',
Signature · 1 line
2.55.0
Re: [PATCH v2 14/31] tests/tcg/mips: Group MSA bit-count tests
Quoted 184 lines · Philippe Mathieu-Daudé
Build the 12 per-opcode bit-count tests as a single executable,
test_msa_bit_count.c, to reduce the number of test binaries. Each opcode reports one TAP line.Prefix the per-instruction summary of
test_utils_128.hwith '# ' so TAP parsers treat it as a comment.Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- tests/tcg/mips/include/test_utils_128.h | 2 +- tests/tcg/mips/test_msa_bit_count.c | 103 ++++++++++++++++++++++++ tests/tcg/mips/meson.build | 12 --- tests/tcg/mips64/meson.build | 6 +- tests/tcg/mipsel/meson.build | 6 +- 5 files changed, 114 insertions(+), 15 deletions(-) create mode 100644 tests/tcg/mips/test_msa_bit_count.ctests/tcg/mips/include/test_utils_128.h +1
-1@@ -59,7 +59,7 @@ static inline int32_t check_results_128(const char *isa_ase_name,uint32_t pass_count =0 ;uint32_t fail_count =0 ; -printf ("| %-10s \t| %-20s\t| %-16s \t|" , +printf ("# %-10s \t| %-20s\t| %-16s \t|" , isa_ase_name, group_name, instruction_name);for (i =0 ; i < test_count; i++) { if ((b128_result[2 * i] == b128_expect[2 * i]) &&tests/tcg/mips/test_msa_bit_count.c new file +103
-0@@ -0,0 +1,103 @@ +/* +* MIPS MSA tests: Bit Count instructions +* +* SPDX-License-Identifier: GPL-2.0-or-later +*/ + +#define main test_msa_nloc_b +#include "user/ase/msa/bit-count/test_msa_nloc_b.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_nloc_d +#include "user/ase/msa/bit-count/test_msa_nloc_d.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_nloc_h +#include "user/ase/msa/bit-count/test_msa_nloc_h.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_nloc_w +#include "user/ase/msa/bit-count/test_msa_nloc_w.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_nlzc_b +#include "user/ase/msa/bit-count/test_msa_nlzc_b.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_nlzc_d +#include "user/ase/msa/bit-count/test_msa_nlzc_d.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_nlzc_h +#include "user/ase/msa/bit-count/test_msa_nlzc_h.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_nlzc_w +#include "user/ase/msa/bit-count/test_msa_nlzc_w.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_pcnt_b +#include "user/ase/msa/bit-count/test_msa_pcnt_b.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_pcnt_d +#include "user/ase/msa/bit-count/test_msa_pcnt_d.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_pcnt_h +#include "user/ase/msa/bit-count/test_msa_pcnt_h.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_pcnt_w +#include "user/ase/msa/bit-count/test_msa_pcnt_w.c" +#undef main +#undef TEST_COUNT_TOTAL + + +static const struct { +const char *name; +int32_t (*fn)(void ); +} msa_tests[] = { + {"nloc.b" , test_msa_nloc_b }, + {"nloc.d" , test_msa_nloc_d }, + {"nloc.h" , test_msa_nloc_h }, + {"nloc.w" , test_msa_nloc_w }, + {"nlzc.b" , test_msa_nlzc_b }, + {"nlzc.d" , test_msa_nlzc_d }, + {"nlzc.h" , test_msa_nlzc_h }, + {"nlzc.w" , test_msa_nlzc_w }, + {"pcnt.b" , test_msa_pcnt_b }, + {"pcnt.d" , test_msa_pcnt_d }, + {"pcnt.h" , test_msa_pcnt_h }, + {"pcnt.w" , test_msa_pcnt_w }, +}; + +int main (void ) +{ +int fail =0 ; +unsigned i; + +printf ("TAP version 14\n" +"1..%u\n" , + (unsigned )(sizeof (msa_tests) /sizeof (msa_tests[0 ]))); +for (i =0 ; i <sizeof (msa_tests) /sizeof (msa_tests[0 ]); i++) { +int r = msa_tests[i].fn (); + +printf ("%s %u - MSA %s %s\n" , r ?"not ok" :"ok" , i +1 , +"Bit Count" , msa_tests[i].name); + fail |= r; + } + +return fail ?1 :0 ; +}tests/tcg/mips/meson.build +0
-12@@ -93,18 +93,6 @@ tests_mips_msa = [ '../mips/user/ase/msa/int-divide/test_msa_div_u_w.c', '../mips/user/ase/msa/int-divide/test_msa_div_u_h.c', '../mips/user/ase/msa/int-divide/test_msa_div_u_d.c', - '../mips/user/ase/msa/bit-count/test_msa_pcnt_h.c', - '../mips/user/ase/msa/bit-count/test_msa_pcnt_b.c', - '../mips/user/ase/msa/bit-count/test_msa_nloc_h.c', - '../mips/user/ase/msa/bit-count/test_msa_pcnt_w.c', - '../mips/user/ase/msa/bit-count/test_msa_nlzc_h.c', - '../mips/user/ase/msa/bit-count/test_msa_pcnt_d.c', - '../mips/user/ase/msa/bit-count/test_msa_nloc_d.c', - '../mips/user/ase/msa/bit-count/test_msa_nloc_w.c', - '../mips/user/ase/msa/bit-count/test_msa_nloc_b.c', - '../mips/user/ase/msa/bit-count/test_msa_nlzc_d.c', - '../mips/user/ase/msa/bit-count/test_msa_nlzc_w.c', - '../mips/user/ase/msa/bit-count/test_msa_nlzc_b.c', '../mips/user/ase/msa/int-add/test_msa_addv_d.c', '../mips/user/ase/msa/int-add/test_msa_adds_a_h.c', '../mips/user/ase/msa/int-add/test_msa_add_a_h.c',tests/tcg/mips64/meson.build +5
-1@@ -39,7 +39,11 @@ foreach src: tests_mips64r6 tests += {src: {'cflags': '-march=mips64r6', 'protocol': 'tap'}} endforeach -foreach src: tests_mips_msa +tests_mips_msa_groups = [ + '../mips/test_msa_bit_count.c', +] + +foreach src: tests_mips_msa + tests_mips_msa_groups tests += { src: { 'cflags': ['-march=mips64r6', '-mmsa'],tests/tcg/mipsel/meson.build +0
-0
tests/tcg/mipsel/meson.build endif · line 46
Quoted 8 lines
tests/tcg/mipsel/meson.build +4
-1@@ -40,7 +40,11 @@ endif tests = [] -foreach src: tests_mips_msa +tests_mips_msa_groups = [ + '../mips/test_msa_bit_count.c', +] +
For this, and all MSA tests, any reason to duplicate this array between mips64 and mipsel?
I can hear the "self-contained" meson.build argument, but in this case, it really feels like duplication.
Regards,
Pierrick
Re: [PATCH v2 14/31] tests/tcg/mips: Group MSA bit-count tests
Quoted 197 lines · Pierrick Bouvier
Quoted 184 lines · Philippe Mathieu-Daudé
Build the 12 per-opcode bit-count tests as a single executable,
test_msa_bit_count.c, to reduce the number of test binaries. Each opcode reports one TAP line.Prefix the per-instruction summary of
test_utils_128.hwith '# ' so TAP parsers treat it as a comment.Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- tests/tcg/mips/include/test_utils_128.h | 2 +- tests/tcg/mips/test_msa_bit_count.c | 103 ++++++++++++++++++++++++ tests/tcg/mips/meson.build | 12 --- tests/tcg/mips64/meson.build | 6 +- tests/tcg/mipsel/meson.build | 6 +- 5 files changed, 114 insertions(+), 15 deletions(-)create mode 100644
tests/tcg/mips/test_msa_bit_count.ctests/tcg/mips/include/test_utils_128.h +1
-1@@ -59,7 +59,7 @@ static inline int32_t check_results_128(const char *isa_ase_name,uint32_t pass_count =0 ;uint32_t fail_count =0 ; -printf ("| %-10s \t| %-20s\t| %-16s \t|" , +printf ("# %-10s \t| %-20s\t| %-16s \t|" , isa_ase_name, group_name, instruction_name);for (i =0 ; i < test_count; i++) { if ((b128_result[2 * i] == b128_expect[2 * i]) &&tests/tcg/mips/test_msa_bit_count.c new file +103
-0@@ -0,0 +1,103 @@ +/* +* MIPS MSA tests: Bit Count instructions +* +* SPDX-License-Identifier: GPL-2.0-or-later +*/ + +#define main test_msa_nloc_b +#include "user/ase/msa/bit-count/test_msa_nloc_b.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_nloc_d +#include "user/ase/msa/bit-count/test_msa_nloc_d.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_nloc_h +#include "user/ase/msa/bit-count/test_msa_nloc_h.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_nloc_w +#include "user/ase/msa/bit-count/test_msa_nloc_w.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_nlzc_b +#include "user/ase/msa/bit-count/test_msa_nlzc_b.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_nlzc_d +#include "user/ase/msa/bit-count/test_msa_nlzc_d.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_nlzc_h +#include "user/ase/msa/bit-count/test_msa_nlzc_h.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_nlzc_w +#include "user/ase/msa/bit-count/test_msa_nlzc_w.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_pcnt_b +#include "user/ase/msa/bit-count/test_msa_pcnt_b.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_pcnt_d +#include "user/ase/msa/bit-count/test_msa_pcnt_d.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_pcnt_h +#include "user/ase/msa/bit-count/test_msa_pcnt_h.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_pcnt_w +#include "user/ase/msa/bit-count/test_msa_pcnt_w.c" +#undef main +#undef TEST_COUNT_TOTAL + + +static const struct { +const char *name; +int32_t (*fn)(void ); +} msa_tests[] = { + {"nloc.b" , test_msa_nloc_b }, + {"nloc.d" , test_msa_nloc_d }, + {"nloc.h" , test_msa_nloc_h }, + {"nloc.w" , test_msa_nloc_w }, + {"nlzc.b" , test_msa_nlzc_b }, + {"nlzc.d" , test_msa_nlzc_d }, + {"nlzc.h" , test_msa_nlzc_h }, + {"nlzc.w" , test_msa_nlzc_w }, + {"pcnt.b" , test_msa_pcnt_b }, + {"pcnt.d" , test_msa_pcnt_d }, + {"pcnt.h" , test_msa_pcnt_h }, + {"pcnt.w" , test_msa_pcnt_w }, +}; + +int main (void ) +{ +int fail =0 ; +unsigned i; + +printf ("TAP version 14\n" +"1..%u\n" , + (unsigned )(sizeof (msa_tests) /sizeof (msa_tests[0 ]))); +for (i =0 ; i <sizeof (msa_tests) /sizeof (msa_tests[0 ]); i++) { +int r = msa_tests[i].fn (); + +printf ("%s %u - MSA %s %s\n" , r ?"not ok" :"ok" , i +1 , +"Bit Count" , msa_tests[i].name); + fail |= r; + } + +return fail ?1 :0 ; +}tests/tcg/mips/meson.build +0
-12@@ -93,18 +93,6 @@ tests_mips_msa = [ '../mips/user/ase/msa/int-divide/test_msa_div_u_w.c', '../mips/user/ase/msa/int-divide/test_msa_div_u_h.c', '../mips/user/ase/msa/int-divide/test_msa_div_u_d.c', - '../mips/user/ase/msa/bit-count/test_msa_pcnt_h.c', - '../mips/user/ase/msa/bit-count/test_msa_pcnt_b.c', - '../mips/user/ase/msa/bit-count/test_msa_nloc_h.c', - '../mips/user/ase/msa/bit-count/test_msa_pcnt_w.c', - '../mips/user/ase/msa/bit-count/test_msa_nlzc_h.c', - '../mips/user/ase/msa/bit-count/test_msa_pcnt_d.c', - '../mips/user/ase/msa/bit-count/test_msa_nloc_d.c', - '../mips/user/ase/msa/bit-count/test_msa_nloc_w.c', - '../mips/user/ase/msa/bit-count/test_msa_nloc_b.c', - '../mips/user/ase/msa/bit-count/test_msa_nlzc_d.c', - '../mips/user/ase/msa/bit-count/test_msa_nlzc_w.c', - '../mips/user/ase/msa/bit-count/test_msa_nlzc_b.c', '../mips/user/ase/msa/int-add/test_msa_addv_d.c', '../mips/user/ase/msa/int-add/test_msa_adds_a_h.c', '../mips/user/ase/msa/int-add/test_msa_add_a_h.c',tests/tcg/mips64/meson.build +5
-1@@ -39,7 +39,11 @@ foreach src: tests_mips64r6 tests += {src: {'cflags': '-march=mips64r6', 'protocol': 'tap'}} endforeach -foreach src: tests_mips_msa +tests_mips_msa_groups = [ + '../mips/test_msa_bit_count.c', +] + +foreach src: tests_mips_msa + tests_mips_msa_groups tests += { src: { 'cflags': ['-march=mips64r6', '-mmsa'],tests/tcg/mipsel/meson.build +0
-0tests/tcg/mipsel/meson.build endif · line 46
Quoted 8 lines
tests/tcg/mipsel/meson.build +4
-1@@ -40,7 +40,11 @@ endif tests = [] -foreach src: tests_mips_msa +tests_mips_msa_groups = [ + '../mips/test_msa_bit_count.c', +] +For this, and all MSA tests, any reason to duplicate this array between mips64 and mipsel?
Quoted 2 lines
I can hear the "self-contained" meson.build argument, but in this case, it really feels like duplication.
Good point, I didn't notice.
PATCH v2 15/31 tests/tcg/mips: Group MSA bit-move tests
In reply to Philippe Mathieu-DaudéBuild the 11 per-opcode bit-move tests as a single executable, test_msa_bit_move.c, to reduce the number of test binaries. Each opcode reports one TAP line.
--- tests/tcg/mips/test_msa_bit_move.c | 97 ++++++++++++++++++++++++++++++ tests/tcg/mips/meson.build | 11 ---- tests/tcg/mips64/meson.build | 1 + tests/tcg/mipsel/meson.build | 1 + 4 files changed, 99 insertions(+), 11 deletions(-) create mode 100644 tests/tcg/mips/test_msa_bit_move.c
tests/tcg/mips/test_msa_bit_move.c new file +97 -0
@@ -0,0 +1,97 @@ +/* +* MIPS MSA tests: Bit Move instructions +* +* SPDX-License-Identifier: GPL-2.0-or-later +*/ + +#define main test_msa_binsl_b +#include "user/ase/msa/bit-move/test_msa_binsl_b.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_binsl_d +#include "user/ase/msa/bit-move/test_msa_binsl_d.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_binsl_h +#include "user/ase/msa/bit-move/test_msa_binsl_h.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_binsl_w +#include "user/ase/msa/bit-move/test_msa_binsl_w.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_binsr_b +#include "user/ase/msa/bit-move/test_msa_binsr_b.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_binsr_d +#include "user/ase/msa/bit-move/test_msa_binsr_d.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_binsr_h +#include "user/ase/msa/bit-move/test_msa_binsr_h.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_binsr_w +#include "user/ase/msa/bit-move/test_msa_binsr_w.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_bmnz_v +#include "user/ase/msa/bit-move/test_msa_bmnz_v.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_bmz_v +#include "user/ase/msa/bit-move/test_msa_bmz_v.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_bsel_v +#include "user/ase/msa/bit-move/test_msa_bsel_v.c" +#undef main +#undef TEST_COUNT_TOTAL + + +static const struct { +const char *name; +int32_t (*fn)(void ); +} msa_tests[] = { + {"binsl.b" , test_msa_binsl_b }, + {"binsl.d" , test_msa_binsl_d }, + {"binsl.h" , test_msa_binsl_h }, + {"binsl.w" , test_msa_binsl_w }, + {"binsr.b" , test_msa_binsr_b }, + {"binsr.d" , test_msa_binsr_d }, + {"binsr.h" , test_msa_binsr_h }, + {"binsr.w" , test_msa_binsr_w }, + {"bmnz.v" , test_msa_bmnz_v }, + {"bmz.v" , test_msa_bmz_v }, + {"bsel.v" , test_msa_bsel_v }, +}; + +int main (void ) +{ +int fail =0 ; +unsigned i; + +printf ("TAP version 14\n" +"1..%u\n" , + (unsigned )(sizeof (msa_tests) /sizeof (msa_tests[0 ]))); +for (i =0 ; i <sizeof (msa_tests) /sizeof (msa_tests[0 ]); i++) { +int r = msa_tests[i].fn (); + +printf ("%s %u - MSA %s %s\n" , r ?"not ok" :"ok" , i +1 , +"Bit Move" , msa_tests[i].name); + fail |= r; + } + +return fail ?1 :0 ; +}
tests/tcg/mips/meson.build +0 -11
@@ -147,17 +147,6 @@ tests_mips_msa = [ '../mips/user/ase/msa/pack/test_msa_pckod_w.c', '../mips/user/ase/msa/pack/test_msa_vshf_h.c', '../mips/user/ase/msa/pack/test_msa_pckod_d.c', - '../mips/user/ase/msa/bit-move/test_msa_binsr_w.c', - '../mips/user/ase/msa/bit-move/test_msa_binsr_b.c', - '../mips/user/ase/msa/bit-move/test_msa_binsr_d.c', - '../mips/user/ase/msa/bit-move/test_msa_binsr_h.c', - '../mips/user/ase/msa/bit-move/test_msa_binsl_h.c', - '../mips/user/ase/msa/bit-move/test_msa_binsl_w.c', - '../mips/user/ase/msa/bit-move/test_msa_bmnz_v.c', - '../mips/user/ase/msa/bit-move/test_msa_bsel_v.c', - '../mips/user/ase/msa/bit-move/test_msa_bmz_v.c', - '../mips/user/ase/msa/bit-move/test_msa_binsl_d.c', - '../mips/user/ase/msa/bit-move/test_msa_binsl_b.c', '../mips/user/ase/msa/shift/test_msa_sra_d.c', '../mips/user/ase/msa/shift/test_msa_srl_b.c', '../mips/user/ase/msa/shift/test_msa_srl_d.c',
tests/tcg/mips64/meson.build +1 -0
@@ -41,6 +41,7 @@ endforeach tests_mips_msa_groups = [ '../mips/test_msa_bit_count.c', + '../mips/test_msa_bit_move.c', ] foreach src: tests_mips_msa + tests_mips_msa_groups
tests/tcg/mipsel/meson.build +1 -0
@@ -42,6 +42,7 @@ tests = [] tests_mips_msa_groups = [ '../mips/test_msa_bit_count.c', + '../mips/test_msa_bit_move.c', ] foreach src: tests_mips_msa + tests_mips_msa_groups
Signature · 1 line
2.55.0
PATCH v2 16/31 tests/tcg/mips: Group MSA bit-set tests
In reply to Philippe Mathieu-DaudéBuild the 12 per-opcode bit-set tests as a single executable, test_msa_bit_set.c, to reduce the number of test binaries. Each opcode reports one TAP line.
--- tests/tcg/mips/test_msa_bit_set.c | 103 ++++++++++++++++++++++++++++++ tests/tcg/mips/meson.build | 12 ---- tests/tcg/mips64/meson.build | 1 + tests/tcg/mipsel/meson.build | 1 + 4 files changed, 105 insertions(+), 12 deletions(-) create mode 100644 tests/tcg/mips/test_msa_bit_set.c
tests/tcg/mips/test_msa_bit_set.c new file +103 -0
@@ -0,0 +1,103 @@ +/* +* MIPS MSA tests: Bit Set instructions +* +* SPDX-License-Identifier: GPL-2.0-or-later +*/ + +#define main test_msa_bclr_b +#include "user/ase/msa/bit-set/test_msa_bclr_b.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_bclr_d +#include "user/ase/msa/bit-set/test_msa_bclr_d.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_bclr_h +#include "user/ase/msa/bit-set/test_msa_bclr_h.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_bclr_w +#include "user/ase/msa/bit-set/test_msa_bclr_w.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_bneg_b +#include "user/ase/msa/bit-set/test_msa_bneg_b.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_bneg_d +#include "user/ase/msa/bit-set/test_msa_bneg_d.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_bneg_h +#include "user/ase/msa/bit-set/test_msa_bneg_h.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_bneg_w +#include "user/ase/msa/bit-set/test_msa_bneg_w.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_bset_b +#include "user/ase/msa/bit-set/test_msa_bset_b.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_bset_d +#include "user/ase/msa/bit-set/test_msa_bset_d.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_bset_h +#include "user/ase/msa/bit-set/test_msa_bset_h.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_bset_w +#include "user/ase/msa/bit-set/test_msa_bset_w.c" +#undef main +#undef TEST_COUNT_TOTAL + + +static const struct { +const char *name; +int32_t (*fn)(void ); +} msa_tests[] = { + {"bclr.b" , test_msa_bclr_b }, + {"bclr.d" , test_msa_bclr_d }, + {"bclr.h" , test_msa_bclr_h }, + {"bclr.w" , test_msa_bclr_w }, + {"bneg.b" , test_msa_bneg_b }, + {"bneg.d" , test_msa_bneg_d }, + {"bneg.h" , test_msa_bneg_h }, + {"bneg.w" , test_msa_bneg_w }, + {"bset.b" , test_msa_bset_b }, + {"bset.d" , test_msa_bset_d }, + {"bset.h" , test_msa_bset_h }, + {"bset.w" , test_msa_bset_w }, +}; + +int main (void ) +{ +int fail =0 ; +unsigned i; + +printf ("TAP version 14\n" +"1..%u\n" , + (unsigned )(sizeof (msa_tests) /sizeof (msa_tests[0 ]))); +for (i =0 ; i <sizeof (msa_tests) /sizeof (msa_tests[0 ]); i++) { +int r = msa_tests[i].fn (); + +printf ("%s %u - MSA %s %s\n" , r ?"not ok" :"ok" , i +1 , +"Bit Set" , msa_tests[i].name); + fail |= r; + } + +return fail ?1 :0 ; +}
tests/tcg/mips/meson.build +0 -12
@@ -244,18 +244,6 @@ tests_mips_msa = [ '../mips/user/ase/msa/int-average/test_msa_aver_u_d.c', '../mips/user/ase/msa/int-average/test_msa_ave_u_b.c', '../mips/user/ase/msa/int-average/test_msa_aver_s_h.c', - '../mips/user/ase/msa/bit-set/test_msa_bneg_b.c', - '../mips/user/ase/msa/bit-set/test_msa_bclr_d.c', - '../mips/user/ase/msa/bit-set/test_msa_bneg_h.c', - '../mips/user/ase/msa/bit-set/test_msa_bset_h.c', - '../mips/user/ase/msa/bit-set/test_msa_bclr_b.c', - '../mips/user/ase/msa/bit-set/test_msa_bclr_h.c', - '../mips/user/ase/msa/bit-set/test_msa_bneg_w.c', - '../mips/user/ase/msa/bit-set/test_msa_bset_w.c', - '../mips/user/ase/msa/bit-set/test_msa_bset_b.c', - '../mips/user/ase/msa/bit-set/test_msa_bclr_w.c', - '../mips/user/ase/msa/bit-set/test_msa_bset_d.c', - '../mips/user/ase/msa/bit-set/test_msa_bneg_d.c', '../mips/user/ase/msa/int-dot-product/test_msa_dpadd_s_h.c', '../mips/user/ase/msa/int-dot-product/test_msa_dpsub_u_h.c', '../mips/user/ase/msa/int-dot-product/test_msa_dpsub_s_w.c',
tests/tcg/mips64/meson.build +1 -0
@@ -42,6 +42,7 @@ endforeach tests_mips_msa_groups = [ '../mips/test_msa_bit_count.c', '../mips/test_msa_bit_move.c', + '../mips/test_msa_bit_set.c', ] foreach src: tests_mips_msa + tests_mips_msa_groups
tests/tcg/mipsel/meson.build +1 -0
@@ -43,6 +43,7 @@ tests = [] tests_mips_msa_groups = [ '../mips/test_msa_bit_count.c', '../mips/test_msa_bit_move.c', + '../mips/test_msa_bit_set.c', ] foreach src: tests_mips_msa + tests_mips_msa_groups
Signature · 1 line
2.55.0
PATCH v2 17/31 tests/tcg/mips: Group MSA fixed-multiply tests
In reply to Philippe Mathieu-DaudéBuild the 12 per-opcode fixed-multiply tests as a single executable, test_msa_fixed_multiply.c, to reduce the number of test binaries. Each opcode reports one TAP line.
--- tests/tcg/mips/test_msa_fixed_multiply.c | 103 +++++++++++++++++++++++ tests/tcg/mips/meson.build | 12 --- tests/tcg/mips64/meson.build | 1 + tests/tcg/mipsel/meson.build | 1 + 4 files changed, 105 insertions(+), 12 deletions(-) create mode 100644 tests/tcg/mips/test_msa_fixed_multiply.c
tests/tcg/mips/test_msa_fixed_multiply.c new file +103 -0
@@ -0,0 +1,103 @@ +/* +* MIPS MSA tests: Fixed Multiply instructions +* +* SPDX-License-Identifier: GPL-2.0-or-later +*/ + +#define main test_msa_madd_q_h +#include "user/ase/msa/fixed-multiply/test_msa_madd_q_h.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_madd_q_w +#include "user/ase/msa/fixed-multiply/test_msa_madd_q_w.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_maddr_q_h +#include "user/ase/msa/fixed-multiply/test_msa_maddr_q_h.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_maddr_q_w +#include "user/ase/msa/fixed-multiply/test_msa_maddr_q_w.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_msub_q_h +#include "user/ase/msa/fixed-multiply/test_msa_msub_q_h.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_msub_q_w +#include "user/ase/msa/fixed-multiply/test_msa_msub_q_w.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_msubr_q_h +#include "user/ase/msa/fixed-multiply/test_msa_msubr_q_h.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_msubr_q_w +#include "user/ase/msa/fixed-multiply/test_msa_msubr_q_w.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_mul_q_h +#include "user/ase/msa/fixed-multiply/test_msa_mul_q_h.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_mul_q_w +#include "user/ase/msa/fixed-multiply/test_msa_mul_q_w.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_mulr_q_h +#include "user/ase/msa/fixed-multiply/test_msa_mulr_q_h.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_mulr_q_w +#include "user/ase/msa/fixed-multiply/test_msa_mulr_q_w.c" +#undef main +#undef TEST_COUNT_TOTAL + + +static const struct { +const char *name; +int32_t (*fn)(void ); +} msa_tests[] = { + {"madd.q.h" , test_msa_madd_q_h }, + {"madd.q.w" , test_msa_madd_q_w }, + {"maddr.q.h" , test_msa_maddr_q_h }, + {"maddr.q.w" , test_msa_maddr_q_w }, + {"msub.q.h" , test_msa_msub_q_h }, + {"msub.q.w" , test_msa_msub_q_w }, + {"msubr.q.h" , test_msa_msubr_q_h }, + {"msubr.q.w" , test_msa_msubr_q_w }, + {"mul.q.h" , test_msa_mul_q_h }, + {"mul.q.w" , test_msa_mul_q_w }, + {"mulr.q.h" , test_msa_mulr_q_h }, + {"mulr.q.w" , test_msa_mulr_q_w }, +}; + +int main (void ) +{ +int fail =0 ; +unsigned i; + +printf ("TAP version 14\n" +"1..%u\n" , + (unsigned )(sizeof (msa_tests) /sizeof (msa_tests[0 ]))); +for (i =0 ; i <sizeof (msa_tests) /sizeof (msa_tests[0 ]); i++) { +int r = msa_tests[i].fn (); + +printf ("%s %u - MSA %s %s\n" , r ?"not ok" :"ok" , i +1 , +"Fixed Multiply" , msa_tests[i].name); + fail |= r; + } + +return fail ?1 :0 ; +}
tests/tcg/mips/meson.build +0 -12
@@ -192,18 +192,6 @@ tests_mips_msa = [ '../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', - '../mips/user/ase/msa/fixed-multiply/test_msa_mulr_q_h.c', - '../mips/user/ase/msa/fixed-multiply/test_msa_mul_q_w.c', - '../mips/user/ase/msa/fixed-multiply/test_msa_msubr_q_w.c', - '../mips/user/ase/msa/fixed-multiply/test_msa_maddr_q_h.c', - '../mips/user/ase/msa/fixed-multiply/test_msa_maddr_q_w.c', - '../mips/user/ase/msa/fixed-multiply/test_msa_msub_q_w.c', - '../mips/user/ase/msa/fixed-multiply/test_msa_msub_q_h.c', - '../mips/user/ase/msa/fixed-multiply/test_msa_madd_q_h.c', - '../mips/user/ase/msa/fixed-multiply/test_msa_mul_q_h.c', - '../mips/user/ase/msa/fixed-multiply/test_msa_mulr_q_w.c', - '../mips/user/ase/msa/fixed-multiply/test_msa_madd_q_w.c', - '../mips/user/ase/msa/fixed-multiply/test_msa_msubr_q_h.c', '../mips/user/ase/msa/int-max-min/test_msa_min_u_h.c', '../mips/user/ase/msa/int-max-min/test_msa_max_a_b.c', '../mips/user/ase/msa/int-max-min/test_msa_max_s_b.c',
tests/tcg/mips64/meson.build +1 -0
@@ -43,6 +43,7 @@ tests_mips_msa_groups = [ '../mips/test_msa_bit_count.c', '../mips/test_msa_bit_move.c', '../mips/test_msa_bit_set.c', + '../mips/test_msa_fixed_multiply.c', ] foreach src: tests_mips_msa + tests_mips_msa_groups
tests/tcg/mipsel/meson.build +1 -0
@@ -44,6 +44,7 @@ tests_mips_msa_groups = [ '../mips/test_msa_bit_count.c', '../mips/test_msa_bit_move.c', '../mips/test_msa_bit_set.c', + '../mips/test_msa_fixed_multiply.c', ] foreach src: tests_mips_msa + tests_mips_msa_groups
Signature · 1 line
2.55.0
PATCH v2 18/31 tests/tcg/mips: Group MSA float-max-min tests
In reply to Philippe Mathieu-DaudéBuild the 8 per-opcode float-max-min tests as a single executable, test_msa_float_max_min.c, to reduce the number of test binaries. Each opcode reports one TAP line.
--- tests/tcg/mips/test_msa_float_max_min.c | 79 +++++++++++++++++++++++++ tests/tcg/mips/meson.build | 8 --- tests/tcg/mips64/meson.build | 1 + tests/tcg/mipsel/meson.build | 1 + 4 files changed, 81 insertions(+), 8 deletions(-) create mode 100644 tests/tcg/mips/test_msa_float_max_min.c
tests/tcg/mips/test_msa_float_max_min.c new file +79 -0
@@ -0,0 +1,79 @@ +/* +* MIPS MSA tests: Float Min / Max instructions +* +* SPDX-License-Identifier: GPL-2.0-or-later +*/ + +#define main test_msa_fmax_a_d +#include "user/ase/msa/float-max-min/test_msa_fmax_a_d.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_fmax_a_w +#include "user/ase/msa/float-max-min/test_msa_fmax_a_w.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_fmax_d +#include "user/ase/msa/float-max-min/test_msa_fmax_d.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_fmax_w +#include "user/ase/msa/float-max-min/test_msa_fmax_w.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_fmin_a_d +#include "user/ase/msa/float-max-min/test_msa_fmin_a_d.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_fmin_a_w +#include "user/ase/msa/float-max-min/test_msa_fmin_a_w.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_fmin_d +#include "user/ase/msa/float-max-min/test_msa_fmin_d.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_fmin_w +#include "user/ase/msa/float-max-min/test_msa_fmin_w.c" +#undef main +#undef TEST_COUNT_TOTAL + + +static const struct { +const char *name; +int32_t (*fn)(void ); +} msa_tests[] = { + {"fmax.a.d" , test_msa_fmax_a_d }, + {"fmax.a.w" , test_msa_fmax_a_w }, + {"fmax.d" , test_msa_fmax_d }, + {"fmax.w" , test_msa_fmax_w }, + {"fmin.a.d" , test_msa_fmin_a_d }, + {"fmin.a.w" , test_msa_fmin_a_w }, + {"fmin.d" , test_msa_fmin_d }, + {"fmin.w" , test_msa_fmin_w }, +}; + +int main (void ) +{ +int fail =0 ; +unsigned i; + +printf ("TAP version 14\n" +"1..%u\n" , + (unsigned )(sizeof (msa_tests) /sizeof (msa_tests[0 ]))); +for (i =0 ; i <sizeof (msa_tests) /sizeof (msa_tests[0 ]); i++) { +int r = msa_tests[i].fn (); + +printf ("%s %u - MSA %s %s\n" , r ?"not ok" :"ok" , i +1 , +"Float Max Min" , msa_tests[i].name); + fail |= r; + } + +return fail ?1 :0 ; +}
tests/tcg/mips/meson.build +0 -8
@@ -65,14 +65,6 @@ tests_mips_msa = [ '../mips/user/ase/msa/int-subtract/test_msa_asub_u_h.c', '../mips/user/ase/msa/int-subtract/test_msa_asub_s_b.c', '../mips/user/ase/msa/int-subtract/test_msa_subs_s_w.c', - '../mips/user/ase/msa/float-max-min/test_msa_fmin_w.c', - '../mips/user/ase/msa/float-max-min/test_msa_fmax_w.c', - '../mips/user/ase/msa/float-max-min/test_msa_fmax_a_d.c', - '../mips/user/ase/msa/float-max-min/test_msa_fmin_a_w.c', - '../mips/user/ase/msa/float-max-min/test_msa_fmax_a_w.c', - '../mips/user/ase/msa/float-max-min/test_msa_fmax_d.c', - '../mips/user/ase/msa/float-max-min/test_msa_fmin_d.c', - '../mips/user/ase/msa/float-max-min/test_msa_fmin_a_d.c', '../mips/user/ase/msa/int-multiply/test_msa_mulv_w.c', '../mips/user/ase/msa/int-multiply/test_msa_msubv_d.c', '../mips/user/ase/msa/int-multiply/test_msa_msubv_h.c',
tests/tcg/mips64/meson.build +1 -0
@@ -44,6 +44,7 @@ tests_mips_msa_groups = [ '../mips/test_msa_bit_move.c', '../mips/test_msa_bit_set.c', '../mips/test_msa_fixed_multiply.c', + '../mips/test_msa_float_max_min.c', ] foreach src: tests_mips_msa + tests_mips_msa_groups
tests/tcg/mipsel/meson.build +1 -0
@@ -45,6 +45,7 @@ tests_mips_msa_groups = [ '../mips/test_msa_bit_move.c', '../mips/test_msa_bit_set.c', '../mips/test_msa_fixed_multiply.c', + '../mips/test_msa_float_max_min.c', ] foreach src: tests_mips_msa + tests_mips_msa_groups
Signature · 1 line
2.55.0
PATCH v2 19/31 tests/tcg/mips: Group MSA int-add tests
In reply to Philippe Mathieu-DaudéBuild the 26 per-opcode int-add tests as a single executable, test_msa_int_add.c, to reduce the number of test binaries. Each opcode reports one TAP line.
--- tests/tcg/mips/test_msa_int_add.c | 187 ++++++++++++++++++++++++++++++ tests/tcg/mips/meson.build | 26 ----- tests/tcg/mips64/meson.build | 1 + tests/tcg/mipsel/meson.build | 1 + 4 files changed, 189 insertions(+), 26 deletions(-) create mode 100644 tests/tcg/mips/test_msa_int_add.c
tests/tcg/mips/test_msa_int_add.c new file +187 -0
@@ -0,0 +1,187 @@ +/* +* MIPS MSA tests: Int Add instructions +* +* SPDX-License-Identifier: GPL-2.0-or-later +*/ + +#define main test_msa_add_a_b +#include "user/ase/msa/int-add/test_msa_add_a_b.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_add_a_d +#include "user/ase/msa/int-add/test_msa_add_a_d.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_add_a_h +#include "user/ase/msa/int-add/test_msa_add_a_h.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_add_a_w +#include "user/ase/msa/int-add/test_msa_add_a_w.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_adds_a_b +#include "user/ase/msa/int-add/test_msa_adds_a_b.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_adds_a_d +#include "user/ase/msa/int-add/test_msa_adds_a_d.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_adds_a_h +#include "user/ase/msa/int-add/test_msa_adds_a_h.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_adds_a_w +#include "user/ase/msa/int-add/test_msa_adds_a_w.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_adds_s_b +#include "user/ase/msa/int-add/test_msa_adds_s_b.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_adds_s_d +#include "user/ase/msa/int-add/test_msa_adds_s_d.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_adds_s_h +#include "user/ase/msa/int-add/test_msa_adds_s_h.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_adds_s_w +#include "user/ase/msa/int-add/test_msa_adds_s_w.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_adds_u_b +#include "user/ase/msa/int-add/test_msa_adds_u_b.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_adds_u_d +#include "user/ase/msa/int-add/test_msa_adds_u_d.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_adds_u_h +#include "user/ase/msa/int-add/test_msa_adds_u_h.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_adds_u_w +#include "user/ase/msa/int-add/test_msa_adds_u_w.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_addv_b +#include "user/ase/msa/int-add/test_msa_addv_b.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_addv_d +#include "user/ase/msa/int-add/test_msa_addv_d.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_addv_h +#include "user/ase/msa/int-add/test_msa_addv_h.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_addv_w +#include "user/ase/msa/int-add/test_msa_addv_w.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_hadd_s_d +#include "user/ase/msa/int-add/test_msa_hadd_s_d.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_hadd_s_h +#include "user/ase/msa/int-add/test_msa_hadd_s_h.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_hadd_s_w +#include "user/ase/msa/int-add/test_msa_hadd_s_w.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_hadd_u_d +#include "user/ase/msa/int-add/test_msa_hadd_u_d.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_hadd_u_h +#include "user/ase/msa/int-add/test_msa_hadd_u_h.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_hadd_u_w +#include "user/ase/msa/int-add/test_msa_hadd_u_w.c" +#undef main +#undef TEST_COUNT_TOTAL + + +static const struct { +const char *name; +int32_t (*fn)(void ); +} msa_tests[] = { + {"add.a.b" , test_msa_add_a_b }, + {"add.a.d" , test_msa_add_a_d }, + {"add.a.h" , test_msa_add_a_h }, + {"add.a.w" , test_msa_add_a_w }, + {"adds.a.b" , test_msa_adds_a_b }, + {"adds.a.d" , test_msa_adds_a_d }, + {"adds.a.h" , test_msa_adds_a_h }, + {"adds.a.w" , test_msa_adds_a_w }, + {"adds.s.b" , test_msa_adds_s_b }, + {"adds.s.d" , test_msa_adds_s_d }, + {"adds.s.h" , test_msa_adds_s_h }, + {"adds.s.w" , test_msa_adds_s_w }, + {"adds.u.b" , test_msa_adds_u_b }, + {"adds.u.d" , test_msa_adds_u_d }, + {"adds.u.h" , test_msa_adds_u_h }, + {"adds.u.w" , test_msa_adds_u_w }, + {"addv.b" , test_msa_addv_b }, + {"addv.d" , test_msa_addv_d }, + {"addv.h" , test_msa_addv_h }, + {"addv.w" , test_msa_addv_w }, + {"hadd.s.d" , test_msa_hadd_s_d }, + {"hadd.s.h" , test_msa_hadd_s_h }, + {"hadd.s.w" , test_msa_hadd_s_w }, + {"hadd.u.d" , test_msa_hadd_u_d }, + {"hadd.u.h" , test_msa_hadd_u_h }, + {"hadd.u.w" , test_msa_hadd_u_w }, +}; + +int main (void ) +{ +int fail =0 ; +unsigned i; + +printf ("TAP version 14\n" +"1..%u\n" , + (unsigned )(sizeof (msa_tests) /sizeof (msa_tests[0 ]))); +for (i =0 ; i <sizeof (msa_tests) /sizeof (msa_tests[0 ]); i++) { +int r = msa_tests[i].fn (); + +printf ("%s %u - MSA %s %s\n" , r ?"not ok" :"ok" , i +1 , +"Int Add" , msa_tests[i].name); + fail |= r; + } + +return fail ?1 :0 ; +}
tests/tcg/mips/meson.build +0 -26
@@ -85,32 +85,6 @@ tests_mips_msa = [ '../mips/user/ase/msa/int-divide/test_msa_div_u_w.c', '../mips/user/ase/msa/int-divide/test_msa_div_u_h.c', '../mips/user/ase/msa/int-divide/test_msa_div_u_d.c', - '../mips/user/ase/msa/int-add/test_msa_addv_d.c', - '../mips/user/ase/msa/int-add/test_msa_adds_a_h.c', - '../mips/user/ase/msa/int-add/test_msa_add_a_h.c', - '../mips/user/ase/msa/int-add/test_msa_adds_a_w.c', - '../mips/user/ase/msa/int-add/test_msa_adds_u_d.c', - '../mips/user/ase/msa/int-add/test_msa_adds_s_h.c', - '../mips/user/ase/msa/int-add/test_msa_adds_s_b.c', - '../mips/user/ase/msa/int-add/test_msa_addv_b.c', - '../mips/user/ase/msa/int-add/test_msa_hadd_s_w.c', - '../mips/user/ase/msa/int-add/test_msa_hadd_u_d.c', - '../mips/user/ase/msa/int-add/test_msa_adds_a_b.c', - '../mips/user/ase/msa/int-add/test_msa_add_a_w.c', - '../mips/user/ase/msa/int-add/test_msa_hadd_u_h.c', - '../mips/user/ase/msa/int-add/test_msa_add_a_b.c', - '../mips/user/ase/msa/int-add/test_msa_adds_s_d.c', - '../mips/user/ase/msa/int-add/test_msa_adds_u_b.c', - '../mips/user/ase/msa/int-add/test_msa_adds_a_d.c', - '../mips/user/ase/msa/int-add/test_msa_adds_s_w.c', - '../mips/user/ase/msa/int-add/test_msa_addv_w.c', - '../mips/user/ase/msa/int-add/test_msa_adds_u_h.c', - '../mips/user/ase/msa/int-add/test_msa_hadd_u_w.c', - '../mips/user/ase/msa/int-add/test_msa_hadd_s_h.c', - '../mips/user/ase/msa/int-add/test_msa_addv_h.c', - '../mips/user/ase/msa/int-add/test_msa_hadd_s_d.c', - '../mips/user/ase/msa/int-add/test_msa_add_a_d.c', - '../mips/user/ase/msa/int-add/test_msa_adds_u_w.c', '../mips/user/ase/msa/interleave/test_msa_ilvr_b.c', '../mips/user/ase/msa/interleave/test_msa_ilvr_d.c', '../mips/user/ase/msa/interleave/test_msa_ilvod_b.c',
tests/tcg/mips64/meson.build +1 -0
@@ -45,6 +45,7 @@ tests_mips_msa_groups = [ '../mips/test_msa_bit_set.c', '../mips/test_msa_fixed_multiply.c', '../mips/test_msa_float_max_min.c', + '../mips/test_msa_int_add.c', ] foreach src: tests_mips_msa + tests_mips_msa_groups
tests/tcg/mipsel/meson.build +1 -0
@@ -46,6 +46,7 @@ tests_mips_msa_groups = [ '../mips/test_msa_bit_set.c', '../mips/test_msa_fixed_multiply.c', '../mips/test_msa_float_max_min.c', + '../mips/test_msa_int_add.c', ] foreach src: tests_mips_msa + tests_mips_msa_groups
Signature · 1 line
2.55.0
PATCH v2 20/31 tests/tcg/mips: Group MSA int-average tests
In reply to Philippe Mathieu-DaudéBuild the 16 per-opcode int-average tests as a single executable, test_msa_int_average.c, to reduce the number of test binaries. Each opcode reports one TAP line.
--- tests/tcg/mips/test_msa_int_average.c | 127 ++++++++++++++++++++++++++ tests/tcg/mips/meson.build | 16 ---- tests/tcg/mips64/meson.build | 1 + tests/tcg/mipsel/meson.build | 1 + 4 files changed, 129 insertions(+), 16 deletions(-) create mode 100644 tests/tcg/mips/test_msa_int_average.c
tests/tcg/mips/test_msa_int_average.c new file +127 -0
@@ -0,0 +1,127 @@ +/* +* MIPS MSA tests: Int Average instructions +* +* SPDX-License-Identifier: GPL-2.0-or-later +*/ + +#define main test_msa_ave_s_b +#include "user/ase/msa/int-average/test_msa_ave_s_b.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_ave_s_d +#include "user/ase/msa/int-average/test_msa_ave_s_d.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_ave_s_h +#include "user/ase/msa/int-average/test_msa_ave_s_h.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_ave_s_w +#include "user/ase/msa/int-average/test_msa_ave_s_w.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_ave_u_b +#include "user/ase/msa/int-average/test_msa_ave_u_b.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_ave_u_d +#include "user/ase/msa/int-average/test_msa_ave_u_d.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_ave_u_h +#include "user/ase/msa/int-average/test_msa_ave_u_h.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_ave_u_w +#include "user/ase/msa/int-average/test_msa_ave_u_w.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_aver_s_b +#include "user/ase/msa/int-average/test_msa_aver_s_b.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_aver_s_d +#include "user/ase/msa/int-average/test_msa_aver_s_d.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_aver_s_h +#include "user/ase/msa/int-average/test_msa_aver_s_h.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_aver_s_w +#include "user/ase/msa/int-average/test_msa_aver_s_w.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_aver_u_b +#include "user/ase/msa/int-average/test_msa_aver_u_b.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_aver_u_d +#include "user/ase/msa/int-average/test_msa_aver_u_d.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_aver_u_h +#include "user/ase/msa/int-average/test_msa_aver_u_h.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_aver_u_w +#include "user/ase/msa/int-average/test_msa_aver_u_w.c" +#undef main +#undef TEST_COUNT_TOTAL + + +static const struct { +const char *name; +int32_t (*fn)(void ); +} msa_tests[] = { + {"ave.s.b" , test_msa_ave_s_b }, + {"ave.s.d" , test_msa_ave_s_d }, + {"ave.s.h" , test_msa_ave_s_h }, + {"ave.s.w" , test_msa_ave_s_w }, + {"ave.u.b" , test_msa_ave_u_b }, + {"ave.u.d" , test_msa_ave_u_d }, + {"ave.u.h" , test_msa_ave_u_h }, + {"ave.u.w" , test_msa_ave_u_w }, + {"aver.s.b" , test_msa_aver_s_b }, + {"aver.s.d" , test_msa_aver_s_d }, + {"aver.s.h" , test_msa_aver_s_h }, + {"aver.s.w" , test_msa_aver_s_w }, + {"aver.u.b" , test_msa_aver_u_b }, + {"aver.u.d" , test_msa_aver_u_d }, + {"aver.u.h" , test_msa_aver_u_h }, + {"aver.u.w" , test_msa_aver_u_w }, +}; + +int main (void ) +{ +int fail =0 ; +unsigned i; + +printf ("TAP version 14\n" +"1..%u\n" , + (unsigned )(sizeof (msa_tests) /sizeof (msa_tests[0 ]))); +for (i =0 ; i <sizeof (msa_tests) /sizeof (msa_tests[0 ]); i++) { +int r = msa_tests[i].fn (); + +printf ("%s %u - MSA %s %s\n" , r ?"not ok" :"ok" , i +1 , +"Int Average" , msa_tests[i].name); + fail |= r; + } + +return fail ?1 :0 ; +}
tests/tcg/mips/meson.build +0 -16
@@ -182,22 +182,6 @@ tests_mips_msa = [ '../mips/user/ase/msa/int-max-min/test_msa_min_s_b.c', '../mips/user/ase/msa/int-max-min/test_msa_min_u_w.c', '../mips/user/ase/msa/int-max-min/test_msa_max_u_w.c', - '../mips/user/ase/msa/int-average/test_msa_aver_s_b.c', - '../mips/user/ase/msa/int-average/test_msa_ave_s_b.c', - '../mips/user/ase/msa/int-average/test_msa_ave_u_w.c', - '../mips/user/ase/msa/int-average/test_msa_ave_s_h.c', - '../mips/user/ase/msa/int-average/test_msa_aver_u_w.c', - '../mips/user/ase/msa/int-average/test_msa_ave_s_w.c', - '../mips/user/ase/msa/int-average/test_msa_aver_u_h.c', - '../mips/user/ase/msa/int-average/test_msa_ave_s_d.c', - '../mips/user/ase/msa/int-average/test_msa_ave_u_h.c', - '../mips/user/ase/msa/int-average/test_msa_aver_u_b.c', - '../mips/user/ase/msa/int-average/test_msa_aver_s_d.c', - '../mips/user/ase/msa/int-average/test_msa_aver_s_w.c', - '../mips/user/ase/msa/int-average/test_msa_ave_u_d.c', - '../mips/user/ase/msa/int-average/test_msa_aver_u_d.c', - '../mips/user/ase/msa/int-average/test_msa_ave_u_b.c', - '../mips/user/ase/msa/int-average/test_msa_aver_s_h.c', '../mips/user/ase/msa/int-dot-product/test_msa_dpadd_s_h.c', '../mips/user/ase/msa/int-dot-product/test_msa_dpsub_u_h.c', '../mips/user/ase/msa/int-dot-product/test_msa_dpsub_s_w.c',
tests/tcg/mips64/meson.build +1 -0
@@ -46,6 +46,7 @@ tests_mips_msa_groups = [ '../mips/test_msa_fixed_multiply.c', '../mips/test_msa_float_max_min.c', '../mips/test_msa_int_add.c', + '../mips/test_msa_int_average.c', ] foreach src: tests_mips_msa + tests_mips_msa_groups
tests/tcg/mipsel/meson.build +1 -0
@@ -47,6 +47,7 @@ tests_mips_msa_groups = [ '../mips/test_msa_fixed_multiply.c', '../mips/test_msa_float_max_min.c', '../mips/test_msa_int_add.c', + '../mips/test_msa_int_average.c', ] foreach src: tests_mips_msa + tests_mips_msa_groups
Signature · 1 line
2.55.0
PATCH v2 21/31 tests/tcg/mips: Group MSA int-compare tests
In reply to Philippe Mathieu-DaudéBuild the 20 per-opcode int-compare tests as a single executable, test_msa_int_compare.c, to reduce the number of test binaries. Each opcode reports one TAP line.
--- tests/tcg/mips/test_msa_int_compare.c | 151 ++++++++++++++++++++++++++ tests/tcg/mips/meson.build | 20 ---- tests/tcg/mips64/meson.build | 1 + tests/tcg/mipsel/meson.build | 1 + 4 files changed, 153 insertions(+), 20 deletions(-) create mode 100644 tests/tcg/mips/test_msa_int_compare.c
tests/tcg/mips/test_msa_int_compare.c new file +151 -0
@@ -0,0 +1,151 @@ +/* +* MIPS MSA tests: Int Compare instructions +* +* SPDX-License-Identifier: GPL-2.0-or-later +*/ + +#define main test_msa_ceq_b +#include "user/ase/msa/int-compare/test_msa_ceq_b.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_ceq_d +#include "user/ase/msa/int-compare/test_msa_ceq_d.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_ceq_h +#include "user/ase/msa/int-compare/test_msa_ceq_h.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_ceq_w +#include "user/ase/msa/int-compare/test_msa_ceq_w.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_cle_s_b +#include "user/ase/msa/int-compare/test_msa_cle_s_b.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_cle_s_d +#include "user/ase/msa/int-compare/test_msa_cle_s_d.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_cle_s_h +#include "user/ase/msa/int-compare/test_msa_cle_s_h.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_cle_s_w +#include "user/ase/msa/int-compare/test_msa_cle_s_w.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_cle_u_b +#include "user/ase/msa/int-compare/test_msa_cle_u_b.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_cle_u_d +#include "user/ase/msa/int-compare/test_msa_cle_u_d.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_cle_u_h +#include "user/ase/msa/int-compare/test_msa_cle_u_h.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_cle_u_w +#include "user/ase/msa/int-compare/test_msa_cle_u_w.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_clt_s_b +#include "user/ase/msa/int-compare/test_msa_clt_s_b.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_clt_s_d +#include "user/ase/msa/int-compare/test_msa_clt_s_d.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_clt_s_h +#include "user/ase/msa/int-compare/test_msa_clt_s_h.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_clt_s_w +#include "user/ase/msa/int-compare/test_msa_clt_s_w.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_clt_u_b +#include "user/ase/msa/int-compare/test_msa_clt_u_b.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_clt_u_d +#include "user/ase/msa/int-compare/test_msa_clt_u_d.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_clt_u_h +#include "user/ase/msa/int-compare/test_msa_clt_u_h.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_clt_u_w +#include "user/ase/msa/int-compare/test_msa_clt_u_w.c" +#undef main +#undef TEST_COUNT_TOTAL + + +static const struct { +const char *name; +int32_t (*fn)(void ); +} msa_tests[] = { + {"ceq.b" , test_msa_ceq_b }, + {"ceq.d" , test_msa_ceq_d }, + {"ceq.h" , test_msa_ceq_h }, + {"ceq.w" , test_msa_ceq_w }, + {"cle.s.b" , test_msa_cle_s_b }, + {"cle.s.d" , test_msa_cle_s_d }, + {"cle.s.h" , test_msa_cle_s_h }, + {"cle.s.w" , test_msa_cle_s_w }, + {"cle.u.b" , test_msa_cle_u_b }, + {"cle.u.d" , test_msa_cle_u_d }, + {"cle.u.h" , test_msa_cle_u_h }, + {"cle.u.w" , test_msa_cle_u_w }, + {"clt.s.b" , test_msa_clt_s_b }, + {"clt.s.d" , test_msa_clt_s_d }, + {"clt.s.h" , test_msa_clt_s_h }, + {"clt.s.w" , test_msa_clt_s_w }, + {"clt.u.b" , test_msa_clt_u_b }, + {"clt.u.d" , test_msa_clt_u_d }, + {"clt.u.h" , test_msa_clt_u_h }, + {"clt.u.w" , test_msa_clt_u_w }, +}; + +int main (void ) +{ +int fail =0 ; +unsigned i; + +printf ("TAP version 14\n" +"1..%u\n" , + (unsigned )(sizeof (msa_tests) /sizeof (msa_tests[0 ]))); +for (i =0 ; i <sizeof (msa_tests) /sizeof (msa_tests[0 ]); i++) { +int r = msa_tests[i].fn (); + +printf ("%s %u - MSA %s %s\n" , r ?"not ok" :"ok" , i +1 , +"Int Compare" , msa_tests[i].name); + fail |= r; + } + +return fail ?1 :0 ; +}
tests/tcg/mips/meson.build +0 -20
@@ -133,26 +133,6 @@ 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/int-compare/test_msa_cle_u_d.c', - '../mips/user/ase/msa/int-compare/test_msa_clt_s_h.c', - '../mips/user/ase/msa/int-compare/test_msa_clt_u_w.c', - '../mips/user/ase/msa/int-compare/test_msa_cle_s_h.c', - '../mips/user/ase/msa/int-compare/test_msa_cle_u_b.c', - '../mips/user/ase/msa/int-compare/test_msa_cle_s_d.c', - '../mips/user/ase/msa/int-compare/test_msa_ceq_w.c', - '../mips/user/ase/msa/int-compare/test_msa_cle_s_w.c', - '../mips/user/ase/msa/int-compare/test_msa_clt_s_w.c', - '../mips/user/ase/msa/int-compare/test_msa_cle_u_w.c', - '../mips/user/ase/msa/int-compare/test_msa_ceq_h.c', - '../mips/user/ase/msa/int-compare/test_msa_cle_s_b.c', - '../mips/user/ase/msa/int-compare/test_msa_clt_s_b.c', - '../mips/user/ase/msa/int-compare/test_msa_ceq_b.c', - '../mips/user/ase/msa/int-compare/test_msa_clt_u_h.c', - '../mips/user/ase/msa/int-compare/test_msa_cle_u_h.c', - '../mips/user/ase/msa/int-compare/test_msa_clt_s_d.c', - '../mips/user/ase/msa/int-compare/test_msa_ceq_d.c', - '../mips/user/ase/msa/int-compare/test_msa_clt_u_b.c', - '../mips/user/ase/msa/int-compare/test_msa_clt_u_d.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',
tests/tcg/mips64/meson.build +1 -0
@@ -47,6 +47,7 @@ tests_mips_msa_groups = [ '../mips/test_msa_float_max_min.c', '../mips/test_msa_int_add.c', '../mips/test_msa_int_average.c', + '../mips/test_msa_int_compare.c', ] foreach src: tests_mips_msa + tests_mips_msa_groups
tests/tcg/mipsel/meson.build +1 -0
@@ -48,6 +48,7 @@ tests_mips_msa_groups = [ '../mips/test_msa_float_max_min.c', '../mips/test_msa_int_add.c', '../mips/test_msa_int_average.c', + '../mips/test_msa_int_compare.c', ] foreach src: tests_mips_msa + tests_mips_msa_groups
Signature · 1 line
2.55.0
PATCH v2 22/31 tests/tcg/mips: Group MSA int-div-mod tests
In reply to Philippe Mathieu-DaudéBuild the 16 per-opcode int-div-mod tests as a single executable, test_msa_int_div_mod.c, to reduce the number of test binaries. Each opcode reports one TAP line.
--- tests/tcg/mips/test_msa_int_div_mod.c | 127 ++++++++++++++++++++++++++ tests/tcg/mips/meson.build | 16 ---- tests/tcg/mips64/meson.build | 1 + tests/tcg/mipsel/meson.build | 1 + 4 files changed, 129 insertions(+), 16 deletions(-) create mode 100644 tests/tcg/mips/test_msa_int_div_mod.c
tests/tcg/mips/test_msa_int_div_mod.c new file +127 -0
@@ -0,0 +1,127 @@ +/* +* MIPS MSA tests: Int Divide and Modulo instructions +* +* SPDX-License-Identifier: GPL-2.0-or-later +*/ + +#define main test_msa_div_s_b +#include "user/ase/msa/int-divide/test_msa_div_s_b.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_div_s_d +#include "user/ase/msa/int-divide/test_msa_div_s_d.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_div_s_h +#include "user/ase/msa/int-divide/test_msa_div_s_h.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_div_s_w +#include "user/ase/msa/int-divide/test_msa_div_s_w.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_div_u_b +#include "user/ase/msa/int-divide/test_msa_div_u_b.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_div_u_d +#include "user/ase/msa/int-divide/test_msa_div_u_d.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_div_u_h +#include "user/ase/msa/int-divide/test_msa_div_u_h.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_div_u_w +#include "user/ase/msa/int-divide/test_msa_div_u_w.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_mod_s_b +#include "user/ase/msa/int-modulo/test_msa_mod_s_b.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_mod_s_d +#include "user/ase/msa/int-modulo/test_msa_mod_s_d.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_mod_s_h +#include "user/ase/msa/int-modulo/test_msa_mod_s_h.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_mod_s_w +#include "user/ase/msa/int-modulo/test_msa_mod_s_w.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_mod_u_b +#include "user/ase/msa/int-modulo/test_msa_mod_u_b.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_mod_u_d +#include "user/ase/msa/int-modulo/test_msa_mod_u_d.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_mod_u_h +#include "user/ase/msa/int-modulo/test_msa_mod_u_h.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_mod_u_w +#include "user/ase/msa/int-modulo/test_msa_mod_u_w.c" +#undef main +#undef TEST_COUNT_TOTAL + + +static const struct { +const char *name; +int32_t (*fn)(void ); +} msa_tests[] = { + {"div.s.b" , test_msa_div_s_b }, + {"div.s.d" , test_msa_div_s_d }, + {"div.s.h" , test_msa_div_s_h }, + {"div.s.w" , test_msa_div_s_w }, + {"div.u.b" , test_msa_div_u_b }, + {"div.u.d" , test_msa_div_u_d }, + {"div.u.h" , test_msa_div_u_h }, + {"div.u.w" , test_msa_div_u_w }, + {"mod.s.b" , test_msa_mod_s_b }, + {"mod.s.d" , test_msa_mod_s_d }, + {"mod.s.h" , test_msa_mod_s_h }, + {"mod.s.w" , test_msa_mod_s_w }, + {"mod.u.b" , test_msa_mod_u_b }, + {"mod.u.d" , test_msa_mod_u_d }, + {"mod.u.h" , test_msa_mod_u_h }, + {"mod.u.w" , test_msa_mod_u_w }, +}; + +int main (void ) +{ +int fail =0 ; +unsigned i; + +printf ("TAP version 14\n" +"1..%u\n" , + (unsigned )(sizeof (msa_tests) /sizeof (msa_tests[0 ]))); +for (i =0 ; i <sizeof (msa_tests) /sizeof (msa_tests[0 ]); i++) { +int r = msa_tests[i].fn (); + +printf ("%s %u - MSA %s %s\n" , r ?"not ok" :"ok" , i +1 , +"Int Divide and Modulo" , msa_tests[i].name); + fail |= r; + } + +return fail ?1 :0 ; +}
tests/tcg/mips/meson.build +0 -16
@@ -23,14 +23,6 @@ if 'qemu-mips' in emulators endif tests_mips_msa = [ - '../mips/user/ase/msa/int-modulo/test_msa_mod_s_b.c', - '../mips/user/ase/msa/int-modulo/test_msa_mod_u_d.c', - '../mips/user/ase/msa/int-modulo/test_msa_mod_s_d.c', - '../mips/user/ase/msa/int-modulo/test_msa_mod_s_w.c', - '../mips/user/ase/msa/int-modulo/test_msa_mod_s_h.c', - '../mips/user/ase/msa/int-modulo/test_msa_mod_u_b.c', - '../mips/user/ase/msa/int-modulo/test_msa_mod_u_h.c', - '../mips/user/ase/msa/int-modulo/test_msa_mod_u_w.c', '../mips/user/ase/msa/int-subtract/test_msa_asub_s_w.c', '../mips/user/ase/msa/int-subtract/test_msa_hsub_u_d.c', '../mips/user/ase/msa/int-subtract/test_msa_hsub_s_w.c',
@@ -77,14 +69,6 @@ tests_mips_msa = [ '../mips/user/ase/msa/int-multiply/test_msa_mulv_h.c', '../mips/user/ase/msa/int-multiply/test_msa_mulv_d.c', '../mips/user/ase/msa/int-multiply/test_msa_maddv_h.c', - '../mips/user/ase/msa/int-divide/test_msa_div_s_b.c', - '../mips/user/ase/msa/int-divide/test_msa_div_u_b.c', - '../mips/user/ase/msa/int-divide/test_msa_div_s_d.c', - '../mips/user/ase/msa/int-divide/test_msa_div_s_h.c', - '../mips/user/ase/msa/int-divide/test_msa_div_s_w.c', - '../mips/user/ase/msa/int-divide/test_msa_div_u_w.c', - '../mips/user/ase/msa/int-divide/test_msa_div_u_h.c', - '../mips/user/ase/msa/int-divide/test_msa_div_u_d.c', '../mips/user/ase/msa/interleave/test_msa_ilvr_b.c', '../mips/user/ase/msa/interleave/test_msa_ilvr_d.c', '../mips/user/ase/msa/interleave/test_msa_ilvod_b.c',
tests/tcg/mips64/meson.build +1 -0
@@ -48,6 +48,7 @@ tests_mips_msa_groups = [ '../mips/test_msa_int_add.c', '../mips/test_msa_int_average.c', '../mips/test_msa_int_compare.c', + '../mips/test_msa_int_div_mod.c', ] foreach src: tests_mips_msa + tests_mips_msa_groups
tests/tcg/mipsel/meson.build +1 -0
@@ -49,6 +49,7 @@ tests_mips_msa_groups = [ '../mips/test_msa_int_add.c', '../mips/test_msa_int_average.c', '../mips/test_msa_int_compare.c', + '../mips/test_msa_int_div_mod.c', ] foreach src: tests_mips_msa + tests_mips_msa_groups
Signature · 1 line
2.55.0
PATCH v2 23/31 tests/tcg/mips: Group MSA int-dot-product tests
In reply to Philippe Mathieu-DaudéBuild the 18 per-opcode int-dot-product tests as a single executable, test_msa_int_dot_product.c, to reduce the number of test binaries. Each opcode reports one TAP line.
--- tests/tcg/mips/test_msa_int_dot_product.c | 139 ++++++++++++++++++++++ tests/tcg/mips/meson.build | 18 --- tests/tcg/mips64/meson.build | 1 + tests/tcg/mipsel/meson.build | 1 + 4 files changed, 141 insertions(+), 18 deletions(-) create mode 100644 tests/tcg/mips/test_msa_int_dot_product.c
tests/tcg/mips/test_msa_int_dot_product.c new file +139 -0
@@ -0,0 +1,139 @@ +/* +* MIPS MSA tests: Int Dot Product instructions +* +* SPDX-License-Identifier: GPL-2.0-or-later +*/ + +#define main test_msa_dotp_s_d +#include "user/ase/msa/int-dot-product/test_msa_dotp_s_d.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_dotp_s_h +#include "user/ase/msa/int-dot-product/test_msa_dotp_s_h.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_dotp_s_w +#include "user/ase/msa/int-dot-product/test_msa_dotp_s_w.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_dotp_u_d +#include "user/ase/msa/int-dot-product/test_msa_dotp_u_d.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_dotp_u_h +#include "user/ase/msa/int-dot-product/test_msa_dotp_u_h.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_dotp_u_w +#include "user/ase/msa/int-dot-product/test_msa_dotp_u_w.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_dpadd_s_d +#include "user/ase/msa/int-dot-product/test_msa_dpadd_s_d.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_dpadd_s_h +#include "user/ase/msa/int-dot-product/test_msa_dpadd_s_h.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_dpadd_s_w +#include "user/ase/msa/int-dot-product/test_msa_dpadd_s_w.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_dpadd_u_d +#include "user/ase/msa/int-dot-product/test_msa_dpadd_u_d.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_dpadd_u_h +#include "user/ase/msa/int-dot-product/test_msa_dpadd_u_h.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_dpadd_u_w +#include "user/ase/msa/int-dot-product/test_msa_dpadd_u_w.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_dpsub_s_d +#include "user/ase/msa/int-dot-product/test_msa_dpsub_s_d.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_dpsub_s_h +#include "user/ase/msa/int-dot-product/test_msa_dpsub_s_h.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_dpsub_s_w +#include "user/ase/msa/int-dot-product/test_msa_dpsub_s_w.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_dpsub_u_d +#include "user/ase/msa/int-dot-product/test_msa_dpsub_u_d.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_dpsub_u_h +#include "user/ase/msa/int-dot-product/test_msa_dpsub_u_h.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_dpsub_u_w +#include "user/ase/msa/int-dot-product/test_msa_dpsub_u_w.c" +#undef main +#undef TEST_COUNT_TOTAL + + +static const struct { +const char *name; +int32_t (*fn)(void ); +} msa_tests[] = { + {"dotp.s.d" , test_msa_dotp_s_d }, + {"dotp.s.h" , test_msa_dotp_s_h }, + {"dotp.s.w" , test_msa_dotp_s_w }, + {"dotp.u.d" , test_msa_dotp_u_d }, + {"dotp.u.h" , test_msa_dotp_u_h }, + {"dotp.u.w" , test_msa_dotp_u_w }, + {"dpadd.s.d" , test_msa_dpadd_s_d }, + {"dpadd.s.h" , test_msa_dpadd_s_h }, + {"dpadd.s.w" , test_msa_dpadd_s_w }, + {"dpadd.u.d" , test_msa_dpadd_u_d }, + {"dpadd.u.h" , test_msa_dpadd_u_h }, + {"dpadd.u.w" , test_msa_dpadd_u_w }, + {"dpsub.s.d" , test_msa_dpsub_s_d }, + {"dpsub.s.h" , test_msa_dpsub_s_h }, + {"dpsub.s.w" , test_msa_dpsub_s_w }, + {"dpsub.u.d" , test_msa_dpsub_u_d }, + {"dpsub.u.h" , test_msa_dpsub_u_h }, + {"dpsub.u.w" , test_msa_dpsub_u_w }, +}; + +int main (void ) +{ +int fail =0 ; +unsigned i; + +printf ("TAP version 14\n" +"1..%u\n" , + (unsigned )(sizeof (msa_tests) /sizeof (msa_tests[0 ]))); +for (i =0 ; i <sizeof (msa_tests) /sizeof (msa_tests[0 ]); i++) { +int r = msa_tests[i].fn (); + +printf ("%s %u - MSA %s %s\n" , r ?"not ok" :"ok" , i +1 , +"Int Dot Product" , msa_tests[i].name); + fail |= r; + } + +return fail ?1 :0 ; +}
tests/tcg/mips/meson.build +0 -18
@@ -146,22 +146,4 @@ tests_mips_msa = [ '../mips/user/ase/msa/int-max-min/test_msa_min_s_b.c', '../mips/user/ase/msa/int-max-min/test_msa_min_u_w.c', '../mips/user/ase/msa/int-max-min/test_msa_max_u_w.c', - '../mips/user/ase/msa/int-dot-product/test_msa_dpadd_s_h.c', - '../mips/user/ase/msa/int-dot-product/test_msa_dpsub_u_h.c', - '../mips/user/ase/msa/int-dot-product/test_msa_dpsub_s_w.c', - '../mips/user/ase/msa/int-dot-product/test_msa_dpadd_s_w.c', - '../mips/user/ase/msa/int-dot-product/test_msa_dpadd_s_d.c', - '../mips/user/ase/msa/int-dot-product/test_msa_dpadd_u_d.c', - '../mips/user/ase/msa/int-dot-product/test_msa_dotp_s_h.c', - '../mips/user/ase/msa/int-dot-product/test_msa_dotp_u_h.c', - '../mips/user/ase/msa/int-dot-product/test_msa_dotp_s_d.c', - '../mips/user/ase/msa/int-dot-product/test_msa_dpadd_u_h.c', - '../mips/user/ase/msa/int-dot-product/test_msa_dpsub_s_d.c', - '../mips/user/ase/msa/int-dot-product/test_msa_dpsub_s_h.c', - '../mips/user/ase/msa/int-dot-product/test_msa_dpadd_u_w.c', - '../mips/user/ase/msa/int-dot-product/test_msa_dotp_s_w.c', - '../mips/user/ase/msa/int-dot-product/test_msa_dotp_u_d.c', - '../mips/user/ase/msa/int-dot-product/test_msa_dpsub_u_d.c', - '../mips/user/ase/msa/int-dot-product/test_msa_dpsub_u_w.c', - '../mips/user/ase/msa/int-dot-product/test_msa_dotp_u_w.c', ]
tests/tcg/mips64/meson.build +1 -0
@@ -49,6 +49,7 @@ tests_mips_msa_groups = [ '../mips/test_msa_int_average.c', '../mips/test_msa_int_compare.c', '../mips/test_msa_int_div_mod.c', + '../mips/test_msa_int_dot_product.c', ] foreach src: tests_mips_msa + tests_mips_msa_groups
tests/tcg/mipsel/meson.build +1 -0
@@ -50,6 +50,7 @@ tests_mips_msa_groups = [ '../mips/test_msa_int_average.c', '../mips/test_msa_int_compare.c', '../mips/test_msa_int_div_mod.c', + '../mips/test_msa_int_dot_product.c', ] foreach src: tests_mips_msa + tests_mips_msa_groups
Signature · 1 line
2.55.0
PATCH v2 24/31 tests/tcg/mips: Group MSA int-max-min tests
In reply to Philippe Mathieu-DaudéBuild the 24 per-opcode int-max-min tests as a single executable, test_msa_int_max_min.c, to reduce the number of test binaries. Each opcode reports one TAP line.
--- tests/tcg/mips/test_msa_int_max_min.c | 175 ++++++++++++++++++++++++++ tests/tcg/mips/meson.build | 24 ---- tests/tcg/mips64/meson.build | 1 + tests/tcg/mipsel/meson.build | 1 + 4 files changed, 177 insertions(+), 24 deletions(-) create mode 100644 tests/tcg/mips/test_msa_int_max_min.c
tests/tcg/mips/test_msa_int_max_min.c new file +175 -0
@@ -0,0 +1,175 @@ +/* +* MIPS MSA tests: Int Min / Max instructions +* +* SPDX-License-Identifier: GPL-2.0-or-later +*/ + +#define main test_msa_max_a_b +#include "user/ase/msa/int-max-min/test_msa_max_a_b.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_max_a_d +#include "user/ase/msa/int-max-min/test_msa_max_a_d.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_max_a_h +#include "user/ase/msa/int-max-min/test_msa_max_a_h.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_max_a_w +#include "user/ase/msa/int-max-min/test_msa_max_a_w.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_max_s_b +#include "user/ase/msa/int-max-min/test_msa_max_s_b.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_max_s_d +#include "user/ase/msa/int-max-min/test_msa_max_s_d.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_max_s_h +#include "user/ase/msa/int-max-min/test_msa_max_s_h.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_max_s_w +#include "user/ase/msa/int-max-min/test_msa_max_s_w.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_max_u_b +#include "user/ase/msa/int-max-min/test_msa_max_u_b.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_max_u_d +#include "user/ase/msa/int-max-min/test_msa_max_u_d.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_max_u_h +#include "user/ase/msa/int-max-min/test_msa_max_u_h.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_max_u_w +#include "user/ase/msa/int-max-min/test_msa_max_u_w.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_min_a_b +#include "user/ase/msa/int-max-min/test_msa_min_a_b.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_min_a_d +#include "user/ase/msa/int-max-min/test_msa_min_a_d.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_min_a_h +#include "user/ase/msa/int-max-min/test_msa_min_a_h.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_min_a_w +#include "user/ase/msa/int-max-min/test_msa_min_a_w.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_min_s_b +#include "user/ase/msa/int-max-min/test_msa_min_s_b.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_min_s_d +#include "user/ase/msa/int-max-min/test_msa_min_s_d.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_min_s_h +#include "user/ase/msa/int-max-min/test_msa_min_s_h.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_min_s_w +#include "user/ase/msa/int-max-min/test_msa_min_s_w.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_min_u_b +#include "user/ase/msa/int-max-min/test_msa_min_u_b.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_min_u_d +#include "user/ase/msa/int-max-min/test_msa_min_u_d.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_min_u_h +#include "user/ase/msa/int-max-min/test_msa_min_u_h.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_min_u_w +#include "user/ase/msa/int-max-min/test_msa_min_u_w.c" +#undef main +#undef TEST_COUNT_TOTAL + + +static const struct { +const char *name; +int32_t (*fn)(void ); +} msa_tests[] = { + {"max.a.b" , test_msa_max_a_b }, + {"max.a.d" , test_msa_max_a_d }, + {"max.a.h" , test_msa_max_a_h }, + {"max.a.w" , test_msa_max_a_w }, + {"max.s.b" , test_msa_max_s_b }, + {"max.s.d" , test_msa_max_s_d }, + {"max.s.h" , test_msa_max_s_h }, + {"max.s.w" , test_msa_max_s_w }, + {"max.u.b" , test_msa_max_u_b }, + {"max.u.d" , test_msa_max_u_d }, + {"max.u.h" , test_msa_max_u_h }, + {"max.u.w" , test_msa_max_u_w }, + {"min.a.b" , test_msa_min_a_b }, + {"min.a.d" , test_msa_min_a_d }, + {"min.a.h" , test_msa_min_a_h }, + {"min.a.w" , test_msa_min_a_w }, + {"min.s.b" , test_msa_min_s_b }, + {"min.s.d" , test_msa_min_s_d }, + {"min.s.h" , test_msa_min_s_h }, + {"min.s.w" , test_msa_min_s_w }, + {"min.u.b" , test_msa_min_u_b }, + {"min.u.d" , test_msa_min_u_d }, + {"min.u.h" , test_msa_min_u_h }, + {"min.u.w" , test_msa_min_u_w }, +}; + +int main (void ) +{ +int fail =0 ; +unsigned i; + +printf ("TAP version 14\n" +"1..%u\n" , + (unsigned )(sizeof (msa_tests) /sizeof (msa_tests[0 ]))); +for (i =0 ; i <sizeof (msa_tests) /sizeof (msa_tests[0 ]); i++) { +int r = msa_tests[i].fn (); + +printf ("%s %u - MSA %s %s\n" , r ?"not ok" :"ok" , i +1 , +"Int Max Min" , msa_tests[i].name); + fail |= r; + } + +return fail ?1 :0 ; +}
tests/tcg/mips/meson.build +0 -24
@@ -122,28 +122,4 @@ tests_mips_msa = [ '../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', - '../mips/user/ase/msa/int-max-min/test_msa_min_u_h.c', - '../mips/user/ase/msa/int-max-min/test_msa_max_a_b.c', - '../mips/user/ase/msa/int-max-min/test_msa_max_s_b.c', - '../mips/user/ase/msa/int-max-min/test_msa_max_a_w.c', - '../mips/user/ase/msa/int-max-min/test_msa_min_s_w.c', - '../mips/user/ase/msa/int-max-min/test_msa_min_s_h.c', - '../mips/user/ase/msa/int-max-min/test_msa_max_u_h.c', - '../mips/user/ase/msa/int-max-min/test_msa_min_a_b.c', - '../mips/user/ase/msa/int-max-min/test_msa_max_a_d.c', - '../mips/user/ase/msa/int-max-min/test_msa_min_u_d.c', - '../mips/user/ase/msa/int-max-min/test_msa_max_u_d.c', - '../mips/user/ase/msa/int-max-min/test_msa_min_u_b.c', - '../mips/user/ase/msa/int-max-min/test_msa_max_s_d.c', - '../mips/user/ase/msa/int-max-min/test_msa_min_a_d.c', - '../mips/user/ase/msa/int-max-min/test_msa_min_a_h.c', - '../mips/user/ase/msa/int-max-min/test_msa_min_a_w.c', - '../mips/user/ase/msa/int-max-min/test_msa_min_s_d.c', - '../mips/user/ase/msa/int-max-min/test_msa_max_u_b.c', - '../mips/user/ase/msa/int-max-min/test_msa_max_s_w.c', - '../mips/user/ase/msa/int-max-min/test_msa_max_a_h.c', - '../mips/user/ase/msa/int-max-min/test_msa_max_s_h.c', - '../mips/user/ase/msa/int-max-min/test_msa_min_s_b.c', - '../mips/user/ase/msa/int-max-min/test_msa_min_u_w.c', - '../mips/user/ase/msa/int-max-min/test_msa_max_u_w.c', ]
tests/tcg/mips64/meson.build +1 -0
@@ -50,6 +50,7 @@ tests_mips_msa_groups = [ '../mips/test_msa_int_compare.c', '../mips/test_msa_int_div_mod.c', '../mips/test_msa_int_dot_product.c', + '../mips/test_msa_int_max_min.c', ] foreach src: tests_mips_msa + tests_mips_msa_groups
tests/tcg/mipsel/meson.build +1 -0
@@ -51,6 +51,7 @@ tests_mips_msa_groups = [ '../mips/test_msa_int_compare.c', '../mips/test_msa_int_div_mod.c', '../mips/test_msa_int_dot_product.c', + '../mips/test_msa_int_max_min.c', ] foreach src: tests_mips_msa + tests_mips_msa_groups
Signature · 1 line
2.55.0
PATCH v2 25/31 tests/tcg/mips: Group MSA int-multiply tests
In reply to Philippe Mathieu-DaudéBuild the 12 per-opcode int-multiply tests as a single executable, test_msa_int_multiply.c, to reduce the number of test binaries. Each opcode reports one TAP line.
--- tests/tcg/mips/test_msa_int_multiply.c | 103 +++++++++++++++++++++++++ tests/tcg/mips/meson.build | 12 --- tests/tcg/mips64/meson.build | 1 + tests/tcg/mipsel/meson.build | 1 + 4 files changed, 105 insertions(+), 12 deletions(-) create mode 100644 tests/tcg/mips/test_msa_int_multiply.c
tests/tcg/mips/test_msa_int_multiply.c new file +103 -0
@@ -0,0 +1,103 @@ +/* +* MIPS MSA tests: Int Multiply instructions +* +* SPDX-License-Identifier: GPL-2.0-or-later +*/ + +#define main test_msa_maddv_b +#include "user/ase/msa/int-multiply/test_msa_maddv_b.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_maddv_d +#include "user/ase/msa/int-multiply/test_msa_maddv_d.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_maddv_h +#include "user/ase/msa/int-multiply/test_msa_maddv_h.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_maddv_w +#include "user/ase/msa/int-multiply/test_msa_maddv_w.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_msubv_b +#include "user/ase/msa/int-multiply/test_msa_msubv_b.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_msubv_d +#include "user/ase/msa/int-multiply/test_msa_msubv_d.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_msubv_h +#include "user/ase/msa/int-multiply/test_msa_msubv_h.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_msubv_w +#include "user/ase/msa/int-multiply/test_msa_msubv_w.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_mulv_b +#include "user/ase/msa/int-multiply/test_msa_mulv_b.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_mulv_d +#include "user/ase/msa/int-multiply/test_msa_mulv_d.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_mulv_h +#include "user/ase/msa/int-multiply/test_msa_mulv_h.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_mulv_w +#include "user/ase/msa/int-multiply/test_msa_mulv_w.c" +#undef main +#undef TEST_COUNT_TOTAL + + +static const struct { +const char *name; +int32_t (*fn)(void ); +} msa_tests[] = { + {"maddv.b" , test_msa_maddv_b }, + {"maddv.d" , test_msa_maddv_d }, + {"maddv.h" , test_msa_maddv_h }, + {"maddv.w" , test_msa_maddv_w }, + {"msubv.b" , test_msa_msubv_b }, + {"msubv.d" , test_msa_msubv_d }, + {"msubv.h" , test_msa_msubv_h }, + {"msubv.w" , test_msa_msubv_w }, + {"mulv.b" , test_msa_mulv_b }, + {"mulv.d" , test_msa_mulv_d }, + {"mulv.h" , test_msa_mulv_h }, + {"mulv.w" , test_msa_mulv_w }, +}; + +int main (void ) +{ +int fail =0 ; +unsigned i; + +printf ("TAP version 14\n" +"1..%u\n" , + (unsigned )(sizeof (msa_tests) /sizeof (msa_tests[0 ]))); +for (i =0 ; i <sizeof (msa_tests) /sizeof (msa_tests[0 ]); i++) { +int r = msa_tests[i].fn (); + +printf ("%s %u - MSA %s %s\n" , r ?"not ok" :"ok" , i +1 , +"Int Multiply" , msa_tests[i].name); + fail |= r; + } + +return fail ?1 :0 ; +}
tests/tcg/mips/meson.build +0 -12
@@ -57,18 +57,6 @@ tests_mips_msa = [ '../mips/user/ase/msa/int-subtract/test_msa_asub_u_h.c', '../mips/user/ase/msa/int-subtract/test_msa_asub_s_b.c', '../mips/user/ase/msa/int-subtract/test_msa_subs_s_w.c', - '../mips/user/ase/msa/int-multiply/test_msa_mulv_w.c', - '../mips/user/ase/msa/int-multiply/test_msa_msubv_d.c', - '../mips/user/ase/msa/int-multiply/test_msa_msubv_h.c', - '../mips/user/ase/msa/int-multiply/test_msa_maddv_w.c', - '../mips/user/ase/msa/int-multiply/test_msa_msubv_b.c', - '../mips/user/ase/msa/int-multiply/test_msa_mulv_b.c', - '../mips/user/ase/msa/int-multiply/test_msa_maddv_d.c', - '../mips/user/ase/msa/int-multiply/test_msa_msubv_w.c', - '../mips/user/ase/msa/int-multiply/test_msa_maddv_b.c', - '../mips/user/ase/msa/int-multiply/test_msa_mulv_h.c', - '../mips/user/ase/msa/int-multiply/test_msa_mulv_d.c', - '../mips/user/ase/msa/int-multiply/test_msa_maddv_h.c', '../mips/user/ase/msa/interleave/test_msa_ilvr_b.c', '../mips/user/ase/msa/interleave/test_msa_ilvr_d.c', '../mips/user/ase/msa/interleave/test_msa_ilvod_b.c',
tests/tcg/mips64/meson.build +1 -0
@@ -51,6 +51,7 @@ tests_mips_msa_groups = [ '../mips/test_msa_int_div_mod.c', '../mips/test_msa_int_dot_product.c', '../mips/test_msa_int_max_min.c', + '../mips/test_msa_int_multiply.c', ] foreach src: tests_mips_msa + tests_mips_msa_groups
tests/tcg/mipsel/meson.build +1 -0
@@ -52,6 +52,7 @@ tests_mips_msa_groups = [ '../mips/test_msa_int_div_mod.c', '../mips/test_msa_int_dot_product.c', '../mips/test_msa_int_max_min.c', + '../mips/test_msa_int_multiply.c', ] foreach src: tests_mips_msa + tests_mips_msa_groups
Signature · 1 line
2.55.0
PATCH v2 26/31 tests/tcg/mips: Group MSA int-subtract tests
In reply to Philippe Mathieu-DaudéBuild the 34 per-opcode int-subtract tests as a single executable, test_msa_int_subtract.c, to reduce the number of test binaries. Each opcode reports one TAP line.
--- tests/tcg/mips/test_msa_int_subtract.c | 235 +++++++++++++++++++++++++ tests/tcg/mips/meson.build | 34 ---- tests/tcg/mips64/meson.build | 1 + tests/tcg/mipsel/meson.build | 1 + 4 files changed, 237 insertions(+), 34 deletions(-) create mode 100644 tests/tcg/mips/test_msa_int_subtract.c
tests/tcg/mips/test_msa_int_subtract.c new file +235 -0
@@ -0,0 +1,235 @@ +/* +* MIPS MSA tests: Int Subtract instructions +* +* SPDX-License-Identifier: GPL-2.0-or-later +*/ + +#define main test_msa_asub_s_b +#include "user/ase/msa/int-subtract/test_msa_asub_s_b.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_asub_s_d +#include "user/ase/msa/int-subtract/test_msa_asub_s_d.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_asub_s_h +#include "user/ase/msa/int-subtract/test_msa_asub_s_h.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_asub_s_w +#include "user/ase/msa/int-subtract/test_msa_asub_s_w.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_asub_u_b +#include "user/ase/msa/int-subtract/test_msa_asub_u_b.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_asub_u_d +#include "user/ase/msa/int-subtract/test_msa_asub_u_d.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_asub_u_h +#include "user/ase/msa/int-subtract/test_msa_asub_u_h.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_asub_u_w +#include "user/ase/msa/int-subtract/test_msa_asub_u_w.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_hsub_s_d +#include "user/ase/msa/int-subtract/test_msa_hsub_s_d.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_hsub_s_h +#include "user/ase/msa/int-subtract/test_msa_hsub_s_h.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_hsub_s_w +#include "user/ase/msa/int-subtract/test_msa_hsub_s_w.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_hsub_u_d +#include "user/ase/msa/int-subtract/test_msa_hsub_u_d.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_hsub_u_h +#include "user/ase/msa/int-subtract/test_msa_hsub_u_h.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_hsub_u_w +#include "user/ase/msa/int-subtract/test_msa_hsub_u_w.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_subs_s_b +#include "user/ase/msa/int-subtract/test_msa_subs_s_b.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_subs_s_d +#include "user/ase/msa/int-subtract/test_msa_subs_s_d.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_subs_s_h +#include "user/ase/msa/int-subtract/test_msa_subs_s_h.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_subs_s_w +#include "user/ase/msa/int-subtract/test_msa_subs_s_w.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_subs_u_b +#include "user/ase/msa/int-subtract/test_msa_subs_u_b.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_subs_u_d +#include "user/ase/msa/int-subtract/test_msa_subs_u_d.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_subs_u_h +#include "user/ase/msa/int-subtract/test_msa_subs_u_h.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_subs_u_w +#include "user/ase/msa/int-subtract/test_msa_subs_u_w.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_subsus_u_b +#include "user/ase/msa/int-subtract/test_msa_subsus_u_b.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_subsus_u_d +#include "user/ase/msa/int-subtract/test_msa_subsus_u_d.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_subsus_u_h +#include "user/ase/msa/int-subtract/test_msa_subsus_u_h.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_subsus_u_w +#include "user/ase/msa/int-subtract/test_msa_subsus_u_w.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_subsuu_s_b +#include "user/ase/msa/int-subtract/test_msa_subsuu_s_b.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_subsuu_s_d +#include "user/ase/msa/int-subtract/test_msa_subsuu_s_d.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_subsuu_s_h +#include "user/ase/msa/int-subtract/test_msa_subsuu_s_h.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_subsuu_s_w +#include "user/ase/msa/int-subtract/test_msa_subsuu_s_w.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_subv_b +#include "user/ase/msa/int-subtract/test_msa_subv_b.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_subv_d +#include "user/ase/msa/int-subtract/test_msa_subv_d.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_subv_h +#include "user/ase/msa/int-subtract/test_msa_subv_h.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_subv_w +#include "user/ase/msa/int-subtract/test_msa_subv_w.c" +#undef main +#undef TEST_COUNT_TOTAL + + +static const struct { +const char *name; +int32_t (*fn)(void ); +} msa_tests[] = { + {"asub.s.b" , test_msa_asub_s_b }, + {"asub.s.d" , test_msa_asub_s_d }, + {"asub.s.h" , test_msa_asub_s_h }, + {"asub.s.w" , test_msa_asub_s_w }, + {"asub.u.b" , test_msa_asub_u_b }, + {"asub.u.d" , test_msa_asub_u_d }, + {"asub.u.h" , test_msa_asub_u_h }, + {"asub.u.w" , test_msa_asub_u_w }, + {"hsub.s.d" , test_msa_hsub_s_d }, + {"hsub.s.h" , test_msa_hsub_s_h }, + {"hsub.s.w" , test_msa_hsub_s_w }, + {"hsub.u.d" , test_msa_hsub_u_d }, + {"hsub.u.h" , test_msa_hsub_u_h }, + {"hsub.u.w" , test_msa_hsub_u_w }, + {"subs.s.b" , test_msa_subs_s_b }, + {"subs.s.d" , test_msa_subs_s_d }, + {"subs.s.h" , test_msa_subs_s_h }, + {"subs.s.w" , test_msa_subs_s_w }, + {"subs.u.b" , test_msa_subs_u_b }, + {"subs.u.d" , test_msa_subs_u_d }, + {"subs.u.h" , test_msa_subs_u_h }, + {"subs.u.w" , test_msa_subs_u_w }, + {"subsus.u.b" , test_msa_subsus_u_b }, + {"subsus.u.d" , test_msa_subsus_u_d }, + {"subsus.u.h" , test_msa_subsus_u_h }, + {"subsus.u.w" , test_msa_subsus_u_w }, + {"subsuu.s.b" , test_msa_subsuu_s_b }, + {"subsuu.s.d" , test_msa_subsuu_s_d }, + {"subsuu.s.h" , test_msa_subsuu_s_h }, + {"subsuu.s.w" , test_msa_subsuu_s_w }, + {"subv.b" , test_msa_subv_b }, + {"subv.d" , test_msa_subv_d }, + {"subv.h" , test_msa_subv_h }, + {"subv.w" , test_msa_subv_w }, +}; + +int main (void ) +{ +int fail =0 ; +unsigned i; + +printf ("TAP version 14\n" +"1..%u\n" , + (unsigned )(sizeof (msa_tests) /sizeof (msa_tests[0 ]))); +for (i =0 ; i <sizeof (msa_tests) /sizeof (msa_tests[0 ]); i++) { +int r = msa_tests[i].fn (); + +printf ("%s %u - MSA %s %s\n" , r ?"not ok" :"ok" , i +1 , +"Int Subtract" , msa_tests[i].name); + fail |= r; + } + +return fail ?1 :0 ; +}
tests/tcg/mips/meson.build +0 -34
@@ -23,40 +23,6 @@ if 'qemu-mips' in emulators endif tests_mips_msa = [ - '../mips/user/ase/msa/int-subtract/test_msa_asub_s_w.c', - '../mips/user/ase/msa/int-subtract/test_msa_hsub_u_d.c', - '../mips/user/ase/msa/int-subtract/test_msa_hsub_s_w.c', - '../mips/user/ase/msa/int-subtract/test_msa_asub_u_d.c', - '../mips/user/ase/msa/int-subtract/test_msa_asub_u_b.c', - '../mips/user/ase/msa/int-subtract/test_msa_asub_u_w.c', - '../mips/user/ase/msa/int-subtract/test_msa_subsuu_s_d.c', - '../mips/user/ase/msa/int-subtract/test_msa_asub_s_d.c', - '../mips/user/ase/msa/int-subtract/test_msa_subsus_u_w.c', - '../mips/user/ase/msa/int-subtract/test_msa_subsus_u_h.c', - '../mips/user/ase/msa/int-subtract/test_msa_subs_s_d.c', - '../mips/user/ase/msa/int-subtract/test_msa_subs_u_d.c', - '../mips/user/ase/msa/int-subtract/test_msa_hsub_s_d.c', - '../mips/user/ase/msa/int-subtract/test_msa_asub_s_h.c', - '../mips/user/ase/msa/int-subtract/test_msa_subv_d.c', - '../mips/user/ase/msa/int-subtract/test_msa_subs_s_b.c', - '../mips/user/ase/msa/int-subtract/test_msa_subs_u_w.c', - '../mips/user/ase/msa/int-subtract/test_msa_subv_w.c', - '../mips/user/ase/msa/int-subtract/test_msa_subsuu_s_h.c', - '../mips/user/ase/msa/int-subtract/test_msa_subv_h.c', - '../mips/user/ase/msa/int-subtract/test_msa_hsub_s_h.c', - '../mips/user/ase/msa/int-subtract/test_msa_subv_b.c', - '../mips/user/ase/msa/int-subtract/test_msa_subsuu_s_b.c', - '../mips/user/ase/msa/int-subtract/test_msa_subs_u_b.c', - '../mips/user/ase/msa/int-subtract/test_msa_hsub_u_h.c', - '../mips/user/ase/msa/int-subtract/test_msa_subs_s_h.c', - '../mips/user/ase/msa/int-subtract/test_msa_subs_u_h.c', - '../mips/user/ase/msa/int-subtract/test_msa_hsub_u_w.c', - '../mips/user/ase/msa/int-subtract/test_msa_subsus_u_b.c', - '../mips/user/ase/msa/int-subtract/test_msa_subsuu_s_w.c', - '../mips/user/ase/msa/int-subtract/test_msa_subsus_u_d.c', - '../mips/user/ase/msa/int-subtract/test_msa_asub_u_h.c', - '../mips/user/ase/msa/int-subtract/test_msa_asub_s_b.c', - '../mips/user/ase/msa/int-subtract/test_msa_subs_s_w.c', '../mips/user/ase/msa/interleave/test_msa_ilvr_b.c', '../mips/user/ase/msa/interleave/test_msa_ilvr_d.c', '../mips/user/ase/msa/interleave/test_msa_ilvod_b.c',
tests/tcg/mips64/meson.build +1 -0
@@ -52,6 +52,7 @@ tests_mips_msa_groups = [ '../mips/test_msa_int_dot_product.c', '../mips/test_msa_int_max_min.c', '../mips/test_msa_int_multiply.c', + '../mips/test_msa_int_subtract.c', ] foreach src: tests_mips_msa + tests_mips_msa_groups
tests/tcg/mipsel/meson.build +1 -0
@@ -53,6 +53,7 @@ tests_mips_msa_groups = [ '../mips/test_msa_int_dot_product.c', '../mips/test_msa_int_max_min.c', '../mips/test_msa_int_multiply.c', + '../mips/test_msa_int_subtract.c', ] foreach src: tests_mips_msa + tests_mips_msa_groups
Signature · 1 line
2.55.0
PATCH v2 27/31 tests/tcg/mips: Group MSA interleave tests
In reply to Philippe Mathieu-DaudéBuild the 16 per-opcode interleave tests as a single executable, test_msa_interleave.c, to reduce the number of test binaries. Each opcode reports one TAP line.
--- tests/tcg/mips/test_msa_interleave.c | 127 +++++++++++++++++++++++++++ tests/tcg/mips/meson.build | 16 ---- tests/tcg/mips64/meson.build | 1 + tests/tcg/mipsel/meson.build | 1 + 4 files changed, 129 insertions(+), 16 deletions(-) create mode 100644 tests/tcg/mips/test_msa_interleave.c
tests/tcg/mips/test_msa_interleave.c new file +127 -0
@@ -0,0 +1,127 @@ +/* +* MIPS MSA tests: Interleave instructions +* +* SPDX-License-Identifier: GPL-2.0-or-later +*/ + +#define main test_msa_ilvev_b +#include "user/ase/msa/interleave/test_msa_ilvev_b.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_ilvev_d +#include "user/ase/msa/interleave/test_msa_ilvev_d.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_ilvev_h +#include "user/ase/msa/interleave/test_msa_ilvev_h.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_ilvev_w +#include "user/ase/msa/interleave/test_msa_ilvev_w.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_ilvl_b +#include "user/ase/msa/interleave/test_msa_ilvl_b.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_ilvl_d +#include "user/ase/msa/interleave/test_msa_ilvl_d.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_ilvl_h +#include "user/ase/msa/interleave/test_msa_ilvl_h.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_ilvl_w +#include "user/ase/msa/interleave/test_msa_ilvl_w.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_ilvod_b +#include "user/ase/msa/interleave/test_msa_ilvod_b.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_ilvod_d +#include "user/ase/msa/interleave/test_msa_ilvod_d.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_ilvod_h +#include "user/ase/msa/interleave/test_msa_ilvod_h.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_ilvod_w +#include "user/ase/msa/interleave/test_msa_ilvod_w.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_ilvr_b +#include "user/ase/msa/interleave/test_msa_ilvr_b.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_ilvr_d +#include "user/ase/msa/interleave/test_msa_ilvr_d.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_ilvr_h +#include "user/ase/msa/interleave/test_msa_ilvr_h.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_ilvr_w +#include "user/ase/msa/interleave/test_msa_ilvr_w.c" +#undef main +#undef TEST_COUNT_TOTAL + + +static const struct { +const char *name; +int32_t (*fn)(void ); +} msa_tests[] = { + {"ilvev.b" , test_msa_ilvev_b }, + {"ilvev.d" , test_msa_ilvev_d }, + {"ilvev.h" , test_msa_ilvev_h }, + {"ilvev.w" , test_msa_ilvev_w }, + {"ilvl.b" , test_msa_ilvl_b }, + {"ilvl.d" , test_msa_ilvl_d }, + {"ilvl.h" , test_msa_ilvl_h }, + {"ilvl.w" , test_msa_ilvl_w }, + {"ilvod.b" , test_msa_ilvod_b }, + {"ilvod.d" , test_msa_ilvod_d }, + {"ilvod.h" , test_msa_ilvod_h }, + {"ilvod.w" , test_msa_ilvod_w }, + {"ilvr.b" , test_msa_ilvr_b }, + {"ilvr.d" , test_msa_ilvr_d }, + {"ilvr.h" , test_msa_ilvr_h }, + {"ilvr.w" , test_msa_ilvr_w }, +}; + +int main (void ) +{ +int fail =0 ; +unsigned i; + +printf ("TAP version 14\n" +"1..%u\n" , + (unsigned )(sizeof (msa_tests) /sizeof (msa_tests[0 ]))); +for (i =0 ; i <sizeof (msa_tests) /sizeof (msa_tests[0 ]); i++) { +int r = msa_tests[i].fn (); + +printf ("%s %u - MSA %s %s\n" , r ?"not ok" :"ok" , i +1 , +"Interleave" , msa_tests[i].name); + fail |= r; + } + +return fail ?1 :0 ; +}
tests/tcg/mips/meson.build +0 -16
@@ -23,22 +23,6 @@ if 'qemu-mips' in emulators endif tests_mips_msa = [ - '../mips/user/ase/msa/interleave/test_msa_ilvr_b.c', - '../mips/user/ase/msa/interleave/test_msa_ilvr_d.c', - '../mips/user/ase/msa/interleave/test_msa_ilvod_b.c', - '../mips/user/ase/msa/interleave/test_msa_ilvl_b.c', - '../mips/user/ase/msa/interleave/test_msa_ilvev_w.c', - '../mips/user/ase/msa/interleave/test_msa_ilvr_w.c', - '../mips/user/ase/msa/interleave/test_msa_ilvr_h.c', - '../mips/user/ase/msa/interleave/test_msa_ilvev_h.c', - '../mips/user/ase/msa/interleave/test_msa_ilvev_b.c', - '../mips/user/ase/msa/interleave/test_msa_ilvod_w.c', - '../mips/user/ase/msa/interleave/test_msa_ilvev_d.c', - '../mips/user/ase/msa/interleave/test_msa_ilvl_d.c', - '../mips/user/ase/msa/interleave/test_msa_ilvod_d.c', - '../mips/user/ase/msa/interleave/test_msa_ilvl_h.c', - '../mips/user/ase/msa/interleave/test_msa_ilvl_w.c', - '../mips/user/ase/msa/interleave/test_msa_ilvod_h.c', '../mips/user/ase/msa/pack/test_msa_vshf_b.c', '../mips/user/ase/msa/pack/test_msa_pckev_b.c', '../mips/user/ase/msa/pack/test_msa_vshf_w.c',
tests/tcg/mips64/meson.build +1 -0
@@ -53,6 +53,7 @@ tests_mips_msa_groups = [ '../mips/test_msa_int_max_min.c', '../mips/test_msa_int_multiply.c', '../mips/test_msa_int_subtract.c', + '../mips/test_msa_interleave.c', ] foreach src: tests_mips_msa + tests_mips_msa_groups
tests/tcg/mipsel/meson.build +1 -0
@@ -54,6 +54,7 @@ tests_mips_msa_groups = [ '../mips/test_msa_int_max_min.c', '../mips/test_msa_int_multiply.c', '../mips/test_msa_int_subtract.c', + '../mips/test_msa_interleave.c', ] foreach src: tests_mips_msa + tests_mips_msa_groups
Signature · 1 line
2.55.0
PATCH v2 28/31 tests/tcg/mips: Group MSA logic tests
In reply to Philippe Mathieu-Daudé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.
--- tests/tcg/mips/test_msa_logic.c | 61 +++++++++++++++++++++++++++++++++ tests/tcg/mips/meson.build | 5 --- tests/tcg/mips64/meson.build | 1 + tests/tcg/mipsel/meson.build | 1 + 4 files changed, 63 insertions(+), 5 deletions(-) create mode 100644 tests/tcg/mips/test_msa_logic.c
tests/tcg/mips/test_msa_logic.c new file +61 -0
@@ -0,0 +1,61 @@ +/* +* MIPS MSA tests: Logic and Move instructions +* +* SPDX-License-Identifier: GPL-2.0-or-later +*/ + +#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 ) +{ +int fail =0 ; +unsigned i; + +printf ("TAP version 14\n" +"1..%u\n" , + (unsigned )(sizeof (msa_tests) /sizeof (msa_tests[0 ]))); +for (i =0 ; i <sizeof (msa_tests) /sizeof (msa_tests[0 ]); i++) { +int r = msa_tests[i].fn (); + +printf ("%s %u - MSA %s %s\n" , r ?"not ok" :"ok" , i +1 , +"Logic and Move" , msa_tests[i].name); + fail |= r; + } + +return fail ?1 :0 ; +}
tests/tcg/mips/meson.build +0 -5
@@ -55,9 +55,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', ]
tests/tcg/mips64/meson.build +1 -0
@@ -54,6 +54,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', ] foreach src: tests_mips_msa + tests_mips_msa_groups
tests/tcg/mipsel/meson.build +1 -0
@@ -55,6 +55,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', ] foreach src: tests_mips_msa + tests_mips_msa_groups
Signature · 1 line
2.55.0
PATCH v2 29/31 tests/tcg/mips: Group MSA pack tests
In reply to Philippe Mathieu-DaudéBuild the 12 per-opcode pack tests as a single executable, test_msa_pack.c, to reduce the number of test binaries. Each opcode reports one TAP line.
--- tests/tcg/mips/test_msa_pack.c | 103 +++++++++++++++++++++++++++++++++ tests/tcg/mips/meson.build | 12 ---- tests/tcg/mips64/meson.build | 1 + tests/tcg/mipsel/meson.build | 1 + 4 files changed, 105 insertions(+), 12 deletions(-) create mode 100644 tests/tcg/mips/test_msa_pack.c
tests/tcg/mips/test_msa_pack.c new file +103 -0
@@ -0,0 +1,103 @@ +/* +* MIPS MSA tests: Pack instructions +* +* SPDX-License-Identifier: GPL-2.0-or-later +*/ + +#define main test_msa_pckev_b +#include "user/ase/msa/pack/test_msa_pckev_b.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_pckev_d +#include "user/ase/msa/pack/test_msa_pckev_d.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_pckev_h +#include "user/ase/msa/pack/test_msa_pckev_h.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_pckev_w +#include "user/ase/msa/pack/test_msa_pckev_w.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_pckod_b +#include "user/ase/msa/pack/test_msa_pckod_b.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_pckod_d +#include "user/ase/msa/pack/test_msa_pckod_d.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_pckod_h +#include "user/ase/msa/pack/test_msa_pckod_h.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_pckod_w +#include "user/ase/msa/pack/test_msa_pckod_w.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_vshf_b +#include "user/ase/msa/pack/test_msa_vshf_b.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_vshf_d +#include "user/ase/msa/pack/test_msa_vshf_d.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_vshf_h +#include "user/ase/msa/pack/test_msa_vshf_h.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_vshf_w +#include "user/ase/msa/pack/test_msa_vshf_w.c" +#undef main +#undef TEST_COUNT_TOTAL + + +static const struct { +const char *name; +int32_t (*fn)(void ); +} msa_tests[] = { + {"pckev.b" , test_msa_pckev_b }, + {"pckev.d" , test_msa_pckev_d }, + {"pckev.h" , test_msa_pckev_h }, + {"pckev.w" , test_msa_pckev_w }, + {"pckod.b" , test_msa_pckod_b }, + {"pckod.d" , test_msa_pckod_d }, + {"pckod.h" , test_msa_pckod_h }, + {"pckod.w" , test_msa_pckod_w }, + {"vshf.b" , test_msa_vshf_b }, + {"vshf.d" , test_msa_vshf_d }, + {"vshf.h" , test_msa_vshf_h }, + {"vshf.w" , test_msa_vshf_w }, +}; + +int main (void ) +{ +int fail =0 ; +unsigned i; + +printf ("TAP version 14\n" +"1..%u\n" , + (unsigned )(sizeof (msa_tests) /sizeof (msa_tests[0 ]))); +for (i =0 ; i <sizeof (msa_tests) /sizeof (msa_tests[0 ]); i++) { +int r = msa_tests[i].fn (); + +printf ("%s %u - MSA %s %s\n" , r ?"not ok" :"ok" , i +1 , +"Pack" , msa_tests[i].name); + fail |= r; + } + +return fail ?1 :0 ; +}
tests/tcg/mips/meson.build +0 -12
@@ -23,18 +23,6 @@ if 'qemu-mips' in emulators endif tests_mips_msa = [ - '../mips/user/ase/msa/pack/test_msa_vshf_b.c', - '../mips/user/ase/msa/pack/test_msa_pckev_b.c', - '../mips/user/ase/msa/pack/test_msa_vshf_w.c', - '../mips/user/ase/msa/pack/test_msa_pckod_h.c', - '../mips/user/ase/msa/pack/test_msa_pckod_b.c', - '../mips/user/ase/msa/pack/test_msa_vshf_d.c', - '../mips/user/ase/msa/pack/test_msa_pckev_w.c', - '../mips/user/ase/msa/pack/test_msa_pckev_h.c', - '../mips/user/ase/msa/pack/test_msa_pckev_d.c', - '../mips/user/ase/msa/pack/test_msa_pckod_w.c', - '../mips/user/ase/msa/pack/test_msa_vshf_h.c', - '../mips/user/ase/msa/pack/test_msa_pckod_d.c', '../mips/user/ase/msa/shift/test_msa_sra_d.c', '../mips/user/ase/msa/shift/test_msa_srl_b.c', '../mips/user/ase/msa/shift/test_msa_srl_d.c',
tests/tcg/mips64/meson.build +1 -0
@@ -55,6 +55,7 @@ tests_mips_msa_groups = [ '../mips/test_msa_int_subtract.c', '../mips/test_msa_interleave.c', '../mips/test_msa_logic.c', + '../mips/test_msa_pack.c', ] foreach src: tests_mips_msa + tests_mips_msa_groups
tests/tcg/mipsel/meson.build +1 -0
@@ -56,6 +56,7 @@ tests_mips_msa_groups = [ '../mips/test_msa_int_subtract.c', '../mips/test_msa_interleave.c', '../mips/test_msa_logic.c', + '../mips/test_msa_pack.c', ] foreach src: tests_mips_msa + tests_mips_msa_groups
Signature · 1 line
2.55.0
PATCH v2 30/31 tests/tcg/mips: Group MSA shift tests
In reply to Philippe Mathieu-DaudéBuild the 20 per-opcode shift tests as a single executable, test_msa_shift.c, to reduce the number of test binaries. Each opcode reports one TAP line.
All MSA tests now emit TAP: select it in the meson setup.
--- tests/tcg/mips/test_msa_shift.c | 151 ++++++++++++++++++++++++++++++++ tests/tcg/mips/meson.build | 23 ----- tests/tcg/mips64/meson.build | 4 +- tests/tcg/mipsel/meson.build | 4 +- 4 files changed, 157 insertions(+), 25 deletions(-) create mode 100644 tests/tcg/mips/test_msa_shift.c
tests/tcg/mips/test_msa_shift.c new file +151 -0
@@ -0,0 +1,151 @@ +/* +* MIPS MSA tests: Shift instructions +* +* SPDX-License-Identifier: GPL-2.0-or-later +*/ + +#define main test_msa_sll_b +#include "user/ase/msa/shift/test_msa_sll_b.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_sll_d +#include "user/ase/msa/shift/test_msa_sll_d.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_sll_h +#include "user/ase/msa/shift/test_msa_sll_h.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_sll_w +#include "user/ase/msa/shift/test_msa_sll_w.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_sra_b +#include "user/ase/msa/shift/test_msa_sra_b.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_sra_d +#include "user/ase/msa/shift/test_msa_sra_d.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_sra_h +#include "user/ase/msa/shift/test_msa_sra_h.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_sra_w +#include "user/ase/msa/shift/test_msa_sra_w.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_srar_b +#include "user/ase/msa/shift/test_msa_srar_b.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_srar_d +#include "user/ase/msa/shift/test_msa_srar_d.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_srar_h +#include "user/ase/msa/shift/test_msa_srar_h.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_srar_w +#include "user/ase/msa/shift/test_msa_srar_w.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_srl_b +#include "user/ase/msa/shift/test_msa_srl_b.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_srl_d +#include "user/ase/msa/shift/test_msa_srl_d.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_srl_h +#include "user/ase/msa/shift/test_msa_srl_h.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_srl_w +#include "user/ase/msa/shift/test_msa_srl_w.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_srlr_b +#include "user/ase/msa/shift/test_msa_srlr_b.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_srlr_d +#include "user/ase/msa/shift/test_msa_srlr_d.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_srlr_h +#include "user/ase/msa/shift/test_msa_srlr_h.c" +#undef main +#undef TEST_COUNT_TOTAL + +#define main test_msa_srlr_w +#include "user/ase/msa/shift/test_msa_srlr_w.c" +#undef main +#undef TEST_COUNT_TOTAL + + +static const struct { +const char *name; +int32_t (*fn)(void ); +} msa_tests[] = { + {"sll.b" , test_msa_sll_b }, + {"sll.d" , test_msa_sll_d }, + {"sll.h" , test_msa_sll_h }, + {"sll.w" , test_msa_sll_w }, + {"sra.b" , test_msa_sra_b }, + {"sra.d" , test_msa_sra_d }, + {"sra.h" , test_msa_sra_h }, + {"sra.w" , test_msa_sra_w }, + {"srar.b" , test_msa_srar_b }, + {"srar.d" , test_msa_srar_d }, + {"srar.h" , test_msa_srar_h }, + {"srar.w" , test_msa_srar_w }, + {"srl.b" , test_msa_srl_b }, + {"srl.d" , test_msa_srl_d }, + {"srl.h" , test_msa_srl_h }, + {"srl.w" , test_msa_srl_w }, + {"srlr.b" , test_msa_srlr_b }, + {"srlr.d" , test_msa_srlr_d }, + {"srlr.h" , test_msa_srlr_h }, + {"srlr.w" , test_msa_srlr_w }, +}; + +int main (void ) +{ +int fail =0 ; +unsigned i; + +printf ("TAP version 14\n" +"1..%u\n" , + (unsigned )(sizeof (msa_tests) /sizeof (msa_tests[0 ]))); +for (i =0 ; i <sizeof (msa_tests) /sizeof (msa_tests[0 ]); i++) { +int r = msa_tests[i].fn (); + +printf ("%s %u - MSA %s %s\n" , r ?"not ok" :"ok" , i +1 , +"Shift" , msa_tests[i].name); + fail |= r; + } + +return fail ?1 :0 ; +}
tests/tcg/mips/meson.build +0 -23
@@ -21,26 +21,3 @@ if 'qemu-mips' in emulators } } endif - -tests_mips_msa = [ - '../mips/user/ase/msa/shift/test_msa_sra_d.c', - '../mips/user/ase/msa/shift/test_msa_srl_b.c', - '../mips/user/ase/msa/shift/test_msa_srl_d.c', - '../mips/user/ase/msa/shift/test_msa_sll_b.c', - '../mips/user/ase/msa/shift/test_msa_sra_w.c', - '../mips/user/ase/msa/shift/test_msa_sra_h.c', - '../mips/user/ase/msa/shift/test_msa_srar_h.c', - '../mips/user/ase/msa/shift/test_msa_srlr_h.c', - '../mips/user/ase/msa/shift/test_msa_srl_h.c', - '../mips/user/ase/msa/shift/test_msa_sll_d.c', - '../mips/user/ase/msa/shift/test_msa_srl_w.c', - '../mips/user/ase/msa/shift/test_msa_srar_b.c', - '../mips/user/ase/msa/shift/test_msa_sll_w.c', - '../mips/user/ase/msa/shift/test_msa_sra_b.c', - '../mips/user/ase/msa/shift/test_msa_sll_h.c', - '../mips/user/ase/msa/shift/test_msa_srar_d.c', - '../mips/user/ase/msa/shift/test_msa_srlr_d.c', - '../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', -]
tests/tcg/mips64/meson.build +3 -1
@@ -56,13 +56,15 @@ tests_mips_msa_groups = [ '../mips/test_msa_interleave.c', '../mips/test_msa_logic.c', '../mips/test_msa_pack.c', + '../mips/test_msa_shift.c', ] -foreach src: tests_mips_msa + tests_mips_msa_groups +foreach src: tests_mips_msa_groups tests += { src: { 'cflags': ['-march=mips64r6', '-mmsa'], 'qemu_args': ['-cpu', 'I6400'], + 'protocol': 'tap', } } endforeach
tests/tcg/mipsel/meson.build +3 -1
@@ -57,14 +57,16 @@ tests_mips_msa_groups = [ '../mips/test_msa_interleave.c', '../mips/test_msa_logic.c', '../mips/test_msa_pack.c', + '../mips/test_msa_shift.c', ] -foreach src: tests_mips_msa + tests_mips_msa_groups +foreach src: tests_mips_msa_groups tests += { src: { 'cflags': ['-mabi=32', '-march=mips32r5', '-mmsa', '-mno-odd-spreg', '-mfp64', '-mnan=2008'], 'qemu_args': ['-cpu', 'P5600'], + 'protocol': 'tap', } } endforeach
Signature · 1 line
2.55.0
PATCH v2 31/31 tests/tcg/mips: Add MSA load/store tests
In reply to Philippe Mathieu-DaudéAdd coverage for the MSA LD/ST.B/H/W/D instructions at every source and destination byte offset within a vector-sized block, including accesses that cross a page boundary. Verify per-element endian ordering, destination contents, and source register preservation.
Test both little-endian (P5600, MIPS32R5) and big-endian (I6400, MIPS64R6).
AI-used-for: tests
---
Since this is a TCG test ran under linux-user, ignore checkpatch:
ERROR: use qemu_real_host_page_size() instead of sysconf(_SC_PAGESIZE) #138: FILE: tests/tcg/mips/test_msa_load_store.c:110:
+ long page_size = sysconf(_SC_PAGESIZE);
--- tests/tcg/mips/test_msa_load_store.c | 166 +++++++++++++++++++++++++++ tests/tcg/mips64/meson.build | 1 + tests/tcg/mipsel/meson.build | 1 + 3 files changed, 168 insertions(+) create mode 100644 tests/tcg/mips/test_msa_load_store.c
tests/tcg/mips/test_msa_load_store.c new file +166 -0
@@ -0,0 +1,166 @@ +/* +* MIPS MSA tests: Load / Store instructions +* +* SPDX-License-Identifier: GPL-2.0-or-later +*/ + +#include <stdbool.h> +#include <stdint.h> +#include <stdio.h> +#include <string.h> +#include <sys/mman.h> +#include <unistd.h> + +enum { +VECTOR_BYTES =16 , +BUFFER_BYTES =64 , +}; + +#define DEFINE_MSA_COPY (format) \ +static void copy_##format(const uint8_t *source, uint8_t *destination, \ + uint8_t *loaded, uint8_t *after_store) \ +{ \ + __asm__ volatile( \ + "ld." #format " $w0, 0(%[source])\n\t" \ + "st.b $w0, 0(%[loaded])\n\t" \ + "st." #format " $w0, 0(%[destination])\n\t" \ + "st.b $w0, 0(%[after_store])\n\t" \ + : \ + : [source] "r" (source), [destination] "r" (destination), \ + [loaded] "r" (loaded), [after_store] "r" (after_store) \ + : "f0", "memory"); \ +} + +DEFINE_MSA_COPY (b) +DEFINE_MSA_COPY (h ) +DEFINE_MSA_COPY (w) +DEFINE_MSA_COPY (d) + +typedef void (*MsaCopy)(const uint8_t *source, uint8_t *destination, +uint8_t *loaded,uint8_t *after_store); + +static const struct { +const char *name; +unsigned element_bytes; +MsaCopy copy; +} formats[] = { + {"b" ,1 , copy_b }, + {"h" ,2 , copy_h }, + {"w" ,4 , copy_w }, + {"d" ,8 , copy_d }, +}; + +static bool check_format (size_t format_index,const uint8_t *source, +uint8_t *destination,size_t first_offset, +const char *region) +{ + _Alignas(VECTOR_BYTES )uint8_t loaded[VECTOR_BYTES ]; + _Alignas(VECTOR_BYTES )uint8_t after_store[VECTOR_BYTES ]; +uint8_t expected_vector[VECTOR_BYTES ]; +uint8_t expected_memory[BUFFER_BYTES ]; +const uint16_t endian_probe =1 ; +unsigned endian_mask = *(const uint8_t *)&endian_probe ?0 : + formats[format_index].element_bytes -1 ; + +for (size_t source_offset = first_offset; + source_offset < first_offset +VECTOR_BYTES ; source_offset++) { +for (size_t destination_offset = first_offset; + destination_offset < first_offset +VECTOR_BYTES ; + destination_offset++) { +memset (destination,0xa5 ,BUFFER_BYTES ); +memset (expected_memory,0xa5 ,BUFFER_BYTES ); +memcpy (expected_memory + destination_offset, + source + source_offset,VECTOR_BYTES ); + +for (size_t byte =0 ; byte <VECTOR_BYTES ; byte++) { + expected_vector[byte] = + source[source_offset + (byte ^ endian_mask)]; + } + + formats[format_index].copy (source + source_offset, + destination + destination_offset, + loaded, after_store); + +if (memcmp (loaded, expected_vector,VECTOR_BYTES )) { +fprintf (stderr,"ld.%s endian mismatch (%s, offset %zu)\n" , + formats[format_index].name, region, source_offset); +return false; + } +if (memcmp (destination, expected_memory,BUFFER_BYTES )) { +fprintf (stderr,"st.%s memory mismatch (%s, offset %zu)\n" , + formats[format_index].name, region, + destination_offset); +return false; + } +if (memcmp (after_store, loaded,VECTOR_BYTES )) { +fprintf (stderr,"st.%s changed its source register (%s)\n" , + formats[format_index].name, region); +return false; + } + } + } + +return true; +} + +int main (void ) +{ + _Alignas(VECTOR_BYTES )uint8_t source[BUFFER_BYTES ]; + _Alignas(VECTOR_BYTES )uint8_t destination[BUFFER_BYTES ]; +long page_size =sysconf (_SC_PAGESIZE); +size_t mapping_bytes; +uint8_t *source_mapping; +uint8_t *destination_mapping; +uint8_t *page_source; +uint8_t *page_destination; +bool success = true; + +if (page_size <BUFFER_BYTES ) { +fprintf (stderr,"Invalid guest page size: %ld\n" , page_size); +return 1 ; + } + mapping_bytes =4 * (size_t )page_size; + source_mapping =mmap (NULL , mapping_bytes,PROT_NONE , +MAP_PRIVATE |MAP_ANONYMOUS ,-1 ,0 ); + destination_mapping =mmap (NULL , mapping_bytes,PROT_NONE , +MAP_PRIVATE |MAP_ANONYMOUS ,-1 ,0 ); +if (source_mapping ==MAP_FAILED || destination_mapping ==MAP_FAILED ) { +perror ("mmap" ); +return 1 ; + } +if (mprotect (source_mapping + page_size,2 * page_size, +PROT_READ |PROT_WRITE ) !=0 || +mprotect (destination_mapping + page_size,2 * page_size, +PROT_READ |PROT_WRITE ) !=0 ) { +perror ("mprotect" ); +return 1 ; + } + + page_source = source_mapping +2 * page_size -BUFFER_BYTES /2 ; + page_destination = destination_mapping +2 * page_size -BUFFER_BYTES /2 ; +for (size_t byte =0 ; byte <BUFFER_BYTES ; byte++) { + source[byte] = page_source[byte] = byte *13 +7 ; + } + +printf ("TAP version 14\n" +"1..%zu\n" , +sizeof (formats) /sizeof (formats[0 ])); +for (size_t format_index =0 ; + format_index <sizeof (formats) /sizeof (formats[0 ]); format_index++) { +bool passed =check_format (format_index, source, destination,0 , +"buffer" ) && +check_format (format_index, page_source, page_destination, +VECTOR_BYTES ,"page boundary" ); + +printf ("%s %zu - MSA ld/st.%s\n" , passed ?"ok" :"not ok" , + format_index +1 , formats[format_index].name); + success &= passed; + } + +if (munmap (source_mapping, mapping_bytes) !=0 || +munmap (destination_mapping, mapping_bytes) !=0 ) { +perror ("munmap" ); +return 1 ; + } +return success ?0 :1 ; +}
tests/tcg/mips64/meson.build +1 -0
@@ -54,6 +54,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_load_store.c', '../mips/test_msa_logic.c', '../mips/test_msa_pack.c', '../mips/test_msa_shift.c',
tests/tcg/mipsel/meson.build +1 -0
@@ -55,6 +55,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_load_store.c', '../mips/test_msa_logic.c', '../mips/test_msa_pack.c', '../mips/test_msa_shift.c',
Signature · 1 line
2.55.0
Quoted 279 lines · Philippe Mathieu-Daudé
I'm glad we have many MIPS tests but they are in too many files, taking time to get compiled. In particular on Aarch64 host via
x86_64docker image... Group the test in order to reduce CI build time.But per v1 review "We can't trade usability for faster compilation", so convert to run one test at a time -- not exiting on the first
assert()-- and use TAP protocol to get integrated with meson. For example we can now list each opcode as a TAP subtest with:$ meson test --suite tcg-mipsel -vNow as a maintainer I can relax a bit :)
Since v1:
- TAP (pbo)
- no more assert (pbo)
- split per group
- MSA ld/st testsBased-on: <[email protected]>
Philippe Mathieu-Daudé (31):
tests/tcg/mips: Group DSP acc tests tests/tcg/mips: Group DSP arith tests tests/tcg/mips: Group DSP cmp tests tests/tcg/mips: Group DSP ctrl tests tests/tcg/mips: Group DSP dot tests tests/tcg/mips: Group DSP mul tests tests/tcg/mips: Group DSP pack tests tests/tcg/mips: Group DSP shift tests tests/tcg/mips: Group Release 6 bitops tests tests/tcg/mips: Group Release 6 crc tests tests/tcg/mips: Group Release 6 logic tests tests/tcg/mips: Group Release 6 multiply tests tests/tcg/mips: Group Release 6 shift tests tests/tcg/mips: Group MSA bit-count tests tests/tcg/mips: Group MSA bit-move tests tests/tcg/mips: Group MSA bit-set tests tests/tcg/mips: Group MSA fixed-multiply tests tests/tcg/mips: Group MSA float-max-min tests tests/tcg/mips: Group MSA int-add tests tests/tcg/mips: Group MSA int-average tests tests/tcg/mips: Group MSA int-compare tests tests/tcg/mips: Group MSA int-div-mod tests tests/tcg/mips: Group MSA int-dot-product tests tests/tcg/mips: Group MSA int-max-min tests tests/tcg/mips: Group MSA int-multiply tests tests/tcg/mips: Group MSA int-subtract tests tests/tcg/mips: Group MSA interleave tests tests/tcg/mips: Group MSA logic tests tests/tcg/mips: Group MSA pack tests tests/tcg/mips: Group MSA shift tests tests/tcg/mips: Add MSA load/store teststests/tcg/mips/include/test_utils_128.h | 2 +- tests/tcg/mips/include/test_utils_64.h | 6 +- tests/tcg/mipsel/test_dsp_runner.h | 39 +++ tests/tcg/mips/test_msa_bit_count.c | 103 +++++++ tests/tcg/mips/test_msa_bit_move.c | 97 ++++++ tests/tcg/mips/test_msa_bit_set.c | 103 +++++++ tests/tcg/mips/test_msa_fixed_multiply.c | 103 +++++++ tests/tcg/mips/test_msa_float_max_min.c | 79 +++++ tests/tcg/mips/test_msa_int_add.c | 187 ++++++++++++ tests/tcg/mips/test_msa_int_average.c | 127 ++++++++ tests/tcg/mips/test_msa_int_compare.c | 151 ++++++++++ tests/tcg/mips/test_msa_int_div_mod.c | 127 ++++++++ tests/tcg/mips/test_msa_int_dot_product.c | 139 +++++++++ tests/tcg/mips/test_msa_int_max_min.c | 175 +++++++++++ tests/tcg/mips/test_msa_int_multiply.c | 103 +++++++ tests/tcg/mips/test_msa_int_subtract.c | 235 +++++++++++++++ tests/tcg/mips/test_msa_interleave.c | 127 ++++++++ tests/tcg/mips/test_msa_load_store.c | 166 +++++++++++ tests/tcg/mips/test_msa_logic.c | 61 ++++ tests/tcg/mips/test_msa_pack.c | 103 +++++++ tests/tcg/mips/test_msa_shift.c | 151 ++++++++++ tests/tcg/mips64/test_mips64r6_bitops.c | 62 ++++ tests/tcg/mips64/test_mips64r6_crc.c | 74 +++++ tests/tcg/mips64/test_mips64r6_logic.c | 50 ++++ tests/tcg/mips64/test_mips64r6_multiply.c | 74 +++++ tests/tcg/mips64/test_mips64r6_shift.c | 62 ++++ tests/tcg/mipsel/test_dsp_acc.c | 112 +++++++ tests/tcg/mipsel/test_dsp_arith.c | 182 ++++++++++++ tests/tcg/mipsel/test_dsp_cmp.c | 87 ++++++ tests/tcg/mipsel/test_dsp_ctrl.c | 47 +++ tests/tcg/mipsel/test_dsp_dot.c | 157 ++++++++++ tests/tcg/mipsel/test_dsp_mul.c | 67 +++++ tests/tcg/mipsel/test_dsp_pack.c | 152 ++++++++++ tests/tcg/mipsel/test_dsp_r1_absq_s_ph.c | 1 - tests/tcg/mipsel/test_dsp_r1_absq_s_w.c | 1 - tests/tcg/mipsel/test_dsp_r1_addq_ph.c | 1 - tests/tcg/mipsel/test_dsp_r1_addq_s_ph.c | 1 - tests/tcg/mipsel/test_dsp_r1_addq_s_w.c | 1 - tests/tcg/mipsel/test_dsp_r1_addsc.c | 1 - tests/tcg/mipsel/test_dsp_r1_addu_qb.c | 1 - tests/tcg/mipsel/test_dsp_r1_addu_s_qb.c | 1 - tests/tcg/mipsel/test_dsp_r1_addwc.c | 1 - tests/tcg/mipsel/test_dsp_r1_bitrev.c | 1 - tests/tcg/mipsel/test_dsp_r1_bposge32.c | 1 - tests/tcg/mipsel/test_dsp_r1_cmp_eq_ph.c | 1 - tests/tcg/mipsel/test_dsp_r1_cmp_le_ph.c | 1 - tests/tcg/mipsel/test_dsp_r1_cmp_lt_ph.c | 1 - tests/tcg/mipsel/test_dsp_r1_cmpgu_eq_qb.c | 1 - tests/tcg/mipsel/test_dsp_r1_cmpgu_le_qb.c | 1 - tests/tcg/mipsel/test_dsp_r1_cmpgu_lt_qb.c | 1 - tests/tcg/mipsel/test_dsp_r1_cmpu_eq_qb.c | 1 - tests/tcg/mipsel/test_dsp_r1_cmpu_le_qb.c | 1 - tests/tcg/mipsel/test_dsp_r1_cmpu_lt_qb.c | 1 - tests/tcg/mipsel/test_dsp_r1_dpaq_s_w_ph.c | 1 - tests/tcg/mipsel/test_dsp_r1_dpaq_sa_l_w.c | 1 - tests/tcg/mipsel/test_dsp_r1_dpau_h_qbl.c | 1 - tests/tcg/mipsel/test_dsp_r1_dpau_h_qbr.c | 1 - tests/tcg/mipsel/test_dsp_r1_dpsq_s_w_ph.c | 1 - tests/tcg/mipsel/test_dsp_r1_dpsq_sa_l_w.c | 1 - tests/tcg/mipsel/test_dsp_r1_dpsu_h_qbl.c | 1 - tests/tcg/mipsel/test_dsp_r1_dpsu_h_qbr.c | 1 - tests/tcg/mipsel/test_dsp_r1_extp.c | 1 - tests/tcg/mipsel/test_dsp_r1_extpdp.c | 1 - tests/tcg/mipsel/test_dsp_r1_extpdpv.c | 1 - tests/tcg/mipsel/test_dsp_r1_extpv.c | 1 - tests/tcg/mipsel/test_dsp_r1_extr_r_w.c | 1 - tests/tcg/mipsel/test_dsp_r1_extr_rs_w.c | 1 - tests/tcg/mipsel/test_dsp_r1_extr_s_h.c | 1 - tests/tcg/mipsel/test_dsp_r1_extr_w.c | 1 - tests/tcg/mipsel/test_dsp_r1_extrv_r_w.c | 1 - tests/tcg/mipsel/test_dsp_r1_extrv_rs_w.c | 1 - tests/tcg/mipsel/test_dsp_r1_extrv_s_h.c | 1 - tests/tcg/mipsel/test_dsp_r1_extrv_w.c | 1 - tests/tcg/mipsel/test_dsp_r1_insv.c | 1 - tests/tcg/mipsel/test_dsp_r1_lbux.c | 1 - tests/tcg/mipsel/test_dsp_r1_lhx.c | 1 - tests/tcg/mipsel/test_dsp_r1_lwx.c | 1 - tests/tcg/mipsel/test_dsp_r1_madd.c | 1 - tests/tcg/mipsel/test_dsp_r1_maddu.c | 1 - tests/tcg/mipsel/test_dsp_r1_main.c | 6 - tests/tcg/mipsel/test_dsp_r1_maq_s_w_phl.c | 1 - tests/tcg/mipsel/test_dsp_r1_maq_s_w_phr.c | 1 - tests/tcg/mipsel/test_dsp_r1_maq_sa_w_phl.c | 1 - tests/tcg/mipsel/test_dsp_r1_maq_sa_w_phr.c | 1 - tests/tcg/mipsel/test_dsp_r1_mfhi.c | 1 - tests/tcg/mipsel/test_dsp_r1_mflo.c | 1 - tests/tcg/mipsel/test_dsp_r1_modsub.c | 1 - tests/tcg/mipsel/test_dsp_r1_msub.c | 1 - tests/tcg/mipsel/test_dsp_r1_msubu.c | 1 - tests/tcg/mipsel/test_dsp_r1_mthi.c | 1 - tests/tcg/mipsel/test_dsp_r1_mthlip.c | 1 - tests/tcg/mipsel/test_dsp_r1_mtlo.c | 1 - tests/tcg/mipsel/test_dsp_r1_muleq_s_w_phl.c | 1 - tests/tcg/mipsel/test_dsp_r1_muleq_s_w_phr.c | 1 - tests/tcg/mipsel/test_dsp_r1_muleu_s_ph_qbl.c | 1 - tests/tcg/mipsel/test_dsp_r1_muleu_s_ph_qbr.c | 1 - tests/tcg/mipsel/test_dsp_r1_mulq_rs_ph.c | 1 - tests/tcg/mipsel/test_dsp_r1_mult.c | 1 - tests/tcg/mipsel/test_dsp_r1_multu.c | 1 - tests/tcg/mipsel/test_dsp_r1_packrl_ph.c | 1 - tests/tcg/mipsel/test_dsp_r1_pick_ph.c | 1 - tests/tcg/mipsel/test_dsp_r1_pick_qb.c | 1 - tests/tcg/mipsel/test_dsp_r1_preceq_w_phl.c | 1 - tests/tcg/mipsel/test_dsp_r1_preceq_w_phr.c | 1 - tests/tcg/mipsel/test_dsp_r1_precequ_ph_qbl.c | 1 - .../tcg/mipsel/test_dsp_r1_precequ_ph_qbla.c | 1 - tests/tcg/mipsel/test_dsp_r1_precequ_ph_qbr.c | 1 - .../tcg/mipsel/test_dsp_r1_precequ_ph_qbra.c | 1 - tests/tcg/mipsel/test_dsp_r1_preceu_ph_qbl.c | 1 - tests/tcg/mipsel/test_dsp_r1_preceu_ph_qbla.c | 1 - tests/tcg/mipsel/test_dsp_r1_preceu_ph_qbr.c | 1 - tests/tcg/mipsel/test_dsp_r1_preceu_ph_qbra.c | 1 - tests/tcg/mipsel/test_dsp_r1_precrq_ph_w.c | 1 - tests/tcg/mipsel/test_dsp_r1_precrq_qb_ph.c | 1 - tests/tcg/mipsel/test_dsp_r1_precrq_rs_ph_w.c | 1 - .../tcg/mipsel/test_dsp_r1_precrqu_s_qb_ph.c | 1 - tests/tcg/mipsel/test_dsp_r1_raddu_w_qb.c | 1 - tests/tcg/mipsel/test_dsp_r1_rddsp.c | 1 - tests/tcg/mipsel/test_dsp_r1_repl_ph.c | 1 - tests/tcg/mipsel/test_dsp_r1_repl_qb.c | 1 - tests/tcg/mipsel/test_dsp_r1_replv_ph.c | 1 - tests/tcg/mipsel/test_dsp_r1_replv_qb.c | 1 - tests/tcg/mipsel/test_dsp_r1_shilo.c | 1 - tests/tcg/mipsel/test_dsp_r1_shilov.c | 1 - tests/tcg/mipsel/test_dsp_r1_shll_ph.c | 1 - tests/tcg/mipsel/test_dsp_r1_shll_qb.c | 1 - tests/tcg/mipsel/test_dsp_r1_shll_s_ph.c | 1 - tests/tcg/mipsel/test_dsp_r1_shll_s_w.c | 1 - tests/tcg/mipsel/test_dsp_r1_shllv_ph.c | 1 - tests/tcg/mipsel/test_dsp_r1_shllv_qb.c | 1 - tests/tcg/mipsel/test_dsp_r1_shllv_s_ph.c | 1 - tests/tcg/mipsel/test_dsp_r1_shllv_s_w.c | 1 - tests/tcg/mipsel/test_dsp_r1_shra_ph.c | 1 - tests/tcg/mipsel/test_dsp_r1_shra_r_ph.c | 1 - tests/tcg/mipsel/test_dsp_r1_shra_r_w.c | 1 - tests/tcg/mipsel/test_dsp_r1_shrav_ph.c | 1 - tests/tcg/mipsel/test_dsp_r1_shrav_r_ph.c | 1 - tests/tcg/mipsel/test_dsp_r1_shrav_r_w.c | 1 - tests/tcg/mipsel/test_dsp_r1_shrl_qb.c | 1 - tests/tcg/mipsel/test_dsp_r1_shrlv_qb.c | 1 - tests/tcg/mipsel/test_dsp_r1_subq_ph.c | 1 - tests/tcg/mipsel/test_dsp_r1_subq_s_ph.c | 1 - tests/tcg/mipsel/test_dsp_r1_subq_s_w.c | 1 - tests/tcg/mipsel/test_dsp_r1_subu_qb.c | 1 - tests/tcg/mipsel/test_dsp_r1_subu_s_qb.c | 1 - tests/tcg/mipsel/test_dsp_r1_wrdsp.c | 1 - tests/tcg/mipsel/test_dsp_r2_absq_s_qb.c | 1 - tests/tcg/mipsel/test_dsp_r2_addqh_ph.c | 1 - tests/tcg/mipsel/test_dsp_r2_addqh_r_ph.c | 1 - tests/tcg/mipsel/test_dsp_r2_addqh_r_w.c | 1 - tests/tcg/mipsel/test_dsp_r2_addqh_w.c | 1 - tests/tcg/mipsel/test_dsp_r2_addu_ph.c | 1 - tests/tcg/mipsel/test_dsp_r2_addu_s_ph.c | 1 - tests/tcg/mipsel/test_dsp_r2_adduh_qb.c | 1 - tests/tcg/mipsel/test_dsp_r2_adduh_r_qb.c | 1 - tests/tcg/mipsel/test_dsp_r2_append.c | 1 - tests/tcg/mipsel/test_dsp_r2_balign.c | 1 - tests/tcg/mipsel/test_dsp_r2_cmpgdu_eq_qb.c | 1 - tests/tcg/mipsel/test_dsp_r2_cmpgdu_le_qb.c | 1 - tests/tcg/mipsel/test_dsp_r2_cmpgdu_lt_qb.c | 1 - tests/tcg/mipsel/test_dsp_r2_dpa_w_ph.c | 1 - tests/tcg/mipsel/test_dsp_r2_dpaqx_s_w_ph.c | 1 - tests/tcg/mipsel/test_dsp_r2_dpaqx_sa_w_ph.c | 1 - tests/tcg/mipsel/test_dsp_r2_dpax_w_ph.c | 1 - tests/tcg/mipsel/test_dsp_r2_dps_w_ph.c | 1 - tests/tcg/mipsel/test_dsp_r2_dpsqx_s_w_ph.c | 1 - tests/tcg/mipsel/test_dsp_r2_dpsqx_sa_w_ph.c | 1 - tests/tcg/mipsel/test_dsp_r2_dpsx_w_ph.c | 1 - tests/tcg/mipsel/test_dsp_r2_mul_ph.c | 1 - tests/tcg/mipsel/test_dsp_r2_mul_s_ph.c | 1 - tests/tcg/mipsel/test_dsp_r2_mulq_rs_w.c | 1 - tests/tcg/mipsel/test_dsp_r2_mulq_s_ph.c | 1 - tests/tcg/mipsel/test_dsp_r2_mulq_s_w.c | 1 - tests/tcg/mipsel/test_dsp_r2_mulsa_w_ph.c | 1 - tests/tcg/mipsel/test_dsp_r2_mulsaq_s_w_ph.c | 1 - tests/tcg/mipsel/test_dsp_r2_precr_qb_ph.c | 1 - tests/tcg/mipsel/test_dsp_r2_precr_sra_ph_w.c | 1 - .../tcg/mipsel/test_dsp_r2_precr_sra_r_ph_w.c | 1 - tests/tcg/mipsel/test_dsp_r2_prepend.c | 1 - tests/tcg/mipsel/test_dsp_r2_shra_qb.c | 1 - tests/tcg/mipsel/test_dsp_r2_shra_r_qb.c | 1 - tests/tcg/mipsel/test_dsp_r2_shrav_qb.c | 1 - tests/tcg/mipsel/test_dsp_r2_shrav_r_qb.c | 1 - tests/tcg/mipsel/test_dsp_r2_shrl_ph.c | 1 - tests/tcg/mipsel/test_dsp_r2_shrlv_ph.c | 1 - tests/tcg/mipsel/test_dsp_r2_subqh_ph.c | 1 - tests/tcg/mipsel/test_dsp_r2_subqh_r_ph.c | 1 - tests/tcg/mipsel/test_dsp_r2_subqh_r_w.c | 1 - tests/tcg/mipsel/test_dsp_r2_subqh_w.c | 1 - tests/tcg/mipsel/test_dsp_r2_subu_ph.c | 1 - tests/tcg/mipsel/test_dsp_r2_subu_s_ph.c | 1 - tests/tcg/mipsel/test_dsp_r2_subuh_qb.c | 1 - tests/tcg/mipsel/test_dsp_r2_subuh_r_qb.c | 1 - tests/tcg/mipsel/test_dsp_shift.c | 127 ++++++++ tests/tcg/mips/meson.build | 277 ------------------ tests/tcg/mips64/meson.build | 63 ++-- tests/tcg/mipsel/meson.build | 193 ++---------- 197 files changed, 3694 insertions(+), 641 deletions(-) create mode 100644 tests/tcg/mipsel/test_dsp_runner.h create mode 100644 tests/tcg/mips/test_msa_bit_count.c create mode 100644 tests/tcg/mips/test_msa_bit_move.c create mode 100644 tests/tcg/mips/test_msa_bit_set.c create mode 100644 tests/tcg/mips/test_msa_fixed_multiply.c create mode 100644 tests/tcg/mips/test_msa_float_max_min.c create mode 100644 tests/tcg/mips/test_msa_int_add.c create mode 100644 tests/tcg/mips/test_msa_int_average.c create mode 100644 tests/tcg/mips/test_msa_int_compare.c create mode 100644 tests/tcg/mips/test_msa_int_div_mod.c create mode 100644 tests/tcg/mips/test_msa_int_dot_product.c create mode 100644 tests/tcg/mips/test_msa_int_max_min.c create mode 100644 tests/tcg/mips/test_msa_int_multiply.c create mode 100644 tests/tcg/mips/test_msa_int_subtract.c create mode 100644 tests/tcg/mips/test_msa_interleave.c create mode 100644 tests/tcg/mips/test_msa_load_store.c create mode 100644 tests/tcg/mips/test_msa_logic.c create mode 100644 tests/tcg/mips/test_msa_pack.c create mode 100644 tests/tcg/mips/test_msa_shift.c create mode 100644 tests/tcg/mips64/test_mips64r6_bitops.c create mode 100644 tests/tcg/mips64/test_mips64r6_crc.c create mode 100644 tests/tcg/mips64/test_mips64r6_logic.c create mode 100644 tests/tcg/mips64/test_mips64r6_multiply.c create mode 100644 tests/tcg/mips64/test_mips64r6_shift.c create mode 100644 tests/tcg/mipsel/test_dsp_acc.c
Quoted 9 lines
create mode 100644 tests/tcg/mipsel/test_dsp_arith.c create mode 100644 tests/tcg/mipsel/test_dsp_cmp.c create mode 100644 tests/tcg/mipsel/test_dsp_ctrl.c create mode 100644 tests/tcg/mipsel/test_dsp_dot.c create mode 100644 tests/tcg/mipsel/test_dsp_mul.c create mode 100644 tests/tcg/mipsel/test_dsp_pack.c delete mode 100644 tests/tcg/mipsel/test_dsp_r1_main.c create mode 100644 tests/tcg/mipsel/test_dsp_shift.c
Series look good to me, minus the comment on MSA tests duplicating their groups definition between targets.
With this factorized:
Regards,
Pierrick
Quoted 39 lines · Pierrick Bouvier
Quoted 26 lines · Philippe Mathieu-Daudé
Based-on: <[email protected]>
Philippe Mathieu-Daudé (31):
tests/tcg/mips: Group DSP acc tests tests/tcg/mips: Group DSP arith tests tests/tcg/mips: Group DSP cmp tests tests/tcg/mips: Group DSP ctrl tests tests/tcg/mips: Group DSP dot tests tests/tcg/mips: Group DSP mul tests tests/tcg/mips: Group DSP pack tests tests/tcg/mips: Group DSP shift tests tests/tcg/mips: Group Release 6 bitops tests tests/tcg/mips: Group Release 6 crc tests tests/tcg/mips: Group Release 6 logic tests tests/tcg/mips: Group Release 6 multiply tests tests/tcg/mips: Group Release 6 shift tests tests/tcg/mips: Group MSA bit-count tests tests/tcg/mips: Group MSA bit-move tests tests/tcg/mips: Group MSA bit-set tests tests/tcg/mips: Group MSA fixed-multiply tests tests/tcg/mips: Group MSA float-max-min tests tests/tcg/mips: Group MSA int-add tests tests/tcg/mips: Group MSA int-average tests tests/tcg/mips: Group MSA int-compare tests tests/tcg/mips: Group MSA int-div-mod tests tests/tcg/mips: Group MSA int-dot-product testsQuoted 8 lines
tests/tcg/mips: Group MSA int-max-min tests
tests/tcg/mips: Group MSA int-multiply tests
tests/tcg/mips: Group MSA int-subtract tests
tests/tcg/mips: Group MSA interleave tests
tests/tcg/mips: Group MSA logic tests
tests/tcg/mips: Group MSA pack tests
tests/tcg/mips: Group MSA shift tests
tests/tcg/mips: Add MSA load/store tests
Quoted 5 lines
Series look good to me, minus the comment on MSA tests duplicating their groups definition between targets.
With this factorized:
Reviewed-by Pierrick Bouvier <[email protected]>
Done and queued, thanks!