* [PATCH 0/4] tests/tcg: Massage MIPS tests for easier maintenance
@ 2026-10-28 19:21 Philippe Mathieu-Daudé
2026-10-28 19:21 ` [PATCH 1/4] tests/tcg/mips: Clear DSPControl at start of DSP tests Philippe Mathieu-Daudé
` (4 more replies)
0 siblings, 5 replies; 9+ messages in thread
From: Philippe Mathieu-Daudé @ 2026-10-28 19:21 UTC (permalink / raw)
To: qemu-devel
Cc: Aleksandar Rikalo, Aurelien Jarno, Jiaxun Yang,
Philippe Mathieu-Daudé, Pierrick Bouvier
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.
Philippe Mathieu-Daudé (4):
tests/tcg/mips: Clear DSPControl at start of DSP tests
tests/tcg/mips: Group DSP tests
tests/tcg/mips: Group Release 6 tests
tests/tcg/mips: Group MSA tests
.../user/ase/msa/test_msa_group_bit_count.c | 82 +++++
.../user/ase/msa/test_msa_group_bit_move.c | 76 +++++
.../user/ase/msa/test_msa_group_bit_set.c | 82 +++++
.../ase/msa/test_msa_group_fixed_multiply.c | 82 +++++
.../ase/msa/test_msa_group_float_max_min.c | 58 ++++
.../user/ase/msa/test_msa_group_int_add.c | 166 ++++++++++
.../user/ase/msa/test_msa_group_int_average.c | 106 +++++++
.../user/ase/msa/test_msa_group_int_compare.c | 130 ++++++++
.../user/ase/msa/test_msa_group_int_div_mod.c | 106 +++++++
.../ase/msa/test_msa_group_int_dot_product.c | 118 +++++++
.../user/ase/msa/test_msa_group_int_max_min.c | 154 +++++++++
.../ase/msa/test_msa_group_int_multiply.c | 82 +++++
.../ase/msa/test_msa_group_int_subtract.c | 214 +++++++++++++
.../user/ase/msa/test_msa_group_interleave.c | 106 +++++++
.../mips/user/ase/msa/test_msa_group_logic.c | 40 +++
.../mips/user/ase/msa/test_msa_group_pack.c | 82 +++++
.../mips/user/ase/msa/test_msa_group_shift.c | 130 ++++++++
tests/tcg/mips64/test_mips64r6_bitops.c | 46 +++
tests/tcg/mips64/test_mips64r6_crc.c | 58 ++++
tests/tcg/mips64/test_mips64r6_logic.c | 34 ++
tests/tcg/mips64/test_mips64r6_multiply.c | 58 ++++
tests/tcg/mips64/test_mips64r6_shift.c | 46 +++
tests/tcg/mipsel/test_dsp_acc.c | 105 +++++++
tests/tcg/mipsel/test_dsp_arith.c | 175 +++++++++++
tests/tcg/mipsel/test_dsp_cmp.c | 80 +++++
tests/tcg/mipsel/test_dsp_ctrl.c | 40 +++
tests/tcg/mipsel/test_dsp_dot.c | 150 +++++++++
tests/tcg/mipsel/test_dsp_mul.c | 60 ++++
tests/tcg/mipsel/test_dsp_pack.c | 145 +++++++++
tests/tcg/mipsel/test_dsp_r1_absq_s_ph.c | 2 +
tests/tcg/mipsel/test_dsp_r1_absq_s_w.c | 2 +
tests/tcg/mipsel/test_dsp_r1_addq_ph.c | 2 +
tests/tcg/mipsel/test_dsp_r1_addq_s_ph.c | 2 +
tests/tcg/mipsel/test_dsp_r1_addq_s_w.c | 2 +
tests/tcg/mipsel/test_dsp_r1_addsc.c | 2 +
tests/tcg/mipsel/test_dsp_r1_addu_qb.c | 2 +
tests/tcg/mipsel/test_dsp_r1_addu_s_qb.c | 2 +
tests/tcg/mipsel/test_dsp_r1_addwc.c | 2 +
tests/tcg/mipsel/test_dsp_r1_bitrev.c | 2 +
tests/tcg/mipsel/test_dsp_r1_bposge32.c | 2 +
tests/tcg/mipsel/test_dsp_r1_cmp_eq_ph.c | 2 +
tests/tcg/mipsel/test_dsp_r1_cmp_le_ph.c | 2 +
tests/tcg/mipsel/test_dsp_r1_cmp_lt_ph.c | 2 +
tests/tcg/mipsel/test_dsp_r1_cmpgu_eq_qb.c | 2 +
tests/tcg/mipsel/test_dsp_r1_cmpgu_le_qb.c | 2 +
tests/tcg/mipsel/test_dsp_r1_cmpgu_lt_qb.c | 2 +
tests/tcg/mipsel/test_dsp_r1_cmpu_eq_qb.c | 2 +
tests/tcg/mipsel/test_dsp_r1_cmpu_le_qb.c | 2 +
tests/tcg/mipsel/test_dsp_r1_cmpu_lt_qb.c | 2 +
tests/tcg/mipsel/test_dsp_r1_dpaq_s_w_ph.c | 2 +
tests/tcg/mipsel/test_dsp_r1_dpaq_sa_l_w.c | 2 +
tests/tcg/mipsel/test_dsp_r1_dpau_h_qbl.c | 2 +
tests/tcg/mipsel/test_dsp_r1_dpau_h_qbr.c | 2 +
tests/tcg/mipsel/test_dsp_r1_dpsq_s_w_ph.c | 2 +
tests/tcg/mipsel/test_dsp_r1_dpsq_sa_l_w.c | 2 +
tests/tcg/mipsel/test_dsp_r1_dpsu_h_qbl.c | 2 +
tests/tcg/mipsel/test_dsp_r1_dpsu_h_qbr.c | 2 +
tests/tcg/mipsel/test_dsp_r1_extp.c | 2 +
tests/tcg/mipsel/test_dsp_r1_extpdp.c | 2 +
tests/tcg/mipsel/test_dsp_r1_extpdpv.c | 2 +
tests/tcg/mipsel/test_dsp_r1_extpv.c | 2 +
tests/tcg/mipsel/test_dsp_r1_extr_r_w.c | 2 +
tests/tcg/mipsel/test_dsp_r1_extr_rs_w.c | 2 +
tests/tcg/mipsel/test_dsp_r1_extr_s_h.c | 2 +
tests/tcg/mipsel/test_dsp_r1_extr_w.c | 2 +
tests/tcg/mipsel/test_dsp_r1_extrv_r_w.c | 2 +
tests/tcg/mipsel/test_dsp_r1_extrv_rs_w.c | 2 +
tests/tcg/mipsel/test_dsp_r1_extrv_s_h.c | 2 +
tests/tcg/mipsel/test_dsp_r1_extrv_w.c | 2 +
tests/tcg/mipsel/test_dsp_r1_insv.c | 2 +
tests/tcg/mipsel/test_dsp_r1_lbux.c | 2 +
tests/tcg/mipsel/test_dsp_r1_lhx.c | 2 +
tests/tcg/mipsel/test_dsp_r1_lwx.c | 2 +
tests/tcg/mipsel/test_dsp_r1_madd.c | 2 +
tests/tcg/mipsel/test_dsp_r1_maddu.c | 2 +
tests/tcg/mipsel/test_dsp_r1_main.c | 6 -
tests/tcg/mipsel/test_dsp_r1_maq_s_w_phl.c | 2 +
tests/tcg/mipsel/test_dsp_r1_maq_s_w_phr.c | 2 +
tests/tcg/mipsel/test_dsp_r1_maq_sa_w_phl.c | 2 +
tests/tcg/mipsel/test_dsp_r1_maq_sa_w_phr.c | 2 +
tests/tcg/mipsel/test_dsp_r1_mfhi.c | 2 +
tests/tcg/mipsel/test_dsp_r1_mflo.c | 2 +
tests/tcg/mipsel/test_dsp_r1_modsub.c | 2 +
tests/tcg/mipsel/test_dsp_r1_msub.c | 2 +
tests/tcg/mipsel/test_dsp_r1_msubu.c | 2 +
tests/tcg/mipsel/test_dsp_r1_mthi.c | 2 +
tests/tcg/mipsel/test_dsp_r1_mthlip.c | 2 +
tests/tcg/mipsel/test_dsp_r1_mtlo.c | 2 +
tests/tcg/mipsel/test_dsp_r1_muleq_s_w_phl.c | 2 +
tests/tcg/mipsel/test_dsp_r1_muleq_s_w_phr.c | 2 +
tests/tcg/mipsel/test_dsp_r1_muleu_s_ph_qbl.c | 2 +
tests/tcg/mipsel/test_dsp_r1_muleu_s_ph_qbr.c | 2 +
tests/tcg/mipsel/test_dsp_r1_mulq_rs_ph.c | 2 +
tests/tcg/mipsel/test_dsp_r1_mult.c | 2 +
tests/tcg/mipsel/test_dsp_r1_multu.c | 2 +
tests/tcg/mipsel/test_dsp_r1_packrl_ph.c | 2 +
tests/tcg/mipsel/test_dsp_r1_pick_ph.c | 2 +
tests/tcg/mipsel/test_dsp_r1_pick_qb.c | 2 +
tests/tcg/mipsel/test_dsp_r1_preceq_w_phl.c | 2 +
tests/tcg/mipsel/test_dsp_r1_preceq_w_phr.c | 2 +
tests/tcg/mipsel/test_dsp_r1_precequ_ph_qbl.c | 2 +
.../tcg/mipsel/test_dsp_r1_precequ_ph_qbla.c | 2 +
tests/tcg/mipsel/test_dsp_r1_precequ_ph_qbr.c | 2 +
.../tcg/mipsel/test_dsp_r1_precequ_ph_qbra.c | 2 +
tests/tcg/mipsel/test_dsp_r1_preceu_ph_qbl.c | 2 +
tests/tcg/mipsel/test_dsp_r1_preceu_ph_qbla.c | 2 +
tests/tcg/mipsel/test_dsp_r1_preceu_ph_qbr.c | 2 +
tests/tcg/mipsel/test_dsp_r1_preceu_ph_qbra.c | 2 +
tests/tcg/mipsel/test_dsp_r1_precrq_ph_w.c | 2 +
tests/tcg/mipsel/test_dsp_r1_precrq_qb_ph.c | 2 +
tests/tcg/mipsel/test_dsp_r1_precrq_rs_ph_w.c | 2 +
.../tcg/mipsel/test_dsp_r1_precrqu_s_qb_ph.c | 2 +
tests/tcg/mipsel/test_dsp_r1_raddu_w_qb.c | 2 +
tests/tcg/mipsel/test_dsp_r1_rddsp.c | 2 +
tests/tcg/mipsel/test_dsp_r1_repl_ph.c | 2 +
tests/tcg/mipsel/test_dsp_r1_repl_qb.c | 2 +
tests/tcg/mipsel/test_dsp_r1_replv_ph.c | 2 +
tests/tcg/mipsel/test_dsp_r1_replv_qb.c | 2 +
tests/tcg/mipsel/test_dsp_r1_shilo.c | 2 +
tests/tcg/mipsel/test_dsp_r1_shilov.c | 2 +
tests/tcg/mipsel/test_dsp_r1_shll_ph.c | 2 +
tests/tcg/mipsel/test_dsp_r1_shll_qb.c | 2 +
tests/tcg/mipsel/test_dsp_r1_shll_s_ph.c | 2 +
tests/tcg/mipsel/test_dsp_r1_shll_s_w.c | 2 +
tests/tcg/mipsel/test_dsp_r1_shllv_ph.c | 2 +
tests/tcg/mipsel/test_dsp_r1_shllv_qb.c | 2 +
tests/tcg/mipsel/test_dsp_r1_shllv_s_ph.c | 2 +
tests/tcg/mipsel/test_dsp_r1_shllv_s_w.c | 2 +
tests/tcg/mipsel/test_dsp_r1_shra_ph.c | 2 +
tests/tcg/mipsel/test_dsp_r1_shra_r_ph.c | 2 +
tests/tcg/mipsel/test_dsp_r1_shra_r_w.c | 2 +
tests/tcg/mipsel/test_dsp_r1_shrav_ph.c | 2 +
tests/tcg/mipsel/test_dsp_r1_shrav_r_ph.c | 2 +
tests/tcg/mipsel/test_dsp_r1_shrav_r_w.c | 2 +
tests/tcg/mipsel/test_dsp_r1_shrl_qb.c | 2 +
tests/tcg/mipsel/test_dsp_r1_shrlv_qb.c | 2 +
tests/tcg/mipsel/test_dsp_r1_subq_ph.c | 2 +
tests/tcg/mipsel/test_dsp_r1_subq_s_ph.c | 2 +
tests/tcg/mipsel/test_dsp_r1_subq_s_w.c | 2 +
tests/tcg/mipsel/test_dsp_r1_subu_qb.c | 2 +
tests/tcg/mipsel/test_dsp_r1_subu_s_qb.c | 2 +
tests/tcg/mipsel/test_dsp_r1_wrdsp.c | 2 +
tests/tcg/mipsel/test_dsp_r2_absq_s_qb.c | 2 +
tests/tcg/mipsel/test_dsp_r2_addqh_ph.c | 2 +
tests/tcg/mipsel/test_dsp_r2_addqh_r_ph.c | 2 +
tests/tcg/mipsel/test_dsp_r2_addqh_r_w.c | 2 +
tests/tcg/mipsel/test_dsp_r2_addqh_w.c | 2 +
tests/tcg/mipsel/test_dsp_r2_addu_ph.c | 2 +
tests/tcg/mipsel/test_dsp_r2_addu_s_ph.c | 2 +
tests/tcg/mipsel/test_dsp_r2_adduh_qb.c | 2 +
tests/tcg/mipsel/test_dsp_r2_adduh_r_qb.c | 2 +
tests/tcg/mipsel/test_dsp_r2_append.c | 2 +
tests/tcg/mipsel/test_dsp_r2_balign.c | 2 +
tests/tcg/mipsel/test_dsp_r2_cmpgdu_eq_qb.c | 2 +
tests/tcg/mipsel/test_dsp_r2_cmpgdu_le_qb.c | 2 +
tests/tcg/mipsel/test_dsp_r2_cmpgdu_lt_qb.c | 2 +
tests/tcg/mipsel/test_dsp_r2_dpa_w_ph.c | 2 +
tests/tcg/mipsel/test_dsp_r2_dpaqx_s_w_ph.c | 2 +
tests/tcg/mipsel/test_dsp_r2_dpaqx_sa_w_ph.c | 2 +
tests/tcg/mipsel/test_dsp_r2_dpax_w_ph.c | 2 +
tests/tcg/mipsel/test_dsp_r2_dps_w_ph.c | 2 +
tests/tcg/mipsel/test_dsp_r2_dpsqx_s_w_ph.c | 2 +
tests/tcg/mipsel/test_dsp_r2_dpsqx_sa_w_ph.c | 2 +
tests/tcg/mipsel/test_dsp_r2_dpsx_w_ph.c | 2 +
tests/tcg/mipsel/test_dsp_r2_mul_ph.c | 2 +
tests/tcg/mipsel/test_dsp_r2_mul_s_ph.c | 2 +
tests/tcg/mipsel/test_dsp_r2_mulq_rs_w.c | 2 +
tests/tcg/mipsel/test_dsp_r2_mulq_s_ph.c | 2 +
tests/tcg/mipsel/test_dsp_r2_mulq_s_w.c | 2 +
tests/tcg/mipsel/test_dsp_r2_mulsa_w_ph.c | 2 +
tests/tcg/mipsel/test_dsp_r2_mulsaq_s_w_ph.c | 2 +
tests/tcg/mipsel/test_dsp_r2_precr_qb_ph.c | 2 +
tests/tcg/mipsel/test_dsp_r2_precr_sra_ph_w.c | 2 +
.../tcg/mipsel/test_dsp_r2_precr_sra_r_ph_w.c | 2 +
tests/tcg/mipsel/test_dsp_r2_prepend.c | 2 +
tests/tcg/mipsel/test_dsp_r2_shra_qb.c | 2 +
tests/tcg/mipsel/test_dsp_r2_shra_r_qb.c | 2 +
tests/tcg/mipsel/test_dsp_r2_shrav_qb.c | 2 +
tests/tcg/mipsel/test_dsp_r2_shrav_r_qb.c | 2 +
tests/tcg/mipsel/test_dsp_r2_shrl_ph.c | 2 +
tests/tcg/mipsel/test_dsp_r2_shrlv_ph.c | 2 +
tests/tcg/mipsel/test_dsp_r2_subqh_ph.c | 2 +
tests/tcg/mipsel/test_dsp_r2_subqh_r_ph.c | 2 +
tests/tcg/mipsel/test_dsp_r2_subqh_r_w.c | 2 +
tests/tcg/mipsel/test_dsp_r2_subqh_w.c | 2 +
tests/tcg/mipsel/test_dsp_r2_subu_ph.c | 2 +
tests/tcg/mipsel/test_dsp_r2_subu_s_ph.c | 2 +
tests/tcg/mipsel/test_dsp_r2_subuh_qb.c | 2 +
tests/tcg/mipsel/test_dsp_r2_subuh_r_qb.c | 2 +
tests/tcg/mipsel/test_dsp_shift.c | 120 ++++++++
tests/tcg/mips/meson.build | 291 +-----------------
tests/tcg/mips64/meson.build | 37 +--
tests/tcg/mipsel/meson.build | 168 +---------
193 files changed, 3279 insertions(+), 472 deletions(-)
create mode 100644 tests/tcg/mips/user/ase/msa/test_msa_group_bit_count.c
create mode 100644 tests/tcg/mips/user/ase/msa/test_msa_group_bit_move.c
create mode 100644 tests/tcg/mips/user/ase/msa/test_msa_group_bit_set.c
create mode 100644 tests/tcg/mips/user/ase/msa/test_msa_group_fixed_multiply.c
create mode 100644 tests/tcg/mips/user/ase/msa/test_msa_group_float_max_min.c
create mode 100644 tests/tcg/mips/user/ase/msa/test_msa_group_int_add.c
create mode 100644 tests/tcg/mips/user/ase/msa/test_msa_group_int_average.c
create mode 100644 tests/tcg/mips/user/ase/msa/test_msa_group_int_compare.c
create mode 100644 tests/tcg/mips/user/ase/msa/test_msa_group_int_div_mod.c
create mode 100644 tests/tcg/mips/user/ase/msa/test_msa_group_int_dot_product.c
create mode 100644 tests/tcg/mips/user/ase/msa/test_msa_group_int_max_min.c
create mode 100644 tests/tcg/mips/user/ase/msa/test_msa_group_int_multiply.c
create mode 100644 tests/tcg/mips/user/ase/msa/test_msa_group_int_subtract.c
create mode 100644 tests/tcg/mips/user/ase/msa/test_msa_group_interleave.c
create mode 100644 tests/tcg/mips/user/ase/msa/test_msa_group_logic.c
create mode 100644 tests/tcg/mips/user/ase/msa/test_msa_group_pack.c
create mode 100644 tests/tcg/mips/user/ase/msa/test_msa_group_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
--
2.55.0
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 1/4] tests/tcg/mips: Clear DSPControl at start of DSP tests
2026-10-28 19:21 [PATCH 0/4] tests/tcg: Massage MIPS tests for easier maintenance Philippe Mathieu-Daudé
@ 2026-10-28 19:21 ` Philippe Mathieu-Daudé
2026-10-28 19:21 ` [PATCH 2/4] tests/tcg/mips: Group " Philippe Mathieu-Daudé
` (3 subsequent siblings)
4 siblings, 0 replies; 9+ messages in thread
From: Philippe Mathieu-Daudé @ 2026-10-28 19:21 UTC (permalink / raw)
To: qemu-devel
Cc: Aleksandar Rikalo, Aurelien Jarno, Jiaxun Yang,
Philippe Mathieu-Daudé, Pierrick Bouvier
Some tests check sticky DSPControl flags assuming the register
starts zeroed. Clear it explicitly so tests remain valid when
run in the same process.
Signed-off-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
---
tests/tcg/mipsel/test_dsp_r1_absq_s_ph.c | 2 ++
tests/tcg/mipsel/test_dsp_r1_absq_s_w.c | 2 ++
tests/tcg/mipsel/test_dsp_r1_addq_ph.c | 2 ++
tests/tcg/mipsel/test_dsp_r1_addq_s_ph.c | 2 ++
tests/tcg/mipsel/test_dsp_r1_addq_s_w.c | 2 ++
tests/tcg/mipsel/test_dsp_r1_addsc.c | 2 ++
tests/tcg/mipsel/test_dsp_r1_addu_qb.c | 2 ++
tests/tcg/mipsel/test_dsp_r1_addu_s_qb.c | 2 ++
tests/tcg/mipsel/test_dsp_r1_addwc.c | 2 ++
tests/tcg/mipsel/test_dsp_r1_bitrev.c | 2 ++
tests/tcg/mipsel/test_dsp_r1_bposge32.c | 2 ++
tests/tcg/mipsel/test_dsp_r1_cmp_eq_ph.c | 2 ++
tests/tcg/mipsel/test_dsp_r1_cmp_le_ph.c | 2 ++
tests/tcg/mipsel/test_dsp_r1_cmp_lt_ph.c | 2 ++
tests/tcg/mipsel/test_dsp_r1_cmpgu_eq_qb.c | 2 ++
tests/tcg/mipsel/test_dsp_r1_cmpgu_le_qb.c | 2 ++
tests/tcg/mipsel/test_dsp_r1_cmpgu_lt_qb.c | 2 ++
tests/tcg/mipsel/test_dsp_r1_cmpu_eq_qb.c | 2 ++
tests/tcg/mipsel/test_dsp_r1_cmpu_le_qb.c | 2 ++
tests/tcg/mipsel/test_dsp_r1_cmpu_lt_qb.c | 2 ++
tests/tcg/mipsel/test_dsp_r1_dpaq_s_w_ph.c | 2 ++
tests/tcg/mipsel/test_dsp_r1_dpaq_sa_l_w.c | 2 ++
tests/tcg/mipsel/test_dsp_r1_dpau_h_qbl.c | 2 ++
tests/tcg/mipsel/test_dsp_r1_dpau_h_qbr.c | 2 ++
tests/tcg/mipsel/test_dsp_r1_dpsq_s_w_ph.c | 2 ++
tests/tcg/mipsel/test_dsp_r1_dpsq_sa_l_w.c | 2 ++
tests/tcg/mipsel/test_dsp_r1_dpsu_h_qbl.c | 2 ++
tests/tcg/mipsel/test_dsp_r1_dpsu_h_qbr.c | 2 ++
tests/tcg/mipsel/test_dsp_r1_extp.c | 2 ++
tests/tcg/mipsel/test_dsp_r1_extpdp.c | 2 ++
tests/tcg/mipsel/test_dsp_r1_extpdpv.c | 2 ++
tests/tcg/mipsel/test_dsp_r1_extpv.c | 2 ++
tests/tcg/mipsel/test_dsp_r1_extr_r_w.c | 2 ++
tests/tcg/mipsel/test_dsp_r1_extr_rs_w.c | 2 ++
tests/tcg/mipsel/test_dsp_r1_extr_s_h.c | 2 ++
tests/tcg/mipsel/test_dsp_r1_extr_w.c | 2 ++
tests/tcg/mipsel/test_dsp_r1_extrv_r_w.c | 2 ++
tests/tcg/mipsel/test_dsp_r1_extrv_rs_w.c | 2 ++
tests/tcg/mipsel/test_dsp_r1_extrv_s_h.c | 2 ++
tests/tcg/mipsel/test_dsp_r1_extrv_w.c | 2 ++
tests/tcg/mipsel/test_dsp_r1_insv.c | 2 ++
tests/tcg/mipsel/test_dsp_r1_lbux.c | 2 ++
tests/tcg/mipsel/test_dsp_r1_lhx.c | 2 ++
tests/tcg/mipsel/test_dsp_r1_lwx.c | 2 ++
tests/tcg/mipsel/test_dsp_r1_madd.c | 2 ++
tests/tcg/mipsel/test_dsp_r1_maddu.c | 2 ++
tests/tcg/mipsel/test_dsp_r1_maq_s_w_phl.c | 2 ++
tests/tcg/mipsel/test_dsp_r1_maq_s_w_phr.c | 2 ++
tests/tcg/mipsel/test_dsp_r1_maq_sa_w_phl.c | 2 ++
tests/tcg/mipsel/test_dsp_r1_maq_sa_w_phr.c | 2 ++
tests/tcg/mipsel/test_dsp_r1_mfhi.c | 2 ++
tests/tcg/mipsel/test_dsp_r1_mflo.c | 2 ++
tests/tcg/mipsel/test_dsp_r1_modsub.c | 2 ++
tests/tcg/mipsel/test_dsp_r1_msub.c | 2 ++
tests/tcg/mipsel/test_dsp_r1_msubu.c | 2 ++
tests/tcg/mipsel/test_dsp_r1_mthi.c | 2 ++
tests/tcg/mipsel/test_dsp_r1_mthlip.c | 2 ++
tests/tcg/mipsel/test_dsp_r1_mtlo.c | 2 ++
tests/tcg/mipsel/test_dsp_r1_muleq_s_w_phl.c | 2 ++
tests/tcg/mipsel/test_dsp_r1_muleq_s_w_phr.c | 2 ++
tests/tcg/mipsel/test_dsp_r1_muleu_s_ph_qbl.c | 2 ++
tests/tcg/mipsel/test_dsp_r1_muleu_s_ph_qbr.c | 2 ++
tests/tcg/mipsel/test_dsp_r1_mulq_rs_ph.c | 2 ++
tests/tcg/mipsel/test_dsp_r1_mult.c | 2 ++
tests/tcg/mipsel/test_dsp_r1_multu.c | 2 ++
tests/tcg/mipsel/test_dsp_r1_packrl_ph.c | 2 ++
tests/tcg/mipsel/test_dsp_r1_pick_ph.c | 2 ++
tests/tcg/mipsel/test_dsp_r1_pick_qb.c | 2 ++
tests/tcg/mipsel/test_dsp_r1_preceq_w_phl.c | 2 ++
tests/tcg/mipsel/test_dsp_r1_preceq_w_phr.c | 2 ++
tests/tcg/mipsel/test_dsp_r1_precequ_ph_qbl.c | 2 ++
tests/tcg/mipsel/test_dsp_r1_precequ_ph_qbla.c | 2 ++
tests/tcg/mipsel/test_dsp_r1_precequ_ph_qbr.c | 2 ++
tests/tcg/mipsel/test_dsp_r1_precequ_ph_qbra.c | 2 ++
tests/tcg/mipsel/test_dsp_r1_preceu_ph_qbl.c | 2 ++
tests/tcg/mipsel/test_dsp_r1_preceu_ph_qbla.c | 2 ++
tests/tcg/mipsel/test_dsp_r1_preceu_ph_qbr.c | 2 ++
tests/tcg/mipsel/test_dsp_r1_preceu_ph_qbra.c | 2 ++
tests/tcg/mipsel/test_dsp_r1_precrq_ph_w.c | 2 ++
tests/tcg/mipsel/test_dsp_r1_precrq_qb_ph.c | 2 ++
tests/tcg/mipsel/test_dsp_r1_precrq_rs_ph_w.c | 2 ++
tests/tcg/mipsel/test_dsp_r1_precrqu_s_qb_ph.c | 2 ++
tests/tcg/mipsel/test_dsp_r1_raddu_w_qb.c | 2 ++
tests/tcg/mipsel/test_dsp_r1_rddsp.c | 2 ++
tests/tcg/mipsel/test_dsp_r1_repl_ph.c | 2 ++
tests/tcg/mipsel/test_dsp_r1_repl_qb.c | 2 ++
tests/tcg/mipsel/test_dsp_r1_replv_ph.c | 2 ++
tests/tcg/mipsel/test_dsp_r1_replv_qb.c | 2 ++
tests/tcg/mipsel/test_dsp_r1_shilo.c | 2 ++
tests/tcg/mipsel/test_dsp_r1_shilov.c | 2 ++
tests/tcg/mipsel/test_dsp_r1_shll_ph.c | 2 ++
tests/tcg/mipsel/test_dsp_r1_shll_qb.c | 2 ++
tests/tcg/mipsel/test_dsp_r1_shll_s_ph.c | 2 ++
tests/tcg/mipsel/test_dsp_r1_shll_s_w.c | 2 ++
tests/tcg/mipsel/test_dsp_r1_shllv_ph.c | 2 ++
tests/tcg/mipsel/test_dsp_r1_shllv_qb.c | 2 ++
tests/tcg/mipsel/test_dsp_r1_shllv_s_ph.c | 2 ++
tests/tcg/mipsel/test_dsp_r1_shllv_s_w.c | 2 ++
tests/tcg/mipsel/test_dsp_r1_shra_ph.c | 2 ++
tests/tcg/mipsel/test_dsp_r1_shra_r_ph.c | 2 ++
tests/tcg/mipsel/test_dsp_r1_shra_r_w.c | 2 ++
tests/tcg/mipsel/test_dsp_r1_shrav_ph.c | 2 ++
tests/tcg/mipsel/test_dsp_r1_shrav_r_ph.c | 2 ++
tests/tcg/mipsel/test_dsp_r1_shrav_r_w.c | 2 ++
tests/tcg/mipsel/test_dsp_r1_shrl_qb.c | 2 ++
tests/tcg/mipsel/test_dsp_r1_shrlv_qb.c | 2 ++
tests/tcg/mipsel/test_dsp_r1_subq_ph.c | 2 ++
tests/tcg/mipsel/test_dsp_r1_subq_s_ph.c | 2 ++
tests/tcg/mipsel/test_dsp_r1_subq_s_w.c | 2 ++
tests/tcg/mipsel/test_dsp_r1_subu_qb.c | 2 ++
tests/tcg/mipsel/test_dsp_r1_subu_s_qb.c | 2 ++
tests/tcg/mipsel/test_dsp_r1_wrdsp.c | 2 ++
tests/tcg/mipsel/test_dsp_r2_absq_s_qb.c | 2 ++
tests/tcg/mipsel/test_dsp_r2_addqh_ph.c | 2 ++
tests/tcg/mipsel/test_dsp_r2_addqh_r_ph.c | 2 ++
tests/tcg/mipsel/test_dsp_r2_addqh_r_w.c | 2 ++
tests/tcg/mipsel/test_dsp_r2_addqh_w.c | 2 ++
tests/tcg/mipsel/test_dsp_r2_addu_ph.c | 2 ++
tests/tcg/mipsel/test_dsp_r2_addu_s_ph.c | 2 ++
tests/tcg/mipsel/test_dsp_r2_adduh_qb.c | 2 ++
tests/tcg/mipsel/test_dsp_r2_adduh_r_qb.c | 2 ++
tests/tcg/mipsel/test_dsp_r2_append.c | 2 ++
tests/tcg/mipsel/test_dsp_r2_balign.c | 2 ++
tests/tcg/mipsel/test_dsp_r2_cmpgdu_eq_qb.c | 2 ++
tests/tcg/mipsel/test_dsp_r2_cmpgdu_le_qb.c | 2 ++
tests/tcg/mipsel/test_dsp_r2_cmpgdu_lt_qb.c | 2 ++
tests/tcg/mipsel/test_dsp_r2_dpa_w_ph.c | 2 ++
tests/tcg/mipsel/test_dsp_r2_dpaqx_s_w_ph.c | 2 ++
tests/tcg/mipsel/test_dsp_r2_dpaqx_sa_w_ph.c | 2 ++
tests/tcg/mipsel/test_dsp_r2_dpax_w_ph.c | 2 ++
tests/tcg/mipsel/test_dsp_r2_dps_w_ph.c | 2 ++
tests/tcg/mipsel/test_dsp_r2_dpsqx_s_w_ph.c | 2 ++
tests/tcg/mipsel/test_dsp_r2_dpsqx_sa_w_ph.c | 2 ++
tests/tcg/mipsel/test_dsp_r2_dpsx_w_ph.c | 2 ++
tests/tcg/mipsel/test_dsp_r2_mul_ph.c | 2 ++
tests/tcg/mipsel/test_dsp_r2_mul_s_ph.c | 2 ++
tests/tcg/mipsel/test_dsp_r2_mulq_rs_w.c | 2 ++
tests/tcg/mipsel/test_dsp_r2_mulq_s_ph.c | 2 ++
tests/tcg/mipsel/test_dsp_r2_mulq_s_w.c | 2 ++
tests/tcg/mipsel/test_dsp_r2_mulsa_w_ph.c | 2 ++
tests/tcg/mipsel/test_dsp_r2_mulsaq_s_w_ph.c | 2 ++
tests/tcg/mipsel/test_dsp_r2_precr_qb_ph.c | 2 ++
tests/tcg/mipsel/test_dsp_r2_precr_sra_ph_w.c | 2 ++
tests/tcg/mipsel/test_dsp_r2_precr_sra_r_ph_w.c | 2 ++
tests/tcg/mipsel/test_dsp_r2_prepend.c | 2 ++
tests/tcg/mipsel/test_dsp_r2_shra_qb.c | 2 ++
tests/tcg/mipsel/test_dsp_r2_shra_r_qb.c | 2 ++
tests/tcg/mipsel/test_dsp_r2_shrav_qb.c | 2 ++
tests/tcg/mipsel/test_dsp_r2_shrav_r_qb.c | 2 ++
tests/tcg/mipsel/test_dsp_r2_shrl_ph.c | 2 ++
tests/tcg/mipsel/test_dsp_r2_shrlv_ph.c | 2 ++
tests/tcg/mipsel/test_dsp_r2_subqh_ph.c | 2 ++
tests/tcg/mipsel/test_dsp_r2_subqh_r_ph.c | 2 ++
tests/tcg/mipsel/test_dsp_r2_subqh_r_w.c | 2 ++
tests/tcg/mipsel/test_dsp_r2_subqh_w.c | 2 ++
tests/tcg/mipsel/test_dsp_r2_subu_ph.c | 2 ++
tests/tcg/mipsel/test_dsp_r2_subu_s_ph.c | 2 ++
tests/tcg/mipsel/test_dsp_r2_subuh_qb.c | 2 ++
tests/tcg/mipsel/test_dsp_r2_subuh_r_qb.c | 2 ++
159 files changed, 318 insertions(+)
diff --git a/tests/tcg/mipsel/test_dsp_r1_absq_s_ph.c b/tests/tcg/mipsel/test_dsp_r1_absq_s_ph.c
index aa8411202e20..6f85ae493bdd 100644
--- a/tests/tcg/mipsel/test_dsp_r1_absq_s_ph.c
+++ b/tests/tcg/mipsel/test_dsp_r1_absq_s_ph.c
@@ -7,6 +7,8 @@ int main()
int rd, rt;
int result;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rt = 0x10017EFD;
result = 0x10017EFD;
diff --git a/tests/tcg/mipsel/test_dsp_r1_absq_s_w.c b/tests/tcg/mipsel/test_dsp_r1_absq_s_w.c
index 3f52a48039cd..3e96dec3159d 100644
--- a/tests/tcg/mipsel/test_dsp_r1_absq_s_w.c
+++ b/tests/tcg/mipsel/test_dsp_r1_absq_s_w.c
@@ -6,6 +6,8 @@ int main()
int rd, rt;
int result;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rt = 0x80000000;
result = 0x7FFFFFFF;
__asm
diff --git a/tests/tcg/mipsel/test_dsp_r1_addq_ph.c b/tests/tcg/mipsel/test_dsp_r1_addq_ph.c
index 96a549637b41..0b8f7e893e89 100644
--- a/tests/tcg/mipsel/test_dsp_r1_addq_ph.c
+++ b/tests/tcg/mipsel/test_dsp_r1_addq_ph.c
@@ -7,6 +7,8 @@ int main()
int dsp;
int result;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rs = 0xFFFFFFFF;
rt = 0x10101010;
result = 0x100F100F;
diff --git a/tests/tcg/mipsel/test_dsp_r1_addq_s_ph.c b/tests/tcg/mipsel/test_dsp_r1_addq_s_ph.c
index 5f865f6cffd5..0846634d4926 100644
--- a/tests/tcg/mipsel/test_dsp_r1_addq_s_ph.c
+++ b/tests/tcg/mipsel/test_dsp_r1_addq_s_ph.c
@@ -7,6 +7,8 @@ int main()
int dsp;
int result;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rs = 0xFFFFFFFF;
rt = 0x10101010;
result = 0x100F100F;
diff --git a/tests/tcg/mipsel/test_dsp_r1_addq_s_w.c b/tests/tcg/mipsel/test_dsp_r1_addq_s_w.c
index 1e13acf68fb9..4bdc59a6c9a9 100644
--- a/tests/tcg/mipsel/test_dsp_r1_addq_s_w.c
+++ b/tests/tcg/mipsel/test_dsp_r1_addq_s_w.c
@@ -7,6 +7,8 @@ int main()
int rd, rs, rt;
int result;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rt = 0x10017EFD;
rs = 0x11111111;
result = 0x2112900e;
diff --git a/tests/tcg/mipsel/test_dsp_r1_addsc.c b/tests/tcg/mipsel/test_dsp_r1_addsc.c
index ace749f667c4..90361cd836fd 100644
--- a/tests/tcg/mipsel/test_dsp_r1_addsc.c
+++ b/tests/tcg/mipsel/test_dsp_r1_addsc.c
@@ -7,6 +7,8 @@ int main()
int dsp;
int result;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rs = 0x0000000F;
rt = 0x00000001;
result = 0x00000010;
diff --git a/tests/tcg/mipsel/test_dsp_r1_addu_qb.c b/tests/tcg/mipsel/test_dsp_r1_addu_qb.c
index 23ba2e90d1c9..c82d15c41a6a 100644
--- a/tests/tcg/mipsel/test_dsp_r1_addu_qb.c
+++ b/tests/tcg/mipsel/test_dsp_r1_addu_qb.c
@@ -7,6 +7,8 @@ int main()
int dsp;
int result;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rs = 0x00FF00FF;
rt = 0x00010001;
result = 0x00000000;
diff --git a/tests/tcg/mipsel/test_dsp_r1_addu_s_qb.c b/tests/tcg/mipsel/test_dsp_r1_addu_s_qb.c
index fe7fd3e6aa2d..91de186fad6b 100644
--- a/tests/tcg/mipsel/test_dsp_r1_addu_s_qb.c
+++ b/tests/tcg/mipsel/test_dsp_r1_addu_s_qb.c
@@ -7,6 +7,8 @@ int main()
int dsp;
int result;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rs = 0x10FF01FF;
rt = 0x10010001;
result = 0x20FF01FF;
diff --git a/tests/tcg/mipsel/test_dsp_r1_addwc.c b/tests/tcg/mipsel/test_dsp_r1_addwc.c
index 8a8d81fab4ca..77ac3381bde9 100644
--- a/tests/tcg/mipsel/test_dsp_r1_addwc.c
+++ b/tests/tcg/mipsel/test_dsp_r1_addwc.c
@@ -7,6 +7,8 @@ int main()
int dspi, dspo;
int result;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rs = 0x10FF01FF;
rt = 0x10010001;
dspi = 0x00002000;
diff --git a/tests/tcg/mipsel/test_dsp_r1_bitrev.c b/tests/tcg/mipsel/test_dsp_r1_bitrev.c
index 04d8a3844eb8..3ece5c9f2c82 100644
--- a/tests/tcg/mipsel/test_dsp_r1_bitrev.c
+++ b/tests/tcg/mipsel/test_dsp_r1_bitrev.c
@@ -6,6 +6,8 @@ int main()
int rd, rt;
int result;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rt = 0x12345678;
result = 0x00001E6A;
diff --git a/tests/tcg/mipsel/test_dsp_r1_bposge32.c b/tests/tcg/mipsel/test_dsp_r1_bposge32.c
index d25417ea77b2..6e9f5f28b2ca 100644
--- a/tests/tcg/mipsel/test_dsp_r1_bposge32.c
+++ b/tests/tcg/mipsel/test_dsp_r1_bposge32.c
@@ -6,6 +6,8 @@ int main()
int dsp, sum;
int result;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
dsp = 0x20;
sum = 0x01;
result = 0x02;
diff --git a/tests/tcg/mipsel/test_dsp_r1_cmp_eq_ph.c b/tests/tcg/mipsel/test_dsp_r1_cmp_eq_ph.c
index 957bd88ce01f..378bf17213a2 100644
--- a/tests/tcg/mipsel/test_dsp_r1_cmp_eq_ph.c
+++ b/tests/tcg/mipsel/test_dsp_r1_cmp_eq_ph.c
@@ -6,6 +6,8 @@ int main()
int rd, rs, rt;
int result;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rs = 0x11777066;
rt = 0x55AA33FF;
result = 0x00;
diff --git a/tests/tcg/mipsel/test_dsp_r1_cmp_le_ph.c b/tests/tcg/mipsel/test_dsp_r1_cmp_le_ph.c
index 356f156c5d1f..d42bc4a54df3 100644
--- a/tests/tcg/mipsel/test_dsp_r1_cmp_le_ph.c
+++ b/tests/tcg/mipsel/test_dsp_r1_cmp_le_ph.c
@@ -6,6 +6,8 @@ int main()
int rd, rs, rt;
int result;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rs = 0x11777066;
rt = 0x55AA33FF;
result = 0x02;
diff --git a/tests/tcg/mipsel/test_dsp_r1_cmp_lt_ph.c b/tests/tcg/mipsel/test_dsp_r1_cmp_lt_ph.c
index 3fb4827ad761..dd85601decbe 100644
--- a/tests/tcg/mipsel/test_dsp_r1_cmp_lt_ph.c
+++ b/tests/tcg/mipsel/test_dsp_r1_cmp_lt_ph.c
@@ -6,6 +6,8 @@ int main()
int rd, rs, rt;
int result;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rs = 0x11777066;
rt = 0x55AA33FF;
result = 0x02;
diff --git a/tests/tcg/mipsel/test_dsp_r1_cmpgu_eq_qb.c b/tests/tcg/mipsel/test_dsp_r1_cmpgu_eq_qb.c
index 2615c84c75c7..28c8ff4de27e 100644
--- a/tests/tcg/mipsel/test_dsp_r1_cmpgu_eq_qb.c
+++ b/tests/tcg/mipsel/test_dsp_r1_cmpgu_eq_qb.c
@@ -6,6 +6,8 @@ int main()
int rd, rs, rt;
int result;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rs = 0x11777066;
rt = 0x55AA70FF;
result = 0x02;
diff --git a/tests/tcg/mipsel/test_dsp_r1_cmpgu_le_qb.c b/tests/tcg/mipsel/test_dsp_r1_cmpgu_le_qb.c
index 65d0813c3b19..5bcd20782889 100644
--- a/tests/tcg/mipsel/test_dsp_r1_cmpgu_le_qb.c
+++ b/tests/tcg/mipsel/test_dsp_r1_cmpgu_le_qb.c
@@ -6,6 +6,8 @@ int main()
int rd, rs, rt;
int result;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rs = 0x11777066;
rt = 0x55AA70FF;
result = 0x0F;
diff --git a/tests/tcg/mipsel/test_dsp_r1_cmpgu_lt_qb.c b/tests/tcg/mipsel/test_dsp_r1_cmpgu_lt_qb.c
index 7dddad98532c..fa7ae80051b4 100644
--- a/tests/tcg/mipsel/test_dsp_r1_cmpgu_lt_qb.c
+++ b/tests/tcg/mipsel/test_dsp_r1_cmpgu_lt_qb.c
@@ -6,6 +6,8 @@ int main()
int rd, rs, rt;
int result;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rs = 0x11777066;
rt = 0x55AA70FF;
result = 0x0D;
diff --git a/tests/tcg/mipsel/test_dsp_r1_cmpu_eq_qb.c b/tests/tcg/mipsel/test_dsp_r1_cmpu_eq_qb.c
index 680f2a1999d8..c770a78ca7a0 100644
--- a/tests/tcg/mipsel/test_dsp_r1_cmpu_eq_qb.c
+++ b/tests/tcg/mipsel/test_dsp_r1_cmpu_eq_qb.c
@@ -7,6 +7,8 @@ int main()
int dsp;
int result;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rs = 0x11777066;
rt = 0x55AA70FF;
result = 0x02;
diff --git a/tests/tcg/mipsel/test_dsp_r1_cmpu_le_qb.c b/tests/tcg/mipsel/test_dsp_r1_cmpu_le_qb.c
index 43cfa509ca3c..e107731c494a 100644
--- a/tests/tcg/mipsel/test_dsp_r1_cmpu_le_qb.c
+++ b/tests/tcg/mipsel/test_dsp_r1_cmpu_le_qb.c
@@ -7,6 +7,8 @@ int main()
int dsp;
int result;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rs = 0x11777066;
rt = 0x55AA70FF;
result = 0x0F;
diff --git a/tests/tcg/mipsel/test_dsp_r1_cmpu_lt_qb.c b/tests/tcg/mipsel/test_dsp_r1_cmpu_lt_qb.c
index 074ca5b402de..a1ae33d371d2 100644
--- a/tests/tcg/mipsel/test_dsp_r1_cmpu_lt_qb.c
+++ b/tests/tcg/mipsel/test_dsp_r1_cmpu_lt_qb.c
@@ -7,6 +7,8 @@ int main()
int dsp;
int result;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rs = 0x11777066;
rt = 0x55AA70FF;
result = 0x0D;
diff --git a/tests/tcg/mipsel/test_dsp_r1_dpaq_s_w_ph.c b/tests/tcg/mipsel/test_dsp_r1_dpaq_s_w_ph.c
index a6425b6edc84..9031d7cc2852 100644
--- a/tests/tcg/mipsel/test_dsp_r1_dpaq_s_w_ph.c
+++ b/tests/tcg/mipsel/test_dsp_r1_dpaq_s_w_ph.c
@@ -7,6 +7,8 @@ int main()
int ach = 0, acl = 0;
int resulth, resultl, resultdsp;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rs = 0x800000FF;
rt = 0x80000002;
resulth = 0x00;
diff --git a/tests/tcg/mipsel/test_dsp_r1_dpaq_sa_l_w.c b/tests/tcg/mipsel/test_dsp_r1_dpaq_sa_l_w.c
index cbf900713f33..992513cf4798 100644
--- a/tests/tcg/mipsel/test_dsp_r1_dpaq_sa_l_w.c
+++ b/tests/tcg/mipsel/test_dsp_r1_dpaq_sa_l_w.c
@@ -7,6 +7,8 @@ int main()
int ach = 0, acl = 0;
int resulth, resultl, resultdsp;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rs = 0x80000000;
rt = 0x80000000;
resulth = 0x7FFFFFFF;
diff --git a/tests/tcg/mipsel/test_dsp_r1_dpau_h_qbl.c b/tests/tcg/mipsel/test_dsp_r1_dpau_h_qbl.c
index 6017b5e73ab2..5417db80495e 100644
--- a/tests/tcg/mipsel/test_dsp_r1_dpau_h_qbl.c
+++ b/tests/tcg/mipsel/test_dsp_r1_dpau_h_qbl.c
@@ -7,6 +7,8 @@ int main()
int ach = 5, acl = 3;
int resulth, resultl;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rs = 0x800000FF;
rt = 0x80000002;
resulth = 0x05;
diff --git a/tests/tcg/mipsel/test_dsp_r1_dpau_h_qbr.c b/tests/tcg/mipsel/test_dsp_r1_dpau_h_qbr.c
index e4abb2e2af03..d51372ab768e 100644
--- a/tests/tcg/mipsel/test_dsp_r1_dpau_h_qbr.c
+++ b/tests/tcg/mipsel/test_dsp_r1_dpau_h_qbr.c
@@ -7,6 +7,8 @@ int main()
int ach = 5, acl = 3;
int resulth, resultl;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rs = 0x800000FF;
rt = 0x80000002;
resulth = 0x05;
diff --git a/tests/tcg/mipsel/test_dsp_r1_dpsq_s_w_ph.c b/tests/tcg/mipsel/test_dsp_r1_dpsq_s_w_ph.c
index 74058fe7ecd0..d79b16c3e690 100644
--- a/tests/tcg/mipsel/test_dsp_r1_dpsq_s_w_ph.c
+++ b/tests/tcg/mipsel/test_dsp_r1_dpsq_s_w_ph.c
@@ -7,6 +7,8 @@ int main()
int ach = 5, acl = 5;
int resulth, resultl;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rs = 0xBC0123AD;
rt = 0x01643721;
resulth = 0x00000004;
diff --git a/tests/tcg/mipsel/test_dsp_r1_dpsq_sa_l_w.c b/tests/tcg/mipsel/test_dsp_r1_dpsq_sa_l_w.c
index eda3b14e2be2..fb819c7cde22 100644
--- a/tests/tcg/mipsel/test_dsp_r1_dpsq_sa_l_w.c
+++ b/tests/tcg/mipsel/test_dsp_r1_dpsq_sa_l_w.c
@@ -7,6 +7,8 @@ int main()
int ach = 5, acl = 5;
int resulth, resultl, resultdsp;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rs = 0xBC0123AD;
rt = 0x01643721;
resulth = 0x00BD3A22;
diff --git a/tests/tcg/mipsel/test_dsp_r1_dpsu_h_qbl.c b/tests/tcg/mipsel/test_dsp_r1_dpsu_h_qbl.c
index 94e2bf625499..34b81489078c 100644
--- a/tests/tcg/mipsel/test_dsp_r1_dpsu_h_qbl.c
+++ b/tests/tcg/mipsel/test_dsp_r1_dpsu_h_qbl.c
@@ -7,6 +7,8 @@ int main()
int ach = 5, acl = 5;
int resulth, resultl;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rs = 0xBC0123AD;
rt = 0x01643721;
resulth = 0x04;
diff --git a/tests/tcg/mipsel/test_dsp_r1_dpsu_h_qbr.c b/tests/tcg/mipsel/test_dsp_r1_dpsu_h_qbr.c
index a1e66356310d..06e6e0e6f9f3 100644
--- a/tests/tcg/mipsel/test_dsp_r1_dpsu_h_qbr.c
+++ b/tests/tcg/mipsel/test_dsp_r1_dpsu_h_qbr.c
@@ -7,6 +7,8 @@ int main()
int ach = 5, acl = 5;
int resulth, resultl;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rs = 0xBC0123AD;
rt = 0x01643721;
resulth = 0x04;
diff --git a/tests/tcg/mipsel/test_dsp_r1_extp.c b/tests/tcg/mipsel/test_dsp_r1_extp.c
index b18bdb34c872..3092067b36db 100644
--- a/tests/tcg/mipsel/test_dsp_r1_extp.c
+++ b/tests/tcg/mipsel/test_dsp_r1_extp.c
@@ -6,6 +6,8 @@ int main()
int rt, ach, acl, dsp;
int result;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
ach = 0x05;
acl = 0xB4CB;
dsp = 0x07;
diff --git a/tests/tcg/mipsel/test_dsp_r1_extpdp.c b/tests/tcg/mipsel/test_dsp_r1_extpdp.c
index 79ee16e8b87c..8bdb1fb6999b 100644
--- a/tests/tcg/mipsel/test_dsp_r1_extpdp.c
+++ b/tests/tcg/mipsel/test_dsp_r1_extpdp.c
@@ -6,6 +6,8 @@ int main()
int rt, ach, acl, dsp, pos, efi;
int result;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
ach = 0x05;
acl = 0xB4CB;
dsp = 0x07;
diff --git a/tests/tcg/mipsel/test_dsp_r1_extpdpv.c b/tests/tcg/mipsel/test_dsp_r1_extpdpv.c
index f5774eed3cae..e865052e3f24 100644
--- a/tests/tcg/mipsel/test_dsp_r1_extpdpv.c
+++ b/tests/tcg/mipsel/test_dsp_r1_extpdpv.c
@@ -6,6 +6,8 @@ int main()
int rt, rs, ach, acl, dsp, pos, efi;
int result;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
ach = 0x05;
acl = 0xB4CB;
dsp = 0x07;
diff --git a/tests/tcg/mipsel/test_dsp_r1_extpv.c b/tests/tcg/mipsel/test_dsp_r1_extpv.c
index 401b94afadfc..8fe8555a4f4d 100644
--- a/tests/tcg/mipsel/test_dsp_r1_extpv.c
+++ b/tests/tcg/mipsel/test_dsp_r1_extpv.c
@@ -6,6 +6,8 @@ int main()
int rt, ac, ach, acl, dsp;
int result;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
ach = 0x05;
acl = 0xB4CB;
dsp = 0x07;
diff --git a/tests/tcg/mipsel/test_dsp_r1_extr_r_w.c b/tests/tcg/mipsel/test_dsp_r1_extr_r_w.c
index 489c1931b475..a8dc1fb88799 100644
--- a/tests/tcg/mipsel/test_dsp_r1_extr_r_w.c
+++ b/tests/tcg/mipsel/test_dsp_r1_extr_r_w.c
@@ -6,6 +6,8 @@ int main()
int rt, ach, acl, dsp;
int result;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
ach = 0x05;
acl = 0xB4CB;
result = 0xA0001699;
diff --git a/tests/tcg/mipsel/test_dsp_r1_extr_rs_w.c b/tests/tcg/mipsel/test_dsp_r1_extr_rs_w.c
index f9d2ed646fa3..2295d0180417 100644
--- a/tests/tcg/mipsel/test_dsp_r1_extr_rs_w.c
+++ b/tests/tcg/mipsel/test_dsp_r1_extr_rs_w.c
@@ -6,6 +6,8 @@ int main()
int rt, ach, acl, dsp;
int result;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
ach = 0x05;
acl = 0xB4CB;
result = 0x7FFFFFFF;
diff --git a/tests/tcg/mipsel/test_dsp_r1_extr_s_h.c b/tests/tcg/mipsel/test_dsp_r1_extr_s_h.c
index 9bc2a63cc2d1..e0c3e75a22d7 100644
--- a/tests/tcg/mipsel/test_dsp_r1_extr_s_h.c
+++ b/tests/tcg/mipsel/test_dsp_r1_extr_s_h.c
@@ -6,6 +6,8 @@ int main()
int rt, ach, acl, dsp;
int result;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
ach = 0x05;
acl = 0xB4CB;
result = 0x00007FFF;
diff --git a/tests/tcg/mipsel/test_dsp_r1_extr_w.c b/tests/tcg/mipsel/test_dsp_r1_extr_w.c
index cf926146d54c..19ec7a37c4ae 100644
--- a/tests/tcg/mipsel/test_dsp_r1_extr_w.c
+++ b/tests/tcg/mipsel/test_dsp_r1_extr_w.c
@@ -6,6 +6,8 @@ int main()
int rt, ach, acl, dsp;
int result;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
ach = 0x05;
acl = 0xB4CB;
result = 0xA0001699;
diff --git a/tests/tcg/mipsel/test_dsp_r1_extrv_r_w.c b/tests/tcg/mipsel/test_dsp_r1_extrv_r_w.c
index 2403b3afe40f..8f4ccefdabff 100644
--- a/tests/tcg/mipsel/test_dsp_r1_extrv_r_w.c
+++ b/tests/tcg/mipsel/test_dsp_r1_extrv_r_w.c
@@ -6,6 +6,8 @@ int main()
int rt, rs, ach, acl, dsp;
int result;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
ach = 0x05;
acl = 0xB4CB;
dsp = 0x07;
diff --git a/tests/tcg/mipsel/test_dsp_r1_extrv_rs_w.c b/tests/tcg/mipsel/test_dsp_r1_extrv_rs_w.c
index 10c182a54b23..783dcd167175 100644
--- a/tests/tcg/mipsel/test_dsp_r1_extrv_rs_w.c
+++ b/tests/tcg/mipsel/test_dsp_r1_extrv_rs_w.c
@@ -6,6 +6,8 @@ int main()
int rt, rs, ach, acl, dsp = 0;
int result;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rs = 0x03;
ach = 0x05;
acl = 0xB4CB;
diff --git a/tests/tcg/mipsel/test_dsp_r1_extrv_s_h.c b/tests/tcg/mipsel/test_dsp_r1_extrv_s_h.c
index feac3e2e334a..6369a138b4fd 100644
--- a/tests/tcg/mipsel/test_dsp_r1_extrv_s_h.c
+++ b/tests/tcg/mipsel/test_dsp_r1_extrv_s_h.c
@@ -6,6 +6,8 @@ int main()
int rt, rs, ach, acl, dsp;
int result;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
ach = 0x05;
acl = 0xB4CB;
dsp = 0x07;
diff --git a/tests/tcg/mipsel/test_dsp_r1_extrv_w.c b/tests/tcg/mipsel/test_dsp_r1_extrv_w.c
index 9e8b238a04d4..f839dac03827 100644
--- a/tests/tcg/mipsel/test_dsp_r1_extrv_w.c
+++ b/tests/tcg/mipsel/test_dsp_r1_extrv_w.c
@@ -6,6 +6,8 @@ int main()
int rt, rs, ach, acl, dsp;
int result;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
ach = 0x05;
acl = 0xB4CB;
dsp = 0x07;
diff --git a/tests/tcg/mipsel/test_dsp_r1_insv.c b/tests/tcg/mipsel/test_dsp_r1_insv.c
index 9d674697ccaa..81843726aa21 100644
--- a/tests/tcg/mipsel/test_dsp_r1_insv.c
+++ b/tests/tcg/mipsel/test_dsp_r1_insv.c
@@ -6,6 +6,8 @@ int main()
int rt, rs, dsp;
int result;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
/* msb = 10, lsb = 5 */
dsp = 0x305;
rt = 0x12345678;
diff --git a/tests/tcg/mipsel/test_dsp_r1_lbux.c b/tests/tcg/mipsel/test_dsp_r1_lbux.c
index 2337abea2acb..39b21ab2c150 100644
--- a/tests/tcg/mipsel/test_dsp_r1_lbux.c
+++ b/tests/tcg/mipsel/test_dsp_r1_lbux.c
@@ -8,6 +8,8 @@ int main(void)
unsigned long addr, index;
int result;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
value = 0xBCDEF389;
p = &value;
addr = (unsigned long)p;
diff --git a/tests/tcg/mipsel/test_dsp_r1_lhx.c b/tests/tcg/mipsel/test_dsp_r1_lhx.c
index 10be3b385fee..822e56c0d093 100644
--- a/tests/tcg/mipsel/test_dsp_r1_lhx.c
+++ b/tests/tcg/mipsel/test_dsp_r1_lhx.c
@@ -8,6 +8,8 @@ int main(void)
unsigned long addr, index;
int result;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
value = 0xBCDEF389;
p = &value;
addr = (unsigned long)p;
diff --git a/tests/tcg/mipsel/test_dsp_r1_lwx.c b/tests/tcg/mipsel/test_dsp_r1_lwx.c
index e6543c9e7eae..149a8d254cff 100644
--- a/tests/tcg/mipsel/test_dsp_r1_lwx.c
+++ b/tests/tcg/mipsel/test_dsp_r1_lwx.c
@@ -8,6 +8,8 @@ int main(void)
unsigned long addr, index;
int result;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
value = 0xBCDEF389;
p = &value;
addr = (unsigned long)p;
diff --git a/tests/tcg/mipsel/test_dsp_r1_madd.c b/tests/tcg/mipsel/test_dsp_r1_madd.c
index af4bfcfe9df3..732e366b9afc 100644
--- a/tests/tcg/mipsel/test_dsp_r1_madd.c
+++ b/tests/tcg/mipsel/test_dsp_r1_madd.c
@@ -8,6 +8,8 @@ int main()
int acho, aclo;
int resulth, resultl;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
achi = 0x05;
acli = 0xB4CB;
rs = 0x01;
diff --git a/tests/tcg/mipsel/test_dsp_r1_maddu.c b/tests/tcg/mipsel/test_dsp_r1_maddu.c
index af4bfcfe9df3..732e366b9afc 100644
--- a/tests/tcg/mipsel/test_dsp_r1_maddu.c
+++ b/tests/tcg/mipsel/test_dsp_r1_maddu.c
@@ -8,6 +8,8 @@ int main()
int acho, aclo;
int resulth, resultl;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
achi = 0x05;
acli = 0xB4CB;
rs = 0x01;
diff --git a/tests/tcg/mipsel/test_dsp_r1_maq_s_w_phl.c b/tests/tcg/mipsel/test_dsp_r1_maq_s_w_phl.c
index 0f7c070155a8..1842889ba43f 100644
--- a/tests/tcg/mipsel/test_dsp_r1_maq_s_w_phl.c
+++ b/tests/tcg/mipsel/test_dsp_r1_maq_s_w_phl.c
@@ -10,6 +10,8 @@ int main()
int resulth, resultl;
int resdsp;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
achi = 0x00000005;
acli = 0x0000B4CB;
rs = 0xFF060000;
diff --git a/tests/tcg/mipsel/test_dsp_r1_maq_s_w_phr.c b/tests/tcg/mipsel/test_dsp_r1_maq_s_w_phr.c
index 942722a530c2..5255ca8f527b 100644
--- a/tests/tcg/mipsel/test_dsp_r1_maq_s_w_phr.c
+++ b/tests/tcg/mipsel/test_dsp_r1_maq_s_w_phr.c
@@ -10,6 +10,8 @@ int main()
int resulth, resultl;
int resdsp;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
achi = 0x00000005;
acli = 0x0000B4CB;
rs = 0x0000FF06;
diff --git a/tests/tcg/mipsel/test_dsp_r1_maq_sa_w_phl.c b/tests/tcg/mipsel/test_dsp_r1_maq_sa_w_phl.c
index d83dce6f3272..90b109749350 100644
--- a/tests/tcg/mipsel/test_dsp_r1_maq_sa_w_phl.c
+++ b/tests/tcg/mipsel/test_dsp_r1_maq_sa_w_phl.c
@@ -10,6 +10,8 @@ int main()
int resulth, resultl;
int resdsp;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
achi = 0x00000000;
acli = 0x0000B4CB;
rs = 0xFF060000;
diff --git a/tests/tcg/mipsel/test_dsp_r1_maq_sa_w_phr.c b/tests/tcg/mipsel/test_dsp_r1_maq_sa_w_phr.c
index d2331118abb8..cbc05492f51a 100644
--- a/tests/tcg/mipsel/test_dsp_r1_maq_sa_w_phr.c
+++ b/tests/tcg/mipsel/test_dsp_r1_maq_sa_w_phr.c
@@ -10,6 +10,8 @@ int main()
int resulth, resultl;
int resdsp;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
achi = 0x00000000;
acli = 0x0000B4CB;
rs = 0x0000FF06;
diff --git a/tests/tcg/mipsel/test_dsp_r1_mfhi.c b/tests/tcg/mipsel/test_dsp_r1_mfhi.c
index 43a80669d1ea..c4f2cc00efbb 100644
--- a/tests/tcg/mipsel/test_dsp_r1_mfhi.c
+++ b/tests/tcg/mipsel/test_dsp_r1_mfhi.c
@@ -6,6 +6,8 @@ int main()
int achi, acho;
int result;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
achi = 0x004433;
result = 0x004433;
diff --git a/tests/tcg/mipsel/test_dsp_r1_mflo.c b/tests/tcg/mipsel/test_dsp_r1_mflo.c
index caeafdb05ce4..fad79768c687 100644
--- a/tests/tcg/mipsel/test_dsp_r1_mflo.c
+++ b/tests/tcg/mipsel/test_dsp_r1_mflo.c
@@ -6,6 +6,8 @@ int main()
int acli, aclo;
int result;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
acli = 0x004433;
result = 0x004433;
diff --git a/tests/tcg/mipsel/test_dsp_r1_modsub.c b/tests/tcg/mipsel/test_dsp_r1_modsub.c
index c294eebb519d..96d9bca2595d 100644
--- a/tests/tcg/mipsel/test_dsp_r1_modsub.c
+++ b/tests/tcg/mipsel/test_dsp_r1_modsub.c
@@ -6,6 +6,8 @@ int main()
int rd, rs, rt;
int result;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rs = 0xFFFFFFFF;
rt = 0x000000FF;
result = 0xFFFFFF00;
diff --git a/tests/tcg/mipsel/test_dsp_r1_msub.c b/tests/tcg/mipsel/test_dsp_r1_msub.c
index 5779e6f47ac7..ddcc144da129 100644
--- a/tests/tcg/mipsel/test_dsp_r1_msub.c
+++ b/tests/tcg/mipsel/test_dsp_r1_msub.c
@@ -7,6 +7,8 @@ int main()
int acho, aclo;
int resulth, resultl;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rs = 0x00BBAACC;
rt = 0x0B1C3D2F;
achi = 0x00004433;
diff --git a/tests/tcg/mipsel/test_dsp_r1_msubu.c b/tests/tcg/mipsel/test_dsp_r1_msubu.c
index e0f9b5a77ae3..7955f4e174b2 100644
--- a/tests/tcg/mipsel/test_dsp_r1_msubu.c
+++ b/tests/tcg/mipsel/test_dsp_r1_msubu.c
@@ -7,6 +7,8 @@ int main()
int acho, aclo;
int resulth, resultl;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rs = 0x00BBAACC;
rt = 0x0B1C3D2F;
achi = 0x00004433;
diff --git a/tests/tcg/mipsel/test_dsp_r1_mthi.c b/tests/tcg/mipsel/test_dsp_r1_mthi.c
index 43a80669d1ea..c4f2cc00efbb 100644
--- a/tests/tcg/mipsel/test_dsp_r1_mthi.c
+++ b/tests/tcg/mipsel/test_dsp_r1_mthi.c
@@ -6,6 +6,8 @@ int main()
int achi, acho;
int result;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
achi = 0x004433;
result = 0x004433;
diff --git a/tests/tcg/mipsel/test_dsp_r1_mthlip.c b/tests/tcg/mipsel/test_dsp_r1_mthlip.c
index 85f94d8450ea..61ed5aeb25eb 100644
--- a/tests/tcg/mipsel/test_dsp_r1_mthlip.c
+++ b/tests/tcg/mipsel/test_dsp_r1_mthlip.c
@@ -6,6 +6,8 @@ int main()
int rs, ach, acl, dsp;
int result, resulth, resultl;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
dsp = 0x07;
ach = 0x05;
acl = 0xB4CB;
diff --git a/tests/tcg/mipsel/test_dsp_r1_mtlo.c b/tests/tcg/mipsel/test_dsp_r1_mtlo.c
index caeafdb05ce4..fad79768c687 100644
--- a/tests/tcg/mipsel/test_dsp_r1_mtlo.c
+++ b/tests/tcg/mipsel/test_dsp_r1_mtlo.c
@@ -6,6 +6,8 @@ int main()
int acli, aclo;
int result;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
acli = 0x004433;
result = 0x004433;
diff --git a/tests/tcg/mipsel/test_dsp_r1_muleq_s_w_phl.c b/tests/tcg/mipsel/test_dsp_r1_muleq_s_w_phl.c
index b3a5370fe59e..157275550aab 100644
--- a/tests/tcg/mipsel/test_dsp_r1_muleq_s_w_phl.c
+++ b/tests/tcg/mipsel/test_dsp_r1_muleq_s_w_phl.c
@@ -6,6 +6,8 @@ int main()
int rd, rs, rt, dsp;
int result, resultdsp;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rs = 0x80001234;
rt = 0x80001234;
result = 0x7FFFFFFF;
diff --git a/tests/tcg/mipsel/test_dsp_r1_muleq_s_w_phr.c b/tests/tcg/mipsel/test_dsp_r1_muleq_s_w_phr.c
index 8066d7d02a1e..887ea0e6574f 100644
--- a/tests/tcg/mipsel/test_dsp_r1_muleq_s_w_phr.c
+++ b/tests/tcg/mipsel/test_dsp_r1_muleq_s_w_phr.c
@@ -6,6 +6,8 @@ int main()
int rd, rs, rt, dsp;
int result, resultdsp;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rs = 0x8000;
rt = 0x8000;
result = 0x7FFFFFFF;
diff --git a/tests/tcg/mipsel/test_dsp_r1_muleu_s_ph_qbl.c b/tests/tcg/mipsel/test_dsp_r1_muleu_s_ph_qbl.c
index 66a382806a21..caf2e9c0e5cc 100644
--- a/tests/tcg/mipsel/test_dsp_r1_muleu_s_ph_qbl.c
+++ b/tests/tcg/mipsel/test_dsp_r1_muleu_s_ph_qbl.c
@@ -6,6 +6,8 @@ int main()
int rd, rs, rt, dsp;
int result, resultdsp;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rs = 0x80001234;
rt = 0x80004321;
result = 0xFFFF0000;
diff --git a/tests/tcg/mipsel/test_dsp_r1_muleu_s_ph_qbr.c b/tests/tcg/mipsel/test_dsp_r1_muleu_s_ph_qbr.c
index 4cc6c8f7cfe1..6e16fe6384bb 100644
--- a/tests/tcg/mipsel/test_dsp_r1_muleu_s_ph_qbr.c
+++ b/tests/tcg/mipsel/test_dsp_r1_muleu_s_ph_qbr.c
@@ -6,6 +6,8 @@ int main()
int rd, rs, rt, dsp;
int result, resultdsp;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rs = 0x8000;
rt = 0x80004321;
result = 0xFFFF0000;
diff --git a/tests/tcg/mipsel/test_dsp_r1_mulq_rs_ph.c b/tests/tcg/mipsel/test_dsp_r1_mulq_rs_ph.c
index 370c2a801832..444cd7678631 100644
--- a/tests/tcg/mipsel/test_dsp_r1_mulq_rs_ph.c
+++ b/tests/tcg/mipsel/test_dsp_r1_mulq_rs_ph.c
@@ -6,6 +6,8 @@ int main()
int rd, rs, rt, dsp;
int result, resultdsp;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rs = 0x80001234;
rt = 0x80004321;
result = 0x7FFF098C;
diff --git a/tests/tcg/mipsel/test_dsp_r1_mult.c b/tests/tcg/mipsel/test_dsp_r1_mult.c
index 15e6fde92c0e..d8e834f153b4 100644
--- a/tests/tcg/mipsel/test_dsp_r1_mult.c
+++ b/tests/tcg/mipsel/test_dsp_r1_mult.c
@@ -6,6 +6,8 @@ int main()
int rs, rt, ach, acl;
int result, resulth, resultl;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rs = 0x00FFBBAA;
rt = 0x4B231000;
resulth = 0x4b0f01;
diff --git a/tests/tcg/mipsel/test_dsp_r1_multu.c b/tests/tcg/mipsel/test_dsp_r1_multu.c
index 85d36c1b621a..f628172d778c 100644
--- a/tests/tcg/mipsel/test_dsp_r1_multu.c
+++ b/tests/tcg/mipsel/test_dsp_r1_multu.c
@@ -6,6 +6,8 @@ int main()
int rs, rt, ach, acl;
int result, resulth, resultl;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rs = 0x00FFBBAA;
rt = 0x4B231000;
resulth = 0x4b0f01;
diff --git a/tests/tcg/mipsel/test_dsp_r1_packrl_ph.c b/tests/tcg/mipsel/test_dsp_r1_packrl_ph.c
index 1f8e69992503..9bbdf1946a6f 100644
--- a/tests/tcg/mipsel/test_dsp_r1_packrl_ph.c
+++ b/tests/tcg/mipsel/test_dsp_r1_packrl_ph.c
@@ -6,6 +6,8 @@ int main()
int rd, rs, rt;
int result;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rs = 0x12345678;
rt = 0x87654321;
result = 0x56788765;
diff --git a/tests/tcg/mipsel/test_dsp_r1_pick_ph.c b/tests/tcg/mipsel/test_dsp_r1_pick_ph.c
index 929a002e7544..c53b894f320e 100644
--- a/tests/tcg/mipsel/test_dsp_r1_pick_ph.c
+++ b/tests/tcg/mipsel/test_dsp_r1_pick_ph.c
@@ -6,6 +6,8 @@ int main()
int rd, rs, rt, dsp;
int result;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rs = 0x12345678;
rt = 0x87654321;
dsp = 0x0A000000;
diff --git a/tests/tcg/mipsel/test_dsp_r1_pick_qb.c b/tests/tcg/mipsel/test_dsp_r1_pick_qb.c
index a79047524662..2d848b8fbaf9 100644
--- a/tests/tcg/mipsel/test_dsp_r1_pick_qb.c
+++ b/tests/tcg/mipsel/test_dsp_r1_pick_qb.c
@@ -6,6 +6,8 @@ int main()
int rd, rs, rt, dsp;
int result;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rs = 0x12345678;
rt = 0x87654321;
dsp = 0x0f000000;
diff --git a/tests/tcg/mipsel/test_dsp_r1_preceq_w_phl.c b/tests/tcg/mipsel/test_dsp_r1_preceq_w_phl.c
index bf70bf7d3aec..af302e1032a9 100644
--- a/tests/tcg/mipsel/test_dsp_r1_preceq_w_phl.c
+++ b/tests/tcg/mipsel/test_dsp_r1_preceq_w_phl.c
@@ -6,6 +6,8 @@ int main()
int rd, rt;
int result;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rt = 0x87654321;
result = 0x87650000;
diff --git a/tests/tcg/mipsel/test_dsp_r1_preceq_w_phr.c b/tests/tcg/mipsel/test_dsp_r1_preceq_w_phr.c
index 3f885ef584e6..67986518faa1 100644
--- a/tests/tcg/mipsel/test_dsp_r1_preceq_w_phr.c
+++ b/tests/tcg/mipsel/test_dsp_r1_preceq_w_phr.c
@@ -6,6 +6,8 @@ int main()
int rd, rt;
int result;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rt = 0x87654321;
result = 0x43210000;
diff --git a/tests/tcg/mipsel/test_dsp_r1_precequ_ph_qbl.c b/tests/tcg/mipsel/test_dsp_r1_precequ_ph_qbl.c
index 63b7a9568345..130bd8236685 100644
--- a/tests/tcg/mipsel/test_dsp_r1_precequ_ph_qbl.c
+++ b/tests/tcg/mipsel/test_dsp_r1_precequ_ph_qbl.c
@@ -6,6 +6,8 @@ int main()
int rd, rt;
int result;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rt = 0x87654321;
result = 0x43803280;
diff --git a/tests/tcg/mipsel/test_dsp_r1_precequ_ph_qbla.c b/tests/tcg/mipsel/test_dsp_r1_precequ_ph_qbla.c
index 31627f0bd606..47821692d892 100644
--- a/tests/tcg/mipsel/test_dsp_r1_precequ_ph_qbla.c
+++ b/tests/tcg/mipsel/test_dsp_r1_precequ_ph_qbla.c
@@ -6,6 +6,8 @@ int main()
int rd, rt;
int result;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rt = 0x87654321;
result = 0x43802180;
diff --git a/tests/tcg/mipsel/test_dsp_r1_precequ_ph_qbr.c b/tests/tcg/mipsel/test_dsp_r1_precequ_ph_qbr.c
index b6f72d3cbfde..1c592f74746b 100644
--- a/tests/tcg/mipsel/test_dsp_r1_precequ_ph_qbr.c
+++ b/tests/tcg/mipsel/test_dsp_r1_precequ_ph_qbr.c
@@ -6,6 +6,8 @@ int main()
int rd, rt;
int result;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rt = 0x87654321;
result = 0x21801080;
diff --git a/tests/tcg/mipsel/test_dsp_r1_precequ_ph_qbra.c b/tests/tcg/mipsel/test_dsp_r1_precequ_ph_qbra.c
index 4764fd031d8a..cc7c8ef6a126 100644
--- a/tests/tcg/mipsel/test_dsp_r1_precequ_ph_qbra.c
+++ b/tests/tcg/mipsel/test_dsp_r1_precequ_ph_qbra.c
@@ -6,6 +6,8 @@ int main()
int rd, rt;
int result;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rt = 0x87654321;
result = 0x32801080;
diff --git a/tests/tcg/mipsel/test_dsp_r1_preceu_ph_qbl.c b/tests/tcg/mipsel/test_dsp_r1_preceu_ph_qbl.c
index fa95c26cc48f..ca10372c9c7c 100644
--- a/tests/tcg/mipsel/test_dsp_r1_preceu_ph_qbl.c
+++ b/tests/tcg/mipsel/test_dsp_r1_preceu_ph_qbl.c
@@ -6,6 +6,8 @@ int main()
int rd, rt;
int result;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rt = 0x87654321;
result = 0x00870065;
diff --git a/tests/tcg/mipsel/test_dsp_r1_preceu_ph_qbla.c b/tests/tcg/mipsel/test_dsp_r1_preceu_ph_qbla.c
index 021f21a74440..843c70fd57aa 100644
--- a/tests/tcg/mipsel/test_dsp_r1_preceu_ph_qbla.c
+++ b/tests/tcg/mipsel/test_dsp_r1_preceu_ph_qbla.c
@@ -6,6 +6,8 @@ int main()
int rd, rt;
int result;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rt = 0x87654321;
result = 0x00870043;
diff --git a/tests/tcg/mipsel/test_dsp_r1_preceu_ph_qbr.c b/tests/tcg/mipsel/test_dsp_r1_preceu_ph_qbr.c
index 03df18c72ca5..ab3680b40733 100644
--- a/tests/tcg/mipsel/test_dsp_r1_preceu_ph_qbr.c
+++ b/tests/tcg/mipsel/test_dsp_r1_preceu_ph_qbr.c
@@ -6,6 +6,8 @@ int main()
int rd, rt;
int result;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rt = 0x87654321;
result = 0x00430021;
diff --git a/tests/tcg/mipsel/test_dsp_r1_preceu_ph_qbra.c b/tests/tcg/mipsel/test_dsp_r1_preceu_ph_qbra.c
index 634327618cce..f729e035dd9c 100644
--- a/tests/tcg/mipsel/test_dsp_r1_preceu_ph_qbra.c
+++ b/tests/tcg/mipsel/test_dsp_r1_preceu_ph_qbra.c
@@ -6,6 +6,8 @@ int main()
int rd, rt;
int result;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rt = 0x87654321;
result = 0x00650021;
diff --git a/tests/tcg/mipsel/test_dsp_r1_precrq_ph_w.c b/tests/tcg/mipsel/test_dsp_r1_precrq_ph_w.c
index 25d45f1a9aa8..f4cb4b498b64 100644
--- a/tests/tcg/mipsel/test_dsp_r1_precrq_ph_w.c
+++ b/tests/tcg/mipsel/test_dsp_r1_precrq_ph_w.c
@@ -6,6 +6,8 @@ int main()
int rd, rs, rt;
int result;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rs = 0x12345678;
rt = 0x87654321;
result = 0x12348765;
diff --git a/tests/tcg/mipsel/test_dsp_r1_precrq_qb_ph.c b/tests/tcg/mipsel/test_dsp_r1_precrq_qb_ph.c
index fe23acce8c47..50c2b7697aa6 100644
--- a/tests/tcg/mipsel/test_dsp_r1_precrq_qb_ph.c
+++ b/tests/tcg/mipsel/test_dsp_r1_precrq_qb_ph.c
@@ -6,6 +6,8 @@ int main()
int rd, rs, rt;
int result;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rs = 0x12345678;
rt = 0x87654321;
result = 0x12568743;
diff --git a/tests/tcg/mipsel/test_dsp_r1_precrq_rs_ph_w.c b/tests/tcg/mipsel/test_dsp_r1_precrq_rs_ph_w.c
index da6845bf2423..3dca43c0630a 100644
--- a/tests/tcg/mipsel/test_dsp_r1_precrq_rs_ph_w.c
+++ b/tests/tcg/mipsel/test_dsp_r1_precrq_rs_ph_w.c
@@ -7,6 +7,8 @@ int main()
int dsp;
int result;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rs = 0x12345678;
rt = 0x87654321;
result = 0x12348765;
diff --git a/tests/tcg/mipsel/test_dsp_r1_precrqu_s_qb_ph.c b/tests/tcg/mipsel/test_dsp_r1_precrqu_s_qb_ph.c
index 7481d5af3a5b..7fab8bb0f3e9 100644
--- a/tests/tcg/mipsel/test_dsp_r1_precrqu_s_qb_ph.c
+++ b/tests/tcg/mipsel/test_dsp_r1_precrqu_s_qb_ph.c
@@ -7,6 +7,8 @@ int main()
int dsp;
int result;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rs = 0x12345678;
rt = 0x87657FFF;
result = 0x24AC00FF;
diff --git a/tests/tcg/mipsel/test_dsp_r1_raddu_w_qb.c b/tests/tcg/mipsel/test_dsp_r1_raddu_w_qb.c
index 77a983c0d20f..d611a4b853d9 100644
--- a/tests/tcg/mipsel/test_dsp_r1_raddu_w_qb.c
+++ b/tests/tcg/mipsel/test_dsp_r1_raddu_w_qb.c
@@ -6,6 +6,8 @@ int main()
int rd, rs;
int result;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rs = 0x12345678;
result = 0x114;
diff --git a/tests/tcg/mipsel/test_dsp_r1_rddsp.c b/tests/tcg/mipsel/test_dsp_r1_rddsp.c
index 2f3028503324..a08ff4fe965b 100644
--- a/tests/tcg/mipsel/test_dsp_r1_rddsp.c
+++ b/tests/tcg/mipsel/test_dsp_r1_rddsp.c
@@ -7,6 +7,8 @@ int main()
int ccond_i, outflag_i, efi_i, c_i, scount_i, pos_i;
int ccond_o, outflag_o, efi_o, c_o, scount_o, pos_o;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
ccond_i = 0x0000000C; /* 4 */
outflag_i = 0x0000001B; /* 3 */
efi_i = 0x00000001; /* 5 */
diff --git a/tests/tcg/mipsel/test_dsp_r1_repl_ph.c b/tests/tcg/mipsel/test_dsp_r1_repl_ph.c
index 21074953bdde..1d91dae105a2 100644
--- a/tests/tcg/mipsel/test_dsp_r1_repl_ph.c
+++ b/tests/tcg/mipsel/test_dsp_r1_repl_ph.c
@@ -5,6 +5,8 @@ int main()
{
int rd, result;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
result = 0x01BF01BF;
__asm
("repl.ph %0, 0x1BF\n\t"
diff --git a/tests/tcg/mipsel/test_dsp_r1_repl_qb.c b/tests/tcg/mipsel/test_dsp_r1_repl_qb.c
index 6631393ea131..e704a3a85fff 100644
--- a/tests/tcg/mipsel/test_dsp_r1_repl_qb.c
+++ b/tests/tcg/mipsel/test_dsp_r1_repl_qb.c
@@ -5,6 +5,8 @@ int main()
{
int rd, result;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
result = 0xBFBFBFBF;
__asm
("repl.qb %0, 0xBF\n\t"
diff --git a/tests/tcg/mipsel/test_dsp_r1_replv_ph.c b/tests/tcg/mipsel/test_dsp_r1_replv_ph.c
index 07fb15f1f795..7285f215b69d 100644
--- a/tests/tcg/mipsel/test_dsp_r1_replv_ph.c
+++ b/tests/tcg/mipsel/test_dsp_r1_replv_ph.c
@@ -6,6 +6,8 @@ int main()
int rd, rt;
int result;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rt = 0x12345678;
result = 0x56785678;
__asm
diff --git a/tests/tcg/mipsel/test_dsp_r1_replv_qb.c b/tests/tcg/mipsel/test_dsp_r1_replv_qb.c
index dd1271fedff0..a65b9299f976 100644
--- a/tests/tcg/mipsel/test_dsp_r1_replv_qb.c
+++ b/tests/tcg/mipsel/test_dsp_r1_replv_qb.c
@@ -6,6 +6,8 @@ int main()
int rd, rt;
int result;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rt = 0x12345678;
result = 0x78787878;
__asm
diff --git a/tests/tcg/mipsel/test_dsp_r1_shilo.c b/tests/tcg/mipsel/test_dsp_r1_shilo.c
index ce8ebc69c2ac..1066600f3085 100644
--- a/tests/tcg/mipsel/test_dsp_r1_shilo.c
+++ b/tests/tcg/mipsel/test_dsp_r1_shilo.c
@@ -6,6 +6,8 @@ int main()
int ach, acl;
int resulth, resultl;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
ach = 0xBBAACCFF;
acl = 0x1C3B001D;
diff --git a/tests/tcg/mipsel/test_dsp_r1_shilov.c b/tests/tcg/mipsel/test_dsp_r1_shilov.c
index e1d6cea4b6de..aa7838fdb96e 100644
--- a/tests/tcg/mipsel/test_dsp_r1_shilov.c
+++ b/tests/tcg/mipsel/test_dsp_r1_shilov.c
@@ -6,6 +6,8 @@ int main()
int rs, ach, acl;
int resulth, resultl;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rs = 0x0F;
ach = 0xBBAACCFF;
acl = 0x1C3B001D;
diff --git a/tests/tcg/mipsel/test_dsp_r1_shll_ph.c b/tests/tcg/mipsel/test_dsp_r1_shll_ph.c
index 5fa58ccf6374..7090aa5766bd 100644
--- a/tests/tcg/mipsel/test_dsp_r1_shll_ph.c
+++ b/tests/tcg/mipsel/test_dsp_r1_shll_ph.c
@@ -6,6 +6,8 @@ int main()
int rd, rt, dsp;
int result, resultdsp;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rt = 0x12345678;
result = 0xA000C000;
resultdsp = 1;
diff --git a/tests/tcg/mipsel/test_dsp_r1_shll_qb.c b/tests/tcg/mipsel/test_dsp_r1_shll_qb.c
index 729716d62618..7234f7229dd0 100644
--- a/tests/tcg/mipsel/test_dsp_r1_shll_qb.c
+++ b/tests/tcg/mipsel/test_dsp_r1_shll_qb.c
@@ -6,6 +6,8 @@ int main()
int rd, rt, dsp;
int result, resultdsp;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rt = 0x87654321;
result = 0x87654321;
resultdsp = 0x00;
diff --git a/tests/tcg/mipsel/test_dsp_r1_shll_s_ph.c b/tests/tcg/mipsel/test_dsp_r1_shll_s_ph.c
index 910fea3b317e..1cfc6222fe13 100644
--- a/tests/tcg/mipsel/test_dsp_r1_shll_s_ph.c
+++ b/tests/tcg/mipsel/test_dsp_r1_shll_s_ph.c
@@ -6,6 +6,8 @@ int main()
int rd, rt, dsp;
int result, resultdsp;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rt = 0x12345678;
result = 0x7FFF7FFF;
resultdsp = 0x01;
diff --git a/tests/tcg/mipsel/test_dsp_r1_shll_s_w.c b/tests/tcg/mipsel/test_dsp_r1_shll_s_w.c
index 628c7521027b..9ba756ca4fe7 100644
--- a/tests/tcg/mipsel/test_dsp_r1_shll_s_w.c
+++ b/tests/tcg/mipsel/test_dsp_r1_shll_s_w.c
@@ -6,6 +6,8 @@ int main()
int rd, rt, dsp;
int result, resultdsp;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rt = 0x82345678;
result = 0x82345678;
resultdsp = 0x00;
diff --git a/tests/tcg/mipsel/test_dsp_r1_shllv_ph.c b/tests/tcg/mipsel/test_dsp_r1_shllv_ph.c
index f98a6322dc1d..834189585424 100644
--- a/tests/tcg/mipsel/test_dsp_r1_shllv_ph.c
+++ b/tests/tcg/mipsel/test_dsp_r1_shllv_ph.c
@@ -6,6 +6,8 @@ int main()
int rd, rs, rt, dsp;
int result, resultdsp;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rs = 0x0;
rt = 0x12345678;
result = 0x12345678;
diff --git a/tests/tcg/mipsel/test_dsp_r1_shllv_qb.c b/tests/tcg/mipsel/test_dsp_r1_shllv_qb.c
index 6d8ff4a259ba..2db00c662a88 100644
--- a/tests/tcg/mipsel/test_dsp_r1_shllv_qb.c
+++ b/tests/tcg/mipsel/test_dsp_r1_shllv_qb.c
@@ -6,6 +6,8 @@ int main()
int rd, rs, rt, dsp;
int result, resultdsp;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rs = 0x03;
rt = 0x87654321;
result = 0x38281808;
diff --git a/tests/tcg/mipsel/test_dsp_r1_shllv_s_ph.c b/tests/tcg/mipsel/test_dsp_r1_shllv_s_ph.c
index fc9bd32765b8..51a7f6a35516 100644
--- a/tests/tcg/mipsel/test_dsp_r1_shllv_s_ph.c
+++ b/tests/tcg/mipsel/test_dsp_r1_shllv_s_ph.c
@@ -6,6 +6,8 @@ int main()
int rd, rs, rt, dsp;
int result, resultdsp;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rs = 0x0;
rt = 0x12345678;
result = 0x12345678;
diff --git a/tests/tcg/mipsel/test_dsp_r1_shllv_s_w.c b/tests/tcg/mipsel/test_dsp_r1_shllv_s_w.c
index 350c25617adc..752c9a2615fb 100644
--- a/tests/tcg/mipsel/test_dsp_r1_shllv_s_w.c
+++ b/tests/tcg/mipsel/test_dsp_r1_shllv_s_w.c
@@ -6,6 +6,8 @@ int main()
int rd, rs, rt, dsp;
int result, resultdsp;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rs = 0x0B;
rt = 0x12345678;
result = 0x7FFFFFFF;
diff --git a/tests/tcg/mipsel/test_dsp_r1_shra_ph.c b/tests/tcg/mipsel/test_dsp_r1_shra_ph.c
index 5b2d840a6bc5..625a2289051a 100644
--- a/tests/tcg/mipsel/test_dsp_r1_shra_ph.c
+++ b/tests/tcg/mipsel/test_dsp_r1_shra_ph.c
@@ -6,6 +6,8 @@ int main()
int rd, rt;
int result;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rt = 0x87654321;
result = 0xF0EC0864;
diff --git a/tests/tcg/mipsel/test_dsp_r1_shra_r_ph.c b/tests/tcg/mipsel/test_dsp_r1_shra_r_ph.c
index adc4ae68bdc3..10608405f232 100644
--- a/tests/tcg/mipsel/test_dsp_r1_shra_r_ph.c
+++ b/tests/tcg/mipsel/test_dsp_r1_shra_r_ph.c
@@ -6,6 +6,8 @@ int main()
int rd, rt;
int result;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rt = 0x87654321;
result = 0xF0ED0864;
diff --git a/tests/tcg/mipsel/test_dsp_r1_shra_r_w.c b/tests/tcg/mipsel/test_dsp_r1_shra_r_w.c
index ec0cf2c72ccb..cd71c81e1e95 100644
--- a/tests/tcg/mipsel/test_dsp_r1_shra_r_w.c
+++ b/tests/tcg/mipsel/test_dsp_r1_shra_r_w.c
@@ -6,6 +6,8 @@ int main()
int rd, rt;
int result;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rt = 0x87654321;
result = 0xF0ECA864;
diff --git a/tests/tcg/mipsel/test_dsp_r1_shrav_ph.c b/tests/tcg/mipsel/test_dsp_r1_shrav_ph.c
index 6e42aaf8e1a7..a0750eb5a9bc 100644
--- a/tests/tcg/mipsel/test_dsp_r1_shrav_ph.c
+++ b/tests/tcg/mipsel/test_dsp_r1_shrav_ph.c
@@ -6,6 +6,8 @@ int main()
int rd, rs, rt;
int result;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rs = 0x03;
rt = 0x87654321;
result = 0xF0EC0864;
diff --git a/tests/tcg/mipsel/test_dsp_r1_shrav_r_ph.c b/tests/tcg/mipsel/test_dsp_r1_shrav_r_ph.c
index f03b978d0544..b944765a494c 100644
--- a/tests/tcg/mipsel/test_dsp_r1_shrav_r_ph.c
+++ b/tests/tcg/mipsel/test_dsp_r1_shrav_r_ph.c
@@ -6,6 +6,8 @@ int main()
int rd, rs, rt;
int result;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rs = 0x03;
rt = 0x87654321;
result = 0xF0ED0864;
diff --git a/tests/tcg/mipsel/test_dsp_r1_shrav_r_w.c b/tests/tcg/mipsel/test_dsp_r1_shrav_r_w.c
index 2ab03bb5daae..002466d1c15d 100644
--- a/tests/tcg/mipsel/test_dsp_r1_shrav_r_w.c
+++ b/tests/tcg/mipsel/test_dsp_r1_shrav_r_w.c
@@ -6,6 +6,8 @@ int main()
int rd, rs, rt;
int result;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rs = 0x03;
rt = 0x87654321;
result = 0xF0ECA864;
diff --git a/tests/tcg/mipsel/test_dsp_r1_shrl_qb.c b/tests/tcg/mipsel/test_dsp_r1_shrl_qb.c
index a7e4e6a5e4f5..d00d69f82413 100644
--- a/tests/tcg/mipsel/test_dsp_r1_shrl_qb.c
+++ b/tests/tcg/mipsel/test_dsp_r1_shrl_qb.c
@@ -6,6 +6,8 @@ int main()
int rd, rt;
int result;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rt = 0x12345678;
result = 0x00010203;
diff --git a/tests/tcg/mipsel/test_dsp_r1_shrlv_qb.c b/tests/tcg/mipsel/test_dsp_r1_shrlv_qb.c
index db77f6d0e117..1f8f8852c205 100644
--- a/tests/tcg/mipsel/test_dsp_r1_shrlv_qb.c
+++ b/tests/tcg/mipsel/test_dsp_r1_shrlv_qb.c
@@ -6,6 +6,8 @@ int main()
int rd, rs, rt;
int result;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rs = 0x05;
rt = 0x12345678;
result = 0x00010203;
diff --git a/tests/tcg/mipsel/test_dsp_r1_subq_ph.c b/tests/tcg/mipsel/test_dsp_r1_subq_ph.c
index fdd7b38b647e..8c9a3abdfe92 100644
--- a/tests/tcg/mipsel/test_dsp_r1_subq_ph.c
+++ b/tests/tcg/mipsel/test_dsp_r1_subq_ph.c
@@ -6,6 +6,8 @@ int main()
int rd, rs, rt, dsp;
int result, resultdsp;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rs = 0x77777777;
rt = 0x67654321;
result = 0x10123456;
diff --git a/tests/tcg/mipsel/test_dsp_r1_subq_s_ph.c b/tests/tcg/mipsel/test_dsp_r1_subq_s_ph.c
index 64c89ebd5114..7436af4ce95b 100644
--- a/tests/tcg/mipsel/test_dsp_r1_subq_s_ph.c
+++ b/tests/tcg/mipsel/test_dsp_r1_subq_s_ph.c
@@ -6,6 +6,8 @@ int main()
int rd, rs, rt, dsp;
int result, resultdsp;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rs = 0x12345678;
rt = 0x87654321;
result = 0x7FFF1357;
diff --git a/tests/tcg/mipsel/test_dsp_r1_subq_s_w.c b/tests/tcg/mipsel/test_dsp_r1_subq_s_w.c
index 9d456a90f417..bd74f731d75e 100644
--- a/tests/tcg/mipsel/test_dsp_r1_subq_s_w.c
+++ b/tests/tcg/mipsel/test_dsp_r1_subq_s_w.c
@@ -6,6 +6,8 @@ int main()
int rd, rs, rt, dsp;
int result, resultdsp;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rs = 0x12345678;
rt = 0x87654321;
result = 0x7FFFFFFF;
diff --git a/tests/tcg/mipsel/test_dsp_r1_subu_qb.c b/tests/tcg/mipsel/test_dsp_r1_subu_qb.c
index 420909615526..4161424a8d37 100644
--- a/tests/tcg/mipsel/test_dsp_r1_subu_qb.c
+++ b/tests/tcg/mipsel/test_dsp_r1_subu_qb.c
@@ -6,6 +6,8 @@ int main()
int rd, rs, rt, dsp;
int result, resultdsp;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rs = 0x12345678;
rt = 0x87654321;
result = 0x8BCF1357;
diff --git a/tests/tcg/mipsel/test_dsp_r1_subu_s_qb.c b/tests/tcg/mipsel/test_dsp_r1_subu_s_qb.c
index 3d650533d171..4ac17d051b05 100644
--- a/tests/tcg/mipsel/test_dsp_r1_subu_s_qb.c
+++ b/tests/tcg/mipsel/test_dsp_r1_subu_s_qb.c
@@ -6,6 +6,8 @@ int main()
int rd, rs, rt, dsp;
int result, resultdsp;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rs = 0x12345678;
rt = 0x87654321;
result = 0x00001357;
diff --git a/tests/tcg/mipsel/test_dsp_r1_wrdsp.c b/tests/tcg/mipsel/test_dsp_r1_wrdsp.c
index dc54943a99e8..bd6e163d343e 100644
--- a/tests/tcg/mipsel/test_dsp_r1_wrdsp.c
+++ b/tests/tcg/mipsel/test_dsp_r1_wrdsp.c
@@ -7,6 +7,8 @@ int main()
int ccond_i, outflag_i, efi_i, c_i, scount_i, pos_i;
int ccond_o, outflag_o, efi_o, c_o, scount_o, pos_o;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
ccond_i = 0x000000BC; /* 4 */
outflag_i = 0x0000001B; /* 3 */
efi_i = 0x00000001; /* 5 */
diff --git a/tests/tcg/mipsel/test_dsp_r2_absq_s_qb.c b/tests/tcg/mipsel/test_dsp_r2_absq_s_qb.c
index af4683f30475..5269a7eb4692 100644
--- a/tests/tcg/mipsel/test_dsp_r2_absq_s_qb.c
+++ b/tests/tcg/mipsel/test_dsp_r2_absq_s_qb.c
@@ -6,6 +6,8 @@ int main()
int input, result, dsp;
int hope;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
input = 0x701BA35E;
hope = 0x701B5D5E;
diff --git a/tests/tcg/mipsel/test_dsp_r2_addqh_ph.c b/tests/tcg/mipsel/test_dsp_r2_addqh_ph.c
index 921f0eaf33c7..797386d9d9ba 100644
--- a/tests/tcg/mipsel/test_dsp_r2_addqh_ph.c
+++ b/tests/tcg/mipsel/test_dsp_r2_addqh_ph.c
@@ -6,6 +6,8 @@ int main()
int rd, rs, rt;
int result;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rs = 0x706A13FE;
rt = 0x13065174;
result = 0x41B832B9;
diff --git a/tests/tcg/mipsel/test_dsp_r2_addqh_r_ph.c b/tests/tcg/mipsel/test_dsp_r2_addqh_r_ph.c
index 213ba3725006..8bcb48f1d18d 100644
--- a/tests/tcg/mipsel/test_dsp_r2_addqh_r_ph.c
+++ b/tests/tcg/mipsel/test_dsp_r2_addqh_r_ph.c
@@ -6,6 +6,8 @@ int main()
int rd, rs, rt;
int result;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rs = 0x706A13FE;
rt = 0x13065174;
result = 0x41B832B9;
diff --git a/tests/tcg/mipsel/test_dsp_r2_addqh_r_w.c b/tests/tcg/mipsel/test_dsp_r2_addqh_r_w.c
index 75a75c50f32d..046ccbf8bd24 100644
--- a/tests/tcg/mipsel/test_dsp_r2_addqh_r_w.c
+++ b/tests/tcg/mipsel/test_dsp_r2_addqh_r_w.c
@@ -6,6 +6,8 @@ int main()
int rd, rs, rt;
int result;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rs = 0x00000010;
rt = 0x00000001;
result = 0x00000009;
diff --git a/tests/tcg/mipsel/test_dsp_r2_addqh_w.c b/tests/tcg/mipsel/test_dsp_r2_addqh_w.c
index de6926ebbb72..224e20e43691 100644
--- a/tests/tcg/mipsel/test_dsp_r2_addqh_w.c
+++ b/tests/tcg/mipsel/test_dsp_r2_addqh_w.c
@@ -6,6 +6,8 @@ int main()
int rd, rs, rt;
int result;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rs = 0x00000010;
rt = 0x00000001;
result = 0x00000008;
diff --git a/tests/tcg/mipsel/test_dsp_r2_addu_ph.c b/tests/tcg/mipsel/test_dsp_r2_addu_ph.c
index 1d7a25a2a773..9511a29ae14f 100644
--- a/tests/tcg/mipsel/test_dsp_r2_addu_ph.c
+++ b/tests/tcg/mipsel/test_dsp_r2_addu_ph.c
@@ -7,6 +7,8 @@ int main()
int dsp;
int result;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rs = 0x00FF00FF;
rt = 0x00010001;
result = 0x01000100;
diff --git a/tests/tcg/mipsel/test_dsp_r2_addu_s_ph.c b/tests/tcg/mipsel/test_dsp_r2_addu_s_ph.c
index 979651bfc9ac..0b7c09bbd63d 100644
--- a/tests/tcg/mipsel/test_dsp_r2_addu_s_ph.c
+++ b/tests/tcg/mipsel/test_dsp_r2_addu_s_ph.c
@@ -7,6 +7,8 @@ int main()
int dsp;
int result;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rs = 0x00FE00FE;
rt = 0x00020001;
result = 0x010000FF;
diff --git a/tests/tcg/mipsel/test_dsp_r2_adduh_qb.c b/tests/tcg/mipsel/test_dsp_r2_adduh_qb.c
index a1f5d631b52e..6f82890be468 100644
--- a/tests/tcg/mipsel/test_dsp_r2_adduh_qb.c
+++ b/tests/tcg/mipsel/test_dsp_r2_adduh_qb.c
@@ -6,6 +6,8 @@ int main()
int rd, rs, rt;
int result;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rs = 0xFF0055AA;
rt = 0x0113421B;
result = 0x80094B62;
diff --git a/tests/tcg/mipsel/test_dsp_r2_adduh_r_qb.c b/tests/tcg/mipsel/test_dsp_r2_adduh_r_qb.c
index 81e98c190d2b..5ed7c1825c3b 100644
--- a/tests/tcg/mipsel/test_dsp_r2_adduh_r_qb.c
+++ b/tests/tcg/mipsel/test_dsp_r2_adduh_r_qb.c
@@ -6,6 +6,8 @@ int main()
int rd, rs, rt;
int result;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rs = 0xFF0055AA;
rt = 0x01112211;
result = 0x80093C5E;
diff --git a/tests/tcg/mipsel/test_dsp_r2_append.c b/tests/tcg/mipsel/test_dsp_r2_append.c
index 9a91e1650dbd..b9437c6b1d2b 100644
--- a/tests/tcg/mipsel/test_dsp_r2_append.c
+++ b/tests/tcg/mipsel/test_dsp_r2_append.c
@@ -6,6 +6,8 @@ int main()
int rs, rt;
int result;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rs = 0xFF0055AA;
rt = 0x0113421B;
result = 0x02268436;
diff --git a/tests/tcg/mipsel/test_dsp_r2_balign.c b/tests/tcg/mipsel/test_dsp_r2_balign.c
index 537cf0451cc8..4c68722f2779 100644
--- a/tests/tcg/mipsel/test_dsp_r2_balign.c
+++ b/tests/tcg/mipsel/test_dsp_r2_balign.c
@@ -6,6 +6,8 @@ int main()
int rs, rt;
int result;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rs = 0xFF0055AA;
rt = 0x0113421B;
result = 0x13421BFF;
diff --git a/tests/tcg/mipsel/test_dsp_r2_cmpgdu_eq_qb.c b/tests/tcg/mipsel/test_dsp_r2_cmpgdu_eq_qb.c
index 2d6340d6fb12..6314772051bd 100644
--- a/tests/tcg/mipsel/test_dsp_r2_cmpgdu_eq_qb.c
+++ b/tests/tcg/mipsel/test_dsp_r2_cmpgdu_eq_qb.c
@@ -7,6 +7,8 @@ int main()
int dsp;
int result;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rs = 0x11777066;
rt = 0x55AA70FF;
result = 0x02;
diff --git a/tests/tcg/mipsel/test_dsp_r2_cmpgdu_le_qb.c b/tests/tcg/mipsel/test_dsp_r2_cmpgdu_le_qb.c
index a0ecdca2ac2e..ec612e204dad 100644
--- a/tests/tcg/mipsel/test_dsp_r2_cmpgdu_le_qb.c
+++ b/tests/tcg/mipsel/test_dsp_r2_cmpgdu_le_qb.c
@@ -7,6 +7,8 @@ int main()
int dsp;
int result;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rs = 0x11777066;
rt = 0x55AA70FF;
result = 0x0F;
diff --git a/tests/tcg/mipsel/test_dsp_r2_cmpgdu_lt_qb.c b/tests/tcg/mipsel/test_dsp_r2_cmpgdu_lt_qb.c
index dba99e392c29..cbdcdc78dc8e 100644
--- a/tests/tcg/mipsel/test_dsp_r2_cmpgdu_lt_qb.c
+++ b/tests/tcg/mipsel/test_dsp_r2_cmpgdu_lt_qb.c
@@ -7,6 +7,8 @@ int main()
int dsp;
int result;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rs = 0x11777066;
rt = 0x55AA70FF;
result = 0x0D;
diff --git a/tests/tcg/mipsel/test_dsp_r2_dpa_w_ph.c b/tests/tcg/mipsel/test_dsp_r2_dpa_w_ph.c
index fae49f10eb95..3b58d4c66863 100644
--- a/tests/tcg/mipsel/test_dsp_r2_dpa_w_ph.c
+++ b/tests/tcg/mipsel/test_dsp_r2_dpa_w_ph.c
@@ -7,6 +7,8 @@ int main()
int ach = 5, acl = 5;
int resulth, resultl;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rs = 0x00FF00FF;
rt = 0x00010002;
resulth = 0x05;
diff --git a/tests/tcg/mipsel/test_dsp_r2_dpaqx_s_w_ph.c b/tests/tcg/mipsel/test_dsp_r2_dpaqx_s_w_ph.c
index ce8783024685..a7926b423f48 100644
--- a/tests/tcg/mipsel/test_dsp_r2_dpaqx_s_w_ph.c
+++ b/tests/tcg/mipsel/test_dsp_r2_dpaqx_s_w_ph.c
@@ -7,6 +7,8 @@ int main()
int ach = 5, acl = 5;
int resulth, resultl, resultdsp;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rs = 0x800000FF;
rt = 0x00018000;
resulth = 0x05;
diff --git a/tests/tcg/mipsel/test_dsp_r2_dpaqx_sa_w_ph.c b/tests/tcg/mipsel/test_dsp_r2_dpaqx_sa_w_ph.c
index d551d64ae293..e7a4e5ff255d 100644
--- a/tests/tcg/mipsel/test_dsp_r2_dpaqx_sa_w_ph.c
+++ b/tests/tcg/mipsel/test_dsp_r2_dpaqx_sa_w_ph.c
@@ -7,6 +7,8 @@ int main()
int ach, acl;
int resulth, resultl, resultdsp;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
ach = 0x00000005;
acl = 0x00000005;
rs = 0x00FF00FF;
diff --git a/tests/tcg/mipsel/test_dsp_r2_dpax_w_ph.c b/tests/tcg/mipsel/test_dsp_r2_dpax_w_ph.c
index 514797cfd1b4..f925c97ae12d 100644
--- a/tests/tcg/mipsel/test_dsp_r2_dpax_w_ph.c
+++ b/tests/tcg/mipsel/test_dsp_r2_dpax_w_ph.c
@@ -7,6 +7,8 @@ int main()
int ach = 5, acl = 5;
int resulth, resultl;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rs = 0x00FF00FF;
rt = 0x00010002;
resulth = 0x05;
diff --git a/tests/tcg/mipsel/test_dsp_r2_dps_w_ph.c b/tests/tcg/mipsel/test_dsp_r2_dps_w_ph.c
index f51f9b9d13d7..56393dd21b53 100644
--- a/tests/tcg/mipsel/test_dsp_r2_dps_w_ph.c
+++ b/tests/tcg/mipsel/test_dsp_r2_dps_w_ph.c
@@ -7,6 +7,8 @@ int main()
int ach = 5, acl = 5;
int resulth, resultl;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rs = 0x00FF00FF;
rt = 0x00010002;
resulth = 0x04;
diff --git a/tests/tcg/mipsel/test_dsp_r2_dpsqx_s_w_ph.c b/tests/tcg/mipsel/test_dsp_r2_dpsqx_s_w_ph.c
index e40543fd8292..ce711058d3a6 100644
--- a/tests/tcg/mipsel/test_dsp_r2_dpsqx_s_w_ph.c
+++ b/tests/tcg/mipsel/test_dsp_r2_dpsqx_s_w_ph.c
@@ -7,6 +7,8 @@ int main()
int ach = 5, acl = 5;
int resulth, resultl, resultdsp;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rs = 0xBC0123AD;
rt = 0x01643721;
resulth = 0x00000005;
diff --git a/tests/tcg/mipsel/test_dsp_r2_dpsqx_sa_w_ph.c b/tests/tcg/mipsel/test_dsp_r2_dpsqx_sa_w_ph.c
index 7da278eacc0e..6177894090ed 100644
--- a/tests/tcg/mipsel/test_dsp_r2_dpsqx_sa_w_ph.c
+++ b/tests/tcg/mipsel/test_dsp_r2_dpsqx_sa_w_ph.c
@@ -7,6 +7,8 @@ int main()
int ach = 5, acl = 5;
int resulth, resultl, resultdsp;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rs = 0xBC0123AD;
rt = 0x01643721;
resulth = 0x00;
diff --git a/tests/tcg/mipsel/test_dsp_r2_dpsx_w_ph.c b/tests/tcg/mipsel/test_dsp_r2_dpsx_w_ph.c
index bb49a4031d34..ac508e25c9f3 100644
--- a/tests/tcg/mipsel/test_dsp_r2_dpsx_w_ph.c
+++ b/tests/tcg/mipsel/test_dsp_r2_dpsx_w_ph.c
@@ -7,6 +7,8 @@ int main()
int ach = 5, acl = 5;
int resulth, resultl;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rs = 0xBC0123AD;
rt = 0x01643721;
resulth = 0x05;
diff --git a/tests/tcg/mipsel/test_dsp_r2_mul_ph.c b/tests/tcg/mipsel/test_dsp_r2_mul_ph.c
index c7e9d60d12e2..d8c3b6a1be7b 100644
--- a/tests/tcg/mipsel/test_dsp_r2_mul_ph.c
+++ b/tests/tcg/mipsel/test_dsp_r2_mul_ph.c
@@ -6,6 +6,8 @@ int main()
int rd, rs, rt, dsp;
int result, resultdsp;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rs = 0x03FB1234;
rt = 0x0BCC4321;
result = 0xF504F4B4;
diff --git a/tests/tcg/mipsel/test_dsp_r2_mul_s_ph.c b/tests/tcg/mipsel/test_dsp_r2_mul_s_ph.c
index 33da110de869..6feac41dd6e5 100644
--- a/tests/tcg/mipsel/test_dsp_r2_mul_s_ph.c
+++ b/tests/tcg/mipsel/test_dsp_r2_mul_s_ph.c
@@ -6,6 +6,8 @@ int main()
int rd, rs, rt, dsp;
int result, resultdsp;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rs = 0x03FB1234;
rt = 0x0BCC4321;
result = 0x7fff7FFF;
diff --git a/tests/tcg/mipsel/test_dsp_r2_mulq_rs_w.c b/tests/tcg/mipsel/test_dsp_r2_mulq_rs_w.c
index 7ba633bc17f7..5754484735dd 100644
--- a/tests/tcg/mipsel/test_dsp_r2_mulq_rs_w.c
+++ b/tests/tcg/mipsel/test_dsp_r2_mulq_rs_w.c
@@ -6,6 +6,8 @@ int main()
int rd, rs, rt, dsp;
int result, resultdsp;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rs = 0x80001234;
rt = 0x80004321;
result = 0x7FFFAAAB;
diff --git a/tests/tcg/mipsel/test_dsp_r2_mulq_s_ph.c b/tests/tcg/mipsel/test_dsp_r2_mulq_s_ph.c
index 00e015542e69..132f50d0a899 100644
--- a/tests/tcg/mipsel/test_dsp_r2_mulq_s_ph.c
+++ b/tests/tcg/mipsel/test_dsp_r2_mulq_s_ph.c
@@ -6,6 +6,8 @@ int main()
int rd, rs, rt, dsp;
int result, resultdsp;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rs = 0x80000000;
rt = 0x0ffc0000;
result = 0xF0040000;
diff --git a/tests/tcg/mipsel/test_dsp_r2_mulq_s_w.c b/tests/tcg/mipsel/test_dsp_r2_mulq_s_w.c
index 9c2be06cc08a..ffc802fb0e66 100644
--- a/tests/tcg/mipsel/test_dsp_r2_mulq_s_w.c
+++ b/tests/tcg/mipsel/test_dsp_r2_mulq_s_w.c
@@ -6,6 +6,8 @@ int main()
int rd, rs, rt, dsp;
int result, resultdsp;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rs = 0x80001234;
rt = 0x80004321;
result = 0x7FFFAAAB;
diff --git a/tests/tcg/mipsel/test_dsp_r2_mulsa_w_ph.c b/tests/tcg/mipsel/test_dsp_r2_mulsa_w_ph.c
index a6940939ca50..d55031f82d58 100644
--- a/tests/tcg/mipsel/test_dsp_r2_mulsa_w_ph.c
+++ b/tests/tcg/mipsel/test_dsp_r2_mulsa_w_ph.c
@@ -6,6 +6,8 @@ int main()
int rs, rt, ach, acl;
int resulth, resultl;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
ach = 0x05;
acl = 0x00BBDDCC;
rs = 0x80001234;
diff --git a/tests/tcg/mipsel/test_dsp_r2_mulsaq_s_w_ph.c b/tests/tcg/mipsel/test_dsp_r2_mulsaq_s_w_ph.c
index 06c91a43e7ea..3ec7b4c50b5b 100644
--- a/tests/tcg/mipsel/test_dsp_r2_mulsaq_s_w_ph.c
+++ b/tests/tcg/mipsel/test_dsp_r2_mulsaq_s_w_ph.c
@@ -6,6 +6,8 @@ int main()
int rs, rt, ach, acl;
int resulth, resultl;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
ach = 0x05;
acl = 0x00BBDDCC;
rs = 0x80001234;
diff --git a/tests/tcg/mipsel/test_dsp_r2_precr_qb_ph.c b/tests/tcg/mipsel/test_dsp_r2_precr_qb_ph.c
index 3a2b3fde0573..ee7eb8f99b80 100644
--- a/tests/tcg/mipsel/test_dsp_r2_precr_qb_ph.c
+++ b/tests/tcg/mipsel/test_dsp_r2_precr_qb_ph.c
@@ -6,6 +6,8 @@ int main()
int rd, rs, rt;
int result;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rs = 0x12345678;
rt = 0x87654321;
result = 0x34786521;
diff --git a/tests/tcg/mipsel/test_dsp_r2_precr_sra_ph_w.c b/tests/tcg/mipsel/test_dsp_r2_precr_sra_ph_w.c
index 5c9baab03d00..48bbf3ce49ac 100644
--- a/tests/tcg/mipsel/test_dsp_r2_precr_sra_ph_w.c
+++ b/tests/tcg/mipsel/test_dsp_r2_precr_sra_ph_w.c
@@ -6,6 +6,8 @@ int main()
int rs, rt;
int result;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rs = 0x12345678;
rt = 0x87654321;
result = 0x43215678;
diff --git a/tests/tcg/mipsel/test_dsp_r2_precr_sra_r_ph_w.c b/tests/tcg/mipsel/test_dsp_r2_precr_sra_r_ph_w.c
index 6474a108c057..396449764ae3 100644
--- a/tests/tcg/mipsel/test_dsp_r2_precr_sra_r_ph_w.c
+++ b/tests/tcg/mipsel/test_dsp_r2_precr_sra_r_ph_w.c
@@ -6,6 +6,8 @@ int main()
int rs, rt;
int result;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rs = 0x12345678;
rt = 0x87654321;
result = 0x43215678;
diff --git a/tests/tcg/mipsel/test_dsp_r2_prepend.c b/tests/tcg/mipsel/test_dsp_r2_prepend.c
index f6bcd47b2da9..736a4e2dd499 100644
--- a/tests/tcg/mipsel/test_dsp_r2_prepend.c
+++ b/tests/tcg/mipsel/test_dsp_r2_prepend.c
@@ -6,6 +6,8 @@ int main()
int rs, rt;
int result;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rs = 0x12345678;
rt = 0x87654321;
result = 0x87654321;
diff --git a/tests/tcg/mipsel/test_dsp_r2_shra_qb.c b/tests/tcg/mipsel/test_dsp_r2_shra_qb.c
index 48193de87ad0..530b79d39068 100644
--- a/tests/tcg/mipsel/test_dsp_r2_shra_qb.c
+++ b/tests/tcg/mipsel/test_dsp_r2_shra_qb.c
@@ -6,6 +6,8 @@ int main()
int rd, rt;
int result;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rt = 0x12345678;
result = 0x02060A0F;
diff --git a/tests/tcg/mipsel/test_dsp_r2_shra_r_qb.c b/tests/tcg/mipsel/test_dsp_r2_shra_r_qb.c
index 29afa0e4b07b..d38f4cb70825 100644
--- a/tests/tcg/mipsel/test_dsp_r2_shra_r_qb.c
+++ b/tests/tcg/mipsel/test_dsp_r2_shra_r_qb.c
@@ -6,6 +6,8 @@ int main()
int rd, rt;
int result;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rt = 0x12345678;
result = 0x02070B0F;
diff --git a/tests/tcg/mipsel/test_dsp_r2_shrav_qb.c b/tests/tcg/mipsel/test_dsp_r2_shrav_qb.c
index b21e1b7ca64a..2627285ac08d 100644
--- a/tests/tcg/mipsel/test_dsp_r2_shrav_qb.c
+++ b/tests/tcg/mipsel/test_dsp_r2_shrav_qb.c
@@ -6,6 +6,8 @@ int main()
int rd, rs, rt;
int result;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rs = 0x03;
rt = 0x12345678;
result = 0x02060A0F;
diff --git a/tests/tcg/mipsel/test_dsp_r2_shrav_r_qb.c b/tests/tcg/mipsel/test_dsp_r2_shrav_r_qb.c
index 9ea8aa0cbb90..7527e4ef4fb5 100644
--- a/tests/tcg/mipsel/test_dsp_r2_shrav_r_qb.c
+++ b/tests/tcg/mipsel/test_dsp_r2_shrav_r_qb.c
@@ -6,6 +6,8 @@ int main()
int rd, rs, rt;
int result;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rs = 0x03;
rt = 0x12345678;
result = 0x02070B0F;
diff --git a/tests/tcg/mipsel/test_dsp_r2_shrl_ph.c b/tests/tcg/mipsel/test_dsp_r2_shrl_ph.c
index 724b9a7a4691..8ce0a4ef26a1 100644
--- a/tests/tcg/mipsel/test_dsp_r2_shrl_ph.c
+++ b/tests/tcg/mipsel/test_dsp_r2_shrl_ph.c
@@ -6,6 +6,8 @@ int main()
int rd, rt;
int result;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rt = 0x12345678;
result = 0x009102B3;
diff --git a/tests/tcg/mipsel/test_dsp_r2_shrlv_ph.c b/tests/tcg/mipsel/test_dsp_r2_shrlv_ph.c
index ac79aa69acf0..7bff8170422a 100644
--- a/tests/tcg/mipsel/test_dsp_r2_shrlv_ph.c
+++ b/tests/tcg/mipsel/test_dsp_r2_shrlv_ph.c
@@ -6,6 +6,8 @@ int main()
int rd, rs, rt;
int result;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rs = 0x05;
rt = 0x12345678;
result = 0x009102B3;
diff --git a/tests/tcg/mipsel/test_dsp_r2_subqh_ph.c b/tests/tcg/mipsel/test_dsp_r2_subqh_ph.c
index dbc096734ceb..cadd988dea43 100644
--- a/tests/tcg/mipsel/test_dsp_r2_subqh_ph.c
+++ b/tests/tcg/mipsel/test_dsp_r2_subqh_ph.c
@@ -6,6 +6,8 @@ int main()
int rd, rs, rt;
int result;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rs = 0x12345678;
rt = 0x87654321;
result = 0x456709AB;
diff --git a/tests/tcg/mipsel/test_dsp_r2_subqh_r_ph.c b/tests/tcg/mipsel/test_dsp_r2_subqh_r_ph.c
index 24ef0f1aeb91..53a2e677c6bf 100644
--- a/tests/tcg/mipsel/test_dsp_r2_subqh_r_ph.c
+++ b/tests/tcg/mipsel/test_dsp_r2_subqh_r_ph.c
@@ -6,6 +6,8 @@ int main()
int rd, rs, rt;
int result;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rs = 0x12345678;
rt = 0x87654321;
result = 0x456809AC;
diff --git a/tests/tcg/mipsel/test_dsp_r2_subqh_r_w.c b/tests/tcg/mipsel/test_dsp_r2_subqh_r_w.c
index d460f8630fae..fc97a1984cef 100644
--- a/tests/tcg/mipsel/test_dsp_r2_subqh_r_w.c
+++ b/tests/tcg/mipsel/test_dsp_r2_subqh_r_w.c
@@ -6,6 +6,8 @@ int main()
int rd, rs, rt;
int result;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rs = 0x12345678;
rt = 0x87654321;
result = 0x456789AC;
diff --git a/tests/tcg/mipsel/test_dsp_r2_subqh_w.c b/tests/tcg/mipsel/test_dsp_r2_subqh_w.c
index 42be3deb80a3..6c8db811b935 100644
--- a/tests/tcg/mipsel/test_dsp_r2_subqh_w.c
+++ b/tests/tcg/mipsel/test_dsp_r2_subqh_w.c
@@ -6,6 +6,8 @@ int main()
int rd, rs, rt;
int result;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rs = 0x12345678;
rt = 0x87654321;
result = 0x456789AB;
diff --git a/tests/tcg/mipsel/test_dsp_r2_subu_ph.c b/tests/tcg/mipsel/test_dsp_r2_subu_ph.c
index 0d39a017c79d..209d88c2c7b2 100644
--- a/tests/tcg/mipsel/test_dsp_r2_subu_ph.c
+++ b/tests/tcg/mipsel/test_dsp_r2_subu_ph.c
@@ -6,6 +6,8 @@ int main()
int rd, rs, rt, dsp;
int result, resultdsp;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rs = 0x87654321;
rt = 0x11111111;
result = 0x76543210;
diff --git a/tests/tcg/mipsel/test_dsp_r2_subu_s_ph.c b/tests/tcg/mipsel/test_dsp_r2_subu_s_ph.c
index 8e4da4f3e544..0ca208fe4bca 100644
--- a/tests/tcg/mipsel/test_dsp_r2_subu_s_ph.c
+++ b/tests/tcg/mipsel/test_dsp_r2_subu_s_ph.c
@@ -6,6 +6,8 @@ int main()
int rd, rs, rt, dsp;
int result, resultdsp;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rs = 0x87654321;
rt = 0x12345678;
result = 0x75310000;
diff --git a/tests/tcg/mipsel/test_dsp_r2_subuh_qb.c b/tests/tcg/mipsel/test_dsp_r2_subuh_qb.c
index 92cfc764b8c9..0dce73bbea39 100644
--- a/tests/tcg/mipsel/test_dsp_r2_subuh_qb.c
+++ b/tests/tcg/mipsel/test_dsp_r2_subuh_qb.c
@@ -6,6 +6,8 @@ int main()
int rd, rs, rt;
int result;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rs = 0x12345678;
rt = 0x87654321;
result = 0xC5E7092B;
diff --git a/tests/tcg/mipsel/test_dsp_r2_subuh_r_qb.c b/tests/tcg/mipsel/test_dsp_r2_subuh_r_qb.c
index dac81d47db60..dc83aa5907aa 100644
--- a/tests/tcg/mipsel/test_dsp_r2_subuh_r_qb.c
+++ b/tests/tcg/mipsel/test_dsp_r2_subuh_r_qb.c
@@ -6,6 +6,8 @@ int main()
int rd, rs, rt;
int result;
+ __asm("wrdsp $zero, 0x3f\n\t");
+
rs = 0x12345678;
rt = 0x87654321;
result = 0xC6E80A2C;
--
2.55.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 2/4] tests/tcg/mips: Group DSP tests
2026-10-28 19:21 [PATCH 0/4] tests/tcg: Massage MIPS tests for easier maintenance Philippe Mathieu-Daudé
2026-10-28 19:21 ` [PATCH 1/4] tests/tcg/mips: Clear DSPControl at start of DSP tests Philippe Mathieu-Daudé
@ 2026-10-28 19:21 ` Philippe Mathieu-Daudé
2026-10-28 19:21 ` [PATCH 3/4] tests/tcg/mips: Group Release 6 tests Philippe Mathieu-Daudé
` (2 subsequent siblings)
4 siblings, 0 replies; 9+ messages in thread
From: Philippe Mathieu-Daudé @ 2026-10-28 19:21 UTC (permalink / raw)
To: qemu-devel
Cc: Aleksandar Rikalo, Aurelien Jarno, Jiaxun Yang,
Philippe Mathieu-Daudé, Pierrick Bouvier
Although meson parallelize build, building the 159 tests is overkill.
Keep the per-opcode files unchanged, but add 8 new files for each
group of instructions:
- arith: add, subtract, absq, modsub, raddu
- cmp: cmp, cmpu, cmpgu, cmpgdu, pick
- dot: dpa/dps, maq, madd/msub, mult, mulsa
- mul: muleq, muleu, mulq, mul
- acc: ext*, shilo, mthlip, mfhi/mflo/mthi/mtlo
- shift: shll, shra, shrl and their variants
- pack: prece*, precr*, packrl, repl, append/prepend/balign, bitrev, insv
- ctrl: lbux/lhx/lwx, bposge32, rddsp/wrdsp
The tests still call assert() so the first failure aborts the whole
group but we can still identify the opcode in the assert message.
Drop the unuseful hello-world file.
Signed-off-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
---
tests/tcg/mipsel/test_dsp_acc.c | 105 +++++++++++++++++
tests/tcg/mipsel/test_dsp_arith.c | 175 ++++++++++++++++++++++++++++
tests/tcg/mipsel/test_dsp_cmp.c | 80 +++++++++++++
tests/tcg/mipsel/test_dsp_ctrl.c | 40 +++++++
tests/tcg/mipsel/test_dsp_dot.c | 150 ++++++++++++++++++++++++
tests/tcg/mipsel/test_dsp_mul.c | 60 ++++++++++
tests/tcg/mipsel/test_dsp_pack.c | 145 +++++++++++++++++++++++
tests/tcg/mipsel/test_dsp_r1_main.c | 6 -
tests/tcg/mipsel/test_dsp_shift.c | 120 +++++++++++++++++++
tests/tcg/mipsel/meson.build | 168 ++------------------------
10 files changed, 883 insertions(+), 166 deletions(-)
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
diff --git a/tests/tcg/mipsel/test_dsp_acc.c b/tests/tcg/mipsel/test_dsp_acc.c
new file mode 100644
index 000000000000..57710072d4bb
--- /dev/null
+++ b/tests/tcg/mipsel/test_dsp_acc.c
@@ -0,0 +1,105 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+/* MIPS DSP ASE tests: accumulator access and extract */
+
+#define main test_dsp_r1_extp
+#include "test_dsp_r1_extp.c"
+#undef main
+
+#define main test_dsp_r1_extpdp
+#include "test_dsp_r1_extpdp.c"
+#undef main
+
+#define main test_dsp_r1_extpdpv
+#include "test_dsp_r1_extpdpv.c"
+#undef main
+
+#define main test_dsp_r1_extpv
+#include "test_dsp_r1_extpv.c"
+#undef main
+
+#define main test_dsp_r1_extr_r_w
+#include "test_dsp_r1_extr_r_w.c"
+#undef main
+
+#define main test_dsp_r1_extr_rs_w
+#include "test_dsp_r1_extr_rs_w.c"
+#undef main
+
+#define main test_dsp_r1_extr_s_h
+#include "test_dsp_r1_extr_s_h.c"
+#undef main
+
+#define main test_dsp_r1_extr_w
+#include "test_dsp_r1_extr_w.c"
+#undef main
+
+#define main test_dsp_r1_extrv_r_w
+#include "test_dsp_r1_extrv_r_w.c"
+#undef main
+
+#define main test_dsp_r1_extrv_rs_w
+#include "test_dsp_r1_extrv_rs_w.c"
+#undef main
+
+#define main test_dsp_r1_extrv_s_h
+#include "test_dsp_r1_extrv_s_h.c"
+#undef main
+
+#define main test_dsp_r1_extrv_w
+#include "test_dsp_r1_extrv_w.c"
+#undef main
+
+#define main test_dsp_r1_mfhi
+#include "test_dsp_r1_mfhi.c"
+#undef main
+
+#define main test_dsp_r1_mflo
+#include "test_dsp_r1_mflo.c"
+#undef main
+
+#define main test_dsp_r1_mthi
+#include "test_dsp_r1_mthi.c"
+#undef main
+
+#define main test_dsp_r1_mthlip
+#include "test_dsp_r1_mthlip.c"
+#undef main
+
+#define main test_dsp_r1_mtlo
+#include "test_dsp_r1_mtlo.c"
+#undef main
+
+#define main test_dsp_r1_shilo
+#include "test_dsp_r1_shilo.c"
+#undef main
+
+#define main test_dsp_r1_shilov
+#include "test_dsp_r1_shilov.c"
+#undef main
+
+int main(void)
+{
+ int ret = 0;
+
+ ret |= test_dsp_r1_extp();
+ ret |= test_dsp_r1_extpdp();
+ ret |= test_dsp_r1_extpdpv();
+ ret |= test_dsp_r1_extpv();
+ ret |= test_dsp_r1_extr_r_w();
+ ret |= test_dsp_r1_extr_rs_w();
+ ret |= test_dsp_r1_extr_s_h();
+ ret |= test_dsp_r1_extr_w();
+ ret |= test_dsp_r1_extrv_r_w();
+ ret |= test_dsp_r1_extrv_rs_w();
+ ret |= test_dsp_r1_extrv_s_h();
+ ret |= test_dsp_r1_extrv_w();
+ ret |= test_dsp_r1_mfhi();
+ ret |= test_dsp_r1_mflo();
+ ret |= test_dsp_r1_mthi();
+ ret |= test_dsp_r1_mthlip();
+ ret |= test_dsp_r1_mtlo();
+ ret |= test_dsp_r1_shilo();
+ ret |= test_dsp_r1_shilov();
+
+ return ret;
+}
diff --git a/tests/tcg/mipsel/test_dsp_arith.c b/tests/tcg/mipsel/test_dsp_arith.c
new file mode 100644
index 000000000000..37a47cd036c5
--- /dev/null
+++ b/tests/tcg/mipsel/test_dsp_arith.c
@@ -0,0 +1,175 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+/* MIPS DSP ASE tests: add, subtract and absolute value */
+
+#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;
+
+ ret |= test_dsp_r1_absq_s_ph();
+ ret |= test_dsp_r1_absq_s_w();
+ ret |= test_dsp_r1_addq_ph();
+ ret |= test_dsp_r1_addq_s_ph();
+ ret |= test_dsp_r1_addq_s_w();
+ ret |= test_dsp_r1_addsc();
+ ret |= test_dsp_r1_addu_qb();
+ ret |= test_dsp_r1_addu_s_qb();
+ ret |= test_dsp_r1_addwc();
+ ret |= test_dsp_r1_modsub();
+ ret |= test_dsp_r1_raddu_w_qb();
+ ret |= test_dsp_r1_subq_ph();
+ ret |= test_dsp_r1_subq_s_ph();
+ ret |= test_dsp_r1_subq_s_w();
+ ret |= test_dsp_r1_subu_qb();
+ ret |= test_dsp_r1_subu_s_qb();
+ ret |= test_dsp_r2_absq_s_qb();
+ ret |= test_dsp_r2_addqh_ph();
+ ret |= test_dsp_r2_addqh_r_ph();
+ ret |= test_dsp_r2_addqh_r_w();
+ ret |= test_dsp_r2_addqh_w();
+ ret |= test_dsp_r2_addu_ph();
+ ret |= test_dsp_r2_addu_s_ph();
+ ret |= test_dsp_r2_adduh_qb();
+ ret |= test_dsp_r2_adduh_r_qb();
+ ret |= test_dsp_r2_subqh_ph();
+ ret |= test_dsp_r2_subqh_r_ph();
+ ret |= test_dsp_r2_subqh_r_w();
+ ret |= test_dsp_r2_subqh_w();
+ ret |= test_dsp_r2_subu_ph();
+ ret |= test_dsp_r2_subu_s_ph();
+ ret |= test_dsp_r2_subuh_qb();
+ ret |= test_dsp_r2_subuh_r_qb();
+
+ return ret;
+}
diff --git a/tests/tcg/mipsel/test_dsp_cmp.c b/tests/tcg/mipsel/test_dsp_cmp.c
new file mode 100644
index 000000000000..47553313eb6a
--- /dev/null
+++ b/tests/tcg/mipsel/test_dsp_cmp.c
@@ -0,0 +1,80 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+/* MIPS DSP ASE tests: compare and pick */
+
+#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;
+
+ ret |= test_dsp_r1_cmp_eq_ph();
+ ret |= test_dsp_r1_cmp_le_ph();
+ ret |= test_dsp_r1_cmp_lt_ph();
+ ret |= test_dsp_r1_cmpgu_eq_qb();
+ ret |= test_dsp_r1_cmpgu_le_qb();
+ ret |= test_dsp_r1_cmpgu_lt_qb();
+ ret |= test_dsp_r1_cmpu_eq_qb();
+ ret |= test_dsp_r1_cmpu_le_qb();
+ ret |= test_dsp_r1_cmpu_lt_qb();
+ ret |= test_dsp_r1_pick_ph();
+ ret |= test_dsp_r1_pick_qb();
+ ret |= test_dsp_r2_cmpgdu_eq_qb();
+ ret |= test_dsp_r2_cmpgdu_le_qb();
+ ret |= test_dsp_r2_cmpgdu_lt_qb();
+
+ return ret;
+}
diff --git a/tests/tcg/mipsel/test_dsp_ctrl.c b/tests/tcg/mipsel/test_dsp_ctrl.c
new file mode 100644
index 000000000000..40b0bd1b785b
--- /dev/null
+++ b/tests/tcg/mipsel/test_dsp_ctrl.c
@@ -0,0 +1,40 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+/* MIPS DSP ASE tests: indexed load and DSPControl access */
+
+#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;
+
+ ret |= test_dsp_r1_bposge32();
+ ret |= test_dsp_r1_lbux();
+ ret |= test_dsp_r1_lhx();
+ ret |= test_dsp_r1_lwx();
+ ret |= test_dsp_r1_rddsp();
+ ret |= test_dsp_r1_wrdsp();
+
+ return ret;
+}
diff --git a/tests/tcg/mipsel/test_dsp_dot.c b/tests/tcg/mipsel/test_dsp_dot.c
new file mode 100644
index 000000000000..5a6b9f0b0853
--- /dev/null
+++ b/tests/tcg/mipsel/test_dsp_dot.c
@@ -0,0 +1,150 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+/* MIPS DSP ASE tests: dot product and multiply-accumulate */
+
+#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;
+
+ ret |= test_dsp_r1_dpaq_s_w_ph();
+ ret |= test_dsp_r1_dpaq_sa_l_w();
+ ret |= test_dsp_r1_dpau_h_qbl();
+ ret |= test_dsp_r1_dpau_h_qbr();
+ ret |= test_dsp_r1_dpsq_s_w_ph();
+ ret |= test_dsp_r1_dpsq_sa_l_w();
+ ret |= test_dsp_r1_dpsu_h_qbl();
+ ret |= test_dsp_r1_dpsu_h_qbr();
+ ret |= test_dsp_r1_maq_s_w_phl();
+ ret |= test_dsp_r1_maq_s_w_phr();
+ ret |= test_dsp_r1_maq_sa_w_phl();
+ ret |= test_dsp_r1_maq_sa_w_phr();
+ ret |= test_dsp_r1_madd();
+ ret |= test_dsp_r1_maddu();
+ ret |= test_dsp_r1_msub();
+ ret |= test_dsp_r1_msubu();
+ ret |= test_dsp_r1_mult();
+ ret |= test_dsp_r1_multu();
+ ret |= test_dsp_r2_dpa_w_ph();
+ ret |= test_dsp_r2_dpaqx_s_w_ph();
+ ret |= test_dsp_r2_dpaqx_sa_w_ph();
+ ret |= test_dsp_r2_dpax_w_ph();
+ ret |= test_dsp_r2_dps_w_ph();
+ ret |= test_dsp_r2_dpsqx_s_w_ph();
+ ret |= test_dsp_r2_dpsqx_sa_w_ph();
+ ret |= test_dsp_r2_dpsx_w_ph();
+ ret |= test_dsp_r2_mulsa_w_ph();
+ ret |= test_dsp_r2_mulsaq_s_w_ph();
+
+ return ret;
+}
diff --git a/tests/tcg/mipsel/test_dsp_mul.c b/tests/tcg/mipsel/test_dsp_mul.c
new file mode 100644
index 000000000000..9ffa52683ccc
--- /dev/null
+++ b/tests/tcg/mipsel/test_dsp_mul.c
@@ -0,0 +1,60 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+/* MIPS DSP ASE tests: multiply */
+
+#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;
+
+ ret |= test_dsp_r1_muleq_s_w_phl();
+ ret |= test_dsp_r1_muleq_s_w_phr();
+ ret |= test_dsp_r1_muleu_s_ph_qbl();
+ ret |= test_dsp_r1_muleu_s_ph_qbr();
+ ret |= test_dsp_r1_mulq_rs_ph();
+ ret |= test_dsp_r2_mul_ph();
+ ret |= test_dsp_r2_mul_s_ph();
+ ret |= test_dsp_r2_mulq_rs_w();
+ ret |= test_dsp_r2_mulq_s_ph();
+ ret |= test_dsp_r2_mulq_s_w();
+
+ return ret;
+}
diff --git a/tests/tcg/mipsel/test_dsp_pack.c b/tests/tcg/mipsel/test_dsp_pack.c
new file mode 100644
index 000000000000..a2a85061d3ec
--- /dev/null
+++ b/tests/tcg/mipsel/test_dsp_pack.c
@@ -0,0 +1,145 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+/* MIPS DSP ASE tests: precision, pack, replicate and bit insert */
+
+#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;
+
+ ret |= test_dsp_r1_bitrev();
+ ret |= test_dsp_r1_insv();
+ ret |= test_dsp_r1_packrl_ph();
+ ret |= test_dsp_r1_preceq_w_phl();
+ ret |= test_dsp_r1_preceq_w_phr();
+ ret |= test_dsp_r1_precequ_ph_qbl();
+ ret |= test_dsp_r1_precequ_ph_qbla();
+ ret |= test_dsp_r1_precequ_ph_qbr();
+ ret |= test_dsp_r1_precequ_ph_qbra();
+ ret |= test_dsp_r1_preceu_ph_qbl();
+ ret |= test_dsp_r1_preceu_ph_qbla();
+ ret |= test_dsp_r1_preceu_ph_qbr();
+ ret |= test_dsp_r1_preceu_ph_qbra();
+ ret |= test_dsp_r1_precrq_ph_w();
+ ret |= test_dsp_r1_precrq_qb_ph();
+ ret |= test_dsp_r1_precrq_rs_ph_w();
+ ret |= test_dsp_r1_precrqu_s_qb_ph();
+ ret |= test_dsp_r1_repl_ph();
+ ret |= test_dsp_r1_repl_qb();
+ ret |= test_dsp_r1_replv_ph();
+ ret |= test_dsp_r1_replv_qb();
+ ret |= test_dsp_r2_append();
+ ret |= test_dsp_r2_balign();
+ ret |= test_dsp_r2_precr_qb_ph();
+ ret |= test_dsp_r2_precr_sra_ph_w();
+ ret |= test_dsp_r2_precr_sra_r_ph_w();
+ ret |= test_dsp_r2_prepend();
+
+ return ret;
+}
diff --git a/tests/tcg/mipsel/test_dsp_r1_main.c b/tests/tcg/mipsel/test_dsp_r1_main.c
deleted file mode 100644
index b296b20c9254..000000000000
--- a/tests/tcg/mipsel/test_dsp_r1_main.c
+++ /dev/null
@@ -1,6 +0,0 @@
-#include<stdio.h>
-
-int main()
-{
- printf("hello world\n");
-}
diff --git a/tests/tcg/mipsel/test_dsp_shift.c b/tests/tcg/mipsel/test_dsp_shift.c
new file mode 100644
index 000000000000..a88e46508fab
--- /dev/null
+++ b/tests/tcg/mipsel/test_dsp_shift.c
@@ -0,0 +1,120 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+/* MIPS DSP ASE tests: shift */
+
+#define main test_dsp_r1_shll_ph
+#include "test_dsp_r1_shll_ph.c"
+#undef main
+
+#define main test_dsp_r1_shll_qb
+#include "test_dsp_r1_shll_qb.c"
+#undef main
+
+#define main test_dsp_r1_shll_s_ph
+#include "test_dsp_r1_shll_s_ph.c"
+#undef main
+
+#define main test_dsp_r1_shll_s_w
+#include "test_dsp_r1_shll_s_w.c"
+#undef main
+
+#define main test_dsp_r1_shllv_ph
+#include "test_dsp_r1_shllv_ph.c"
+#undef main
+
+#define main test_dsp_r1_shllv_qb
+#include "test_dsp_r1_shllv_qb.c"
+#undef main
+
+#define main test_dsp_r1_shllv_s_ph
+#include "test_dsp_r1_shllv_s_ph.c"
+#undef main
+
+#define main test_dsp_r1_shllv_s_w
+#include "test_dsp_r1_shllv_s_w.c"
+#undef main
+
+#define main test_dsp_r1_shra_ph
+#include "test_dsp_r1_shra_ph.c"
+#undef main
+
+#define main test_dsp_r1_shra_r_ph
+#include "test_dsp_r1_shra_r_ph.c"
+#undef main
+
+#define main test_dsp_r1_shra_r_w
+#include "test_dsp_r1_shra_r_w.c"
+#undef main
+
+#define main test_dsp_r1_shrav_ph
+#include "test_dsp_r1_shrav_ph.c"
+#undef main
+
+#define main test_dsp_r1_shrav_r_ph
+#include "test_dsp_r1_shrav_r_ph.c"
+#undef main
+
+#define main test_dsp_r1_shrav_r_w
+#include "test_dsp_r1_shrav_r_w.c"
+#undef main
+
+#define main test_dsp_r1_shrl_qb
+#include "test_dsp_r1_shrl_qb.c"
+#undef main
+
+#define main test_dsp_r1_shrlv_qb
+#include "test_dsp_r1_shrlv_qb.c"
+#undef main
+
+#define main test_dsp_r2_shra_qb
+#include "test_dsp_r2_shra_qb.c"
+#undef main
+
+#define main test_dsp_r2_shra_r_qb
+#include "test_dsp_r2_shra_r_qb.c"
+#undef main
+
+#define main test_dsp_r2_shrav_qb
+#include "test_dsp_r2_shrav_qb.c"
+#undef main
+
+#define main test_dsp_r2_shrav_r_qb
+#include "test_dsp_r2_shrav_r_qb.c"
+#undef main
+
+#define main test_dsp_r2_shrl_ph
+#include "test_dsp_r2_shrl_ph.c"
+#undef main
+
+#define main test_dsp_r2_shrlv_ph
+#include "test_dsp_r2_shrlv_ph.c"
+#undef main
+
+int main(void)
+{
+ int ret = 0;
+
+ ret |= test_dsp_r1_shll_ph();
+ ret |= test_dsp_r1_shll_qb();
+ ret |= test_dsp_r1_shll_s_ph();
+ ret |= test_dsp_r1_shll_s_w();
+ ret |= test_dsp_r1_shllv_ph();
+ ret |= test_dsp_r1_shllv_qb();
+ ret |= test_dsp_r1_shllv_s_ph();
+ ret |= test_dsp_r1_shllv_s_w();
+ ret |= test_dsp_r1_shra_ph();
+ ret |= test_dsp_r1_shra_r_ph();
+ ret |= test_dsp_r1_shra_r_w();
+ ret |= test_dsp_r1_shrav_ph();
+ ret |= test_dsp_r1_shrav_r_ph();
+ ret |= test_dsp_r1_shrav_r_w();
+ ret |= test_dsp_r1_shrl_qb();
+ ret |= test_dsp_r1_shrlv_qb();
+ ret |= test_dsp_r2_shra_qb();
+ ret |= test_dsp_r2_shra_r_qb();
+ ret |= test_dsp_r2_shrav_qb();
+ ret |= test_dsp_r2_shrav_r_qb();
+ ret |= test_dsp_r2_shrl_ph();
+ ret |= test_dsp_r2_shrlv_ph();
+
+ return ret;
+}
diff --git a/tests/tcg/mipsel/meson.build b/tests/tcg/mipsel/meson.build
index c9e869b000f4..d0745c2c185f 100644
--- a/tests/tcg/mipsel/meson.build
+++ b/tests/tcg/mipsel/meson.build
@@ -4,166 +4,14 @@ tests = []
tests += tcg_tests['multiarch-linux-user']['tests']
tests_dsp = [
- '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_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',
- '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_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',
- '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_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',
- '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_raddu_w_qb.c',
- 'test_dsp_r1_rddsp.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_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',
- '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_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',
- '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',
- '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',
- 'test_dsp_r2_prepend.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_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',
+ 'test_dsp_acc.c',
+ 'test_dsp_arith.c',
+ 'test_dsp_cmp.c',
+ 'test_dsp_ctrl.c',
+ 'test_dsp_dot.c',
+ 'test_dsp_mul.c',
+ 'test_dsp_pack.c',
+ 'test_dsp_shift.c',
]
foreach src: tests_dsp
--
2.55.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 3/4] tests/tcg/mips: Group Release 6 tests
2026-10-28 19:21 [PATCH 0/4] tests/tcg: Massage MIPS tests for easier maintenance Philippe Mathieu-Daudé
2026-10-28 19:21 ` [PATCH 1/4] tests/tcg/mips: Clear DSPControl at start of DSP tests Philippe Mathieu-Daudé
2026-10-28 19:21 ` [PATCH 2/4] tests/tcg/mips: Group " Philippe Mathieu-Daudé
@ 2026-10-28 19:21 ` Philippe Mathieu-Daudé
2026-10-28 19:21 ` [PATCH 4/4] tests/tcg/mips: Group MSA tests Philippe Mathieu-Daudé
2026-10-28 20:07 ` [PATCH 0/4] tests/tcg: Massage MIPS tests for easier maintenance Pierrick Bouvier
4 siblings, 0 replies; 9+ messages in thread
From: Philippe Mathieu-Daudé @ 2026-10-28 19:21 UTC (permalink / raw)
To: qemu-devel
Cc: Aleksandar Rikalo, Aurelien Jarno, Jiaxun Yang,
Philippe Mathieu-Daudé, Pierrick Bouvier
Although meson parallelize build, building the 32 tests is overkill.
Keep the per-opcode files unchanged, but add 5 new files for each
group of instructions:
- logic: and, nor, or, xor
- bitopts: bitswap, dbitswap, clo, clz, dclo, dclz
- multiply: mul, muh, mulu, muhu, dmul, dmuh, dmulu, dmuhu
- shift: sllv, srav, srlv, dsllv, dsrav, dsrlv
- crc: crc32b/h/w/d, crc32cb/ch/cw/cd
These tests return a status instead of calling assert(), so one
failing test doesn't stop the rest of its group (except if crashing
on an illegal instruction).
Signed-off-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
---
tests/tcg/mips64/test_mips64r6_bitops.c | 46 ++++++++++++++++++
tests/tcg/mips64/test_mips64r6_crc.c | 58 +++++++++++++++++++++++
tests/tcg/mips64/test_mips64r6_logic.c | 34 +++++++++++++
tests/tcg/mips64/test_mips64r6_multiply.c | 58 +++++++++++++++++++++++
tests/tcg/mips64/test_mips64r6_shift.c | 46 ++++++++++++++++++
tests/tcg/mips64/meson.build | 37 ++-------------
6 files changed, 247 insertions(+), 32 deletions(-)
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
diff --git a/tests/tcg/mips64/test_mips64r6_bitops.c b/tests/tcg/mips64/test_mips64r6_bitops.c
new file mode 100644
index 000000000000..c031a55f504f
--- /dev/null
+++ b/tests/tcg/mips64/test_mips64r6_bitops.c
@@ -0,0 +1,46 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+/* MIPS64R6 tests: bit count and bit swap */
+
+#define main test_mips64r6_bitswap
+#include "test_mips64r6_bitswap.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_mips64r6_dbitswap
+#include "test_mips64r6_dbitswap.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_mips64r6_clo
+#include "test_mips64r6_clo.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_mips64r6_clz
+#include "test_mips64r6_clz.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_mips64r6_dclo
+#include "test_mips64r6_dclo.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_mips64r6_dclz
+#include "test_mips64r6_dclz.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+int main(void)
+{
+ int ret = 0;
+
+ ret |= test_mips64r6_bitswap();
+ ret |= test_mips64r6_dbitswap();
+ ret |= test_mips64r6_clo();
+ ret |= test_mips64r6_clz();
+ ret |= test_mips64r6_dclo();
+ ret |= test_mips64r6_dclz();
+
+ return ret ? 1 : 0;
+}
diff --git a/tests/tcg/mips64/test_mips64r6_crc.c b/tests/tcg/mips64/test_mips64r6_crc.c
new file mode 100644
index 000000000000..dd8d2d2bfcae
--- /dev/null
+++ b/tests/tcg/mips64/test_mips64r6_crc.c
@@ -0,0 +1,58 @@
+/* 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
+
+int main(void)
+{
+ int ret = 0;
+
+ ret |= test_mips64r6_crc32b();
+ ret |= test_mips64r6_crc32h();
+ ret |= test_mips64r6_crc32w();
+ ret |= test_mips64r6_crc32d();
+ ret |= test_mips64r6_crc32cb();
+ ret |= test_mips64r6_crc32ch();
+ ret |= test_mips64r6_crc32cw();
+ ret |= test_mips64r6_crc32cd();
+
+ return ret ? 1 : 0;
+}
diff --git a/tests/tcg/mips64/test_mips64r6_logic.c b/tests/tcg/mips64/test_mips64r6_logic.c
new file mode 100644
index 000000000000..c4c4c4c32164
--- /dev/null
+++ b/tests/tcg/mips64/test_mips64r6_logic.c
@@ -0,0 +1,34 @@
+/* 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
+
+int main(void)
+{
+ int ret = 0;
+
+ ret |= test_mips64r6_and();
+ ret |= test_mips64r6_nor();
+ ret |= test_mips64r6_or();
+ ret |= test_mips64r6_xor();
+
+ return ret ? 1 : 0;
+}
diff --git a/tests/tcg/mips64/test_mips64r6_multiply.c b/tests/tcg/mips64/test_mips64r6_multiply.c
new file mode 100644
index 000000000000..fceacbbed065
--- /dev/null
+++ b/tests/tcg/mips64/test_mips64r6_multiply.c
@@ -0,0 +1,58 @@
+/* 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
+
+int main(void)
+{
+ int ret = 0;
+
+ ret |= test_mips64r6_mul();
+ ret |= test_mips64r6_muh();
+ ret |= test_mips64r6_mulu();
+ ret |= test_mips64r6_muhu();
+ ret |= test_mips64r6_dmul();
+ ret |= test_mips64r6_dmuh();
+ ret |= test_mips64r6_dmulu();
+ ret |= test_mips64r6_dmuhu();
+
+ return ret ? 1 : 0;
+}
diff --git a/tests/tcg/mips64/test_mips64r6_shift.c b/tests/tcg/mips64/test_mips64r6_shift.c
new file mode 100644
index 000000000000..786dfe84bef4
--- /dev/null
+++ b/tests/tcg/mips64/test_mips64r6_shift.c
@@ -0,0 +1,46 @@
+/* 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
+
+int main(void)
+{
+ int ret = 0;
+
+ ret |= test_mips64r6_sllv();
+ ret |= test_mips64r6_srav();
+ ret |= test_mips64r6_srlv();
+ ret |= test_mips64r6_dsllv();
+ ret |= test_mips64r6_dsrav();
+ ret |= test_mips64r6_dsrlv();
+
+ return ret ? 1 : 0;
+}
diff --git a/tests/tcg/mips64/meson.build b/tests/tcg/mips64/meson.build
index c80a3716f559..495acf3b81a6 100644
--- a/tests/tcg/mips64/meson.build
+++ b/tests/tcg/mips64/meson.build
@@ -27,38 +27,11 @@ endif
tests = []
tests_mips64r6 = [
- '../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',
- '../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_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',
- '../mips64/test_mips64r6_dmulu.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_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',
+ '../mips64/test_mips64r6_bitops.c',
+ '../mips64/test_mips64r6_crc.c',
+ '../mips64/test_mips64r6_logic.c',
+ '../mips64/test_mips64r6_multiply.c',
+ '../mips64/test_mips64r6_shift.c',
]
foreach src: tests_mips64r6
--
2.55.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 4/4] tests/tcg/mips: Group MSA tests
2026-10-28 19:21 [PATCH 0/4] tests/tcg: Massage MIPS tests for easier maintenance Philippe Mathieu-Daudé
` (2 preceding siblings ...)
2026-10-28 19:21 ` [PATCH 3/4] tests/tcg/mips: Group Release 6 tests Philippe Mathieu-Daudé
@ 2026-10-28 19:21 ` Philippe Mathieu-Daudé
2026-10-28 20:07 ` [PATCH 0/4] tests/tcg: Massage MIPS tests for easier maintenance Pierrick Bouvier
4 siblings, 0 replies; 9+ messages in thread
From: Philippe Mathieu-Daudé @ 2026-10-28 19:21 UTC (permalink / raw)
To: qemu-devel
Cc: Aleksandar Rikalo, Aurelien Jarno, Jiaxun Yang,
Philippe Mathieu-Daudé, Pierrick Bouvier
Although meson parallelize build, building 822 test executables
(274 tests * 3 for each target) is overkill. Keep the per-opcode
files unchanged, but add 17 new files for each group of instructions:
- int-subtract
- int-add
- int-max-min
- int-compare
- shift
- int-dot-product
- int-average
- interleave
- int-divide + int-modulo
- pack
- int-multiply
- fixed-multiply
- bit-set
- bit-count
- bit-move
- float-max-min
- logic + move
This reduce to 51 executables.
Signed-off-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
---
.../user/ase/msa/test_msa_group_bit_count.c | 82 +++++
.../user/ase/msa/test_msa_group_bit_move.c | 76 +++++
.../user/ase/msa/test_msa_group_bit_set.c | 82 +++++
.../ase/msa/test_msa_group_fixed_multiply.c | 82 +++++
.../ase/msa/test_msa_group_float_max_min.c | 58 ++++
.../user/ase/msa/test_msa_group_int_add.c | 166 ++++++++++
.../user/ase/msa/test_msa_group_int_average.c | 106 +++++++
.../user/ase/msa/test_msa_group_int_compare.c | 130 ++++++++
.../user/ase/msa/test_msa_group_int_div_mod.c | 106 +++++++
.../ase/msa/test_msa_group_int_dot_product.c | 118 +++++++
.../user/ase/msa/test_msa_group_int_max_min.c | 154 +++++++++
.../ase/msa/test_msa_group_int_multiply.c | 82 +++++
.../ase/msa/test_msa_group_int_subtract.c | 214 +++++++++++++
.../user/ase/msa/test_msa_group_interleave.c | 106 +++++++
.../mips/user/ase/msa/test_msa_group_logic.c | 40 +++
.../mips/user/ase/msa/test_msa_group_pack.c | 82 +++++
.../mips/user/ase/msa/test_msa_group_shift.c | 130 ++++++++
tests/tcg/mips/meson.build | 291 +-----------------
18 files changed, 1831 insertions(+), 274 deletions(-)
create mode 100644 tests/tcg/mips/user/ase/msa/test_msa_group_bit_count.c
create mode 100644 tests/tcg/mips/user/ase/msa/test_msa_group_bit_move.c
create mode 100644 tests/tcg/mips/user/ase/msa/test_msa_group_bit_set.c
create mode 100644 tests/tcg/mips/user/ase/msa/test_msa_group_fixed_multiply.c
create mode 100644 tests/tcg/mips/user/ase/msa/test_msa_group_float_max_min.c
create mode 100644 tests/tcg/mips/user/ase/msa/test_msa_group_int_add.c
create mode 100644 tests/tcg/mips/user/ase/msa/test_msa_group_int_average.c
create mode 100644 tests/tcg/mips/user/ase/msa/test_msa_group_int_compare.c
create mode 100644 tests/tcg/mips/user/ase/msa/test_msa_group_int_div_mod.c
create mode 100644 tests/tcg/mips/user/ase/msa/test_msa_group_int_dot_product.c
create mode 100644 tests/tcg/mips/user/ase/msa/test_msa_group_int_max_min.c
create mode 100644 tests/tcg/mips/user/ase/msa/test_msa_group_int_multiply.c
create mode 100644 tests/tcg/mips/user/ase/msa/test_msa_group_int_subtract.c
create mode 100644 tests/tcg/mips/user/ase/msa/test_msa_group_interleave.c
create mode 100644 tests/tcg/mips/user/ase/msa/test_msa_group_logic.c
create mode 100644 tests/tcg/mips/user/ase/msa/test_msa_group_pack.c
create mode 100644 tests/tcg/mips/user/ase/msa/test_msa_group_shift.c
diff --git a/tests/tcg/mips/user/ase/msa/test_msa_group_bit_count.c b/tests/tcg/mips/user/ase/msa/test_msa_group_bit_count.c
new file mode 100644
index 000000000000..1cc721890fd1
--- /dev/null
+++ b/tests/tcg/mips/user/ase/msa/test_msa_group_bit_count.c
@@ -0,0 +1,82 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+/* MIPS MSA tests: Bit Count */
+
+#define main test_msa_nloc_b
+#include "bit-count/test_msa_nloc_b.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_nloc_d
+#include "bit-count/test_msa_nloc_d.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_nloc_h
+#include "bit-count/test_msa_nloc_h.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_nloc_w
+#include "bit-count/test_msa_nloc_w.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_nlzc_b
+#include "bit-count/test_msa_nlzc_b.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_nlzc_d
+#include "bit-count/test_msa_nlzc_d.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_nlzc_h
+#include "bit-count/test_msa_nlzc_h.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_nlzc_w
+#include "bit-count/test_msa_nlzc_w.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_pcnt_b
+#include "bit-count/test_msa_pcnt_b.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_pcnt_d
+#include "bit-count/test_msa_pcnt_d.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_pcnt_h
+#include "bit-count/test_msa_pcnt_h.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_pcnt_w
+#include "bit-count/test_msa_pcnt_w.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+int main(void)
+{
+ int ret = 0;
+
+ ret |= test_msa_nloc_b();
+ ret |= test_msa_nloc_d();
+ ret |= test_msa_nloc_h();
+ ret |= test_msa_nloc_w();
+ ret |= test_msa_nlzc_b();
+ ret |= test_msa_nlzc_d();
+ ret |= test_msa_nlzc_h();
+ ret |= test_msa_nlzc_w();
+ ret |= test_msa_pcnt_b();
+ ret |= test_msa_pcnt_d();
+ ret |= test_msa_pcnt_h();
+ ret |= test_msa_pcnt_w();
+
+ return ret ? 1 : 0;
+}
diff --git a/tests/tcg/mips/user/ase/msa/test_msa_group_bit_move.c b/tests/tcg/mips/user/ase/msa/test_msa_group_bit_move.c
new file mode 100644
index 000000000000..8de38d75578c
--- /dev/null
+++ b/tests/tcg/mips/user/ase/msa/test_msa_group_bit_move.c
@@ -0,0 +1,76 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+/* MIPS MSA tests: Bit Move */
+
+#define main test_msa_binsl_b
+#include "bit-move/test_msa_binsl_b.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_binsl_d
+#include "bit-move/test_msa_binsl_d.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_binsl_h
+#include "bit-move/test_msa_binsl_h.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_binsl_w
+#include "bit-move/test_msa_binsl_w.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_binsr_b
+#include "bit-move/test_msa_binsr_b.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_binsr_d
+#include "bit-move/test_msa_binsr_d.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_binsr_h
+#include "bit-move/test_msa_binsr_h.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_binsr_w
+#include "bit-move/test_msa_binsr_w.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_bmnz_v
+#include "bit-move/test_msa_bmnz_v.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_bmz_v
+#include "bit-move/test_msa_bmz_v.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_bsel_v
+#include "bit-move/test_msa_bsel_v.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+int main(void)
+{
+ int ret = 0;
+
+ ret |= test_msa_binsl_b();
+ ret |= test_msa_binsl_d();
+ ret |= test_msa_binsl_h();
+ ret |= test_msa_binsl_w();
+ ret |= test_msa_binsr_b();
+ ret |= test_msa_binsr_d();
+ ret |= test_msa_binsr_h();
+ ret |= test_msa_binsr_w();
+ ret |= test_msa_bmnz_v();
+ ret |= test_msa_bmz_v();
+ ret |= test_msa_bsel_v();
+
+ return ret ? 1 : 0;
+}
diff --git a/tests/tcg/mips/user/ase/msa/test_msa_group_bit_set.c b/tests/tcg/mips/user/ase/msa/test_msa_group_bit_set.c
new file mode 100644
index 000000000000..9f2b71bbeddf
--- /dev/null
+++ b/tests/tcg/mips/user/ase/msa/test_msa_group_bit_set.c
@@ -0,0 +1,82 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+/* MIPS MSA tests: Bit Set */
+
+#define main test_msa_bclr_b
+#include "bit-set/test_msa_bclr_b.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_bclr_d
+#include "bit-set/test_msa_bclr_d.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_bclr_h
+#include "bit-set/test_msa_bclr_h.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_bclr_w
+#include "bit-set/test_msa_bclr_w.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_bneg_b
+#include "bit-set/test_msa_bneg_b.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_bneg_d
+#include "bit-set/test_msa_bneg_d.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_bneg_h
+#include "bit-set/test_msa_bneg_h.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_bneg_w
+#include "bit-set/test_msa_bneg_w.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_bset_b
+#include "bit-set/test_msa_bset_b.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_bset_d
+#include "bit-set/test_msa_bset_d.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_bset_h
+#include "bit-set/test_msa_bset_h.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_bset_w
+#include "bit-set/test_msa_bset_w.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+int main(void)
+{
+ int ret = 0;
+
+ ret |= test_msa_bclr_b();
+ ret |= test_msa_bclr_d();
+ ret |= test_msa_bclr_h();
+ ret |= test_msa_bclr_w();
+ ret |= test_msa_bneg_b();
+ ret |= test_msa_bneg_d();
+ ret |= test_msa_bneg_h();
+ ret |= test_msa_bneg_w();
+ ret |= test_msa_bset_b();
+ ret |= test_msa_bset_d();
+ ret |= test_msa_bset_h();
+ ret |= test_msa_bset_w();
+
+ return ret ? 1 : 0;
+}
diff --git a/tests/tcg/mips/user/ase/msa/test_msa_group_fixed_multiply.c b/tests/tcg/mips/user/ase/msa/test_msa_group_fixed_multiply.c
new file mode 100644
index 000000000000..58c1c0373cff
--- /dev/null
+++ b/tests/tcg/mips/user/ase/msa/test_msa_group_fixed_multiply.c
@@ -0,0 +1,82 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+/* MIPS MSA tests: Fixed Multiply */
+
+#define main test_msa_madd_q_h
+#include "fixed-multiply/test_msa_madd_q_h.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_madd_q_w
+#include "fixed-multiply/test_msa_madd_q_w.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_maddr_q_h
+#include "fixed-multiply/test_msa_maddr_q_h.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_maddr_q_w
+#include "fixed-multiply/test_msa_maddr_q_w.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_msub_q_h
+#include "fixed-multiply/test_msa_msub_q_h.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_msub_q_w
+#include "fixed-multiply/test_msa_msub_q_w.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_msubr_q_h
+#include "fixed-multiply/test_msa_msubr_q_h.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_msubr_q_w
+#include "fixed-multiply/test_msa_msubr_q_w.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_mul_q_h
+#include "fixed-multiply/test_msa_mul_q_h.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_mul_q_w
+#include "fixed-multiply/test_msa_mul_q_w.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_mulr_q_h
+#include "fixed-multiply/test_msa_mulr_q_h.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_mulr_q_w
+#include "fixed-multiply/test_msa_mulr_q_w.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+int main(void)
+{
+ int ret = 0;
+
+ ret |= test_msa_madd_q_h();
+ ret |= test_msa_madd_q_w();
+ ret |= test_msa_maddr_q_h();
+ ret |= test_msa_maddr_q_w();
+ ret |= test_msa_msub_q_h();
+ ret |= test_msa_msub_q_w();
+ ret |= test_msa_msubr_q_h();
+ ret |= test_msa_msubr_q_w();
+ ret |= test_msa_mul_q_h();
+ ret |= test_msa_mul_q_w();
+ ret |= test_msa_mulr_q_h();
+ ret |= test_msa_mulr_q_w();
+
+ return ret ? 1 : 0;
+}
diff --git a/tests/tcg/mips/user/ase/msa/test_msa_group_float_max_min.c b/tests/tcg/mips/user/ase/msa/test_msa_group_float_max_min.c
new file mode 100644
index 000000000000..eef4e72063f7
--- /dev/null
+++ b/tests/tcg/mips/user/ase/msa/test_msa_group_float_max_min.c
@@ -0,0 +1,58 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+/* MIPS MSA tests: Float Max Min */
+
+#define main test_msa_fmax_a_d
+#include "float-max-min/test_msa_fmax_a_d.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_fmax_a_w
+#include "float-max-min/test_msa_fmax_a_w.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_fmax_d
+#include "float-max-min/test_msa_fmax_d.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_fmax_w
+#include "float-max-min/test_msa_fmax_w.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_fmin_a_d
+#include "float-max-min/test_msa_fmin_a_d.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_fmin_a_w
+#include "float-max-min/test_msa_fmin_a_w.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_fmin_d
+#include "float-max-min/test_msa_fmin_d.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_fmin_w
+#include "float-max-min/test_msa_fmin_w.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+int main(void)
+{
+ int ret = 0;
+
+ ret |= test_msa_fmax_a_d();
+ ret |= test_msa_fmax_a_w();
+ ret |= test_msa_fmax_d();
+ ret |= test_msa_fmax_w();
+ ret |= test_msa_fmin_a_d();
+ ret |= test_msa_fmin_a_w();
+ ret |= test_msa_fmin_d();
+ ret |= test_msa_fmin_w();
+
+ return ret ? 1 : 0;
+}
diff --git a/tests/tcg/mips/user/ase/msa/test_msa_group_int_add.c b/tests/tcg/mips/user/ase/msa/test_msa_group_int_add.c
new file mode 100644
index 000000000000..b5d739c961b1
--- /dev/null
+++ b/tests/tcg/mips/user/ase/msa/test_msa_group_int_add.c
@@ -0,0 +1,166 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+/* MIPS MSA tests: Int Add */
+
+#define main test_msa_add_a_b
+#include "int-add/test_msa_add_a_b.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_add_a_d
+#include "int-add/test_msa_add_a_d.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_add_a_h
+#include "int-add/test_msa_add_a_h.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_add_a_w
+#include "int-add/test_msa_add_a_w.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_adds_a_b
+#include "int-add/test_msa_adds_a_b.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_adds_a_d
+#include "int-add/test_msa_adds_a_d.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_adds_a_h
+#include "int-add/test_msa_adds_a_h.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_adds_a_w
+#include "int-add/test_msa_adds_a_w.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_adds_s_b
+#include "int-add/test_msa_adds_s_b.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_adds_s_d
+#include "int-add/test_msa_adds_s_d.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_adds_s_h
+#include "int-add/test_msa_adds_s_h.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_adds_s_w
+#include "int-add/test_msa_adds_s_w.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_adds_u_b
+#include "int-add/test_msa_adds_u_b.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_adds_u_d
+#include "int-add/test_msa_adds_u_d.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_adds_u_h
+#include "int-add/test_msa_adds_u_h.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_adds_u_w
+#include "int-add/test_msa_adds_u_w.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_addv_b
+#include "int-add/test_msa_addv_b.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_addv_d
+#include "int-add/test_msa_addv_d.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_addv_h
+#include "int-add/test_msa_addv_h.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_addv_w
+#include "int-add/test_msa_addv_w.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_hadd_s_d
+#include "int-add/test_msa_hadd_s_d.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_hadd_s_h
+#include "int-add/test_msa_hadd_s_h.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_hadd_s_w
+#include "int-add/test_msa_hadd_s_w.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_hadd_u_d
+#include "int-add/test_msa_hadd_u_d.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_hadd_u_h
+#include "int-add/test_msa_hadd_u_h.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_hadd_u_w
+#include "int-add/test_msa_hadd_u_w.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+int main(void)
+{
+ int ret = 0;
+
+ ret |= test_msa_add_a_b();
+ ret |= test_msa_add_a_d();
+ ret |= test_msa_add_a_h();
+ ret |= test_msa_add_a_w();
+ ret |= test_msa_adds_a_b();
+ ret |= test_msa_adds_a_d();
+ ret |= test_msa_adds_a_h();
+ ret |= test_msa_adds_a_w();
+ ret |= test_msa_adds_s_b();
+ ret |= test_msa_adds_s_d();
+ ret |= test_msa_adds_s_h();
+ ret |= test_msa_adds_s_w();
+ ret |= test_msa_adds_u_b();
+ ret |= test_msa_adds_u_d();
+ ret |= test_msa_adds_u_h();
+ ret |= test_msa_adds_u_w();
+ ret |= test_msa_addv_b();
+ ret |= test_msa_addv_d();
+ ret |= test_msa_addv_h();
+ ret |= test_msa_addv_w();
+ ret |= test_msa_hadd_s_d();
+ ret |= test_msa_hadd_s_h();
+ ret |= test_msa_hadd_s_w();
+ ret |= test_msa_hadd_u_d();
+ ret |= test_msa_hadd_u_h();
+ ret |= test_msa_hadd_u_w();
+
+ return ret ? 1 : 0;
+}
diff --git a/tests/tcg/mips/user/ase/msa/test_msa_group_int_average.c b/tests/tcg/mips/user/ase/msa/test_msa_group_int_average.c
new file mode 100644
index 000000000000..c51ed23698ad
--- /dev/null
+++ b/tests/tcg/mips/user/ase/msa/test_msa_group_int_average.c
@@ -0,0 +1,106 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+/* MIPS MSA tests: Int Average */
+
+#define main test_msa_ave_s_b
+#include "int-average/test_msa_ave_s_b.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_ave_s_d
+#include "int-average/test_msa_ave_s_d.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_ave_s_h
+#include "int-average/test_msa_ave_s_h.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_ave_s_w
+#include "int-average/test_msa_ave_s_w.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_ave_u_b
+#include "int-average/test_msa_ave_u_b.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_ave_u_d
+#include "int-average/test_msa_ave_u_d.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_ave_u_h
+#include "int-average/test_msa_ave_u_h.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_ave_u_w
+#include "int-average/test_msa_ave_u_w.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_aver_s_b
+#include "int-average/test_msa_aver_s_b.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_aver_s_d
+#include "int-average/test_msa_aver_s_d.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_aver_s_h
+#include "int-average/test_msa_aver_s_h.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_aver_s_w
+#include "int-average/test_msa_aver_s_w.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_aver_u_b
+#include "int-average/test_msa_aver_u_b.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_aver_u_d
+#include "int-average/test_msa_aver_u_d.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_aver_u_h
+#include "int-average/test_msa_aver_u_h.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_aver_u_w
+#include "int-average/test_msa_aver_u_w.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+int main(void)
+{
+ int ret = 0;
+
+ ret |= test_msa_ave_s_b();
+ ret |= test_msa_ave_s_d();
+ ret |= test_msa_ave_s_h();
+ ret |= test_msa_ave_s_w();
+ ret |= test_msa_ave_u_b();
+ ret |= test_msa_ave_u_d();
+ ret |= test_msa_ave_u_h();
+ ret |= test_msa_ave_u_w();
+ ret |= test_msa_aver_s_b();
+ ret |= test_msa_aver_s_d();
+ ret |= test_msa_aver_s_h();
+ ret |= test_msa_aver_s_w();
+ ret |= test_msa_aver_u_b();
+ ret |= test_msa_aver_u_d();
+ ret |= test_msa_aver_u_h();
+ ret |= test_msa_aver_u_w();
+
+ return ret ? 1 : 0;
+}
diff --git a/tests/tcg/mips/user/ase/msa/test_msa_group_int_compare.c b/tests/tcg/mips/user/ase/msa/test_msa_group_int_compare.c
new file mode 100644
index 000000000000..c61347ad0210
--- /dev/null
+++ b/tests/tcg/mips/user/ase/msa/test_msa_group_int_compare.c
@@ -0,0 +1,130 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+/* MIPS MSA tests: Int Compare */
+
+#define main test_msa_ceq_b
+#include "int-compare/test_msa_ceq_b.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_ceq_d
+#include "int-compare/test_msa_ceq_d.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_ceq_h
+#include "int-compare/test_msa_ceq_h.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_ceq_w
+#include "int-compare/test_msa_ceq_w.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_cle_s_b
+#include "int-compare/test_msa_cle_s_b.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_cle_s_d
+#include "int-compare/test_msa_cle_s_d.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_cle_s_h
+#include "int-compare/test_msa_cle_s_h.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_cle_s_w
+#include "int-compare/test_msa_cle_s_w.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_cle_u_b
+#include "int-compare/test_msa_cle_u_b.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_cle_u_d
+#include "int-compare/test_msa_cle_u_d.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_cle_u_h
+#include "int-compare/test_msa_cle_u_h.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_cle_u_w
+#include "int-compare/test_msa_cle_u_w.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_clt_s_b
+#include "int-compare/test_msa_clt_s_b.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_clt_s_d
+#include "int-compare/test_msa_clt_s_d.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_clt_s_h
+#include "int-compare/test_msa_clt_s_h.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_clt_s_w
+#include "int-compare/test_msa_clt_s_w.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_clt_u_b
+#include "int-compare/test_msa_clt_u_b.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_clt_u_d
+#include "int-compare/test_msa_clt_u_d.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_clt_u_h
+#include "int-compare/test_msa_clt_u_h.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_clt_u_w
+#include "int-compare/test_msa_clt_u_w.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+int main(void)
+{
+ int ret = 0;
+
+ ret |= test_msa_ceq_b();
+ ret |= test_msa_ceq_d();
+ ret |= test_msa_ceq_h();
+ ret |= test_msa_ceq_w();
+ ret |= test_msa_cle_s_b();
+ ret |= test_msa_cle_s_d();
+ ret |= test_msa_cle_s_h();
+ ret |= test_msa_cle_s_w();
+ ret |= test_msa_cle_u_b();
+ ret |= test_msa_cle_u_d();
+ ret |= test_msa_cle_u_h();
+ ret |= test_msa_cle_u_w();
+ ret |= test_msa_clt_s_b();
+ ret |= test_msa_clt_s_d();
+ ret |= test_msa_clt_s_h();
+ ret |= test_msa_clt_s_w();
+ ret |= test_msa_clt_u_b();
+ ret |= test_msa_clt_u_d();
+ ret |= test_msa_clt_u_h();
+ ret |= test_msa_clt_u_w();
+
+ return ret ? 1 : 0;
+}
diff --git a/tests/tcg/mips/user/ase/msa/test_msa_group_int_div_mod.c b/tests/tcg/mips/user/ase/msa/test_msa_group_int_div_mod.c
new file mode 100644
index 000000000000..22f38f34293b
--- /dev/null
+++ b/tests/tcg/mips/user/ase/msa/test_msa_group_int_div_mod.c
@@ -0,0 +1,106 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+/* MIPS MSA tests: Int Divide and Modulo */
+
+#define main test_msa_div_s_b
+#include "int-divide/test_msa_div_s_b.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_div_s_d
+#include "int-divide/test_msa_div_s_d.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_div_s_h
+#include "int-divide/test_msa_div_s_h.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_div_s_w
+#include "int-divide/test_msa_div_s_w.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_div_u_b
+#include "int-divide/test_msa_div_u_b.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_div_u_d
+#include "int-divide/test_msa_div_u_d.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_div_u_h
+#include "int-divide/test_msa_div_u_h.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_div_u_w
+#include "int-divide/test_msa_div_u_w.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_mod_s_b
+#include "int-modulo/test_msa_mod_s_b.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_mod_s_d
+#include "int-modulo/test_msa_mod_s_d.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_mod_s_h
+#include "int-modulo/test_msa_mod_s_h.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_mod_s_w
+#include "int-modulo/test_msa_mod_s_w.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_mod_u_b
+#include "int-modulo/test_msa_mod_u_b.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_mod_u_d
+#include "int-modulo/test_msa_mod_u_d.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_mod_u_h
+#include "int-modulo/test_msa_mod_u_h.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_mod_u_w
+#include "int-modulo/test_msa_mod_u_w.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+int main(void)
+{
+ int ret = 0;
+
+ ret |= test_msa_div_s_b();
+ ret |= test_msa_div_s_d();
+ ret |= test_msa_div_s_h();
+ ret |= test_msa_div_s_w();
+ ret |= test_msa_div_u_b();
+ ret |= test_msa_div_u_d();
+ ret |= test_msa_div_u_h();
+ ret |= test_msa_div_u_w();
+ ret |= test_msa_mod_s_b();
+ ret |= test_msa_mod_s_d();
+ ret |= test_msa_mod_s_h();
+ ret |= test_msa_mod_s_w();
+ ret |= test_msa_mod_u_b();
+ ret |= test_msa_mod_u_d();
+ ret |= test_msa_mod_u_h();
+ ret |= test_msa_mod_u_w();
+
+ return ret ? 1 : 0;
+}
diff --git a/tests/tcg/mips/user/ase/msa/test_msa_group_int_dot_product.c b/tests/tcg/mips/user/ase/msa/test_msa_group_int_dot_product.c
new file mode 100644
index 000000000000..fb9d9d63ee42
--- /dev/null
+++ b/tests/tcg/mips/user/ase/msa/test_msa_group_int_dot_product.c
@@ -0,0 +1,118 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+/* MIPS MSA tests: Int Dot Product */
+
+#define main test_msa_dotp_s_d
+#include "int-dot-product/test_msa_dotp_s_d.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_dotp_s_h
+#include "int-dot-product/test_msa_dotp_s_h.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_dotp_s_w
+#include "int-dot-product/test_msa_dotp_s_w.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_dotp_u_d
+#include "int-dot-product/test_msa_dotp_u_d.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_dotp_u_h
+#include "int-dot-product/test_msa_dotp_u_h.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_dotp_u_w
+#include "int-dot-product/test_msa_dotp_u_w.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_dpadd_s_d
+#include "int-dot-product/test_msa_dpadd_s_d.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_dpadd_s_h
+#include "int-dot-product/test_msa_dpadd_s_h.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_dpadd_s_w
+#include "int-dot-product/test_msa_dpadd_s_w.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_dpadd_u_d
+#include "int-dot-product/test_msa_dpadd_u_d.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_dpadd_u_h
+#include "int-dot-product/test_msa_dpadd_u_h.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_dpadd_u_w
+#include "int-dot-product/test_msa_dpadd_u_w.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_dpsub_s_d
+#include "int-dot-product/test_msa_dpsub_s_d.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_dpsub_s_h
+#include "int-dot-product/test_msa_dpsub_s_h.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_dpsub_s_w
+#include "int-dot-product/test_msa_dpsub_s_w.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_dpsub_u_d
+#include "int-dot-product/test_msa_dpsub_u_d.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_dpsub_u_h
+#include "int-dot-product/test_msa_dpsub_u_h.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_dpsub_u_w
+#include "int-dot-product/test_msa_dpsub_u_w.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+int main(void)
+{
+ int ret = 0;
+
+ ret |= test_msa_dotp_s_d();
+ ret |= test_msa_dotp_s_h();
+ ret |= test_msa_dotp_s_w();
+ ret |= test_msa_dotp_u_d();
+ ret |= test_msa_dotp_u_h();
+ ret |= test_msa_dotp_u_w();
+ ret |= test_msa_dpadd_s_d();
+ ret |= test_msa_dpadd_s_h();
+ ret |= test_msa_dpadd_s_w();
+ ret |= test_msa_dpadd_u_d();
+ ret |= test_msa_dpadd_u_h();
+ ret |= test_msa_dpadd_u_w();
+ ret |= test_msa_dpsub_s_d();
+ ret |= test_msa_dpsub_s_h();
+ ret |= test_msa_dpsub_s_w();
+ ret |= test_msa_dpsub_u_d();
+ ret |= test_msa_dpsub_u_h();
+ ret |= test_msa_dpsub_u_w();
+
+ return ret ? 1 : 0;
+}
diff --git a/tests/tcg/mips/user/ase/msa/test_msa_group_int_max_min.c b/tests/tcg/mips/user/ase/msa/test_msa_group_int_max_min.c
new file mode 100644
index 000000000000..0342230f749d
--- /dev/null
+++ b/tests/tcg/mips/user/ase/msa/test_msa_group_int_max_min.c
@@ -0,0 +1,154 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+/* MIPS MSA tests: Int Max Min */
+
+#define main test_msa_max_a_b
+#include "int-max-min/test_msa_max_a_b.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_max_a_d
+#include "int-max-min/test_msa_max_a_d.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_max_a_h
+#include "int-max-min/test_msa_max_a_h.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_max_a_w
+#include "int-max-min/test_msa_max_a_w.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_max_s_b
+#include "int-max-min/test_msa_max_s_b.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_max_s_d
+#include "int-max-min/test_msa_max_s_d.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_max_s_h
+#include "int-max-min/test_msa_max_s_h.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_max_s_w
+#include "int-max-min/test_msa_max_s_w.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_max_u_b
+#include "int-max-min/test_msa_max_u_b.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_max_u_d
+#include "int-max-min/test_msa_max_u_d.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_max_u_h
+#include "int-max-min/test_msa_max_u_h.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_max_u_w
+#include "int-max-min/test_msa_max_u_w.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_min_a_b
+#include "int-max-min/test_msa_min_a_b.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_min_a_d
+#include "int-max-min/test_msa_min_a_d.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_min_a_h
+#include "int-max-min/test_msa_min_a_h.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_min_a_w
+#include "int-max-min/test_msa_min_a_w.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_min_s_b
+#include "int-max-min/test_msa_min_s_b.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_min_s_d
+#include "int-max-min/test_msa_min_s_d.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_min_s_h
+#include "int-max-min/test_msa_min_s_h.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_min_s_w
+#include "int-max-min/test_msa_min_s_w.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_min_u_b
+#include "int-max-min/test_msa_min_u_b.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_min_u_d
+#include "int-max-min/test_msa_min_u_d.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_min_u_h
+#include "int-max-min/test_msa_min_u_h.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_min_u_w
+#include "int-max-min/test_msa_min_u_w.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+int main(void)
+{
+ int ret = 0;
+
+ ret |= test_msa_max_a_b();
+ ret |= test_msa_max_a_d();
+ ret |= test_msa_max_a_h();
+ ret |= test_msa_max_a_w();
+ ret |= test_msa_max_s_b();
+ ret |= test_msa_max_s_d();
+ ret |= test_msa_max_s_h();
+ ret |= test_msa_max_s_w();
+ ret |= test_msa_max_u_b();
+ ret |= test_msa_max_u_d();
+ ret |= test_msa_max_u_h();
+ ret |= test_msa_max_u_w();
+ ret |= test_msa_min_a_b();
+ ret |= test_msa_min_a_d();
+ ret |= test_msa_min_a_h();
+ ret |= test_msa_min_a_w();
+ ret |= test_msa_min_s_b();
+ ret |= test_msa_min_s_d();
+ ret |= test_msa_min_s_h();
+ ret |= test_msa_min_s_w();
+ ret |= test_msa_min_u_b();
+ ret |= test_msa_min_u_d();
+ ret |= test_msa_min_u_h();
+ ret |= test_msa_min_u_w();
+
+ return ret ? 1 : 0;
+}
diff --git a/tests/tcg/mips/user/ase/msa/test_msa_group_int_multiply.c b/tests/tcg/mips/user/ase/msa/test_msa_group_int_multiply.c
new file mode 100644
index 000000000000..1e74616b01ce
--- /dev/null
+++ b/tests/tcg/mips/user/ase/msa/test_msa_group_int_multiply.c
@@ -0,0 +1,82 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+/* MIPS MSA tests: Int Multiply */
+
+#define main test_msa_maddv_b
+#include "int-multiply/test_msa_maddv_b.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_maddv_d
+#include "int-multiply/test_msa_maddv_d.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_maddv_h
+#include "int-multiply/test_msa_maddv_h.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_maddv_w
+#include "int-multiply/test_msa_maddv_w.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_msubv_b
+#include "int-multiply/test_msa_msubv_b.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_msubv_d
+#include "int-multiply/test_msa_msubv_d.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_msubv_h
+#include "int-multiply/test_msa_msubv_h.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_msubv_w
+#include "int-multiply/test_msa_msubv_w.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_mulv_b
+#include "int-multiply/test_msa_mulv_b.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_mulv_d
+#include "int-multiply/test_msa_mulv_d.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_mulv_h
+#include "int-multiply/test_msa_mulv_h.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_mulv_w
+#include "int-multiply/test_msa_mulv_w.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+int main(void)
+{
+ int ret = 0;
+
+ ret |= test_msa_maddv_b();
+ ret |= test_msa_maddv_d();
+ ret |= test_msa_maddv_h();
+ ret |= test_msa_maddv_w();
+ ret |= test_msa_msubv_b();
+ ret |= test_msa_msubv_d();
+ ret |= test_msa_msubv_h();
+ ret |= test_msa_msubv_w();
+ ret |= test_msa_mulv_b();
+ ret |= test_msa_mulv_d();
+ ret |= test_msa_mulv_h();
+ ret |= test_msa_mulv_w();
+
+ return ret ? 1 : 0;
+}
diff --git a/tests/tcg/mips/user/ase/msa/test_msa_group_int_subtract.c b/tests/tcg/mips/user/ase/msa/test_msa_group_int_subtract.c
new file mode 100644
index 000000000000..7407fd1eb575
--- /dev/null
+++ b/tests/tcg/mips/user/ase/msa/test_msa_group_int_subtract.c
@@ -0,0 +1,214 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+/* MIPS MSA tests: Int Subtract */
+
+#define main test_msa_asub_s_b
+#include "int-subtract/test_msa_asub_s_b.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_asub_s_d
+#include "int-subtract/test_msa_asub_s_d.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_asub_s_h
+#include "int-subtract/test_msa_asub_s_h.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_asub_s_w
+#include "int-subtract/test_msa_asub_s_w.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_asub_u_b
+#include "int-subtract/test_msa_asub_u_b.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_asub_u_d
+#include "int-subtract/test_msa_asub_u_d.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_asub_u_h
+#include "int-subtract/test_msa_asub_u_h.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_asub_u_w
+#include "int-subtract/test_msa_asub_u_w.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_hsub_s_d
+#include "int-subtract/test_msa_hsub_s_d.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_hsub_s_h
+#include "int-subtract/test_msa_hsub_s_h.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_hsub_s_w
+#include "int-subtract/test_msa_hsub_s_w.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_hsub_u_d
+#include "int-subtract/test_msa_hsub_u_d.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_hsub_u_h
+#include "int-subtract/test_msa_hsub_u_h.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_hsub_u_w
+#include "int-subtract/test_msa_hsub_u_w.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_subs_s_b
+#include "int-subtract/test_msa_subs_s_b.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_subs_s_d
+#include "int-subtract/test_msa_subs_s_d.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_subs_s_h
+#include "int-subtract/test_msa_subs_s_h.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_subs_s_w
+#include "int-subtract/test_msa_subs_s_w.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_subs_u_b
+#include "int-subtract/test_msa_subs_u_b.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_subs_u_d
+#include "int-subtract/test_msa_subs_u_d.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_subs_u_h
+#include "int-subtract/test_msa_subs_u_h.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_subs_u_w
+#include "int-subtract/test_msa_subs_u_w.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_subsus_u_b
+#include "int-subtract/test_msa_subsus_u_b.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_subsus_u_d
+#include "int-subtract/test_msa_subsus_u_d.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_subsus_u_h
+#include "int-subtract/test_msa_subsus_u_h.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_subsus_u_w
+#include "int-subtract/test_msa_subsus_u_w.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_subsuu_s_b
+#include "int-subtract/test_msa_subsuu_s_b.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_subsuu_s_d
+#include "int-subtract/test_msa_subsuu_s_d.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_subsuu_s_h
+#include "int-subtract/test_msa_subsuu_s_h.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_subsuu_s_w
+#include "int-subtract/test_msa_subsuu_s_w.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_subv_b
+#include "int-subtract/test_msa_subv_b.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_subv_d
+#include "int-subtract/test_msa_subv_d.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_subv_h
+#include "int-subtract/test_msa_subv_h.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_subv_w
+#include "int-subtract/test_msa_subv_w.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+int main(void)
+{
+ int ret = 0;
+
+ ret |= test_msa_asub_s_b();
+ ret |= test_msa_asub_s_d();
+ ret |= test_msa_asub_s_h();
+ ret |= test_msa_asub_s_w();
+ ret |= test_msa_asub_u_b();
+ ret |= test_msa_asub_u_d();
+ ret |= test_msa_asub_u_h();
+ ret |= test_msa_asub_u_w();
+ ret |= test_msa_hsub_s_d();
+ ret |= test_msa_hsub_s_h();
+ ret |= test_msa_hsub_s_w();
+ ret |= test_msa_hsub_u_d();
+ ret |= test_msa_hsub_u_h();
+ ret |= test_msa_hsub_u_w();
+ ret |= test_msa_subs_s_b();
+ ret |= test_msa_subs_s_d();
+ ret |= test_msa_subs_s_h();
+ ret |= test_msa_subs_s_w();
+ ret |= test_msa_subs_u_b();
+ ret |= test_msa_subs_u_d();
+ ret |= test_msa_subs_u_h();
+ ret |= test_msa_subs_u_w();
+ ret |= test_msa_subsus_u_b();
+ ret |= test_msa_subsus_u_d();
+ ret |= test_msa_subsus_u_h();
+ ret |= test_msa_subsus_u_w();
+ ret |= test_msa_subsuu_s_b();
+ ret |= test_msa_subsuu_s_d();
+ ret |= test_msa_subsuu_s_h();
+ ret |= test_msa_subsuu_s_w();
+ ret |= test_msa_subv_b();
+ ret |= test_msa_subv_d();
+ ret |= test_msa_subv_h();
+ ret |= test_msa_subv_w();
+
+ return ret ? 1 : 0;
+}
diff --git a/tests/tcg/mips/user/ase/msa/test_msa_group_interleave.c b/tests/tcg/mips/user/ase/msa/test_msa_group_interleave.c
new file mode 100644
index 000000000000..660ffa196029
--- /dev/null
+++ b/tests/tcg/mips/user/ase/msa/test_msa_group_interleave.c
@@ -0,0 +1,106 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+/* MIPS MSA tests: Interleave */
+
+#define main test_msa_ilvev_b
+#include "interleave/test_msa_ilvev_b.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_ilvev_d
+#include "interleave/test_msa_ilvev_d.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_ilvev_h
+#include "interleave/test_msa_ilvev_h.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_ilvev_w
+#include "interleave/test_msa_ilvev_w.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_ilvl_b
+#include "interleave/test_msa_ilvl_b.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_ilvl_d
+#include "interleave/test_msa_ilvl_d.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_ilvl_h
+#include "interleave/test_msa_ilvl_h.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_ilvl_w
+#include "interleave/test_msa_ilvl_w.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_ilvod_b
+#include "interleave/test_msa_ilvod_b.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_ilvod_d
+#include "interleave/test_msa_ilvod_d.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_ilvod_h
+#include "interleave/test_msa_ilvod_h.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_ilvod_w
+#include "interleave/test_msa_ilvod_w.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_ilvr_b
+#include "interleave/test_msa_ilvr_b.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_ilvr_d
+#include "interleave/test_msa_ilvr_d.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_ilvr_h
+#include "interleave/test_msa_ilvr_h.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_ilvr_w
+#include "interleave/test_msa_ilvr_w.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+int main(void)
+{
+ int ret = 0;
+
+ ret |= test_msa_ilvev_b();
+ ret |= test_msa_ilvev_d();
+ ret |= test_msa_ilvev_h();
+ ret |= test_msa_ilvev_w();
+ ret |= test_msa_ilvl_b();
+ ret |= test_msa_ilvl_d();
+ ret |= test_msa_ilvl_h();
+ ret |= test_msa_ilvl_w();
+ ret |= test_msa_ilvod_b();
+ ret |= test_msa_ilvod_d();
+ ret |= test_msa_ilvod_h();
+ ret |= test_msa_ilvod_w();
+ ret |= test_msa_ilvr_b();
+ ret |= test_msa_ilvr_d();
+ ret |= test_msa_ilvr_h();
+ ret |= test_msa_ilvr_w();
+
+ return ret ? 1 : 0;
+}
diff --git a/tests/tcg/mips/user/ase/msa/test_msa_group_logic.c b/tests/tcg/mips/user/ase/msa/test_msa_group_logic.c
new file mode 100644
index 000000000000..44f045a7efe8
--- /dev/null
+++ b/tests/tcg/mips/user/ase/msa/test_msa_group_logic.c
@@ -0,0 +1,40 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+/* MIPS MSA tests: Logic and Move */
+
+#define main test_msa_and_v
+#include "logic/test_msa_and_v.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_nor_v
+#include "logic/test_msa_nor_v.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_or_v
+#include "logic/test_msa_or_v.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_xor_v
+#include "logic/test_msa_xor_v.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_move_v
+#include "move/test_msa_move_v.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+int main(void)
+{
+ int ret = 0;
+
+ ret |= test_msa_and_v();
+ ret |= test_msa_nor_v();
+ ret |= test_msa_or_v();
+ ret |= test_msa_xor_v();
+ ret |= test_msa_move_v();
+
+ return ret ? 1 : 0;
+}
diff --git a/tests/tcg/mips/user/ase/msa/test_msa_group_pack.c b/tests/tcg/mips/user/ase/msa/test_msa_group_pack.c
new file mode 100644
index 000000000000..2eefc509d11e
--- /dev/null
+++ b/tests/tcg/mips/user/ase/msa/test_msa_group_pack.c
@@ -0,0 +1,82 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+/* MIPS MSA tests: Pack */
+
+#define main test_msa_pckev_b
+#include "pack/test_msa_pckev_b.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_pckev_d
+#include "pack/test_msa_pckev_d.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_pckev_h
+#include "pack/test_msa_pckev_h.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_pckev_w
+#include "pack/test_msa_pckev_w.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_pckod_b
+#include "pack/test_msa_pckod_b.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_pckod_d
+#include "pack/test_msa_pckod_d.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_pckod_h
+#include "pack/test_msa_pckod_h.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_pckod_w
+#include "pack/test_msa_pckod_w.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_vshf_b
+#include "pack/test_msa_vshf_b.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_vshf_d
+#include "pack/test_msa_vshf_d.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_vshf_h
+#include "pack/test_msa_vshf_h.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_vshf_w
+#include "pack/test_msa_vshf_w.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+int main(void)
+{
+ int ret = 0;
+
+ ret |= test_msa_pckev_b();
+ ret |= test_msa_pckev_d();
+ ret |= test_msa_pckev_h();
+ ret |= test_msa_pckev_w();
+ ret |= test_msa_pckod_b();
+ ret |= test_msa_pckod_d();
+ ret |= test_msa_pckod_h();
+ ret |= test_msa_pckod_w();
+ ret |= test_msa_vshf_b();
+ ret |= test_msa_vshf_d();
+ ret |= test_msa_vshf_h();
+ ret |= test_msa_vshf_w();
+
+ return ret ? 1 : 0;
+}
diff --git a/tests/tcg/mips/user/ase/msa/test_msa_group_shift.c b/tests/tcg/mips/user/ase/msa/test_msa_group_shift.c
new file mode 100644
index 000000000000..d642931dbb7c
--- /dev/null
+++ b/tests/tcg/mips/user/ase/msa/test_msa_group_shift.c
@@ -0,0 +1,130 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+/* MIPS MSA tests: Shift */
+
+#define main test_msa_sll_b
+#include "shift/test_msa_sll_b.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_sll_d
+#include "shift/test_msa_sll_d.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_sll_h
+#include "shift/test_msa_sll_h.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_sll_w
+#include "shift/test_msa_sll_w.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_sra_b
+#include "shift/test_msa_sra_b.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_sra_d
+#include "shift/test_msa_sra_d.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_sra_h
+#include "shift/test_msa_sra_h.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_sra_w
+#include "shift/test_msa_sra_w.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_srar_b
+#include "shift/test_msa_srar_b.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_srar_d
+#include "shift/test_msa_srar_d.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_srar_h
+#include "shift/test_msa_srar_h.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_srar_w
+#include "shift/test_msa_srar_w.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_srl_b
+#include "shift/test_msa_srl_b.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_srl_d
+#include "shift/test_msa_srl_d.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_srl_h
+#include "shift/test_msa_srl_h.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_srl_w
+#include "shift/test_msa_srl_w.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_srlr_b
+#include "shift/test_msa_srlr_b.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_srlr_d
+#include "shift/test_msa_srlr_d.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_srlr_h
+#include "shift/test_msa_srlr_h.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+#define main test_msa_srlr_w
+#include "shift/test_msa_srlr_w.c"
+#undef main
+#undef TEST_COUNT_TOTAL
+
+int main(void)
+{
+ int ret = 0;
+
+ ret |= test_msa_sll_b();
+ ret |= test_msa_sll_d();
+ ret |= test_msa_sll_h();
+ ret |= test_msa_sll_w();
+ ret |= test_msa_sra_b();
+ ret |= test_msa_sra_d();
+ ret |= test_msa_sra_h();
+ ret |= test_msa_sra_w();
+ ret |= test_msa_srar_b();
+ ret |= test_msa_srar_d();
+ ret |= test_msa_srar_h();
+ ret |= test_msa_srar_w();
+ ret |= test_msa_srl_b();
+ ret |= test_msa_srl_d();
+ ret |= test_msa_srl_h();
+ ret |= test_msa_srl_w();
+ ret |= test_msa_srlr_b();
+ ret |= test_msa_srlr_d();
+ ret |= test_msa_srlr_h();
+ ret |= test_msa_srlr_w();
+
+ return ret ? 1 : 0;
+}
diff --git a/tests/tcg/mips/meson.build b/tests/tcg/mips/meson.build
index 88d598a4f89b..11642da4122e 100644
--- a/tests/tcg/mips/meson.build
+++ b/tests/tcg/mips/meson.build
@@ -23,278 +23,21 @@ 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',
- '../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/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',
- '../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/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/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',
- '../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',
- '../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',
- '../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/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',
- '../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',
- '../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',
- '../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',
- '../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',
- '../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/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',
- '../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',
+ '../mips/user/ase/msa/test_msa_group_bit_count.c',
+ '../mips/user/ase/msa/test_msa_group_bit_move.c',
+ '../mips/user/ase/msa/test_msa_group_bit_set.c',
+ '../mips/user/ase/msa/test_msa_group_fixed_multiply.c',
+ '../mips/user/ase/msa/test_msa_group_float_max_min.c',
+ '../mips/user/ase/msa/test_msa_group_int_add.c',
+ '../mips/user/ase/msa/test_msa_group_int_average.c',
+ '../mips/user/ase/msa/test_msa_group_int_compare.c',
+ '../mips/user/ase/msa/test_msa_group_int_div_mod.c',
+ '../mips/user/ase/msa/test_msa_group_int_dot_product.c',
+ '../mips/user/ase/msa/test_msa_group_int_max_min.c',
+ '../mips/user/ase/msa/test_msa_group_int_multiply.c',
+ '../mips/user/ase/msa/test_msa_group_int_subtract.c',
+ '../mips/user/ase/msa/test_msa_group_interleave.c',
+ '../mips/user/ase/msa/test_msa_group_logic.c',
+ '../mips/user/ase/msa/test_msa_group_pack.c',
+ '../mips/user/ase/msa/test_msa_group_shift.c',
]
--
2.55.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH 0/4] tests/tcg: Massage MIPS tests for easier maintenance
2026-10-28 19:21 [PATCH 0/4] tests/tcg: Massage MIPS tests for easier maintenance Philippe Mathieu-Daudé
` (3 preceding siblings ...)
2026-10-28 19:21 ` [PATCH 4/4] tests/tcg/mips: Group MSA tests Philippe Mathieu-Daudé
@ 2026-10-28 20:07 ` Pierrick Bouvier
2026-10-29 7:04 ` Philippe Mathieu-Daudé
4 siblings, 1 reply; 9+ messages in thread
From: Pierrick Bouvier @ 2026-10-28 20:07 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel
Cc: Aleksandar Rikalo, Aurelien Jarno, Jiaxun Yang
On 10/28/2026 11:21 AM, Philippe Mathieu-Daudé wrote:
> 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.
>
> Philippe Mathieu-Daudé (4):
> tests/tcg/mips: Clear DSPControl at start of DSP tests
> tests/tcg/mips: Group DSP tests
> tests/tcg/mips: Group Release 6 tests
> tests/tcg/mips: Group MSA tests
>
That's a good idea in itself, but this would need additional work to
have a clear report per test. We can't trade usability for faster
compilation.
Right now, a test will stop on the first assert() met, without going
further.
Ideally, we can keep the list of tests in a static table, and perform
the DSPControl clear before each, so patch 1 can be removed. Also,
assert could be replaced with a proper return and print information per
test.
Regards,
Pierrick
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 0/4] tests/tcg: Massage MIPS tests for easier maintenance
2026-10-28 20:07 ` [PATCH 0/4] tests/tcg: Massage MIPS tests for easier maintenance Pierrick Bouvier
@ 2026-10-29 7:04 ` Philippe Mathieu-Daudé
2026-10-29 7:47 ` Pierrick Bouvier
0 siblings, 1 reply; 9+ messages in thread
From: Philippe Mathieu-Daudé @ 2026-10-29 7:04 UTC (permalink / raw)
To: Pierrick Bouvier, qemu-devel
Cc: Aleksandar Rikalo, Aurelien Jarno, Jiaxun Yang
On 28/10/26 21:07, Pierrick Bouvier wrote:
> On 10/28/2026 11:21 AM, Philippe Mathieu-Daudé wrote:
>> 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.
>>
>> Philippe Mathieu-Daudé (4):
>> tests/tcg/mips: Clear DSPControl at start of DSP tests
>> tests/tcg/mips: Group DSP tests
>> tests/tcg/mips: Group Release 6 tests
>> tests/tcg/mips: Group MSA tests
>>
>
> That's a good idea in itself, but this would need additional work to
> have a clear report per test. We can't trade usability for faster
> compilation.
>
> Right now, a test will stop on the first assert() met, without going
> further.
>
> Ideally, we can keep the list of tests in a static table, and perform
> the DSPControl clear before each, so patch 1 can be removed. Also,
> assert could be replaced with a proper return and print information per
> test.
IIUC the requested changes are only for the DSP tests, as the other
groups (Rel6 and MSA) do not stop on the first assert() hit.
I'll rework patch 2 (indeed 1 is then unnecessary) and respin, thanks.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 0/4] tests/tcg: Massage MIPS tests for easier maintenance
2026-10-29 7:04 ` Philippe Mathieu-Daudé
@ 2026-10-29 7:47 ` Pierrick Bouvier
2026-10-29 8:16 ` Philippe Mathieu-Daudé
0 siblings, 1 reply; 9+ messages in thread
From: Pierrick Bouvier @ 2026-10-29 7:47 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel
Cc: Aleksandar Rikalo, Aurelien Jarno, Jiaxun Yang
On 10/29/26 12:04 AM, Philippe Mathieu-Daudé wrote:
> On 28/10/26 21:07, Pierrick Bouvier wrote:
>> On 10/28/2026 11:21 AM, Philippe Mathieu-Daudé wrote:
>>> 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.
>>>
>>> Philippe Mathieu-Daudé (4):
>>> tests/tcg/mips: Clear DSPControl at start of DSP tests
>>> tests/tcg/mips: Group DSP tests
>>> tests/tcg/mips: Group Release 6 tests
>>> tests/tcg/mips: Group MSA tests
>>>
>>
>> That's a good idea in itself, but this would need additional work to
>> have a clear report per test. We can't trade usability for faster
>> compilation.
>>
>> Right now, a test will stop on the first assert() met, without going
>> further.
>>
>> Ideally, we can keep the list of tests in a static table, and perform
>> the DSPControl clear before each, so patch 1 can be removed. Also,
>> assert could be replaced with a proper return and print information per
>> test.
>
> IIUC the requested changes are only for the DSP tests, as the other
> groups (Rel6 and MSA) do not stop on the first assert() hit.
>
Yes. Other patches still need to add some reporting on which test failed
(a print with OK/FAIL is enough) instead of just a global return code.
> I'll rework patch 2 (indeed 1 is then unnecessary) and respin, thanks.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 0/4] tests/tcg: Massage MIPS tests for easier maintenance
2026-10-29 7:47 ` Pierrick Bouvier
@ 2026-10-29 8:16 ` Philippe Mathieu-Daudé
0 siblings, 0 replies; 9+ messages in thread
From: Philippe Mathieu-Daudé @ 2026-10-29 8:16 UTC (permalink / raw)
To: Pierrick Bouvier, qemu-devel
Cc: Aleksandar Rikalo, Aurelien Jarno, Jiaxun Yang
On 29/10/26 08:47, Pierrick Bouvier wrote:
> On 10/29/26 12:04 AM, Philippe Mathieu-Daudé wrote:
>> On 28/10/26 21:07, Pierrick Bouvier wrote:
>>> On 10/28/2026 11:21 AM, Philippe Mathieu-Daudé wrote:
>>>> 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.
>>>>
>>>> Philippe Mathieu-Daudé (4):
>>>> tests/tcg/mips: Clear DSPControl at start of DSP tests
>>>> tests/tcg/mips: Group DSP tests
>>>> tests/tcg/mips: Group Release 6 tests
>>>> tests/tcg/mips: Group MSA tests
>>>>
>>>
>>> That's a good idea in itself, but this would need additional work to
>>> have a clear report per test. We can't trade usability for faster
>>> compilation.
>>>
>>> Right now, a test will stop on the first assert() met, without going
>>> further.
>>>
>>> Ideally, we can keep the list of tests in a static table, and perform
>>> the DSPControl clear before each, so patch 1 can be removed. Also,
>>> assert could be replaced with a proper return and print information per
>>> test.
>>
>> IIUC the requested changes are only for the DSP tests, as the other
>> groups (Rel6 and MSA) do not stop on the first assert() hit.
>>
>
> Yes. Other patches still need to add some reporting on which test failed
> (a print with OK/FAIL is enough) instead of just a global return code.
Right. I'll try to use TAP format so it better integrates with meson.
>> I'll rework patch 2 (indeed 1 is then unnecessary) and respin, thanks.
>
>
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2026-10-29 8:17 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-28 19:21 [PATCH 0/4] tests/tcg: Massage MIPS tests for easier maintenance Philippe Mathieu-Daudé
2026-10-28 19:21 ` [PATCH 1/4] tests/tcg/mips: Clear DSPControl at start of DSP tests Philippe Mathieu-Daudé
2026-10-28 19:21 ` [PATCH 2/4] tests/tcg/mips: Group " Philippe Mathieu-Daudé
2026-10-28 19:21 ` [PATCH 3/4] tests/tcg/mips: Group Release 6 tests Philippe Mathieu-Daudé
2026-10-28 19:21 ` [PATCH 4/4] tests/tcg/mips: Group MSA tests Philippe Mathieu-Daudé
2026-10-28 20:07 ` [PATCH 0/4] tests/tcg: Massage MIPS tests for easier maintenance Pierrick Bouvier
2026-10-29 7:04 ` Philippe Mathieu-Daudé
2026-10-29 7:47 ` Pierrick Bouvier
2026-10-29 8:16 ` Philippe Mathieu-Daudé
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.