All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PULL 0/7] MIPS queue for March 11th, 2019
@ 2019-03-11 14:24 Aleksandar Markovic
  2019-03-11 14:24 ` [Qemu-devel] [PULL 1/7] tests/tcg: target/mips: Correct preambles of test source files Aleksandar Markovic
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: Aleksandar Markovic @ 2019-03-11 14:24 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell, amarkovic

From: Aleksandar Markovic <amarkovic@wavecomp.com>

The following changes since commit e2a18635a400b0e68679614132e9ef6316105590:

  Merge remote-tracking branch 'remotes/ericb/tags/pull-nbd-2019-03-08' into staging (2019-03-09 20:55:44 +0000)

are available in the git repository at:

  https://github.com/AMarkovic/qemu tags/mips-queue-mar-11-2019

for you to fetch changes up to 53e116fed6dde572003aebf3bc32e25663eeb446:

  target/mips: Add tests for a variety of MSA integer subtract instructions (2019-03-11 12:45:36 +0100)

----------------------------------------------------------------

MIPS queue for March 11th, 2019

  - MIPS TCG tests updates and cleanups

  Note:

  - six checkpatch.pl warnings on "MAINTAINERS" can be ignored

----------------------------------------------------------------

Aleksandar Markovic (2):
  tests/tcg: target/mips: Correct preambles of test source files
  tests/tcg: target/mips: Rename two header files for consistency

Mateja Marjanovic (5):
  target/mips: Add tests for a variety of MSA integer average
    instructions
  target/mips: Add tests for a variety of MSA integer divide
    instructions
  target/mips: Add tests for a variety of MSA integer dot product
    instructions
  target/mips: Add tests for a variety of MSA integer multiply
    instructions
  target/mips: Add tests for a variety of MSA integer subtract
    instructions

 .../include/{test_inputs.h => test_inputs_128.h}   |   8 +-
 .../include/{test_utils.h => test_utils_128.h}     |   8 +-
 tests/tcg/mips/include/wrappers_msa.h              |   4 +-
 .../mips/user/ase/msa/bit-count/test_msa_nloc_b.c  |   8 +-
 .../mips/user/ase/msa/bit-count/test_msa_nloc_d.c  |   8 +-
 .../mips/user/ase/msa/bit-count/test_msa_nloc_h.c  |   8 +-
 .../mips/user/ase/msa/bit-count/test_msa_nloc_w.c  |   8 +-
 .../mips/user/ase/msa/bit-count/test_msa_nlzc_b.c  |   8 +-
 .../mips/user/ase/msa/bit-count/test_msa_nlzc_d.c  |   8 +-
 .../mips/user/ase/msa/bit-count/test_msa_nlzc_h.c  |   8 +-
 .../mips/user/ase/msa/bit-count/test_msa_nlzc_w.c  |   8 +-
 .../mips/user/ase/msa/bit-count/test_msa_pcnt_b.c  |   8 +-
 .../mips/user/ase/msa/bit-count/test_msa_pcnt_d.c  |   8 +-
 .../mips/user/ase/msa/bit-count/test_msa_pcnt_h.c  |   8 +-
 .../mips/user/ase/msa/bit-count/test_msa_pcnt_w.c  |   8 +-
 .../mips/user/ase/msa/int-add/test_msa_add_a_b.c   |   6 +-
 .../mips/user/ase/msa/int-add/test_msa_add_a_d.c   |   6 +-
 .../mips/user/ase/msa/int-add/test_msa_add_a_h.c   |   6 +-
 .../mips/user/ase/msa/int-add/test_msa_add_a_w.c   |   6 +-
 .../mips/user/ase/msa/int-add/test_msa_adds_a_b.c  |   6 +-
 .../mips/user/ase/msa/int-add/test_msa_adds_a_d.c  |   6 +-
 .../mips/user/ase/msa/int-add/test_msa_adds_a_h.c  |   6 +-
 .../mips/user/ase/msa/int-add/test_msa_adds_a_w.c  |   6 +-
 .../mips/user/ase/msa/int-add/test_msa_adds_s_b.c  |   6 +-
 .../mips/user/ase/msa/int-add/test_msa_adds_s_d.c  |   6 +-
 .../mips/user/ase/msa/int-add/test_msa_adds_s_h.c  |   6 +-
 .../mips/user/ase/msa/int-add/test_msa_adds_s_w.c  |   6 +-
 .../mips/user/ase/msa/int-add/test_msa_adds_u_b.c  |   6 +-
 .../mips/user/ase/msa/int-add/test_msa_adds_u_d.c  |   6 +-
 .../mips/user/ase/msa/int-add/test_msa_adds_u_h.c  |   6 +-
 .../mips/user/ase/msa/int-add/test_msa_adds_u_w.c  |   6 +-
 .../mips/user/ase/msa/int-add/test_msa_addv_b.c    |   6 +-
 .../mips/user/ase/msa/int-add/test_msa_addv_d.c    |   6 +-
 .../mips/user/ase/msa/int-add/test_msa_addv_h.c    |   6 +-
 .../mips/user/ase/msa/int-add/test_msa_addv_w.c    |   6 +-
 .../mips/user/ase/msa/int-add/test_msa_hadd_s_d.c  |   6 +-
 .../mips/user/ase/msa/int-add/test_msa_hadd_s_h.c  |   6 +-
 .../mips/user/ase/msa/int-add/test_msa_hadd_s_w.c  |   6 +-
 .../mips/user/ase/msa/int-add/test_msa_hadd_u_d.c  |   6 +-
 .../mips/user/ase/msa/int-add/test_msa_hadd_u_h.c  |   6 +-
 .../mips/user/ase/msa/int-add/test_msa_hadd_u_w.c  |   6 +-
 .../user/ase/msa/int-average/test_msa_ave_s_b.c    | 151 ++++++++++++++++++++
 .../user/ase/msa/int-average/test_msa_ave_s_d.c    | 151 ++++++++++++++++++++
 .../user/ase/msa/int-average/test_msa_ave_s_h.c    | 151 ++++++++++++++++++++
 .../user/ase/msa/int-average/test_msa_ave_s_w.c    | 151 ++++++++++++++++++++
 .../user/ase/msa/int-average/test_msa_ave_u_b.c    | 151 ++++++++++++++++++++
 .../user/ase/msa/int-average/test_msa_ave_u_d.c    | 151 ++++++++++++++++++++
 .../user/ase/msa/int-average/test_msa_ave_u_h.c    | 151 ++++++++++++++++++++
 .../user/ase/msa/int-average/test_msa_ave_u_w.c    | 151 ++++++++++++++++++++
 .../user/ase/msa/int-average/test_msa_aver_s_b.c   | 151 ++++++++++++++++++++
 .../user/ase/msa/int-average/test_msa_aver_s_d.c   | 151 ++++++++++++++++++++
 .../user/ase/msa/int-average/test_msa_aver_s_h.c   | 151 ++++++++++++++++++++
 .../user/ase/msa/int-average/test_msa_aver_s_w.c   | 151 ++++++++++++++++++++
 .../user/ase/msa/int-average/test_msa_aver_u_b.c   | 151 ++++++++++++++++++++
 .../user/ase/msa/int-average/test_msa_aver_u_d.c   | 151 ++++++++++++++++++++
 .../user/ase/msa/int-average/test_msa_aver_u_h.c   | 151 ++++++++++++++++++++
 .../user/ase/msa/int-average/test_msa_aver_u_w.c   | 151 ++++++++++++++++++++
 .../mips/user/ase/msa/int-compare/test_msa_ceq_b.c |   8 +-
 .../mips/user/ase/msa/int-compare/test_msa_ceq_d.c |   8 +-
 .../mips/user/ase/msa/int-compare/test_msa_ceq_h.c |   8 +-
 .../mips/user/ase/msa/int-compare/test_msa_ceq_w.c |   8 +-
 .../user/ase/msa/int-compare/test_msa_cle_s_b.c    |   8 +-
 .../user/ase/msa/int-compare/test_msa_cle_s_d.c    |   8 +-
 .../user/ase/msa/int-compare/test_msa_cle_s_h.c    |   8 +-
 .../user/ase/msa/int-compare/test_msa_cle_s_w.c    |   8 +-
 .../user/ase/msa/int-compare/test_msa_cle_u_b.c    |   8 +-
 .../user/ase/msa/int-compare/test_msa_cle_u_d.c    |   8 +-
 .../user/ase/msa/int-compare/test_msa_cle_u_h.c    |   8 +-
 .../user/ase/msa/int-compare/test_msa_cle_u_w.c    |   8 +-
 .../user/ase/msa/int-compare/test_msa_clt_s_b.c    |   8 +-
 .../user/ase/msa/int-compare/test_msa_clt_s_d.c    |   8 +-
 .../user/ase/msa/int-compare/test_msa_clt_s_h.c    |   8 +-
 .../user/ase/msa/int-compare/test_msa_clt_s_w.c    |   8 +-
 .../user/ase/msa/int-compare/test_msa_clt_u_b.c    |   8 +-
 .../user/ase/msa/int-compare/test_msa_clt_u_d.c    |   8 +-
 .../user/ase/msa/int-compare/test_msa_clt_u_h.c    |   8 +-
 .../user/ase/msa/int-compare/test_msa_clt_u_w.c    |   8 +-
 .../user/ase/msa/int-divide/test_msa_div_s_b.c     | 151 ++++++++++++++++++++
 .../user/ase/msa/int-divide/test_msa_div_s_d.c     | 151 ++++++++++++++++++++
 .../user/ase/msa/int-divide/test_msa_div_s_h.c     | 151 ++++++++++++++++++++
 .../user/ase/msa/int-divide/test_msa_div_s_w.c     | 151 ++++++++++++++++++++
 .../user/ase/msa/int-divide/test_msa_div_u_b.c     | 151 ++++++++++++++++++++
 .../user/ase/msa/int-divide/test_msa_div_u_d.c     | 151 ++++++++++++++++++++
 .../user/ase/msa/int-divide/test_msa_div_u_h.c     | 151 ++++++++++++++++++++
 .../user/ase/msa/int-divide/test_msa_div_u_w.c     | 151 ++++++++++++++++++++
 .../ase/msa/int-dot-product/test_msa_dotp_s_d.c    | 151 ++++++++++++++++++++
 .../ase/msa/int-dot-product/test_msa_dotp_s_h.c    | 151 ++++++++++++++++++++
 .../ase/msa/int-dot-product/test_msa_dotp_s_w.c    | 151 ++++++++++++++++++++
 .../ase/msa/int-dot-product/test_msa_dotp_u_d.c    | 151 ++++++++++++++++++++
 .../ase/msa/int-dot-product/test_msa_dotp_u_h.c    | 151 ++++++++++++++++++++
 .../ase/msa/int-dot-product/test_msa_dotp_u_w.c    | 151 ++++++++++++++++++++
 .../user/ase/msa/int-max-min/test_msa_max_a_b.c    |   8 +-
 .../user/ase/msa/int-max-min/test_msa_max_a_d.c    |   8 +-
 .../user/ase/msa/int-max-min/test_msa_max_a_h.c    |   8 +-
 .../user/ase/msa/int-max-min/test_msa_max_a_w.c    |   8 +-
 .../user/ase/msa/int-max-min/test_msa_max_s_b.c    |   8 +-
 .../user/ase/msa/int-max-min/test_msa_max_s_d.c    |   8 +-
 .../user/ase/msa/int-max-min/test_msa_max_s_h.c    |   8 +-
 .../user/ase/msa/int-max-min/test_msa_max_s_w.c    |   8 +-
 .../user/ase/msa/int-max-min/test_msa_max_u_b.c    |   8 +-
 .../user/ase/msa/int-max-min/test_msa_max_u_d.c    |   8 +-
 .../user/ase/msa/int-max-min/test_msa_max_u_h.c    |   8 +-
 .../user/ase/msa/int-max-min/test_msa_max_u_w.c    |   8 +-
 .../user/ase/msa/int-max-min/test_msa_min_a_b.c    |   8 +-
 .../user/ase/msa/int-max-min/test_msa_min_a_d.c    |   8 +-
 .../user/ase/msa/int-max-min/test_msa_min_a_h.c    |   8 +-
 .../user/ase/msa/int-max-min/test_msa_min_a_w.c    |   8 +-
 .../user/ase/msa/int-max-min/test_msa_min_s_b.c    |   8 +-
 .../user/ase/msa/int-max-min/test_msa_min_s_d.c    |   8 +-
 .../user/ase/msa/int-max-min/test_msa_min_s_h.c    |   8 +-
 .../user/ase/msa/int-max-min/test_msa_min_s_w.c    |   8 +-
 .../user/ase/msa/int-max-min/test_msa_min_u_b.c    |   8 +-
 .../user/ase/msa/int-max-min/test_msa_min_u_d.c    |   8 +-
 .../user/ase/msa/int-max-min/test_msa_min_u_h.c    |   8 +-
 .../user/ase/msa/int-max-min/test_msa_min_u_w.c    |   8 +-
 .../user/ase/msa/int-multiply/test_msa_mul_q_h.c   | 151 ++++++++++++++++++++
 .../user/ase/msa/int-multiply/test_msa_mul_q_w.c   | 151 ++++++++++++++++++++
 .../user/ase/msa/int-multiply/test_msa_mulr_q_h.c  | 151 ++++++++++++++++++++
 .../user/ase/msa/int-multiply/test_msa_mulr_q_w.c  | 151 ++++++++++++++++++++
 .../user/ase/msa/int-multiply/test_msa_mulv_b.c    | 151 ++++++++++++++++++++
 .../user/ase/msa/int-multiply/test_msa_mulv_d.c    | 151 ++++++++++++++++++++
 .../user/ase/msa/int-multiply/test_msa_mulv_h.c    | 151 ++++++++++++++++++++
 .../user/ase/msa/int-multiply/test_msa_mulv_w.c    | 151 ++++++++++++++++++++
 .../user/ase/msa/int-subtract/test_msa_subs_s_b.c  | 151 ++++++++++++++++++++
 .../user/ase/msa/int-subtract/test_msa_subs_s_d.c  | 151 ++++++++++++++++++++
 .../user/ase/msa/int-subtract/test_msa_subs_s_h.c  | 151 ++++++++++++++++++++
 .../user/ase/msa/int-subtract/test_msa_subs_s_w.c  | 151 ++++++++++++++++++++
 .../user/ase/msa/int-subtract/test_msa_subs_u_b.c  | 151 ++++++++++++++++++++
 .../user/ase/msa/int-subtract/test_msa_subs_u_d.c  | 151 ++++++++++++++++++++
 .../user/ase/msa/int-subtract/test_msa_subs_u_h.c  | 151 ++++++++++++++++++++
 .../user/ase/msa/int-subtract/test_msa_subs_u_w.c  | 151 ++++++++++++++++++++
 .../ase/msa/int-subtract/test_msa_subsus_u_b.c     | 151 ++++++++++++++++++++
 .../ase/msa/int-subtract/test_msa_subsus_u_d.c     | 151 ++++++++++++++++++++
 .../ase/msa/int-subtract/test_msa_subsus_u_h.c     | 151 ++++++++++++++++++++
 .../ase/msa/int-subtract/test_msa_subsus_u_w.c     | 151 ++++++++++++++++++++
 .../ase/msa/int-subtract/test_msa_subsuu_s_b.c     | 151 ++++++++++++++++++++
 .../ase/msa/int-subtract/test_msa_subsuu_s_d.c     | 151 ++++++++++++++++++++
 .../ase/msa/int-subtract/test_msa_subsuu_s_h.c     | 151 ++++++++++++++++++++
 .../ase/msa/int-subtract/test_msa_subsuu_s_w.c     | 151 ++++++++++++++++++++
 .../user/ase/msa/int-subtract/test_msa_subv_b.c    | 151 ++++++++++++++++++++
 .../user/ase/msa/int-subtract/test_msa_subv_d.c    | 151 ++++++++++++++++++++
 .../user/ase/msa/int-subtract/test_msa_subv_h.c    | 151 ++++++++++++++++++++
 .../user/ase/msa/int-subtract/test_msa_subv_w.c    | 153 +++++++++++++++++++++
 .../user/ase/msa/interleave/test_msa_ilvev_b.c     |   8 +-
 .../user/ase/msa/interleave/test_msa_ilvev_d.c     |   8 +-
 .../user/ase/msa/interleave/test_msa_ilvev_h.c     |   8 +-
 .../user/ase/msa/interleave/test_msa_ilvev_w.c     |   8 +-
 .../mips/user/ase/msa/interleave/test_msa_ilvl_b.c |   8 +-
 .../mips/user/ase/msa/interleave/test_msa_ilvl_d.c |   8 +-
 .../mips/user/ase/msa/interleave/test_msa_ilvl_h.c |   8 +-
 .../mips/user/ase/msa/interleave/test_msa_ilvl_w.c |   8 +-
 .../user/ase/msa/interleave/test_msa_ilvod_b.c     |   8 +-
 .../user/ase/msa/interleave/test_msa_ilvod_d.c     |   8 +-
 .../user/ase/msa/interleave/test_msa_ilvod_h.c     |   8 +-
 .../user/ase/msa/interleave/test_msa_ilvod_w.c     |   8 +-
 .../mips/user/ase/msa/interleave/test_msa_ilvr_b.c |   8 +-
 .../mips/user/ase/msa/interleave/test_msa_ilvr_d.c |   8 +-
 .../mips/user/ase/msa/interleave/test_msa_ilvr_h.c |   8 +-
 .../mips/user/ase/msa/interleave/test_msa_ilvr_w.c |   8 +-
 tests/tcg/mips/user/ase/msa/logic/test_msa_and_v.c |   8 +-
 tests/tcg/mips/user/ase/msa/logic/test_msa_nor_v.c |   8 +-
 tests/tcg/mips/user/ase/msa/logic/test_msa_or_v.c  |   8 +-
 tests/tcg/mips/user/ase/msa/logic/test_msa_xor_v.c |   8 +-
 .../tcg/mips/user/ase/msa/pack/test_msa_pckev_b.c  |   8 +-
 .../tcg/mips/user/ase/msa/pack/test_msa_pckev_d.c  |   8 +-
 .../tcg/mips/user/ase/msa/pack/test_msa_pckev_h.c  |   8 +-
 .../tcg/mips/user/ase/msa/pack/test_msa_pckev_w.c  |   8 +-
 .../tcg/mips/user/ase/msa/pack/test_msa_pckod_b.c  |   8 +-
 .../tcg/mips/user/ase/msa/pack/test_msa_pckod_d.c  |   8 +-
 .../tcg/mips/user/ase/msa/pack/test_msa_pckod_h.c  |   8 +-
 .../tcg/mips/user/ase/msa/pack/test_msa_pckod_w.c  |   8 +-
 tests/tcg/mips/user/ase/msa/pack/test_msa_vshf_b.c |   8 +-
 tests/tcg/mips/user/ase/msa/pack/test_msa_vshf_d.c |   8 +-
 tests/tcg/mips/user/ase/msa/pack/test_msa_vshf_h.c |   8 +-
 tests/tcg/mips/user/ase/msa/pack/test_msa_vshf_w.c |   8 +-
 175 files changed, 9200 insertions(+), 440 deletions(-)
 rename tests/tcg/mips/include/{test_inputs.h => test_inputs_128.h} (97%)
 rename tests/tcg/mips/include/{test_utils.h => test_utils_128.h} (93%)
 create mode 100644 tests/tcg/mips/user/ase/msa/int-average/test_msa_ave_s_b.c
 create mode 100644 tests/tcg/mips/user/ase/msa/int-average/test_msa_ave_s_d.c
 create mode 100644 tests/tcg/mips/user/ase/msa/int-average/test_msa_ave_s_h.c
 create mode 100644 tests/tcg/mips/user/ase/msa/int-average/test_msa_ave_s_w.c
 create mode 100644 tests/tcg/mips/user/ase/msa/int-average/test_msa_ave_u_b.c
 create mode 100644 tests/tcg/mips/user/ase/msa/int-average/test_msa_ave_u_d.c
 create mode 100644 tests/tcg/mips/user/ase/msa/int-average/test_msa_ave_u_h.c
 create mode 100644 tests/tcg/mips/user/ase/msa/int-average/test_msa_ave_u_w.c
 create mode 100644 tests/tcg/mips/user/ase/msa/int-average/test_msa_aver_s_b.c
 create mode 100644 tests/tcg/mips/user/ase/msa/int-average/test_msa_aver_s_d.c
 create mode 100644 tests/tcg/mips/user/ase/msa/int-average/test_msa_aver_s_h.c
 create mode 100644 tests/tcg/mips/user/ase/msa/int-average/test_msa_aver_s_w.c
 create mode 100644 tests/tcg/mips/user/ase/msa/int-average/test_msa_aver_u_b.c
 create mode 100644 tests/tcg/mips/user/ase/msa/int-average/test_msa_aver_u_d.c
 create mode 100644 tests/tcg/mips/user/ase/msa/int-average/test_msa_aver_u_h.c
 create mode 100644 tests/tcg/mips/user/ase/msa/int-average/test_msa_aver_u_w.c
 create mode 100644 tests/tcg/mips/user/ase/msa/int-divide/test_msa_div_s_b.c
 create mode 100644 tests/tcg/mips/user/ase/msa/int-divide/test_msa_div_s_d.c
 create mode 100644 tests/tcg/mips/user/ase/msa/int-divide/test_msa_div_s_h.c
 create mode 100644 tests/tcg/mips/user/ase/msa/int-divide/test_msa_div_s_w.c
 create mode 100644 tests/tcg/mips/user/ase/msa/int-divide/test_msa_div_u_b.c
 create mode 100644 tests/tcg/mips/user/ase/msa/int-divide/test_msa_div_u_d.c
 create mode 100644 tests/tcg/mips/user/ase/msa/int-divide/test_msa_div_u_h.c
 create mode 100644 tests/tcg/mips/user/ase/msa/int-divide/test_msa_div_u_w.c
 create mode 100644 tests/tcg/mips/user/ase/msa/int-dot-product/test_msa_dotp_s_d.c
 create mode 100644 tests/tcg/mips/user/ase/msa/int-dot-product/test_msa_dotp_s_h.c
 create mode 100644 tests/tcg/mips/user/ase/msa/int-dot-product/test_msa_dotp_s_w.c
 create mode 100644 tests/tcg/mips/user/ase/msa/int-dot-product/test_msa_dotp_u_d.c
 create mode 100644 tests/tcg/mips/user/ase/msa/int-dot-product/test_msa_dotp_u_h.c
 create mode 100644 tests/tcg/mips/user/ase/msa/int-dot-product/test_msa_dotp_u_w.c
 create mode 100644 tests/tcg/mips/user/ase/msa/int-multiply/test_msa_mul_q_h.c
 create mode 100644 tests/tcg/mips/user/ase/msa/int-multiply/test_msa_mul_q_w.c
 create mode 100644 tests/tcg/mips/user/ase/msa/int-multiply/test_msa_mulr_q_h.c
 create mode 100644 tests/tcg/mips/user/ase/msa/int-multiply/test_msa_mulr_q_w.c
 create mode 100644 tests/tcg/mips/user/ase/msa/int-multiply/test_msa_mulv_b.c
 create mode 100644 tests/tcg/mips/user/ase/msa/int-multiply/test_msa_mulv_d.c
 create mode 100644 tests/tcg/mips/user/ase/msa/int-multiply/test_msa_mulv_h.c
 create mode 100644 tests/tcg/mips/user/ase/msa/int-multiply/test_msa_mulv_w.c
 create mode 100644 tests/tcg/mips/user/ase/msa/int-subtract/test_msa_subs_s_b.c
 create mode 100644 tests/tcg/mips/user/ase/msa/int-subtract/test_msa_subs_s_d.c
 create mode 100644 tests/tcg/mips/user/ase/msa/int-subtract/test_msa_subs_s_h.c
 create mode 100644 tests/tcg/mips/user/ase/msa/int-subtract/test_msa_subs_s_w.c
 create mode 100644 tests/tcg/mips/user/ase/msa/int-subtract/test_msa_subs_u_b.c
 create mode 100644 tests/tcg/mips/user/ase/msa/int-subtract/test_msa_subs_u_d.c
 create mode 100644 tests/tcg/mips/user/ase/msa/int-subtract/test_msa_subs_u_h.c
 create mode 100644 tests/tcg/mips/user/ase/msa/int-subtract/test_msa_subs_u_w.c
 create mode 100644 tests/tcg/mips/user/ase/msa/int-subtract/test_msa_subsus_u_b.c
 create mode 100644 tests/tcg/mips/user/ase/msa/int-subtract/test_msa_subsus_u_d.c
 create mode 100644 tests/tcg/mips/user/ase/msa/int-subtract/test_msa_subsus_u_h.c
 create mode 100644 tests/tcg/mips/user/ase/msa/int-subtract/test_msa_subsus_u_w.c
 create mode 100644 tests/tcg/mips/user/ase/msa/int-subtract/test_msa_subsuu_s_b.c
 create mode 100644 tests/tcg/mips/user/ase/msa/int-subtract/test_msa_subsuu_s_d.c
 create mode 100644 tests/tcg/mips/user/ase/msa/int-subtract/test_msa_subsuu_s_h.c
 create mode 100644 tests/tcg/mips/user/ase/msa/int-subtract/test_msa_subsuu_s_w.c
 create mode 100644 tests/tcg/mips/user/ase/msa/int-subtract/test_msa_subv_b.c
 create mode 100644 tests/tcg/mips/user/ase/msa/int-subtract/test_msa_subv_d.c
 create mode 100644 tests/tcg/mips/user/ase/msa/int-subtract/test_msa_subv_h.c
 create mode 100644 tests/tcg/mips/user/ase/msa/int-subtract/test_msa_subv_w.c

-- 
2.7.4

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Qemu-devel] [PULL 1/7] tests/tcg: target/mips: Correct preambles of test source files
  2019-03-11 14:24 [Qemu-devel] [PULL 0/7] MIPS queue for March 11th, 2019 Aleksandar Markovic
@ 2019-03-11 14:24 ` Aleksandar Markovic
  2019-03-11 14:24 ` [Qemu-devel] [PULL 2/7] tests/tcg: target/mips: Rename two header files for consistency Aleksandar Markovic
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Aleksandar Markovic @ 2019-03-11 14:24 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell, amarkovic

From: Aleksandar Markovic <amarkovic@wavecomp.com>

Correct preambles of test source files.

Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com>
Reviewed-by: Aleksandar Rikalo <amarkovic@wavecomp.com>
Message-Id: <1551981716-30664-2-git-send-email-aleksandar.markovic@rt-rk.com>
---
 tests/tcg/mips/include/test_inputs.h                       | 4 ++--
 tests/tcg/mips/include/test_utils.h                        | 4 ++--
 tests/tcg/mips/include/wrappers_msa.h                      | 4 ++--
 tests/tcg/mips/user/ase/msa/bit-count/test_msa_nloc_b.c    | 4 ++--
 tests/tcg/mips/user/ase/msa/bit-count/test_msa_nloc_d.c    | 4 ++--
 tests/tcg/mips/user/ase/msa/bit-count/test_msa_nloc_h.c    | 4 ++--
 tests/tcg/mips/user/ase/msa/bit-count/test_msa_nloc_w.c    | 4 ++--
 tests/tcg/mips/user/ase/msa/bit-count/test_msa_nlzc_b.c    | 4 ++--
 tests/tcg/mips/user/ase/msa/bit-count/test_msa_nlzc_d.c    | 4 ++--
 tests/tcg/mips/user/ase/msa/bit-count/test_msa_nlzc_h.c    | 4 ++--
 tests/tcg/mips/user/ase/msa/bit-count/test_msa_nlzc_w.c    | 4 ++--
 tests/tcg/mips/user/ase/msa/bit-count/test_msa_pcnt_b.c    | 4 ++--
 tests/tcg/mips/user/ase/msa/bit-count/test_msa_pcnt_d.c    | 4 ++--
 tests/tcg/mips/user/ase/msa/bit-count/test_msa_pcnt_h.c    | 4 ++--
 tests/tcg/mips/user/ase/msa/bit-count/test_msa_pcnt_w.c    | 4 ++--
 tests/tcg/mips/user/ase/msa/int-add/test_msa_add_a_b.c     | 2 +-
 tests/tcg/mips/user/ase/msa/int-add/test_msa_add_a_d.c     | 2 +-
 tests/tcg/mips/user/ase/msa/int-add/test_msa_add_a_h.c     | 2 +-
 tests/tcg/mips/user/ase/msa/int-add/test_msa_add_a_w.c     | 2 +-
 tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_a_b.c    | 2 +-
 tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_a_d.c    | 2 +-
 tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_a_h.c    | 2 +-
 tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_a_w.c    | 2 +-
 tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_s_b.c    | 2 +-
 tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_s_d.c    | 2 +-
 tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_s_h.c    | 2 +-
 tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_s_w.c    | 2 +-
 tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_u_b.c    | 2 +-
 tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_u_d.c    | 2 +-
 tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_u_h.c    | 2 +-
 tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_u_w.c    | 2 +-
 tests/tcg/mips/user/ase/msa/int-add/test_msa_addv_b.c      | 2 +-
 tests/tcg/mips/user/ase/msa/int-add/test_msa_addv_d.c      | 2 +-
 tests/tcg/mips/user/ase/msa/int-add/test_msa_addv_h.c      | 2 +-
 tests/tcg/mips/user/ase/msa/int-add/test_msa_addv_w.c      | 2 +-
 tests/tcg/mips/user/ase/msa/int-add/test_msa_hadd_s_d.c    | 2 +-
 tests/tcg/mips/user/ase/msa/int-add/test_msa_hadd_s_h.c    | 2 +-
 tests/tcg/mips/user/ase/msa/int-add/test_msa_hadd_s_w.c    | 2 +-
 tests/tcg/mips/user/ase/msa/int-add/test_msa_hadd_u_d.c    | 2 +-
 tests/tcg/mips/user/ase/msa/int-add/test_msa_hadd_u_h.c    | 2 +-
 tests/tcg/mips/user/ase/msa/int-add/test_msa_hadd_u_w.c    | 2 +-
 tests/tcg/mips/user/ase/msa/int-compare/test_msa_ceq_b.c   | 4 ++--
 tests/tcg/mips/user/ase/msa/int-compare/test_msa_ceq_d.c   | 4 ++--
 tests/tcg/mips/user/ase/msa/int-compare/test_msa_ceq_h.c   | 4 ++--
 tests/tcg/mips/user/ase/msa/int-compare/test_msa_ceq_w.c   | 4 ++--
 tests/tcg/mips/user/ase/msa/int-compare/test_msa_cle_s_b.c | 4 ++--
 tests/tcg/mips/user/ase/msa/int-compare/test_msa_cle_s_d.c | 4 ++--
 tests/tcg/mips/user/ase/msa/int-compare/test_msa_cle_s_h.c | 4 ++--
 tests/tcg/mips/user/ase/msa/int-compare/test_msa_cle_s_w.c | 4 ++--
 tests/tcg/mips/user/ase/msa/int-compare/test_msa_cle_u_b.c | 4 ++--
 tests/tcg/mips/user/ase/msa/int-compare/test_msa_cle_u_d.c | 4 ++--
 tests/tcg/mips/user/ase/msa/int-compare/test_msa_cle_u_h.c | 4 ++--
 tests/tcg/mips/user/ase/msa/int-compare/test_msa_cle_u_w.c | 4 ++--
 tests/tcg/mips/user/ase/msa/int-compare/test_msa_clt_s_b.c | 4 ++--
 tests/tcg/mips/user/ase/msa/int-compare/test_msa_clt_s_d.c | 4 ++--
 tests/tcg/mips/user/ase/msa/int-compare/test_msa_clt_s_h.c | 4 ++--
 tests/tcg/mips/user/ase/msa/int-compare/test_msa_clt_s_w.c | 4 ++--
 tests/tcg/mips/user/ase/msa/int-compare/test_msa_clt_u_b.c | 4 ++--
 tests/tcg/mips/user/ase/msa/int-compare/test_msa_clt_u_d.c | 4 ++--
 tests/tcg/mips/user/ase/msa/int-compare/test_msa_clt_u_h.c | 4 ++--
 tests/tcg/mips/user/ase/msa/int-compare/test_msa_clt_u_w.c | 4 ++--
 tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_a_b.c | 4 ++--
 tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_a_d.c | 4 ++--
 tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_a_h.c | 4 ++--
 tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_a_w.c | 4 ++--
 tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_s_b.c | 4 ++--
 tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_s_d.c | 4 ++--
 tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_s_h.c | 4 ++--
 tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_s_w.c | 4 ++--
 tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_u_b.c | 4 ++--
 tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_u_d.c | 4 ++--
 tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_u_h.c | 4 ++--
 tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_u_w.c | 4 ++--
 tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_a_b.c | 4 ++--
 tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_a_d.c | 4 ++--
 tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_a_h.c | 4 ++--
 tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_a_w.c | 4 ++--
 tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_s_b.c | 4 ++--
 tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_s_d.c | 4 ++--
 tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_s_h.c | 4 ++--
 tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_s_w.c | 4 ++--
 tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_u_b.c | 4 ++--
 tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_u_d.c | 4 ++--
 tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_u_h.c | 4 ++--
 tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_u_w.c | 4 ++--
 tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvev_b.c  | 4 ++--
 tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvev_d.c  | 4 ++--
 tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvev_h.c  | 4 ++--
 tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvev_w.c  | 4 ++--
 tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvl_b.c   | 4 ++--
 tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvl_d.c   | 4 ++--
 tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvl_h.c   | 4 ++--
 tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvl_w.c   | 4 ++--
 tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvod_b.c  | 4 ++--
 tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvod_d.c  | 4 ++--
 tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvod_h.c  | 4 ++--
 tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvod_w.c  | 4 ++--
 tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvr_b.c   | 4 ++--
 tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvr_d.c   | 4 ++--
 tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvr_h.c   | 4 ++--
 tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvr_w.c   | 4 ++--
 tests/tcg/mips/user/ase/msa/logic/test_msa_and_v.c         | 4 ++--
 tests/tcg/mips/user/ase/msa/logic/test_msa_nor_v.c         | 4 ++--
 tests/tcg/mips/user/ase/msa/logic/test_msa_or_v.c          | 4 ++--
 tests/tcg/mips/user/ase/msa/logic/test_msa_xor_v.c         | 4 ++--
 tests/tcg/mips/user/ase/msa/pack/test_msa_pckev_b.c        | 4 ++--
 tests/tcg/mips/user/ase/msa/pack/test_msa_pckev_d.c        | 4 ++--
 tests/tcg/mips/user/ase/msa/pack/test_msa_pckev_h.c        | 4 ++--
 tests/tcg/mips/user/ase/msa/pack/test_msa_pckev_w.c        | 4 ++--
 tests/tcg/mips/user/ase/msa/pack/test_msa_pckod_b.c        | 4 ++--
 tests/tcg/mips/user/ase/msa/pack/test_msa_pckod_d.c        | 4 ++--
 tests/tcg/mips/user/ase/msa/pack/test_msa_pckod_h.c        | 4 ++--
 tests/tcg/mips/user/ase/msa/pack/test_msa_pckod_w.c        | 4 ++--
 tests/tcg/mips/user/ase/msa/pack/test_msa_vshf_b.c         | 4 ++--
 tests/tcg/mips/user/ase/msa/pack/test_msa_vshf_d.c         | 4 ++--
 tests/tcg/mips/user/ase/msa/pack/test_msa_vshf_h.c         | 4 ++--
 tests/tcg/mips/user/ase/msa/pack/test_msa_vshf_w.c         | 4 ++--
 117 files changed, 208 insertions(+), 208 deletions(-)

diff --git a/tests/tcg/mips/include/test_inputs.h b/tests/tcg/mips/include/test_inputs.h
index 5406e4e..a0bbbdf 100644
--- a/tests/tcg/mips/include/test_inputs.h
+++ b/tests/tcg/mips/include/test_inputs.h
@@ -1,8 +1,8 @@
 /*
  *  Header file for pattern and random test inputs
  *
- *  Copyright (C) 2018  Wave Computing, Inc.
- *  Copyright (C) 2018  Aleksandar Markovic <amarkovic@wavecomp.com>
+ *  Copyright (C) 2019  Wave Computing, Inc.
+ *  Copyright (C) 2019  Aleksandar Markovic <amarkovic@wavecomp.com>
  *
  *  This program is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
diff --git a/tests/tcg/mips/include/test_utils.h b/tests/tcg/mips/include/test_utils.h
index 9672903..0b3af3d 100644
--- a/tests/tcg/mips/include/test_utils.h
+++ b/tests/tcg/mips/include/test_utils.h
@@ -1,8 +1,8 @@
 /*
  *  Header file for test utilities
  *
- *  Copyright (C) 2018  Wave Computing, Inc.
- *  Copyright (C) 2018  Aleksandar Markovic <amarkovic@wavecomp.com>
+ *  Copyright (C) 2019  Wave Computing, Inc.
+ *  Copyright (C) 2019  Aleksandar Markovic <amarkovic@wavecomp.com>
  *
  *  This program is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
diff --git a/tests/tcg/mips/include/wrappers_msa.h b/tests/tcg/mips/include/wrappers_msa.h
index 9cffd55..254e215 100644
--- a/tests/tcg/mips/include/wrappers_msa.h
+++ b/tests/tcg/mips/include/wrappers_msa.h
@@ -1,8 +1,8 @@
 /*
  *  Header file for wrappers around MSA instructions assembler invocations
  *
- *  Copyright (C) 2018  Wave Computing, Inc.
- *  Copyright (C) 2018  Aleksandar Markovic <amarkovic@wavecomp.com>
+ *  Copyright (C) 2019  Wave Computing, Inc.
+ *  Copyright (C) 2019  Aleksandar Markovic <amarkovic@wavecomp.com>
  *
  *  This program is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
diff --git a/tests/tcg/mips/user/ase/msa/bit-count/test_msa_nloc_b.c b/tests/tcg/mips/user/ase/msa/bit-count/test_msa_nloc_b.c
index d629431..574fd75 100644
--- a/tests/tcg/mips/user/ase/msa/bit-count/test_msa_nloc_b.c
+++ b/tests/tcg/mips/user/ase/msa/bit-count/test_msa_nloc_b.c
@@ -1,8 +1,8 @@
 /*
  *  Test program for MSA instruction NLOC.B
  *
- *  Copyright (C) 2018  Wave Computing, Inc.
- *  Copyright (C) 2018  Aleksandar Markovic <amarkovic@wavecomp.com>
+ *  Copyright (C) 2019  Wave Computing, Inc.
+ *  Copyright (C) 2019  Aleksandar Markovic <amarkovic@wavecomp.com>
  *
  *  This program is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
diff --git a/tests/tcg/mips/user/ase/msa/bit-count/test_msa_nloc_d.c b/tests/tcg/mips/user/ase/msa/bit-count/test_msa_nloc_d.c
index fad220c..eec0bfe 100644
--- a/tests/tcg/mips/user/ase/msa/bit-count/test_msa_nloc_d.c
+++ b/tests/tcg/mips/user/ase/msa/bit-count/test_msa_nloc_d.c
@@ -1,8 +1,8 @@
 /*
  *  Test program for MSA instruction NLOC.D
  *
- *  Copyright (C) 2018  Wave Computing, Inc.
- *  Copyright (C) 2018  Aleksandar Markovic <amarkovic@wavecomp.com>
+ *  Copyright (C) 2019  Wave Computing, Inc.
+ *  Copyright (C) 2019  Aleksandar Markovic <amarkovic@wavecomp.com>
  *
  *  This program is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
diff --git a/tests/tcg/mips/user/ase/msa/bit-count/test_msa_nloc_h.c b/tests/tcg/mips/user/ase/msa/bit-count/test_msa_nloc_h.c
index 84cf974..b338266 100644
--- a/tests/tcg/mips/user/ase/msa/bit-count/test_msa_nloc_h.c
+++ b/tests/tcg/mips/user/ase/msa/bit-count/test_msa_nloc_h.c
@@ -1,8 +1,8 @@
 /*
  *  Test program for MSA instruction NLOC.H
  *
- *  Copyright (C) 2018  Wave Computing, Inc.
- *  Copyright (C) 2018  Aleksandar Markovic <amarkovic@wavecomp.com>
+ *  Copyright (C) 2019  Wave Computing, Inc.
+ *  Copyright (C) 2019  Aleksandar Markovic <amarkovic@wavecomp.com>
  *
  *  This program is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
diff --git a/tests/tcg/mips/user/ase/msa/bit-count/test_msa_nloc_w.c b/tests/tcg/mips/user/ase/msa/bit-count/test_msa_nloc_w.c
index a0ed202..e6f4546 100644
--- a/tests/tcg/mips/user/ase/msa/bit-count/test_msa_nloc_w.c
+++ b/tests/tcg/mips/user/ase/msa/bit-count/test_msa_nloc_w.c
@@ -1,8 +1,8 @@
 /*
  *  Test program for MSA instruction NLOC.W
  *
- *  Copyright (C) 2018  Wave Computing, Inc.
- *  Copyright (C) 2018  Aleksandar Markovic <amarkovic@wavecomp.com>
+ *  Copyright (C) 2019  Wave Computing, Inc.
+ *  Copyright (C) 2019  Aleksandar Markovic <amarkovic@wavecomp.com>
  *
  *  This program is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
diff --git a/tests/tcg/mips/user/ase/msa/bit-count/test_msa_nlzc_b.c b/tests/tcg/mips/user/ase/msa/bit-count/test_msa_nlzc_b.c
index 9906eae..430f30b 100644
--- a/tests/tcg/mips/user/ase/msa/bit-count/test_msa_nlzc_b.c
+++ b/tests/tcg/mips/user/ase/msa/bit-count/test_msa_nlzc_b.c
@@ -1,8 +1,8 @@
 /*
  *  Test program for MSA instruction NLZC.B
  *
- *  Copyright (C) 2018  Wave Computing, Inc.
- *  Copyright (C) 2018  Aleksandar Markovic <amarkovic@wavecomp.com>
+ *  Copyright (C) 2019  Wave Computing, Inc.
+ *  Copyright (C) 2019  Aleksandar Markovic <amarkovic@wavecomp.com>
  *
  *  This program is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
diff --git a/tests/tcg/mips/user/ase/msa/bit-count/test_msa_nlzc_d.c b/tests/tcg/mips/user/ase/msa/bit-count/test_msa_nlzc_d.c
index 21222e3..8dcd771 100644
--- a/tests/tcg/mips/user/ase/msa/bit-count/test_msa_nlzc_d.c
+++ b/tests/tcg/mips/user/ase/msa/bit-count/test_msa_nlzc_d.c
@@ -1,8 +1,8 @@
 /*
  *  Test program for MSA instruction NLZC.D
  *
- *  Copyright (C) 2018  Wave Computing, Inc.
- *  Copyright (C) 2018  Aleksandar Markovic <amarkovic@wavecomp.com>
+ *  Copyright (C) 2019  Wave Computing, Inc.
+ *  Copyright (C) 2019  Aleksandar Markovic <amarkovic@wavecomp.com>
  *
  *  This program is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
diff --git a/tests/tcg/mips/user/ase/msa/bit-count/test_msa_nlzc_h.c b/tests/tcg/mips/user/ase/msa/bit-count/test_msa_nlzc_h.c
index fbab9c3..b329432 100644
--- a/tests/tcg/mips/user/ase/msa/bit-count/test_msa_nlzc_h.c
+++ b/tests/tcg/mips/user/ase/msa/bit-count/test_msa_nlzc_h.c
@@ -1,8 +1,8 @@
 /*
  *  Test program for MSA instruction NLZC.H
  *
- *  Copyright (C) 2018  Wave Computing, Inc.
- *  Copyright (C) 2018  Aleksandar Markovic <amarkovic@wavecomp.com>
+ *  Copyright (C) 2019  Wave Computing, Inc.
+ *  Copyright (C) 2019  Aleksandar Markovic <amarkovic@wavecomp.com>
  *
  *  This program is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
diff --git a/tests/tcg/mips/user/ase/msa/bit-count/test_msa_nlzc_w.c b/tests/tcg/mips/user/ase/msa/bit-count/test_msa_nlzc_w.c
index dc33366..6cf28c3 100644
--- a/tests/tcg/mips/user/ase/msa/bit-count/test_msa_nlzc_w.c
+++ b/tests/tcg/mips/user/ase/msa/bit-count/test_msa_nlzc_w.c
@@ -1,8 +1,8 @@
 /*
  *  Test program for MSA instruction NLZC.W
  *
- *  Copyright (C) 2018  Wave Computing, Inc.
- *  Copyright (C) 2018  Aleksandar Markovic <amarkovic@wavecomp.com>
+ *  Copyright (C) 2019  Wave Computing, Inc.
+ *  Copyright (C) 2019  Aleksandar Markovic <amarkovic@wavecomp.com>
  *
  *  This program is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
diff --git a/tests/tcg/mips/user/ase/msa/bit-count/test_msa_pcnt_b.c b/tests/tcg/mips/user/ase/msa/bit-count/test_msa_pcnt_b.c
index f9033c7..cf2c088 100644
--- a/tests/tcg/mips/user/ase/msa/bit-count/test_msa_pcnt_b.c
+++ b/tests/tcg/mips/user/ase/msa/bit-count/test_msa_pcnt_b.c
@@ -1,8 +1,8 @@
 /*
  *  Test program for MSA instruction PCNT.B
  *
- *  Copyright (C) 2018  Wave Computing, Inc.
- *  Copyright (C) 2018  Aleksandar Markovic <amarkovic@wavecomp.com>
+ *  Copyright (C) 2019  Wave Computing, Inc.
+ *  Copyright (C) 2019  Aleksandar Markovic <amarkovic@wavecomp.com>
  *
  *  This program is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
diff --git a/tests/tcg/mips/user/ase/msa/bit-count/test_msa_pcnt_d.c b/tests/tcg/mips/user/ase/msa/bit-count/test_msa_pcnt_d.c
index 132b4d0..26acf0c 100644
--- a/tests/tcg/mips/user/ase/msa/bit-count/test_msa_pcnt_d.c
+++ b/tests/tcg/mips/user/ase/msa/bit-count/test_msa_pcnt_d.c
@@ -1,8 +1,8 @@
 /*
  *  Test program for MSA instruction PCNT.D
  *
- *  Copyright (C) 2018  Wave Computing, Inc.
- *  Copyright (C) 2018  Aleksandar Markovic <amarkovic@wavecomp.com>
+ *  Copyright (C) 2019  Wave Computing, Inc.
+ *  Copyright (C) 2019  Aleksandar Markovic <amarkovic@wavecomp.com>
  *
  *  This program is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
diff --git a/tests/tcg/mips/user/ase/msa/bit-count/test_msa_pcnt_h.c b/tests/tcg/mips/user/ase/msa/bit-count/test_msa_pcnt_h.c
index f469c09..ab76914 100644
--- a/tests/tcg/mips/user/ase/msa/bit-count/test_msa_pcnt_h.c
+++ b/tests/tcg/mips/user/ase/msa/bit-count/test_msa_pcnt_h.c
@@ -1,8 +1,8 @@
 /*
  *  Test program for MSA instruction PCNT.H
  *
- *  Copyright (C) 2018  Wave Computing, Inc.
- *  Copyright (C) 2018  Aleksandar Markovic <amarkovic@wavecomp.com>
+ *  Copyright (C) 2019  Wave Computing, Inc.
+ *  Copyright (C) 2019  Aleksandar Markovic <amarkovic@wavecomp.com>
  *
  *  This program is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
diff --git a/tests/tcg/mips/user/ase/msa/bit-count/test_msa_pcnt_w.c b/tests/tcg/mips/user/ase/msa/bit-count/test_msa_pcnt_w.c
index d73eff7..2e6f290 100644
--- a/tests/tcg/mips/user/ase/msa/bit-count/test_msa_pcnt_w.c
+++ b/tests/tcg/mips/user/ase/msa/bit-count/test_msa_pcnt_w.c
@@ -1,8 +1,8 @@
 /*
  *  Test program for MSA instruction PCNT.W
  *
- *  Copyright (C) 2018  Wave Computing, Inc.
- *  Copyright (C) 2018  Aleksandar Markovic <amarkovic@wavecomp.com>
+ *  Copyright (C) 2019  Wave Computing, Inc.
+ *  Copyright (C) 2019  Aleksandar Markovic <amarkovic@wavecomp.com>
  *
  *  This program is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
diff --git a/tests/tcg/mips/user/ase/msa/int-add/test_msa_add_a_b.c b/tests/tcg/mips/user/ase/msa/int-add/test_msa_add_a_b.c
index 9dca167..8207b00 100644
--- a/tests/tcg/mips/user/ase/msa/int-add/test_msa_add_a_b.c
+++ b/tests/tcg/mips/user/ase/msa/int-add/test_msa_add_a_b.c
@@ -1,7 +1,7 @@
 /*
  *  Test program for MSA instruction ADD_A.B
  *
- *  Copyright (C) 2019  Wave Computing, Inc.
+ *  Copyright (C) 2019  RT-RK Computer Based Systems LLC
  *  Copyright (C) 2019  Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
  *
  *  This program is free software: you can redistribute it and/or modify
diff --git a/tests/tcg/mips/user/ase/msa/int-add/test_msa_add_a_d.c b/tests/tcg/mips/user/ase/msa/int-add/test_msa_add_a_d.c
index 06a7a50..2cc0041 100644
--- a/tests/tcg/mips/user/ase/msa/int-add/test_msa_add_a_d.c
+++ b/tests/tcg/mips/user/ase/msa/int-add/test_msa_add_a_d.c
@@ -1,7 +1,7 @@
 /*
  *  Test program for MSA instruction ADD_A.D
  *
- *  Copyright (C) 2019  Wave Computing, Inc.
+ *  Copyright (C) 2019  RT-RK Computer Based Systems LLC
  *  Copyright (C) 2019  Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
  *
  *  This program is free software: you can redistribute it and/or modify
diff --git a/tests/tcg/mips/user/ase/msa/int-add/test_msa_add_a_h.c b/tests/tcg/mips/user/ase/msa/int-add/test_msa_add_a_h.c
index 5e59142..24295bb 100644
--- a/tests/tcg/mips/user/ase/msa/int-add/test_msa_add_a_h.c
+++ b/tests/tcg/mips/user/ase/msa/int-add/test_msa_add_a_h.c
@@ -1,7 +1,7 @@
 /*
  *  Test program for MSA instruction ADD_A.H
  *
- *  Copyright (C) 2019  Wave Computing, Inc.
+ *  Copyright (C) 2019  RT-RK Computer Based Systems LLC
  *  Copyright (C) 2019  Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
  *
  *  This program is free software: you can redistribute it and/or modify
diff --git a/tests/tcg/mips/user/ase/msa/int-add/test_msa_add_a_w.c b/tests/tcg/mips/user/ase/msa/int-add/test_msa_add_a_w.c
index a12f9b9..03f8fd2 100644
--- a/tests/tcg/mips/user/ase/msa/int-add/test_msa_add_a_w.c
+++ b/tests/tcg/mips/user/ase/msa/int-add/test_msa_add_a_w.c
@@ -1,7 +1,7 @@
 /*
  *  Test program for MSA instruction ADD_A.W
  *
- *  Copyright (C) 2019  Wave Computing, Inc.
+ *  Copyright (C) 2019  RT-RK Computer Based Systems LLC
  *  Copyright (C) 2019  Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
  *
  *  This program is free software: you can redistribute it and/or modify
diff --git a/tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_a_b.c b/tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_a_b.c
index 61b8e6e..0c8004b 100644
--- a/tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_a_b.c
+++ b/tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_a_b.c
@@ -1,7 +1,7 @@
 /*
  *  Test program for MSA instruction ADDS_A.B
  *
- *  Copyright (C) 2019  Wave Computing, Inc.
+ *  Copyright (C) 2019  RT-RK Computer Based Systems LLC
  *  Copyright (C) 2019  Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
  *
  *  This program is free software: you can redistribute it and/or modify
diff --git a/tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_a_d.c b/tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_a_d.c
index 8350f8f..c21346f 100644
--- a/tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_a_d.c
+++ b/tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_a_d.c
@@ -1,7 +1,7 @@
 /*
  *  Test program for MSA instruction ADDS_A.D
  *
- *  Copyright (C) 2019  Wave Computing, Inc.
+ *  Copyright (C) 2019  RT-RK Computer Based Systems LLC
  *  Copyright (C) 2019  Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
  *
  *  This program is free software: you can redistribute it and/or modify
diff --git a/tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_a_h.c b/tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_a_h.c
index 952f9f8..2831580 100644
--- a/tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_a_h.c
+++ b/tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_a_h.c
@@ -1,7 +1,7 @@
 /*
  *  Test program for MSA instruction ADDS_A.H
  *
- *  Copyright (C) 2019  Wave Computing, Inc.
+ *  Copyright (C) 2019  RT-RK Computer Based Systems LLC
  *  Copyright (C) 2019  Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
  *
  *  This program is free software: you can redistribute it and/or modify
diff --git a/tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_a_w.c b/tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_a_w.c
index d058c64..b502c3b 100644
--- a/tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_a_w.c
+++ b/tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_a_w.c
@@ -1,7 +1,7 @@
 /*
  *  Test program for MSA instruction ADDS_A.W
  *
- *  Copyright (C) 2019  Wave Computing, Inc.
+ *  Copyright (C) 2019  RT-RK Computer Based Systems LLC
  *  Copyright (C) 2019  Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
  *
  *  This program is free software: you can redistribute it and/or modify
diff --git a/tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_s_b.c b/tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_s_b.c
index 63e27da..e4846c4 100644
--- a/tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_s_b.c
+++ b/tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_s_b.c
@@ -1,7 +1,7 @@
 /*
  *  Test program for MSA instruction ADDS_S.B
  *
- *  Copyright (C) 2019  Wave Computing, Inc.
+ *  Copyright (C) 2019  RT-RK Computer Based Systems LLC
  *  Copyright (C) 2019  Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
  *
  *  This program is free software: you can redistribute it and/or modify
diff --git a/tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_s_d.c b/tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_s_d.c
index 2719cee..c733dba 100644
--- a/tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_s_d.c
+++ b/tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_s_d.c
@@ -1,7 +1,7 @@
 /*
  *  Test program for MSA instruction ADDS_S.D
  *
- *  Copyright (C) 2019  Wave Computing, Inc.
+ *  Copyright (C) 2019  RT-RK Computer Based Systems LLC
  *  Copyright (C) 2019  Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
  *
  *  This program is free software: you can redistribute it and/or modify
diff --git a/tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_s_h.c b/tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_s_h.c
index 5274096..ec4edb8 100644
--- a/tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_s_h.c
+++ b/tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_s_h.c
@@ -1,7 +1,7 @@
 /*
  *  Test program for MSA instruction ADDS_S.H
  *
- *  Copyright (C) 2019  Wave Computing, Inc.
+ *  Copyright (C) 2019  RT-RK Computer Based Systems LLC
  *  Copyright (C) 2019  Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
  *
  *  This program is free software: you can redistribute it and/or modify
diff --git a/tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_s_w.c b/tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_s_w.c
index c3a6292..b7385d6 100644
--- a/tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_s_w.c
+++ b/tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_s_w.c
@@ -1,7 +1,7 @@
 /*
  *  Test program for MSA instruction ADDS_S.W
  *
- *  Copyright (C) 2019  Wave Computing, Inc.
+ *  Copyright (C) 2019  RT-RK Computer Based Systems LLC
  *  Copyright (C) 2019  Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
  *
  *  This program is free software: you can redistribute it and/or modify
diff --git a/tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_u_b.c b/tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_u_b.c
index df5d85f..341c420 100644
--- a/tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_u_b.c
+++ b/tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_u_b.c
@@ -1,7 +1,7 @@
 /*
  *  Test program for MSA instruction ADDS_U.B
  *
- *  Copyright (C) 2019  Wave Computing, Inc.
+ *  Copyright (C) 2019  RT-RK Computer Based Systems LLC
  *  Copyright (C) 2019  Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
  *
  *  This program is free software: you can redistribute it and/or modify
diff --git a/tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_u_d.c b/tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_u_d.c
index 10c665b..414be70 100644
--- a/tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_u_d.c
+++ b/tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_u_d.c
@@ -1,7 +1,7 @@
 /*
  *  Test program for MSA instruction ADDS_U.D
  *
- *  Copyright (C) 2019  Wave Computing, Inc.
+ *  Copyright (C) 2019  RT-RK Computer Based Systems LLC
  *  Copyright (C) 2019  Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
  *
  *  This program is free software: you can redistribute it and/or modify
diff --git a/tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_u_h.c b/tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_u_h.c
index 1e32f00..b6ca9c9 100644
--- a/tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_u_h.c
+++ b/tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_u_h.c
@@ -1,7 +1,7 @@
 /*
  *  Test program for MSA instruction ADDS_U.H
  *
- *  Copyright (C) 2019  Wave Computing, Inc.
+ *  Copyright (C) 2019  RT-RK Computer Based Systems LLC
  *  Copyright (C) 2019  Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
  *
  *  This program is free software: you can redistribute it and/or modify
diff --git a/tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_u_w.c b/tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_u_w.c
index 938d2da..af30676 100644
--- a/tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_u_w.c
+++ b/tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_u_w.c
@@ -1,7 +1,7 @@
 /*
  *  Test program for MSA instruction ADDS_U.W
  *
- *  Copyright (C) 2019  Wave Computing, Inc.
+ *  Copyright (C) 2019  RT-RK Computer Based Systems LLC
  *  Copyright (C) 2019  Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
  *
  *  This program is free software: you can redistribute it and/or modify
diff --git a/tests/tcg/mips/user/ase/msa/int-add/test_msa_addv_b.c b/tests/tcg/mips/user/ase/msa/int-add/test_msa_addv_b.c
index 5dba386..61aee3b 100644
--- a/tests/tcg/mips/user/ase/msa/int-add/test_msa_addv_b.c
+++ b/tests/tcg/mips/user/ase/msa/int-add/test_msa_addv_b.c
@@ -1,7 +1,7 @@
 /*
  *  Test program for MSA instruction ADDV.B
  *
- *  Copyright (C) 2019  Wave Computing, Inc.
+ *  Copyright (C) 2019  RT-RK Computer Based Systems LLC
  *  Copyright (C) 2019  Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
  *
  *  This program is free software: you can redistribute it and/or modify
diff --git a/tests/tcg/mips/user/ase/msa/int-add/test_msa_addv_d.c b/tests/tcg/mips/user/ase/msa/int-add/test_msa_addv_d.c
index 339878c..0e1b76f 100644
--- a/tests/tcg/mips/user/ase/msa/int-add/test_msa_addv_d.c
+++ b/tests/tcg/mips/user/ase/msa/int-add/test_msa_addv_d.c
@@ -1,7 +1,7 @@
 /*
  *  Test program for MSA instruction ADDV.D
  *
- *  Copyright (C) 2019  Wave Computing, Inc.
+ *  Copyright (C) 2019  RT-RK Computer Based Systems LLC
  *  Copyright (C) 2019  Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
  *
  *  This program is free software: you can redistribute it and/or modify
diff --git a/tests/tcg/mips/user/ase/msa/int-add/test_msa_addv_h.c b/tests/tcg/mips/user/ase/msa/int-add/test_msa_addv_h.c
index 3add379..35b79cf 100644
--- a/tests/tcg/mips/user/ase/msa/int-add/test_msa_addv_h.c
+++ b/tests/tcg/mips/user/ase/msa/int-add/test_msa_addv_h.c
@@ -1,7 +1,7 @@
 /*
  *  Test program for MSA instruction ADDV.H
  *
- *  Copyright (C) 2019  Wave Computing, Inc.
+ *  Copyright (C) 2019  RT-RK Computer Based Systems LLC
  *  Copyright (C) 2019  Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
  *
  *  This program is free software: you can redistribute it and/or modify
diff --git a/tests/tcg/mips/user/ase/msa/int-add/test_msa_addv_w.c b/tests/tcg/mips/user/ase/msa/int-add/test_msa_addv_w.c
index 41f86ab..b3c8e32 100644
--- a/tests/tcg/mips/user/ase/msa/int-add/test_msa_addv_w.c
+++ b/tests/tcg/mips/user/ase/msa/int-add/test_msa_addv_w.c
@@ -1,7 +1,7 @@
 /*
  *  Test program for MSA instruction ADDV.W
  *
- *  Copyright (C) 2019  Wave Computing, Inc.
+ *  Copyright (C) 2019  RT-RK Computer Based Systems LLC
  *  Copyright (C) 2019  Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
  *
  *  This program is free software: you can redistribute it and/or modify
diff --git a/tests/tcg/mips/user/ase/msa/int-add/test_msa_hadd_s_d.c b/tests/tcg/mips/user/ase/msa/int-add/test_msa_hadd_s_d.c
index a6975e7..c455db5 100644
--- a/tests/tcg/mips/user/ase/msa/int-add/test_msa_hadd_s_d.c
+++ b/tests/tcg/mips/user/ase/msa/int-add/test_msa_hadd_s_d.c
@@ -1,7 +1,7 @@
 /*
  *  Test program for MSA instruction HADD_S.D
  *
- *  Copyright (C) 2019  Wave Computing, Inc.
+ *  Copyright (C) 2019  RT-RK Computer Based Systems LLC
  *  Copyright (C) 2019  Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
  *
  *  This program is free software: you can redistribute it and/or modify
diff --git a/tests/tcg/mips/user/ase/msa/int-add/test_msa_hadd_s_h.c b/tests/tcg/mips/user/ase/msa/int-add/test_msa_hadd_s_h.c
index 3b95551..2b0e9d2 100644
--- a/tests/tcg/mips/user/ase/msa/int-add/test_msa_hadd_s_h.c
+++ b/tests/tcg/mips/user/ase/msa/int-add/test_msa_hadd_s_h.c
@@ -1,7 +1,7 @@
 /*
  *  Test program for MSA instruction HADD_S.H
  *
- *  Copyright (C) 2019  Wave Computing, Inc.
+ *  Copyright (C) 2019  RT-RK Computer Based Systems LLC
  *  Copyright (C) 2019  Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
  *
  *  This program is free software: you can redistribute it and/or modify
diff --git a/tests/tcg/mips/user/ase/msa/int-add/test_msa_hadd_s_w.c b/tests/tcg/mips/user/ase/msa/int-add/test_msa_hadd_s_w.c
index 7a940b2..2c09066 100644
--- a/tests/tcg/mips/user/ase/msa/int-add/test_msa_hadd_s_w.c
+++ b/tests/tcg/mips/user/ase/msa/int-add/test_msa_hadd_s_w.c
@@ -1,7 +1,7 @@
 /*
  *  Test program for MSA instruction HADD_S.W
  *
- *  Copyright (C) 2019  Wave Computing, Inc.
+ *  Copyright (C) 2019  RT-RK Computer Based Systems LLC
  *  Copyright (C) 2019  Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
  *
  *  This program is free software: you can redistribute it and/or modify
diff --git a/tests/tcg/mips/user/ase/msa/int-add/test_msa_hadd_u_d.c b/tests/tcg/mips/user/ase/msa/int-add/test_msa_hadd_u_d.c
index d4cbe44..5662050 100644
--- a/tests/tcg/mips/user/ase/msa/int-add/test_msa_hadd_u_d.c
+++ b/tests/tcg/mips/user/ase/msa/int-add/test_msa_hadd_u_d.c
@@ -1,7 +1,7 @@
 /*
  *  Test program for MSA instruction HADD_U.D
  *
- *  Copyright (C) 2019  Wave Computing, Inc.
+ *  Copyright (C) 2019  RT-RK Computer Based Systems LLC
  *  Copyright (C) 2019  Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
  *
  *  This program is free software: you can redistribute it and/or modify
diff --git a/tests/tcg/mips/user/ase/msa/int-add/test_msa_hadd_u_h.c b/tests/tcg/mips/user/ase/msa/int-add/test_msa_hadd_u_h.c
index ca25057..e23ac0a 100644
--- a/tests/tcg/mips/user/ase/msa/int-add/test_msa_hadd_u_h.c
+++ b/tests/tcg/mips/user/ase/msa/int-add/test_msa_hadd_u_h.c
@@ -1,7 +1,7 @@
 /*
  *  Test program for MSA instruction HADD_U.H
  *
- *  Copyright (C) 2019  Wave Computing, Inc.
+ *  Copyright (C) 2019  RT-RK Computer Based Systems LLC
  *  Copyright (C) 2019  Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
  *
  *  This program is free software: you can redistribute it and/or modify
diff --git a/tests/tcg/mips/user/ase/msa/int-add/test_msa_hadd_u_w.c b/tests/tcg/mips/user/ase/msa/int-add/test_msa_hadd_u_w.c
index b302727..c71d82a 100644
--- a/tests/tcg/mips/user/ase/msa/int-add/test_msa_hadd_u_w.c
+++ b/tests/tcg/mips/user/ase/msa/int-add/test_msa_hadd_u_w.c
@@ -1,7 +1,7 @@
 /*
  *  Test program for MSA instruction HADD_U.W
  *
- *  Copyright (C) 2019  Wave Computing, Inc.
+ *  Copyright (C) 2019  RT-RK Computer Based Systems LLC
  *  Copyright (C) 2019  Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
  *
  *  This program is free software: you can redistribute it and/or modify
diff --git a/tests/tcg/mips/user/ase/msa/int-compare/test_msa_ceq_b.c b/tests/tcg/mips/user/ase/msa/int-compare/test_msa_ceq_b.c
index b47b42e..1c38460 100644
--- a/tests/tcg/mips/user/ase/msa/int-compare/test_msa_ceq_b.c
+++ b/tests/tcg/mips/user/ase/msa/int-compare/test_msa_ceq_b.c
@@ -1,8 +1,8 @@
 /*
  *  Test program for MSA instruction CEQ.B
  *
- *  Copyright (C) 2018  Wave Computing, Inc.
- *  Copyright (C) 2018  Aleksandar Markovic <amarkovic@wavecomp.com>
+ *  Copyright (C) 2019  Wave Computing, Inc.
+ *  Copyright (C) 2019  Aleksandar Markovic <amarkovic@wavecomp.com>
  *
  *  This program is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
diff --git a/tests/tcg/mips/user/ase/msa/int-compare/test_msa_ceq_d.c b/tests/tcg/mips/user/ase/msa/int-compare/test_msa_ceq_d.c
index e169bdc..95c7c86 100644
--- a/tests/tcg/mips/user/ase/msa/int-compare/test_msa_ceq_d.c
+++ b/tests/tcg/mips/user/ase/msa/int-compare/test_msa_ceq_d.c
@@ -1,8 +1,8 @@
 /*
  *  Test program for MSA instruction CEQ.D
  *
- *  Copyright (C) 2018  Wave Computing, Inc.
- *  Copyright (C) 2018  Aleksandar Markovic <amarkovic@wavecomp.com>
+ *  Copyright (C) 2019  Wave Computing, Inc.
+ *  Copyright (C) 2019  Aleksandar Markovic <amarkovic@wavecomp.com>
  *
  *  This program is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
diff --git a/tests/tcg/mips/user/ase/msa/int-compare/test_msa_ceq_h.c b/tests/tcg/mips/user/ase/msa/int-compare/test_msa_ceq_h.c
index 9f03cb0..c54ed95 100644
--- a/tests/tcg/mips/user/ase/msa/int-compare/test_msa_ceq_h.c
+++ b/tests/tcg/mips/user/ase/msa/int-compare/test_msa_ceq_h.c
@@ -1,8 +1,8 @@
 /*
  *  Test program for MSA instruction CEQ.H
  *
- *  Copyright (C) 2018  Wave Computing, Inc.
- *  Copyright (C) 2018  Aleksandar Markovic <amarkovic@wavecomp.com>
+ *  Copyright (C) 2019  Wave Computing, Inc.
+ *  Copyright (C) 2019  Aleksandar Markovic <amarkovic@wavecomp.com>
  *
  *  This program is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
diff --git a/tests/tcg/mips/user/ase/msa/int-compare/test_msa_ceq_w.c b/tests/tcg/mips/user/ase/msa/int-compare/test_msa_ceq_w.c
index a927d96..387b15d 100644
--- a/tests/tcg/mips/user/ase/msa/int-compare/test_msa_ceq_w.c
+++ b/tests/tcg/mips/user/ase/msa/int-compare/test_msa_ceq_w.c
@@ -1,8 +1,8 @@
 /*
  *  Test program for MSA instruction CEQ.W
  *
- *  Copyright (C) 2018  Wave Computing, Inc.
- *  Copyright (C) 2018  Aleksandar Markovic <amarkovic@wavecomp.com>
+ *  Copyright (C) 2019  Wave Computing, Inc.
+ *  Copyright (C) 2019  Aleksandar Markovic <amarkovic@wavecomp.com>
  *
  *  This program is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
diff --git a/tests/tcg/mips/user/ase/msa/int-compare/test_msa_cle_s_b.c b/tests/tcg/mips/user/ase/msa/int-compare/test_msa_cle_s_b.c
index 1c1cb3b..4c266cd 100644
--- a/tests/tcg/mips/user/ase/msa/int-compare/test_msa_cle_s_b.c
+++ b/tests/tcg/mips/user/ase/msa/int-compare/test_msa_cle_s_b.c
@@ -1,8 +1,8 @@
 /*
  *  Test program for MSA instruction CLE_S.B
  *
- *  Copyright (C) 2018  Wave Computing, Inc.
- *  Copyright (C) 2018  Aleksandar Markovic <amarkovic@wavecomp.com>
+ *  Copyright (C) 2019  Wave Computing, Inc.
+ *  Copyright (C) 2019  Aleksandar Markovic <amarkovic@wavecomp.com>
  *
  *  This program is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
diff --git a/tests/tcg/mips/user/ase/msa/int-compare/test_msa_cle_s_d.c b/tests/tcg/mips/user/ase/msa/int-compare/test_msa_cle_s_d.c
index b51907c..d35ff2a 100644
--- a/tests/tcg/mips/user/ase/msa/int-compare/test_msa_cle_s_d.c
+++ b/tests/tcg/mips/user/ase/msa/int-compare/test_msa_cle_s_d.c
@@ -1,8 +1,8 @@
 /*
  *  Test program for MSA instruction CLE_S.D
  *
- *  Copyright (C) 2018  Wave Computing, Inc.
- *  Copyright (C) 2018  Aleksandar Markovic <amarkovic@wavecomp.com>
+ *  Copyright (C) 2019  Wave Computing, Inc.
+ *  Copyright (C) 2019  Aleksandar Markovic <amarkovic@wavecomp.com>
  *
  *  This program is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
diff --git a/tests/tcg/mips/user/ase/msa/int-compare/test_msa_cle_s_h.c b/tests/tcg/mips/user/ase/msa/int-compare/test_msa_cle_s_h.c
index 20ebbfb..1dd23de 100644
--- a/tests/tcg/mips/user/ase/msa/int-compare/test_msa_cle_s_h.c
+++ b/tests/tcg/mips/user/ase/msa/int-compare/test_msa_cle_s_h.c
@@ -1,8 +1,8 @@
 /*
  *  Test program for MSA instruction CLE_S.H
  *
- *  Copyright (C) 2018  Wave Computing, Inc.
- *  Copyright (C) 2018  Aleksandar Markovic <amarkovic@wavecomp.com>
+ *  Copyright (C) 2019  Wave Computing, Inc.
+ *  Copyright (C) 2019  Aleksandar Markovic <amarkovic@wavecomp.com>
  *
  *  This program is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
diff --git a/tests/tcg/mips/user/ase/msa/int-compare/test_msa_cle_s_w.c b/tests/tcg/mips/user/ase/msa/int-compare/test_msa_cle_s_w.c
index 4a78cce..54c9696 100644
--- a/tests/tcg/mips/user/ase/msa/int-compare/test_msa_cle_s_w.c
+++ b/tests/tcg/mips/user/ase/msa/int-compare/test_msa_cle_s_w.c
@@ -1,8 +1,8 @@
 /*
  *  Test program for MSA instruction CLE_S.W
  *
- *  Copyright (C) 2018  Wave Computing, Inc.
- *  Copyright (C) 2018  Aleksandar Markovic <amarkovic@wavecomp.com>
+ *  Copyright (C) 2019  Wave Computing, Inc.
+ *  Copyright (C) 2019  Aleksandar Markovic <amarkovic@wavecomp.com>
  *
  *  This program is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
diff --git a/tests/tcg/mips/user/ase/msa/int-compare/test_msa_cle_u_b.c b/tests/tcg/mips/user/ase/msa/int-compare/test_msa_cle_u_b.c
index 9990a5b..b8cc844 100644
--- a/tests/tcg/mips/user/ase/msa/int-compare/test_msa_cle_u_b.c
+++ b/tests/tcg/mips/user/ase/msa/int-compare/test_msa_cle_u_b.c
@@ -1,8 +1,8 @@
 /*
  *  Test program for MSA instruction CLE_U.B
  *
- *  Copyright (C) 2018  Wave Computing, Inc.
- *  Copyright (C) 2018  Aleksandar Markovic <amarkovic@wavecomp.com>
+ *  Copyright (C) 2019  Wave Computing, Inc.
+ *  Copyright (C) 2019  Aleksandar Markovic <amarkovic@wavecomp.com>
  *
  *  This program is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
diff --git a/tests/tcg/mips/user/ase/msa/int-compare/test_msa_cle_u_d.c b/tests/tcg/mips/user/ase/msa/int-compare/test_msa_cle_u_d.c
index cde86d8..e10e35f 100644
--- a/tests/tcg/mips/user/ase/msa/int-compare/test_msa_cle_u_d.c
+++ b/tests/tcg/mips/user/ase/msa/int-compare/test_msa_cle_u_d.c
@@ -1,8 +1,8 @@
 /*
  *  Test program for MSA instruction CLE_U.D
  *
- *  Copyright (C) 2018  Wave Computing, Inc.
- *  Copyright (C) 2018  Aleksandar Markovic <amarkovic@wavecomp.com>
+ *  Copyright (C) 2019  Wave Computing, Inc.
+ *  Copyright (C) 2019  Aleksandar Markovic <amarkovic@wavecomp.com>
  *
  *  This program is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
diff --git a/tests/tcg/mips/user/ase/msa/int-compare/test_msa_cle_u_h.c b/tests/tcg/mips/user/ase/msa/int-compare/test_msa_cle_u_h.c
index 70e4b48..af151f4 100644
--- a/tests/tcg/mips/user/ase/msa/int-compare/test_msa_cle_u_h.c
+++ b/tests/tcg/mips/user/ase/msa/int-compare/test_msa_cle_u_h.c
@@ -1,8 +1,8 @@
 /*
  *  Test program for MSA instruction CLE_U.H
  *
- *  Copyright (C) 2018  Wave Computing, Inc.
- *  Copyright (C) 2018  Aleksandar Markovic <amarkovic@wavecomp.com>
+ *  Copyright (C) 2019  Wave Computing, Inc.
+ *  Copyright (C) 2019  Aleksandar Markovic <amarkovic@wavecomp.com>
  *
  *  This program is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
diff --git a/tests/tcg/mips/user/ase/msa/int-compare/test_msa_cle_u_w.c b/tests/tcg/mips/user/ase/msa/int-compare/test_msa_cle_u_w.c
index f38feac..3ff612e 100644
--- a/tests/tcg/mips/user/ase/msa/int-compare/test_msa_cle_u_w.c
+++ b/tests/tcg/mips/user/ase/msa/int-compare/test_msa_cle_u_w.c
@@ -1,8 +1,8 @@
 /*
  *  Test program for MSA instruction CLE_U.W
  *
- *  Copyright (C) 2018  Wave Computing, Inc.
- *  Copyright (C) 2018  Aleksandar Markovic <amarkovic@wavecomp.com>
+ *  Copyright (C) 2019  Wave Computing, Inc.
+ *  Copyright (C) 2019  Aleksandar Markovic <amarkovic@wavecomp.com>
  *
  *  This program is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
diff --git a/tests/tcg/mips/user/ase/msa/int-compare/test_msa_clt_s_b.c b/tests/tcg/mips/user/ase/msa/int-compare/test_msa_clt_s_b.c
index b81b569..32e6348 100644
--- a/tests/tcg/mips/user/ase/msa/int-compare/test_msa_clt_s_b.c
+++ b/tests/tcg/mips/user/ase/msa/int-compare/test_msa_clt_s_b.c
@@ -1,8 +1,8 @@
 /*
  *  Test program for MSA instruction CLT_S.B
  *
- *  Copyright (C) 2018  Wave Computing, Inc.
- *  Copyright (C) 2018  Aleksandar Markovic <amarkovic@wavecomp.com>
+ *  Copyright (C) 2019  Wave Computing, Inc.
+ *  Copyright (C) 2019  Aleksandar Markovic <amarkovic@wavecomp.com>
  *
  *  This program is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
diff --git a/tests/tcg/mips/user/ase/msa/int-compare/test_msa_clt_s_d.c b/tests/tcg/mips/user/ase/msa/int-compare/test_msa_clt_s_d.c
index 393457a..39796cb 100644
--- a/tests/tcg/mips/user/ase/msa/int-compare/test_msa_clt_s_d.c
+++ b/tests/tcg/mips/user/ase/msa/int-compare/test_msa_clt_s_d.c
@@ -1,8 +1,8 @@
 /*
  *  Test program for MSA instruction CLT_S.D
  *
- *  Copyright (C) 2018  Wave Computing, Inc.
- *  Copyright (C) 2018  Aleksandar Markovic <amarkovic@wavecomp.com>
+ *  Copyright (C) 2019  Wave Computing, Inc.
+ *  Copyright (C) 2019  Aleksandar Markovic <amarkovic@wavecomp.com>
  *
  *  This program is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
diff --git a/tests/tcg/mips/user/ase/msa/int-compare/test_msa_clt_s_h.c b/tests/tcg/mips/user/ase/msa/int-compare/test_msa_clt_s_h.c
index 56860d7..ab9f6bc 100644
--- a/tests/tcg/mips/user/ase/msa/int-compare/test_msa_clt_s_h.c
+++ b/tests/tcg/mips/user/ase/msa/int-compare/test_msa_clt_s_h.c
@@ -1,8 +1,8 @@
 /*
  *  Test program for MSA instruction CLT_S.H
  *
- *  Copyright (C) 2018  Wave Computing, Inc.
- *  Copyright (C) 2018  Aleksandar Markovic <amarkovic@wavecomp.com>
+ *  Copyright (C) 2019  Wave Computing, Inc.
+ *  Copyright (C) 2019  Aleksandar Markovic <amarkovic@wavecomp.com>
  *
  *  This program is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
diff --git a/tests/tcg/mips/user/ase/msa/int-compare/test_msa_clt_s_w.c b/tests/tcg/mips/user/ase/msa/int-compare/test_msa_clt_s_w.c
index 346b293..f7d0db4 100644
--- a/tests/tcg/mips/user/ase/msa/int-compare/test_msa_clt_s_w.c
+++ b/tests/tcg/mips/user/ase/msa/int-compare/test_msa_clt_s_w.c
@@ -1,8 +1,8 @@
 /*
  *  Test program for MSA instruction CLT_S.W
  *
- *  Copyright (C) 2018  Wave Computing, Inc.
- *  Copyright (C) 2018  Aleksandar Markovic <amarkovic@wavecomp.com>
+ *  Copyright (C) 2019  Wave Computing, Inc.
+ *  Copyright (C) 2019  Aleksandar Markovic <amarkovic@wavecomp.com>
  *
  *  This program is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
diff --git a/tests/tcg/mips/user/ase/msa/int-compare/test_msa_clt_u_b.c b/tests/tcg/mips/user/ase/msa/int-compare/test_msa_clt_u_b.c
index be79646..fc7a497 100644
--- a/tests/tcg/mips/user/ase/msa/int-compare/test_msa_clt_u_b.c
+++ b/tests/tcg/mips/user/ase/msa/int-compare/test_msa_clt_u_b.c
@@ -1,8 +1,8 @@
 /*
  *  Test program for MSA instruction CLT_U.B
  *
- *  Copyright (C) 2018  Wave Computing, Inc.
- *  Copyright (C) 2018  Aleksandar Markovic <amarkovic@wavecomp.com>
+ *  Copyright (C) 2019  Wave Computing, Inc.
+ *  Copyright (C) 2019  Aleksandar Markovic <amarkovic@wavecomp.com>
  *
  *  This program is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
diff --git a/tests/tcg/mips/user/ase/msa/int-compare/test_msa_clt_u_d.c b/tests/tcg/mips/user/ase/msa/int-compare/test_msa_clt_u_d.c
index afbe490..5072d09 100644
--- a/tests/tcg/mips/user/ase/msa/int-compare/test_msa_clt_u_d.c
+++ b/tests/tcg/mips/user/ase/msa/int-compare/test_msa_clt_u_d.c
@@ -1,8 +1,8 @@
 /*
  *  Test program for MSA instruction CLT_U.D
  *
- *  Copyright (C) 2018  Wave Computing, Inc.
- *  Copyright (C) 2018  Aleksandar Markovic <amarkovic@wavecomp.com>
+ *  Copyright (C) 2019  Wave Computing, Inc.
+ *  Copyright (C) 2019  Aleksandar Markovic <amarkovic@wavecomp.com>
  *
  *  This program is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
diff --git a/tests/tcg/mips/user/ase/msa/int-compare/test_msa_clt_u_h.c b/tests/tcg/mips/user/ase/msa/int-compare/test_msa_clt_u_h.c
index 126597a..face857 100644
--- a/tests/tcg/mips/user/ase/msa/int-compare/test_msa_clt_u_h.c
+++ b/tests/tcg/mips/user/ase/msa/int-compare/test_msa_clt_u_h.c
@@ -1,8 +1,8 @@
 /*
  *  Test program for MSA instruction CLT_U.H
  *
- *  Copyright (C) 2018  Wave Computing, Inc.
- *  Copyright (C) 2018  Aleksandar Markovic <amarkovic@wavecomp.com>
+ *  Copyright (C) 2019  Wave Computing, Inc.
+ *  Copyright (C) 2019  Aleksandar Markovic <amarkovic@wavecomp.com>
  *
  *  This program is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
diff --git a/tests/tcg/mips/user/ase/msa/int-compare/test_msa_clt_u_w.c b/tests/tcg/mips/user/ase/msa/int-compare/test_msa_clt_u_w.c
index b405929..bddda8a 100644
--- a/tests/tcg/mips/user/ase/msa/int-compare/test_msa_clt_u_w.c
+++ b/tests/tcg/mips/user/ase/msa/int-compare/test_msa_clt_u_w.c
@@ -1,8 +1,8 @@
 /*
  *  Test program for MSA instruction CLT_U.W
  *
- *  Copyright (C) 2018  Wave Computing, Inc.
- *  Copyright (C) 2018  Aleksandar Markovic <amarkovic@wavecomp.com>
+ *  Copyright (C) 2019  Wave Computing, Inc.
+ *  Copyright (C) 2019  Aleksandar Markovic <amarkovic@wavecomp.com>
  *
  *  This program is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
diff --git a/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_a_b.c b/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_a_b.c
index b7a9a61..c9e3bd5 100644
--- a/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_a_b.c
+++ b/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_a_b.c
@@ -1,8 +1,8 @@
 /*
  *  Test program for MSA instruction MAX_A.B
  *
- *  Copyright (C) 2018  Wave Computing, Inc.
- *  Copyright (C) 2018  Aleksandar Markovic <amarkovic@wavecomp.com>
+ *  Copyright (C) 2019  Wave Computing, Inc.
+ *  Copyright (C) 2019  Aleksandar Markovic <amarkovic@wavecomp.com>
  *
  *  This program is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
diff --git a/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_a_d.c b/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_a_d.c
index dfffaf5..efe4569 100644
--- a/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_a_d.c
+++ b/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_a_d.c
@@ -1,8 +1,8 @@
 /*
  *  Test program for MSA instruction MAX_A.D
  *
- *  Copyright (C) 2018  Wave Computing, Inc.
- *  Copyright (C) 2018  Aleksandar Markovic <amarkovic@wavecomp.com>
+ *  Copyright (C) 2019  Wave Computing, Inc.
+ *  Copyright (C) 2019  Aleksandar Markovic <amarkovic@wavecomp.com>
  *
  *  This program is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
diff --git a/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_a_h.c b/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_a_h.c
index e0c1bd4..e8cee19 100644
--- a/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_a_h.c
+++ b/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_a_h.c
@@ -1,8 +1,8 @@
 /*
  *  Test program for MSA instruction MAX_A.H
  *
- *  Copyright (C) 2018  Wave Computing, Inc.
- *  Copyright (C) 2018  Aleksandar Markovic <amarkovic@wavecomp.com>
+ *  Copyright (C) 2019  Wave Computing, Inc.
+ *  Copyright (C) 2019  Aleksandar Markovic <amarkovic@wavecomp.com>
  *
  *  This program is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
diff --git a/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_a_w.c b/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_a_w.c
index 40c30c5..6f1eb68 100644
--- a/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_a_w.c
+++ b/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_a_w.c
@@ -1,8 +1,8 @@
 /*
  *  Test program for MSA instruction MAX_A.W
  *
- *  Copyright (C) 2018  Wave Computing, Inc.
- *  Copyright (C) 2018  Aleksandar Markovic <amarkovic@wavecomp.com>
+ *  Copyright (C) 2019  Wave Computing, Inc.
+ *  Copyright (C) 2019  Aleksandar Markovic <amarkovic@wavecomp.com>
  *
  *  This program is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
diff --git a/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_s_b.c b/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_s_b.c
index ab50eee..c26ef59 100644
--- a/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_s_b.c
+++ b/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_s_b.c
@@ -1,8 +1,8 @@
 /*
  *  Test program for MSA instruction MAX_S.B
  *
- *  Copyright (C) 2018  Wave Computing, Inc.
- *  Copyright (C) 2018  Aleksandar Markovic <amarkovic@wavecomp.com>
+ *  Copyright (C) 2019  Wave Computing, Inc.
+ *  Copyright (C) 2019  Aleksandar Markovic <amarkovic@wavecomp.com>
  *
  *  This program is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
diff --git a/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_s_d.c b/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_s_d.c
index 2957db4..b5407b0 100644
--- a/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_s_d.c
+++ b/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_s_d.c
@@ -1,8 +1,8 @@
 /*
  *  Test program for MSA instruction MAX_S.D
  *
- *  Copyright (C) 2018  Wave Computing, Inc.
- *  Copyright (C) 2018  Aleksandar Markovic <amarkovic@wavecomp.com>
+ *  Copyright (C) 2019  Wave Computing, Inc.
+ *  Copyright (C) 2019  Aleksandar Markovic <amarkovic@wavecomp.com>
  *
  *  This program is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
diff --git a/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_s_h.c b/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_s_h.c
index e101764..8c3d58c 100644
--- a/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_s_h.c
+++ b/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_s_h.c
@@ -1,8 +1,8 @@
 /*
  *  Test program for MSA instruction MAX_S.H
  *
- *  Copyright (C) 2018  Wave Computing, Inc.
- *  Copyright (C) 2018  Aleksandar Markovic <amarkovic@wavecomp.com>
+ *  Copyright (C) 2019  Wave Computing, Inc.
+ *  Copyright (C) 2019  Aleksandar Markovic <amarkovic@wavecomp.com>
  *
  *  This program is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
diff --git a/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_s_w.c b/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_s_w.c
index 119f03f..aa22faf 100644
--- a/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_s_w.c
+++ b/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_s_w.c
@@ -1,8 +1,8 @@
 /*
  *  Test program for MSA instruction MAX_S.W
  *
- *  Copyright (C) 2018  Wave Computing, Inc.
- *  Copyright (C) 2018  Aleksandar Markovic <amarkovic@wavecomp.com>
+ *  Copyright (C) 2019  Wave Computing, Inc.
+ *  Copyright (C) 2019  Aleksandar Markovic <amarkovic@wavecomp.com>
  *
  *  This program is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
diff --git a/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_u_b.c b/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_u_b.c
index d18b6bf..5e648dc 100644
--- a/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_u_b.c
+++ b/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_u_b.c
@@ -1,8 +1,8 @@
 /*
  *  Test program for MSA instruction MAX_U.B
  *
- *  Copyright (C) 2018  Wave Computing, Inc.
- *  Copyright (C) 2018  Aleksandar Markovic <amarkovic@wavecomp.com>
+ *  Copyright (C) 2019  Wave Computing, Inc.
+ *  Copyright (C) 2019  Aleksandar Markovic <amarkovic@wavecomp.com>
  *
  *  This program is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
diff --git a/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_u_d.c b/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_u_d.c
index 1396e74..17067d3 100644
--- a/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_u_d.c
+++ b/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_u_d.c
@@ -1,8 +1,8 @@
 /*
  *  Test program for MSA instruction MAX_U.D
  *
- *  Copyright (C) 2018  Wave Computing, Inc.
- *  Copyright (C) 2018  Aleksandar Markovic <amarkovic@wavecomp.com>
+ *  Copyright (C) 2019  Wave Computing, Inc.
+ *  Copyright (C) 2019  Aleksandar Markovic <amarkovic@wavecomp.com>
  *
  *  This program is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
diff --git a/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_u_h.c b/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_u_h.c
index c7dff10..8bf11a0 100644
--- a/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_u_h.c
+++ b/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_u_h.c
@@ -1,8 +1,8 @@
 /*
  *  Test program for MSA instruction MAX_U.H
  *
- *  Copyright (C) 2018  Wave Computing, Inc.
- *  Copyright (C) 2018  Aleksandar Markovic <amarkovic@wavecomp.com>
+ *  Copyright (C) 2019  Wave Computing, Inc.
+ *  Copyright (C) 2019  Aleksandar Markovic <amarkovic@wavecomp.com>
  *
  *  This program is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
diff --git a/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_u_w.c b/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_u_w.c
index 910dbfc..6eecc46 100644
--- a/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_u_w.c
+++ b/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_u_w.c
@@ -1,8 +1,8 @@
 /*
  *  Test program for MSA instruction MAX_U.W
  *
- *  Copyright (C) 2018  Wave Computing, Inc.
- *  Copyright (C) 2018  Aleksandar Markovic <amarkovic@wavecomp.com>
+ *  Copyright (C) 2019  Wave Computing, Inc.
+ *  Copyright (C) 2019  Aleksandar Markovic <amarkovic@wavecomp.com>
  *
  *  This program is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
diff --git a/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_a_b.c b/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_a_b.c
index c632fe9..48026a2 100644
--- a/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_a_b.c
+++ b/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_a_b.c
@@ -1,8 +1,8 @@
 /*
  *  Test program for MSA instruction MIN_A.B
  *
- *  Copyright (C) 2018  Wave Computing, Inc.
- *  Copyright (C) 2018  Aleksandar Markovic <amarkovic@wavecomp.com>
+ *  Copyright (C) 2019  Wave Computing, Inc.
+ *  Copyright (C) 2019  Aleksandar Markovic <amarkovic@wavecomp.com>
  *
  *  This program is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
diff --git a/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_a_d.c b/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_a_d.c
index 5f9a9d4..5f65fb4 100644
--- a/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_a_d.c
+++ b/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_a_d.c
@@ -1,8 +1,8 @@
 /*
  *  Test program for MSA instruction MIN_A.D
  *
- *  Copyright (C) 2018  Wave Computing, Inc.
- *  Copyright (C) 2018  Aleksandar Markovic <amarkovic@wavecomp.com>
+ *  Copyright (C) 2019  Wave Computing, Inc.
+ *  Copyright (C) 2019  Aleksandar Markovic <amarkovic@wavecomp.com>
  *
  *  This program is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
diff --git a/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_a_h.c b/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_a_h.c
index dc73927..a2eb7fa 100644
--- a/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_a_h.c
+++ b/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_a_h.c
@@ -1,8 +1,8 @@
 /*
  *  Test program for MSA instruction MIN_A.H
  *
- *  Copyright (C) 2018  Wave Computing, Inc.
- *  Copyright (C) 2018  Aleksandar Markovic <amarkovic@wavecomp.com>
+ *  Copyright (C) 2019  Wave Computing, Inc.
+ *  Copyright (C) 2019  Aleksandar Markovic <amarkovic@wavecomp.com>
  *
  *  This program is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
diff --git a/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_a_w.c b/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_a_w.c
index 67b33f3..ca1acfb 100644
--- a/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_a_w.c
+++ b/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_a_w.c
@@ -1,8 +1,8 @@
 /*
  *  Test program for MSA instruction MIN_A.W
  *
- *  Copyright (C) 2018  Wave Computing, Inc.
- *  Copyright (C) 2018  Aleksandar Markovic <amarkovic@wavecomp.com>
+ *  Copyright (C) 2019  Wave Computing, Inc.
+ *  Copyright (C) 2019  Aleksandar Markovic <amarkovic@wavecomp.com>
  *
  *  This program is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
diff --git a/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_s_b.c b/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_s_b.c
index 76bb133..ce56619 100644
--- a/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_s_b.c
+++ b/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_s_b.c
@@ -1,8 +1,8 @@
 /*
  *  Test program for MSA instruction MIN_S.B
  *
- *  Copyright (C) 2018  Wave Computing, Inc.
- *  Copyright (C) 2018  Aleksandar Markovic <amarkovic@wavecomp.com>
+ *  Copyright (C) 2019  Wave Computing, Inc.
+ *  Copyright (C) 2019  Aleksandar Markovic <amarkovic@wavecomp.com>
  *
  *  This program is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
diff --git a/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_s_d.c b/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_s_d.c
index 8ef57a9..d775889 100644
--- a/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_s_d.c
+++ b/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_s_d.c
@@ -1,8 +1,8 @@
 /*
  *  Test program for MSA instruction MIN_S.D
  *
- *  Copyright (C) 2018  Wave Computing, Inc.
- *  Copyright (C) 2018  Aleksandar Markovic <amarkovic@wavecomp.com>
+ *  Copyright (C) 2019  Wave Computing, Inc.
+ *  Copyright (C) 2019  Aleksandar Markovic <amarkovic@wavecomp.com>
  *
  *  This program is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
diff --git a/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_s_h.c b/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_s_h.c
index e206040..5a984d3 100644
--- a/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_s_h.c
+++ b/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_s_h.c
@@ -1,8 +1,8 @@
 /*
  *  Test program for MSA instruction MIN_S.H
  *
- *  Copyright (C) 2018  Wave Computing, Inc.
- *  Copyright (C) 2018  Aleksandar Markovic <amarkovic@wavecomp.com>
+ *  Copyright (C) 2019  Wave Computing, Inc.
+ *  Copyright (C) 2019  Aleksandar Markovic <amarkovic@wavecomp.com>
  *
  *  This program is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
diff --git a/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_s_w.c b/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_s_w.c
index 7532bce..9e6ee5a 100644
--- a/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_s_w.c
+++ b/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_s_w.c
@@ -1,8 +1,8 @@
 /*
  *  Test program for MSA instruction MIN_S.W
  *
- *  Copyright (C) 2018  Wave Computing, Inc.
- *  Copyright (C) 2018  Aleksandar Markovic <amarkovic@wavecomp.com>
+ *  Copyright (C) 2019  Wave Computing, Inc.
+ *  Copyright (C) 2019  Aleksandar Markovic <amarkovic@wavecomp.com>
  *
  *  This program is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
diff --git a/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_u_b.c b/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_u_b.c
index 1f61145..57b702d 100644
--- a/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_u_b.c
+++ b/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_u_b.c
@@ -1,8 +1,8 @@
 /*
  *  Test program for MSA instruction MIN_U.B
  *
- *  Copyright (C) 2018  Wave Computing, Inc.
- *  Copyright (C) 2018  Aleksandar Markovic <amarkovic@wavecomp.com>
+ *  Copyright (C) 2019  Wave Computing, Inc.
+ *  Copyright (C) 2019  Aleksandar Markovic <amarkovic@wavecomp.com>
  *
  *  This program is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
diff --git a/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_u_d.c b/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_u_d.c
index 4626c62..f2f98ac 100644
--- a/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_u_d.c
+++ b/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_u_d.c
@@ -1,8 +1,8 @@
 /*
  *  Test program for MSA instruction MIN_U.D
  *
- *  Copyright (C) 2018  Wave Computing, Inc.
- *  Copyright (C) 2018  Aleksandar Markovic <amarkovic@wavecomp.com>
+ *  Copyright (C) 2019  Wave Computing, Inc.
+ *  Copyright (C) 2019  Aleksandar Markovic <amarkovic@wavecomp.com>
  *
  *  This program is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
diff --git a/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_u_h.c b/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_u_h.c
index 5eeb8d0..b89ba3b 100644
--- a/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_u_h.c
+++ b/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_u_h.c
@@ -1,8 +1,8 @@
 /*
  *  Test program for MSA instruction MIN_U.H
  *
- *  Copyright (C) 2018  Wave Computing, Inc.
- *  Copyright (C) 2018  Aleksandar Markovic <amarkovic@wavecomp.com>
+ *  Copyright (C) 2019  Wave Computing, Inc.
+ *  Copyright (C) 2019  Aleksandar Markovic <amarkovic@wavecomp.com>
  *
  *  This program is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
diff --git a/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_u_w.c b/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_u_w.c
index e70964a..20992b3 100644
--- a/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_u_w.c
+++ b/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_u_w.c
@@ -1,8 +1,8 @@
 /*
  *  Test program for MSA instruction MIN_U.W
  *
- *  Copyright (C) 2018  Wave Computing, Inc.
- *  Copyright (C) 2018  Aleksandar Markovic <amarkovic@wavecomp.com>
+ *  Copyright (C) 2019  Wave Computing, Inc.
+ *  Copyright (C) 2019  Aleksandar Markovic <amarkovic@wavecomp.com>
  *
  *  This program is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
diff --git a/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvev_b.c b/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvev_b.c
index 5cf8627..5690c5c 100644
--- a/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvev_b.c
+++ b/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvev_b.c
@@ -1,8 +1,8 @@
 /*
  *  Test program for MSA instruction ILVEV.B
  *
- *  Copyright (C) 2018  Wave Computing, Inc.
- *  Copyright (C) 2018  Aleksandar Markovic <amarkovic@wavecomp.com>
+ *  Copyright (C) 2019  Wave Computing, Inc.
+ *  Copyright (C) 2019  Aleksandar Markovic <amarkovic@wavecomp.com>
  *
  *  This program is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
diff --git a/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvev_d.c b/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvev_d.c
index d3600e9..a8b1a0a 100644
--- a/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvev_d.c
+++ b/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvev_d.c
@@ -1,8 +1,8 @@
 /*
  *  Test program for MSA instruction ILVEV.D
  *
- *  Copyright (C) 2018  Wave Computing, Inc.
- *  Copyright (C) 2018  Aleksandar Markovic <amarkovic@wavecomp.com>
+ *  Copyright (C) 2019  Wave Computing, Inc.
+ *  Copyright (C) 2019  Aleksandar Markovic <amarkovic@wavecomp.com>
  *
  *  This program is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
diff --git a/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvev_h.c b/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvev_h.c
index 9a80fac..5bd7189 100644
--- a/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvev_h.c
+++ b/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvev_h.c
@@ -1,8 +1,8 @@
 /*
  *  Test program for MSA instruction ILVEV.H
  *
- *  Copyright (C) 2018  Wave Computing, Inc.
- *  Copyright (C) 2018  Aleksandar Markovic <amarkovic@wavecomp.com>
+ *  Copyright (C) 2019  Wave Computing, Inc.
+ *  Copyright (C) 2019  Aleksandar Markovic <amarkovic@wavecomp.com>
  *
  *  This program is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
diff --git a/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvev_w.c b/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvev_w.c
index 8f62d47..ecb3ded 100644
--- a/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvev_w.c
+++ b/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvev_w.c
@@ -1,8 +1,8 @@
 /*
  *  Test program for MSA instruction ILVEV.W
  *
- *  Copyright (C) 2018  Wave Computing, Inc.
- *  Copyright (C) 2018  Aleksandar Markovic <amarkovic@wavecomp.com>
+ *  Copyright (C) 2019  Wave Computing, Inc.
+ *  Copyright (C) 2019  Aleksandar Markovic <amarkovic@wavecomp.com>
  *
  *  This program is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
diff --git a/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvl_b.c b/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvl_b.c
index f7e6dc0..acf0ebf 100644
--- a/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvl_b.c
+++ b/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvl_b.c
@@ -1,8 +1,8 @@
 /*
  *  Test program for MSA instruction ILVL.B
  *
- *  Copyright (C) 2018  Wave Computing, Inc.
- *  Copyright (C) 2018  Aleksandar Markovic <amarkovic@wavecomp.com>
+ *  Copyright (C) 2019  Wave Computing, Inc.
+ *  Copyright (C) 2019  Aleksandar Markovic <amarkovic@wavecomp.com>
  *
  *  This program is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
diff --git a/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvl_d.c b/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvl_d.c
index 0f4c048..ef31f0d 100644
--- a/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvl_d.c
+++ b/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvl_d.c
@@ -1,8 +1,8 @@
 /*
  *  Test program for MSA instruction ILVL.D
  *
- *  Copyright (C) 2018  Wave Computing, Inc.
- *  Copyright (C) 2018  Aleksandar Markovic <amarkovic@wavecomp.com>
+ *  Copyright (C) 2019  Wave Computing, Inc.
+ *  Copyright (C) 2019  Aleksandar Markovic <amarkovic@wavecomp.com>
  *
  *  This program is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
diff --git a/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvl_h.c b/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvl_h.c
index 6c1c6d9..dc4066b 100644
--- a/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvl_h.c
+++ b/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvl_h.c
@@ -1,8 +1,8 @@
 /*
  *  Test program for MSA instruction ILVL.H
  *
- *  Copyright (C) 2018  Wave Computing, Inc.
- *  Copyright (C) 2018  Aleksandar Markovic <amarkovic@wavecomp.com>
+ *  Copyright (C) 2019  Wave Computing, Inc.
+ *  Copyright (C) 2019  Aleksandar Markovic <amarkovic@wavecomp.com>
  *
  *  This program is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
diff --git a/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvl_w.c b/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvl_w.c
index d22d965..68e5562 100644
--- a/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvl_w.c
+++ b/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvl_w.c
@@ -1,8 +1,8 @@
 /*
  *  Test program for MSA instruction ILVL.W
  *
- *  Copyright (C) 2018  Wave Computing, Inc.
- *  Copyright (C) 2018  Aleksandar Markovic <amarkovic@wavecomp.com>
+ *  Copyright (C) 2019  Wave Computing, Inc.
+ *  Copyright (C) 2019  Aleksandar Markovic <amarkovic@wavecomp.com>
  *
  *  This program is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
diff --git a/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvod_b.c b/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvod_b.c
index c55f3a4..8923caf 100644
--- a/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvod_b.c
+++ b/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvod_b.c
@@ -1,8 +1,8 @@
 /*
  *  Test program for MSA instruction ILVOD.B
  *
- *  Copyright (C) 2018  Wave Computing, Inc.
- *  Copyright (C) 2018  Aleksandar Markovic <amarkovic@wavecomp.com>
+ *  Copyright (C) 2019  Wave Computing, Inc.
+ *  Copyright (C) 2019  Aleksandar Markovic <amarkovic@wavecomp.com>
  *
  *  This program is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
diff --git a/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvod_d.c b/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvod_d.c
index d03e7b4..1580080 100644
--- a/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvod_d.c
+++ b/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvod_d.c
@@ -1,8 +1,8 @@
 /*
  *  Test program for MSA instruction ILVOD.D
  *
- *  Copyright (C) 2018  Wave Computing, Inc.
- *  Copyright (C) 2018  Aleksandar Markovic <amarkovic@wavecomp.com>
+ *  Copyright (C) 2019  Wave Computing, Inc.
+ *  Copyright (C) 2019  Aleksandar Markovic <amarkovic@wavecomp.com>
  *
  *  This program is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
diff --git a/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvod_h.c b/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvod_h.c
index f64d8b5..32c2a4e 100644
--- a/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvod_h.c
+++ b/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvod_h.c
@@ -1,8 +1,8 @@
 /*
  *  Test program for MSA instruction ILVOD.H
  *
- *  Copyright (C) 2018  Wave Computing, Inc.
- *  Copyright (C) 2018  Aleksandar Markovic <amarkovic@wavecomp.com>
+ *  Copyright (C) 2019  Wave Computing, Inc.
+ *  Copyright (C) 2019  Aleksandar Markovic <amarkovic@wavecomp.com>
  *
  *  This program is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
diff --git a/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvod_w.c b/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvod_w.c
index 4ae75f8..7f65239 100644
--- a/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvod_w.c
+++ b/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvod_w.c
@@ -1,8 +1,8 @@
 /*
  *  Test program for MSA instruction ILVOD.W
  *
- *  Copyright (C) 2018  Wave Computing, Inc.
- *  Copyright (C) 2018  Aleksandar Markovic <amarkovic@wavecomp.com>
+ *  Copyright (C) 2019  Wave Computing, Inc.
+ *  Copyright (C) 2019  Aleksandar Markovic <amarkovic@wavecomp.com>
  *
  *  This program is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
diff --git a/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvr_b.c b/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvr_b.c
index f2cc7bf..ddf2eef 100644
--- a/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvr_b.c
+++ b/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvr_b.c
@@ -1,8 +1,8 @@
 /*
  *  Test program for MSA instruction ILVR.B
  *
- *  Copyright (C) 2018  Wave Computing, Inc.
- *  Copyright (C) 2018  Aleksandar Markovic <amarkovic@wavecomp.com>
+ *  Copyright (C) 2019  Wave Computing, Inc.
+ *  Copyright (C) 2019  Aleksandar Markovic <amarkovic@wavecomp.com>
  *
  *  This program is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
diff --git a/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvr_d.c b/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvr_d.c
index f5ff947..898b4e3 100644
--- a/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvr_d.c
+++ b/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvr_d.c
@@ -1,8 +1,8 @@
 /*
  *  Test program for MSA instruction ILVR.D
  *
- *  Copyright (C) 2018  Wave Computing, Inc.
- *  Copyright (C) 2018  Aleksandar Markovic <amarkovic@wavecomp.com>
+ *  Copyright (C) 2019  Wave Computing, Inc.
+ *  Copyright (C) 2019  Aleksandar Markovic <amarkovic@wavecomp.com>
  *
  *  This program is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
diff --git a/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvr_h.c b/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvr_h.c
index 5a2986d..3295ed8 100644
--- a/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvr_h.c
+++ b/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvr_h.c
@@ -1,8 +1,8 @@
 /*
  *  Test program for MSA instruction ILVR.H
  *
- *  Copyright (C) 2018  Wave Computing, Inc.
- *  Copyright (C) 2018  Aleksandar Markovic <amarkovic@wavecomp.com>
+ *  Copyright (C) 2019  Wave Computing, Inc.
+ *  Copyright (C) 2019  Aleksandar Markovic <amarkovic@wavecomp.com>
  *
  *  This program is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
diff --git a/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvr_w.c b/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvr_w.c
index fa0d6ea..2c1ebc7 100644
--- a/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvr_w.c
+++ b/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvr_w.c
@@ -1,8 +1,8 @@
 /*
  *  Test program for MSA instruction ILVR.W
  *
- *  Copyright (C) 2018  Wave Computing, Inc.
- *  Copyright (C) 2018  Aleksandar Markovic <amarkovic@wavecomp.com>
+ *  Copyright (C) 2019  Wave Computing, Inc.
+ *  Copyright (C) 2019  Aleksandar Markovic <amarkovic@wavecomp.com>
  *
  *  This program is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
diff --git a/tests/tcg/mips/user/ase/msa/logic/test_msa_and_v.c b/tests/tcg/mips/user/ase/msa/logic/test_msa_and_v.c
index 51b256f..42479ef 100644
--- a/tests/tcg/mips/user/ase/msa/logic/test_msa_and_v.c
+++ b/tests/tcg/mips/user/ase/msa/logic/test_msa_and_v.c
@@ -1,8 +1,8 @@
 /*
  *  Test program for MSA instruction AND.V
  *
- *  Copyright (C) 2018  Wave Computing, Inc.
- *  Copyright (C) 2018  Aleksandar Markovic <amarkovic@wavecomp.com>
+ *  Copyright (C) 2019  Wave Computing, Inc.
+ *  Copyright (C) 2019  Aleksandar Markovic <amarkovic@wavecomp.com>
  *
  *  This program is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
diff --git a/tests/tcg/mips/user/ase/msa/logic/test_msa_nor_v.c b/tests/tcg/mips/user/ase/msa/logic/test_msa_nor_v.c
index 90ca198..a956e03 100644
--- a/tests/tcg/mips/user/ase/msa/logic/test_msa_nor_v.c
+++ b/tests/tcg/mips/user/ase/msa/logic/test_msa_nor_v.c
@@ -1,8 +1,8 @@
 /*
  *  Test program for MSA instruction NOR.V
  *
- *  Copyright (C) 2018  Wave Computing, Inc.
- *  Copyright (C) 2018  Aleksandar Markovic <amarkovic@wavecomp.com>
+ *  Copyright (C) 2019  Wave Computing, Inc.
+ *  Copyright (C) 2019  Aleksandar Markovic <amarkovic@wavecomp.com>
  *
  *  This program is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
diff --git a/tests/tcg/mips/user/ase/msa/logic/test_msa_or_v.c b/tests/tcg/mips/user/ase/msa/logic/test_msa_or_v.c
index 4ad5366..46ac112 100644
--- a/tests/tcg/mips/user/ase/msa/logic/test_msa_or_v.c
+++ b/tests/tcg/mips/user/ase/msa/logic/test_msa_or_v.c
@@ -1,8 +1,8 @@
 /*
  *  Test program for MSA instruction OR.V
  *
- *  Copyright (C) 2018  Wave Computing, Inc.
- *  Copyright (C) 2018  Aleksandar Markovic <amarkovic@wavecomp.com>
+ *  Copyright (C) 2019  Wave Computing, Inc.
+ *  Copyright (C) 2019  Aleksandar Markovic <amarkovic@wavecomp.com>
  *
  *  This program is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
diff --git a/tests/tcg/mips/user/ase/msa/logic/test_msa_xor_v.c b/tests/tcg/mips/user/ase/msa/logic/test_msa_xor_v.c
index 54effed..dd3668c 100644
--- a/tests/tcg/mips/user/ase/msa/logic/test_msa_xor_v.c
+++ b/tests/tcg/mips/user/ase/msa/logic/test_msa_xor_v.c
@@ -1,8 +1,8 @@
 /*
  *  Test program for MSA instruction XOR.V
  *
- *  Copyright (C) 2018  Wave Computing, Inc.
- *  Copyright (C) 2018  Aleksandar Markovic <amarkovic@wavecomp.com>
+ *  Copyright (C) 2019  Wave Computing, Inc.
+ *  Copyright (C) 2019  Aleksandar Markovic <amarkovic@wavecomp.com>
  *
  *  This program is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
diff --git a/tests/tcg/mips/user/ase/msa/pack/test_msa_pckev_b.c b/tests/tcg/mips/user/ase/msa/pack/test_msa_pckev_b.c
index d98dd22..ee1aa5d 100644
--- a/tests/tcg/mips/user/ase/msa/pack/test_msa_pckev_b.c
+++ b/tests/tcg/mips/user/ase/msa/pack/test_msa_pckev_b.c
@@ -1,8 +1,8 @@
 /*
  *  Test program for MSA instruction PCKEV.B
  *
- *  Copyright (C) 2018  Wave Computing, Inc.
- *  Copyright (C) 2018  Aleksandar Markovic <amarkovic@wavecomp.com>
+ *  Copyright (C) 2019  Wave Computing, Inc.
+ *  Copyright (C) 2019  Aleksandar Markovic <amarkovic@wavecomp.com>
  *
  *  This program is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
diff --git a/tests/tcg/mips/user/ase/msa/pack/test_msa_pckev_d.c b/tests/tcg/mips/user/ase/msa/pack/test_msa_pckev_d.c
index 543fb6a..5df658a 100644
--- a/tests/tcg/mips/user/ase/msa/pack/test_msa_pckev_d.c
+++ b/tests/tcg/mips/user/ase/msa/pack/test_msa_pckev_d.c
@@ -1,8 +1,8 @@
 /*
  *  Test program for MSA instruction PCKEV.D
  *
- *  Copyright (C) 2018  Wave Computing, Inc.
- *  Copyright (C) 2018  Aleksandar Markovic <amarkovic@wavecomp.com>
+ *  Copyright (C) 2019  Wave Computing, Inc.
+ *  Copyright (C) 2019  Aleksandar Markovic <amarkovic@wavecomp.com>
  *
  *  This program is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
diff --git a/tests/tcg/mips/user/ase/msa/pack/test_msa_pckev_h.c b/tests/tcg/mips/user/ase/msa/pack/test_msa_pckev_h.c
index 64a18c0..90a5123 100644
--- a/tests/tcg/mips/user/ase/msa/pack/test_msa_pckev_h.c
+++ b/tests/tcg/mips/user/ase/msa/pack/test_msa_pckev_h.c
@@ -1,8 +1,8 @@
 /*
  *  Test program for MSA instruction PCKEV.H
  *
- *  Copyright (C) 2018  Wave Computing, Inc.
- *  Copyright (C) 2018  Aleksandar Markovic <amarkovic@wavecomp.com>
+ *  Copyright (C) 2019  Wave Computing, Inc.
+ *  Copyright (C) 2019  Aleksandar Markovic <amarkovic@wavecomp.com>
  *
  *  This program is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
diff --git a/tests/tcg/mips/user/ase/msa/pack/test_msa_pckev_w.c b/tests/tcg/mips/user/ase/msa/pack/test_msa_pckev_w.c
index a0acacd..364b835 100644
--- a/tests/tcg/mips/user/ase/msa/pack/test_msa_pckev_w.c
+++ b/tests/tcg/mips/user/ase/msa/pack/test_msa_pckev_w.c
@@ -1,8 +1,8 @@
 /*
  *  Test program for MSA instruction PCKEV.W
  *
- *  Copyright (C) 2018  Wave Computing, Inc.
- *  Copyright (C) 2018  Aleksandar Markovic <amarkovic@wavecomp.com>
+ *  Copyright (C) 2019  Wave Computing, Inc.
+ *  Copyright (C) 2019  Aleksandar Markovic <amarkovic@wavecomp.com>
  *
  *  This program is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
diff --git a/tests/tcg/mips/user/ase/msa/pack/test_msa_pckod_b.c b/tests/tcg/mips/user/ase/msa/pack/test_msa_pckod_b.c
index 7bf86fc..e637237 100644
--- a/tests/tcg/mips/user/ase/msa/pack/test_msa_pckod_b.c
+++ b/tests/tcg/mips/user/ase/msa/pack/test_msa_pckod_b.c
@@ -1,8 +1,8 @@
 /*
  *  Test program for MSA instruction PCKOD.B
  *
- *  Copyright (C) 2018  Wave Computing, Inc.
- *  Copyright (C) 2018  Aleksandar Markovic <amarkovic@wavecomp.com>
+ *  Copyright (C) 2019  Wave Computing, Inc.
+ *  Copyright (C) 2019  Aleksandar Markovic <amarkovic@wavecomp.com>
  *
  *  This program is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
diff --git a/tests/tcg/mips/user/ase/msa/pack/test_msa_pckod_d.c b/tests/tcg/mips/user/ase/msa/pack/test_msa_pckod_d.c
index 3c4d55b..d0b17f4 100644
--- a/tests/tcg/mips/user/ase/msa/pack/test_msa_pckod_d.c
+++ b/tests/tcg/mips/user/ase/msa/pack/test_msa_pckod_d.c
@@ -1,8 +1,8 @@
 /*
  *  Test program for MSA instruction PCKOD.D
  *
- *  Copyright (C) 2018  Wave Computing, Inc.
- *  Copyright (C) 2018  Aleksandar Markovic <amarkovic@wavecomp.com>
+ *  Copyright (C) 2019  Wave Computing, Inc.
+ *  Copyright (C) 2019  Aleksandar Markovic <amarkovic@wavecomp.com>
  *
  *  This program is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
diff --git a/tests/tcg/mips/user/ase/msa/pack/test_msa_pckod_h.c b/tests/tcg/mips/user/ase/msa/pack/test_msa_pckod_h.c
index 5c3c529..034c9e8 100644
--- a/tests/tcg/mips/user/ase/msa/pack/test_msa_pckod_h.c
+++ b/tests/tcg/mips/user/ase/msa/pack/test_msa_pckod_h.c
@@ -1,8 +1,8 @@
 /*
  *  Test program for MSA instruction PCKOD.H
  *
- *  Copyright (C) 2018  Wave Computing, Inc.
- *  Copyright (C) 2018  Aleksandar Markovic <amarkovic@wavecomp.com>
+ *  Copyright (C) 2019  Wave Computing, Inc.
+ *  Copyright (C) 2019  Aleksandar Markovic <amarkovic@wavecomp.com>
  *
  *  This program is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
diff --git a/tests/tcg/mips/user/ase/msa/pack/test_msa_pckod_w.c b/tests/tcg/mips/user/ase/msa/pack/test_msa_pckod_w.c
index 9275890..2ff1c36 100644
--- a/tests/tcg/mips/user/ase/msa/pack/test_msa_pckod_w.c
+++ b/tests/tcg/mips/user/ase/msa/pack/test_msa_pckod_w.c
@@ -1,8 +1,8 @@
 /*
  *  Test program for MSA instruction PCKOD.W
  *
- *  Copyright (C) 2018  Wave Computing, Inc.
- *  Copyright (C) 2018  Aleksandar Markovic <amarkovic@wavecomp.com>
+ *  Copyright (C) 2019  Wave Computing, Inc.
+ *  Copyright (C) 2019  Aleksandar Markovic <amarkovic@wavecomp.com>
  *
  *  This program is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
diff --git a/tests/tcg/mips/user/ase/msa/pack/test_msa_vshf_b.c b/tests/tcg/mips/user/ase/msa/pack/test_msa_vshf_b.c
index fcf857a..1f4853a 100644
--- a/tests/tcg/mips/user/ase/msa/pack/test_msa_vshf_b.c
+++ b/tests/tcg/mips/user/ase/msa/pack/test_msa_vshf_b.c
@@ -1,8 +1,8 @@
 /*
  *  Test program for MSA instruction VSHF.B
  *
- *  Copyright (C) 2018  Wave Computing, Inc.
- *  Copyright (C) 2018  Aleksandar Markovic <amarkovic@wavecomp.com>
+ *  Copyright (C) 2019  Wave Computing, Inc.
+ *  Copyright (C) 2019  Aleksandar Markovic <amarkovic@wavecomp.com>
  *
  *  This program is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
diff --git a/tests/tcg/mips/user/ase/msa/pack/test_msa_vshf_d.c b/tests/tcg/mips/user/ase/msa/pack/test_msa_vshf_d.c
index 700c159..0c42d27 100644
--- a/tests/tcg/mips/user/ase/msa/pack/test_msa_vshf_d.c
+++ b/tests/tcg/mips/user/ase/msa/pack/test_msa_vshf_d.c
@@ -1,8 +1,8 @@
 /*
  *  Test program for MSA instruction VSHF.D
  *
- *  Copyright (C) 2018  Wave Computing, Inc.
- *  Copyright (C) 2018  Aleksandar Markovic <amarkovic@wavecomp.com>
+ *  Copyright (C) 2019  Wave Computing, Inc.
+ *  Copyright (C) 2019  Aleksandar Markovic <amarkovic@wavecomp.com>
  *
  *  This program is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
diff --git a/tests/tcg/mips/user/ase/msa/pack/test_msa_vshf_h.c b/tests/tcg/mips/user/ase/msa/pack/test_msa_vshf_h.c
index 3d6c1dc..f3f0e93 100644
--- a/tests/tcg/mips/user/ase/msa/pack/test_msa_vshf_h.c
+++ b/tests/tcg/mips/user/ase/msa/pack/test_msa_vshf_h.c
@@ -1,8 +1,8 @@
 /*
  *  Test program for MSA instruction VSHF.H
  *
- *  Copyright (C) 2018  Wave Computing, Inc.
- *  Copyright (C) 2018  Aleksandar Markovic <amarkovic@wavecomp.com>
+ *  Copyright (C) 2019  Wave Computing, Inc.
+ *  Copyright (C) 2019  Aleksandar Markovic <amarkovic@wavecomp.com>
  *
  *  This program is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
diff --git a/tests/tcg/mips/user/ase/msa/pack/test_msa_vshf_w.c b/tests/tcg/mips/user/ase/msa/pack/test_msa_vshf_w.c
index 6030762..c5f2026 100644
--- a/tests/tcg/mips/user/ase/msa/pack/test_msa_vshf_w.c
+++ b/tests/tcg/mips/user/ase/msa/pack/test_msa_vshf_w.c
@@ -1,8 +1,8 @@
 /*
  *  Test program for MSA instruction VSHF.W
  *
- *  Copyright (C) 2018  Wave Computing, Inc.
- *  Copyright (C) 2018  Aleksandar Markovic <amarkovic@wavecomp.com>
+ *  Copyright (C) 2019  Wave Computing, Inc.
+ *  Copyright (C) 2019  Aleksandar Markovic <amarkovic@wavecomp.com>
  *
  *  This program is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [Qemu-devel] [PULL 2/7] tests/tcg: target/mips: Rename two header files for consistency
  2019-03-11 14:24 [Qemu-devel] [PULL 0/7] MIPS queue for March 11th, 2019 Aleksandar Markovic
  2019-03-11 14:24 ` [Qemu-devel] [PULL 1/7] tests/tcg: target/mips: Correct preambles of test source files Aleksandar Markovic
@ 2019-03-11 14:24 ` Aleksandar Markovic
  2019-03-11 14:24 ` [Qemu-devel] [PULL 3/7] target/mips: Add tests for a variety of MSA integer average instructions Aleksandar Markovic
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Aleksandar Markovic @ 2019-03-11 14:24 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell, amarkovic

From: Aleksandar Markovic <amarkovic@wavecomp.com>

Rename two header files for consistency and clarity. Do all other
changes to accommodate new names.

Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com>
Reviewed-by: Aleksandar Rikalo <amarkovic@wavecomp.com>
Message-Id: <1551981716-30664-3-git-send-email-aleksandar.markovic@rt-rk.com>
---
 tests/tcg/mips/include/{test_inputs.h => test_inputs_128.h} | 4 ++--
 tests/tcg/mips/include/{test_utils.h => test_utils_128.h}   | 4 ++--
 tests/tcg/mips/user/ase/msa/bit-count/test_msa_nloc_b.c     | 4 ++--
 tests/tcg/mips/user/ase/msa/bit-count/test_msa_nloc_d.c     | 4 ++--
 tests/tcg/mips/user/ase/msa/bit-count/test_msa_nloc_h.c     | 4 ++--
 tests/tcg/mips/user/ase/msa/bit-count/test_msa_nloc_w.c     | 4 ++--
 tests/tcg/mips/user/ase/msa/bit-count/test_msa_nlzc_b.c     | 4 ++--
 tests/tcg/mips/user/ase/msa/bit-count/test_msa_nlzc_d.c     | 4 ++--
 tests/tcg/mips/user/ase/msa/bit-count/test_msa_nlzc_h.c     | 4 ++--
 tests/tcg/mips/user/ase/msa/bit-count/test_msa_nlzc_w.c     | 4 ++--
 tests/tcg/mips/user/ase/msa/bit-count/test_msa_pcnt_b.c     | 4 ++--
 tests/tcg/mips/user/ase/msa/bit-count/test_msa_pcnt_d.c     | 4 ++--
 tests/tcg/mips/user/ase/msa/bit-count/test_msa_pcnt_h.c     | 4 ++--
 tests/tcg/mips/user/ase/msa/bit-count/test_msa_pcnt_w.c     | 4 ++--
 tests/tcg/mips/user/ase/msa/int-add/test_msa_add_a_b.c      | 4 ++--
 tests/tcg/mips/user/ase/msa/int-add/test_msa_add_a_d.c      | 4 ++--
 tests/tcg/mips/user/ase/msa/int-add/test_msa_add_a_h.c      | 4 ++--
 tests/tcg/mips/user/ase/msa/int-add/test_msa_add_a_w.c      | 4 ++--
 tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_a_b.c     | 4 ++--
 tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_a_d.c     | 4 ++--
 tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_a_h.c     | 4 ++--
 tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_a_w.c     | 4 ++--
 tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_s_b.c     | 4 ++--
 tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_s_d.c     | 4 ++--
 tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_s_h.c     | 4 ++--
 tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_s_w.c     | 4 ++--
 tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_u_b.c     | 4 ++--
 tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_u_d.c     | 4 ++--
 tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_u_h.c     | 4 ++--
 tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_u_w.c     | 4 ++--
 tests/tcg/mips/user/ase/msa/int-add/test_msa_addv_b.c       | 4 ++--
 tests/tcg/mips/user/ase/msa/int-add/test_msa_addv_d.c       | 4 ++--
 tests/tcg/mips/user/ase/msa/int-add/test_msa_addv_h.c       | 4 ++--
 tests/tcg/mips/user/ase/msa/int-add/test_msa_addv_w.c       | 4 ++--
 tests/tcg/mips/user/ase/msa/int-add/test_msa_hadd_s_d.c     | 4 ++--
 tests/tcg/mips/user/ase/msa/int-add/test_msa_hadd_s_h.c     | 4 ++--
 tests/tcg/mips/user/ase/msa/int-add/test_msa_hadd_s_w.c     | 4 ++--
 tests/tcg/mips/user/ase/msa/int-add/test_msa_hadd_u_d.c     | 4 ++--
 tests/tcg/mips/user/ase/msa/int-add/test_msa_hadd_u_h.c     | 4 ++--
 tests/tcg/mips/user/ase/msa/int-add/test_msa_hadd_u_w.c     | 4 ++--
 tests/tcg/mips/user/ase/msa/int-compare/test_msa_ceq_b.c    | 4 ++--
 tests/tcg/mips/user/ase/msa/int-compare/test_msa_ceq_d.c    | 4 ++--
 tests/tcg/mips/user/ase/msa/int-compare/test_msa_ceq_h.c    | 4 ++--
 tests/tcg/mips/user/ase/msa/int-compare/test_msa_ceq_w.c    | 4 ++--
 tests/tcg/mips/user/ase/msa/int-compare/test_msa_cle_s_b.c  | 4 ++--
 tests/tcg/mips/user/ase/msa/int-compare/test_msa_cle_s_d.c  | 4 ++--
 tests/tcg/mips/user/ase/msa/int-compare/test_msa_cle_s_h.c  | 4 ++--
 tests/tcg/mips/user/ase/msa/int-compare/test_msa_cle_s_w.c  | 4 ++--
 tests/tcg/mips/user/ase/msa/int-compare/test_msa_cle_u_b.c  | 4 ++--
 tests/tcg/mips/user/ase/msa/int-compare/test_msa_cle_u_d.c  | 4 ++--
 tests/tcg/mips/user/ase/msa/int-compare/test_msa_cle_u_h.c  | 4 ++--
 tests/tcg/mips/user/ase/msa/int-compare/test_msa_cle_u_w.c  | 4 ++--
 tests/tcg/mips/user/ase/msa/int-compare/test_msa_clt_s_b.c  | 4 ++--
 tests/tcg/mips/user/ase/msa/int-compare/test_msa_clt_s_d.c  | 4 ++--
 tests/tcg/mips/user/ase/msa/int-compare/test_msa_clt_s_h.c  | 4 ++--
 tests/tcg/mips/user/ase/msa/int-compare/test_msa_clt_s_w.c  | 4 ++--
 tests/tcg/mips/user/ase/msa/int-compare/test_msa_clt_u_b.c  | 4 ++--
 tests/tcg/mips/user/ase/msa/int-compare/test_msa_clt_u_d.c  | 4 ++--
 tests/tcg/mips/user/ase/msa/int-compare/test_msa_clt_u_h.c  | 4 ++--
 tests/tcg/mips/user/ase/msa/int-compare/test_msa_clt_u_w.c  | 4 ++--
 tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_a_b.c  | 4 ++--
 tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_a_d.c  | 4 ++--
 tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_a_h.c  | 4 ++--
 tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_a_w.c  | 4 ++--
 tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_s_b.c  | 4 ++--
 tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_s_d.c  | 4 ++--
 tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_s_h.c  | 4 ++--
 tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_s_w.c  | 4 ++--
 tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_u_b.c  | 4 ++--
 tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_u_d.c  | 4 ++--
 tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_u_h.c  | 4 ++--
 tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_u_w.c  | 4 ++--
 tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_a_b.c  | 4 ++--
 tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_a_d.c  | 4 ++--
 tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_a_h.c  | 4 ++--
 tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_a_w.c  | 4 ++--
 tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_s_b.c  | 4 ++--
 tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_s_d.c  | 4 ++--
 tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_s_h.c  | 4 ++--
 tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_s_w.c  | 4 ++--
 tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_u_b.c  | 4 ++--
 tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_u_d.c  | 4 ++--
 tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_u_h.c  | 4 ++--
 tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_u_w.c  | 4 ++--
 tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvev_b.c   | 4 ++--
 tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvev_d.c   | 4 ++--
 tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvev_h.c   | 4 ++--
 tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvev_w.c   | 4 ++--
 tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvl_b.c    | 4 ++--
 tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvl_d.c    | 4 ++--
 tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvl_h.c    | 4 ++--
 tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvl_w.c    | 4 ++--
 tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvod_b.c   | 4 ++--
 tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvod_d.c   | 4 ++--
 tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvod_h.c   | 4 ++--
 tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvod_w.c   | 4 ++--
 tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvr_b.c    | 4 ++--
 tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvr_d.c    | 4 ++--
 tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvr_h.c    | 4 ++--
 tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvr_w.c    | 4 ++--
 tests/tcg/mips/user/ase/msa/logic/test_msa_and_v.c          | 4 ++--
 tests/tcg/mips/user/ase/msa/logic/test_msa_nor_v.c          | 4 ++--
 tests/tcg/mips/user/ase/msa/logic/test_msa_or_v.c           | 4 ++--
 tests/tcg/mips/user/ase/msa/logic/test_msa_xor_v.c          | 4 ++--
 tests/tcg/mips/user/ase/msa/pack/test_msa_pckev_b.c         | 4 ++--
 tests/tcg/mips/user/ase/msa/pack/test_msa_pckev_d.c         | 4 ++--
 tests/tcg/mips/user/ase/msa/pack/test_msa_pckev_h.c         | 4 ++--
 tests/tcg/mips/user/ase/msa/pack/test_msa_pckev_w.c         | 4 ++--
 tests/tcg/mips/user/ase/msa/pack/test_msa_pckod_b.c         | 4 ++--
 tests/tcg/mips/user/ase/msa/pack/test_msa_pckod_d.c         | 4 ++--
 tests/tcg/mips/user/ase/msa/pack/test_msa_pckod_h.c         | 4 ++--
 tests/tcg/mips/user/ase/msa/pack/test_msa_pckod_w.c         | 4 ++--
 tests/tcg/mips/user/ase/msa/pack/test_msa_vshf_b.c          | 4 ++--
 tests/tcg/mips/user/ase/msa/pack/test_msa_vshf_d.c          | 4 ++--
 tests/tcg/mips/user/ase/msa/pack/test_msa_vshf_h.c          | 4 ++--
 tests/tcg/mips/user/ase/msa/pack/test_msa_vshf_w.c          | 4 ++--
 116 files changed, 232 insertions(+), 232 deletions(-)
 rename tests/tcg/mips/include/{test_inputs.h => test_inputs_128.h} (99%)
 rename tests/tcg/mips/include/{test_utils.h => test_utils_128.h} (97%)

diff --git a/tests/tcg/mips/include/test_inputs.h b/tests/tcg/mips/include/test_inputs_128.h
similarity index 99%
rename from tests/tcg/mips/include/test_inputs.h
rename to tests/tcg/mips/include/test_inputs_128.h
index a0bbbdf..e4c22dd 100644
--- a/tests/tcg/mips/include/test_inputs.h
+++ b/tests/tcg/mips/include/test_inputs_128.h
@@ -19,8 +19,8 @@
  *
  */
 
-#ifndef TEST_INPUTS_H
-#define TEST_INPUTS_H
+#ifndef TEST_INPUTS_128_H
+#define TEST_INPUTS_128_H
 
 #include <stdint.h>
 
diff --git a/tests/tcg/mips/include/test_utils.h b/tests/tcg/mips/include/test_utils_128.h
similarity index 97%
rename from tests/tcg/mips/include/test_utils.h
rename to tests/tcg/mips/include/test_utils_128.h
index 0b3af3d..cfd7ad3 100644
--- a/tests/tcg/mips/include/test_utils.h
+++ b/tests/tcg/mips/include/test_utils_128.h
@@ -19,8 +19,8 @@
  *
  */
 
-#ifndef TEST_UTILS_H
-#define TEST_UTILS_H
+#ifndef TEST_UTILS_128_H
+#define TEST_UTILS_128_H
 
 #include <stdio.h>
 #include <stdint.h>
diff --git a/tests/tcg/mips/user/ase/msa/bit-count/test_msa_nloc_b.c b/tests/tcg/mips/user/ase/msa/bit-count/test_msa_nloc_b.c
index 574fd75..c73ed24 100644
--- a/tests/tcg/mips/user/ase/msa/bit-count/test_msa_nloc_b.c
+++ b/tests/tcg/mips/user/ase/msa/bit-count/test_msa_nloc_b.c
@@ -23,8 +23,8 @@
 #include <stdint.h>
 
 #include "../../../../include/wrappers_msa.h"
-#include "../../../../include/test_inputs.h"
-#include "../../../../include/test_utils.h"
+#include "../../../../include/test_inputs_128.h"
+#include "../../../../include/test_utils_128.h"
 
 #define TEST_COUNT_TOTAL (PATTERN_INPUTS_COUNT + RANDOM_INPUTS_COUNT)
 
diff --git a/tests/tcg/mips/user/ase/msa/bit-count/test_msa_nloc_d.c b/tests/tcg/mips/user/ase/msa/bit-count/test_msa_nloc_d.c
index eec0bfe..b10fb23 100644
--- a/tests/tcg/mips/user/ase/msa/bit-count/test_msa_nloc_d.c
+++ b/tests/tcg/mips/user/ase/msa/bit-count/test_msa_nloc_d.c
@@ -23,8 +23,8 @@
 #include <stdint.h>
 
 #include "../../../../include/wrappers_msa.h"
-#include "../../../../include/test_inputs.h"
-#include "../../../../include/test_utils.h"
+#include "../../../../include/test_inputs_128.h"
+#include "../../../../include/test_utils_128.h"
 
 #define TEST_COUNT_TOTAL (PATTERN_INPUTS_COUNT + RANDOM_INPUTS_COUNT)
 
diff --git a/tests/tcg/mips/user/ase/msa/bit-count/test_msa_nloc_h.c b/tests/tcg/mips/user/ase/msa/bit-count/test_msa_nloc_h.c
index b338266..c1dc075 100644
--- a/tests/tcg/mips/user/ase/msa/bit-count/test_msa_nloc_h.c
+++ b/tests/tcg/mips/user/ase/msa/bit-count/test_msa_nloc_h.c
@@ -23,8 +23,8 @@
 #include <stdint.h>
 
 #include "../../../../include/wrappers_msa.h"
-#include "../../../../include/test_inputs.h"
-#include "../../../../include/test_utils.h"
+#include "../../../../include/test_inputs_128.h"
+#include "../../../../include/test_utils_128.h"
 
 #define TEST_COUNT_TOTAL (PATTERN_INPUTS_COUNT + RANDOM_INPUTS_COUNT)
 
diff --git a/tests/tcg/mips/user/ase/msa/bit-count/test_msa_nloc_w.c b/tests/tcg/mips/user/ase/msa/bit-count/test_msa_nloc_w.c
index e6f4546..4f7a556 100644
--- a/tests/tcg/mips/user/ase/msa/bit-count/test_msa_nloc_w.c
+++ b/tests/tcg/mips/user/ase/msa/bit-count/test_msa_nloc_w.c
@@ -23,8 +23,8 @@
 #include <stdint.h>
 
 #include "../../../../include/wrappers_msa.h"
-#include "../../../../include/test_inputs.h"
-#include "../../../../include/test_utils.h"
+#include "../../../../include/test_inputs_128.h"
+#include "../../../../include/test_utils_128.h"
 
 #define TEST_COUNT_TOTAL (PATTERN_INPUTS_COUNT + RANDOM_INPUTS_COUNT)
 
diff --git a/tests/tcg/mips/user/ase/msa/bit-count/test_msa_nlzc_b.c b/tests/tcg/mips/user/ase/msa/bit-count/test_msa_nlzc_b.c
index 430f30b..c202ba4 100644
--- a/tests/tcg/mips/user/ase/msa/bit-count/test_msa_nlzc_b.c
+++ b/tests/tcg/mips/user/ase/msa/bit-count/test_msa_nlzc_b.c
@@ -23,8 +23,8 @@
 #include <stdint.h>
 
 #include "../../../../include/wrappers_msa.h"
-#include "../../../../include/test_inputs.h"
-#include "../../../../include/test_utils.h"
+#include "../../../../include/test_inputs_128.h"
+#include "../../../../include/test_utils_128.h"
 
 #define TEST_COUNT_TOTAL (PATTERN_INPUTS_COUNT + RANDOM_INPUTS_COUNT)
 
diff --git a/tests/tcg/mips/user/ase/msa/bit-count/test_msa_nlzc_d.c b/tests/tcg/mips/user/ase/msa/bit-count/test_msa_nlzc_d.c
index 8dcd771..1edead2 100644
--- a/tests/tcg/mips/user/ase/msa/bit-count/test_msa_nlzc_d.c
+++ b/tests/tcg/mips/user/ase/msa/bit-count/test_msa_nlzc_d.c
@@ -23,8 +23,8 @@
 #include <stdint.h>
 
 #include "../../../../include/wrappers_msa.h"
-#include "../../../../include/test_inputs.h"
-#include "../../../../include/test_utils.h"
+#include "../../../../include/test_inputs_128.h"
+#include "../../../../include/test_utils_128.h"
 
 #define TEST_COUNT_TOTAL (PATTERN_INPUTS_COUNT + RANDOM_INPUTS_COUNT)
 
diff --git a/tests/tcg/mips/user/ase/msa/bit-count/test_msa_nlzc_h.c b/tests/tcg/mips/user/ase/msa/bit-count/test_msa_nlzc_h.c
index b329432..b2724c5 100644
--- a/tests/tcg/mips/user/ase/msa/bit-count/test_msa_nlzc_h.c
+++ b/tests/tcg/mips/user/ase/msa/bit-count/test_msa_nlzc_h.c
@@ -23,8 +23,8 @@
 #include <stdint.h>
 
 #include "../../../../include/wrappers_msa.h"
-#include "../../../../include/test_inputs.h"
-#include "../../../../include/test_utils.h"
+#include "../../../../include/test_inputs_128.h"
+#include "../../../../include/test_utils_128.h"
 
 #define TEST_COUNT_TOTAL (PATTERN_INPUTS_COUNT + RANDOM_INPUTS_COUNT)
 
diff --git a/tests/tcg/mips/user/ase/msa/bit-count/test_msa_nlzc_w.c b/tests/tcg/mips/user/ase/msa/bit-count/test_msa_nlzc_w.c
index 6cf28c3..b547c73 100644
--- a/tests/tcg/mips/user/ase/msa/bit-count/test_msa_nlzc_w.c
+++ b/tests/tcg/mips/user/ase/msa/bit-count/test_msa_nlzc_w.c
@@ -23,8 +23,8 @@
 #include <stdint.h>
 
 #include "../../../../include/wrappers_msa.h"
-#include "../../../../include/test_inputs.h"
-#include "../../../../include/test_utils.h"
+#include "../../../../include/test_inputs_128.h"
+#include "../../../../include/test_utils_128.h"
 
 #define TEST_COUNT_TOTAL (PATTERN_INPUTS_COUNT + RANDOM_INPUTS_COUNT)
 
diff --git a/tests/tcg/mips/user/ase/msa/bit-count/test_msa_pcnt_b.c b/tests/tcg/mips/user/ase/msa/bit-count/test_msa_pcnt_b.c
index cf2c088..5918e7f 100644
--- a/tests/tcg/mips/user/ase/msa/bit-count/test_msa_pcnt_b.c
+++ b/tests/tcg/mips/user/ase/msa/bit-count/test_msa_pcnt_b.c
@@ -23,8 +23,8 @@
 #include <stdint.h>
 
 #include "../../../../include/wrappers_msa.h"
-#include "../../../../include/test_inputs.h"
-#include "../../../../include/test_utils.h"
+#include "../../../../include/test_inputs_128.h"
+#include "../../../../include/test_utils_128.h"
 
 #define TEST_COUNT_TOTAL (PATTERN_INPUTS_COUNT + RANDOM_INPUTS_COUNT)
 
diff --git a/tests/tcg/mips/user/ase/msa/bit-count/test_msa_pcnt_d.c b/tests/tcg/mips/user/ase/msa/bit-count/test_msa_pcnt_d.c
index 26acf0c..667ca31 100644
--- a/tests/tcg/mips/user/ase/msa/bit-count/test_msa_pcnt_d.c
+++ b/tests/tcg/mips/user/ase/msa/bit-count/test_msa_pcnt_d.c
@@ -23,8 +23,8 @@
 #include <stdint.h>
 
 #include "../../../../include/wrappers_msa.h"
-#include "../../../../include/test_inputs.h"
-#include "../../../../include/test_utils.h"
+#include "../../../../include/test_inputs_128.h"
+#include "../../../../include/test_utils_128.h"
 
 #define TEST_COUNT_TOTAL (PATTERN_INPUTS_COUNT + RANDOM_INPUTS_COUNT)
 
diff --git a/tests/tcg/mips/user/ase/msa/bit-count/test_msa_pcnt_h.c b/tests/tcg/mips/user/ase/msa/bit-count/test_msa_pcnt_h.c
index ab76914..2951f86 100644
--- a/tests/tcg/mips/user/ase/msa/bit-count/test_msa_pcnt_h.c
+++ b/tests/tcg/mips/user/ase/msa/bit-count/test_msa_pcnt_h.c
@@ -23,8 +23,8 @@
 #include <stdint.h>
 
 #include "../../../../include/wrappers_msa.h"
-#include "../../../../include/test_inputs.h"
-#include "../../../../include/test_utils.h"
+#include "../../../../include/test_inputs_128.h"
+#include "../../../../include/test_utils_128.h"
 
 #define TEST_COUNT_TOTAL (PATTERN_INPUTS_COUNT + RANDOM_INPUTS_COUNT)
 
diff --git a/tests/tcg/mips/user/ase/msa/bit-count/test_msa_pcnt_w.c b/tests/tcg/mips/user/ase/msa/bit-count/test_msa_pcnt_w.c
index 2e6f290..ab43ea9 100644
--- a/tests/tcg/mips/user/ase/msa/bit-count/test_msa_pcnt_w.c
+++ b/tests/tcg/mips/user/ase/msa/bit-count/test_msa_pcnt_w.c
@@ -23,8 +23,8 @@
 #include <stdint.h>
 
 #include "../../../../include/wrappers_msa.h"
-#include "../../../../include/test_inputs.h"
-#include "../../../../include/test_utils.h"
+#include "../../../../include/test_inputs_128.h"
+#include "../../../../include/test_utils_128.h"
 
 #define TEST_COUNT_TOTAL (PATTERN_INPUTS_COUNT + RANDOM_INPUTS_COUNT)
 
diff --git a/tests/tcg/mips/user/ase/msa/int-add/test_msa_add_a_b.c b/tests/tcg/mips/user/ase/msa/int-add/test_msa_add_a_b.c
index 8207b00..d2ea54f 100644
--- a/tests/tcg/mips/user/ase/msa/int-add/test_msa_add_a_b.c
+++ b/tests/tcg/mips/user/ase/msa/int-add/test_msa_add_a_b.c
@@ -23,8 +23,8 @@
 #include <stdint.h>
 
 #include "../../../../include/wrappers_msa.h"
-#include "../../../../include/test_inputs.h"
-#include "../../../../include/test_utils.h"
+#include "../../../../include/test_inputs_128.h"
+#include "../../../../include/test_utils_128.h"
 
 #define TEST_COUNT_TOTAL (                                                \
             (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
diff --git a/tests/tcg/mips/user/ase/msa/int-add/test_msa_add_a_d.c b/tests/tcg/mips/user/ase/msa/int-add/test_msa_add_a_d.c
index 2cc0041..56b81f9 100644
--- a/tests/tcg/mips/user/ase/msa/int-add/test_msa_add_a_d.c
+++ b/tests/tcg/mips/user/ase/msa/int-add/test_msa_add_a_d.c
@@ -23,8 +23,8 @@
 #include <stdint.h>
 
 #include "../../../../include/wrappers_msa.h"
-#include "../../../../include/test_inputs.h"
-#include "../../../../include/test_utils.h"
+#include "../../../../include/test_inputs_128.h"
+#include "../../../../include/test_utils_128.h"
 
 #define TEST_COUNT_TOTAL (                                                \
             (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
diff --git a/tests/tcg/mips/user/ase/msa/int-add/test_msa_add_a_h.c b/tests/tcg/mips/user/ase/msa/int-add/test_msa_add_a_h.c
index 24295bb..fe3c664 100644
--- a/tests/tcg/mips/user/ase/msa/int-add/test_msa_add_a_h.c
+++ b/tests/tcg/mips/user/ase/msa/int-add/test_msa_add_a_h.c
@@ -23,8 +23,8 @@
 #include <stdint.h>
 
 #include "../../../../include/wrappers_msa.h"
-#include "../../../../include/test_inputs.h"
-#include "../../../../include/test_utils.h"
+#include "../../../../include/test_inputs_128.h"
+#include "../../../../include/test_utils_128.h"
 
 #define TEST_COUNT_TOTAL (                                                \
             (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
diff --git a/tests/tcg/mips/user/ase/msa/int-add/test_msa_add_a_w.c b/tests/tcg/mips/user/ase/msa/int-add/test_msa_add_a_w.c
index 03f8fd2..205117e 100644
--- a/tests/tcg/mips/user/ase/msa/int-add/test_msa_add_a_w.c
+++ b/tests/tcg/mips/user/ase/msa/int-add/test_msa_add_a_w.c
@@ -23,8 +23,8 @@
 #include <stdint.h>
 
 #include "../../../../include/wrappers_msa.h"
-#include "../../../../include/test_inputs.h"
-#include "../../../../include/test_utils.h"
+#include "../../../../include/test_inputs_128.h"
+#include "../../../../include/test_utils_128.h"
 
 #define TEST_COUNT_TOTAL (                                                \
             (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
diff --git a/tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_a_b.c b/tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_a_b.c
index 0c8004b..6939e91 100644
--- a/tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_a_b.c
+++ b/tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_a_b.c
@@ -23,8 +23,8 @@
 #include <stdint.h>
 
 #include "../../../../include/wrappers_msa.h"
-#include "../../../../include/test_inputs.h"
-#include "../../../../include/test_utils.h"
+#include "../../../../include/test_inputs_128.h"
+#include "../../../../include/test_utils_128.h"
 
 #define TEST_COUNT_TOTAL (                                                \
             (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
diff --git a/tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_a_d.c b/tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_a_d.c
index c21346f..af0f3d3 100644
--- a/tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_a_d.c
+++ b/tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_a_d.c
@@ -23,8 +23,8 @@
 #include <stdint.h>
 
 #include "../../../../include/wrappers_msa.h"
-#include "../../../../include/test_inputs.h"
-#include "../../../../include/test_utils.h"
+#include "../../../../include/test_inputs_128.h"
+#include "../../../../include/test_utils_128.h"
 
 #define TEST_COUNT_TOTAL (                                                \
             (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
diff --git a/tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_a_h.c b/tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_a_h.c
index 2831580..4d3774f 100644
--- a/tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_a_h.c
+++ b/tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_a_h.c
@@ -23,8 +23,8 @@
 #include <stdint.h>
 
 #include "../../../../include/wrappers_msa.h"
-#include "../../../../include/test_inputs.h"
-#include "../../../../include/test_utils.h"
+#include "../../../../include/test_inputs_128.h"
+#include "../../../../include/test_utils_128.h"
 
 #define TEST_COUNT_TOTAL (                                                \
             (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
diff --git a/tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_a_w.c b/tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_a_w.c
index b502c3b..6f06fdc 100644
--- a/tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_a_w.c
+++ b/tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_a_w.c
@@ -23,8 +23,8 @@
 #include <stdint.h>
 
 #include "../../../../include/wrappers_msa.h"
-#include "../../../../include/test_inputs.h"
-#include "../../../../include/test_utils.h"
+#include "../../../../include/test_inputs_128.h"
+#include "../../../../include/test_utils_128.h"
 
 #define TEST_COUNT_TOTAL (                                                \
             (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
diff --git a/tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_s_b.c b/tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_s_b.c
index e4846c4..e6cb987 100644
--- a/tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_s_b.c
+++ b/tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_s_b.c
@@ -23,8 +23,8 @@
 #include <stdint.h>
 
 #include "../../../../include/wrappers_msa.h"
-#include "../../../../include/test_inputs.h"
-#include "../../../../include/test_utils.h"
+#include "../../../../include/test_inputs_128.h"
+#include "../../../../include/test_utils_128.h"
 
 #define TEST_COUNT_TOTAL (                                                \
             (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
diff --git a/tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_s_d.c b/tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_s_d.c
index c733dba..2cda5d9 100644
--- a/tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_s_d.c
+++ b/tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_s_d.c
@@ -23,8 +23,8 @@
 #include <stdint.h>
 
 #include "../../../../include/wrappers_msa.h"
-#include "../../../../include/test_inputs.h"
-#include "../../../../include/test_utils.h"
+#include "../../../../include/test_inputs_128.h"
+#include "../../../../include/test_utils_128.h"
 
 #define TEST_COUNT_TOTAL (                                                \
             (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
diff --git a/tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_s_h.c b/tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_s_h.c
index ec4edb8..5539322 100644
--- a/tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_s_h.c
+++ b/tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_s_h.c
@@ -23,8 +23,8 @@
 #include <stdint.h>
 
 #include "../../../../include/wrappers_msa.h"
-#include "../../../../include/test_inputs.h"
-#include "../../../../include/test_utils.h"
+#include "../../../../include/test_inputs_128.h"
+#include "../../../../include/test_utils_128.h"
 
 #define TEST_COUNT_TOTAL (                                                \
             (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
diff --git a/tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_s_w.c b/tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_s_w.c
index b7385d6..4f2cc38 100644
--- a/tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_s_w.c
+++ b/tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_s_w.c
@@ -23,8 +23,8 @@
 #include <stdint.h>
 
 #include "../../../../include/wrappers_msa.h"
-#include "../../../../include/test_inputs.h"
-#include "../../../../include/test_utils.h"
+#include "../../../../include/test_inputs_128.h"
+#include "../../../../include/test_utils_128.h"
 
 #define TEST_COUNT_TOTAL (                                                \
             (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
diff --git a/tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_u_b.c b/tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_u_b.c
index 341c420..e2d9be3 100644
--- a/tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_u_b.c
+++ b/tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_u_b.c
@@ -23,8 +23,8 @@
 #include <stdint.h>
 
 #include "../../../../include/wrappers_msa.h"
-#include "../../../../include/test_inputs.h"
-#include "../../../../include/test_utils.h"
+#include "../../../../include/test_inputs_128.h"
+#include "../../../../include/test_utils_128.h"
 
 #define TEST_COUNT_TOTAL (                                                \
             (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
diff --git a/tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_u_d.c b/tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_u_d.c
index 414be70..8418c63 100644
--- a/tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_u_d.c
+++ b/tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_u_d.c
@@ -23,8 +23,8 @@
 #include <stdint.h>
 
 #include "../../../../include/wrappers_msa.h"
-#include "../../../../include/test_inputs.h"
-#include "../../../../include/test_utils.h"
+#include "../../../../include/test_inputs_128.h"
+#include "../../../../include/test_utils_128.h"
 
 #define TEST_COUNT_TOTAL (                                                \
             (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
diff --git a/tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_u_h.c b/tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_u_h.c
index b6ca9c9..8a3b5c5 100644
--- a/tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_u_h.c
+++ b/tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_u_h.c
@@ -23,8 +23,8 @@
 #include <stdint.h>
 
 #include "../../../../include/wrappers_msa.h"
-#include "../../../../include/test_inputs.h"
-#include "../../../../include/test_utils.h"
+#include "../../../../include/test_inputs_128.h"
+#include "../../../../include/test_utils_128.h"
 
 #define TEST_COUNT_TOTAL (                                                \
             (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
diff --git a/tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_u_w.c b/tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_u_w.c
index af30676..b18bdc3 100644
--- a/tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_u_w.c
+++ b/tests/tcg/mips/user/ase/msa/int-add/test_msa_adds_u_w.c
@@ -23,8 +23,8 @@
 #include <stdint.h>
 
 #include "../../../../include/wrappers_msa.h"
-#include "../../../../include/test_inputs.h"
-#include "../../../../include/test_utils.h"
+#include "../../../../include/test_inputs_128.h"
+#include "../../../../include/test_utils_128.h"
 
 #define TEST_COUNT_TOTAL (                                                \
             (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
diff --git a/tests/tcg/mips/user/ase/msa/int-add/test_msa_addv_b.c b/tests/tcg/mips/user/ase/msa/int-add/test_msa_addv_b.c
index 61aee3b..c86c992 100644
--- a/tests/tcg/mips/user/ase/msa/int-add/test_msa_addv_b.c
+++ b/tests/tcg/mips/user/ase/msa/int-add/test_msa_addv_b.c
@@ -23,8 +23,8 @@
 #include <stdint.h>
 
 #include "../../../../include/wrappers_msa.h"
-#include "../../../../include/test_inputs.h"
-#include "../../../../include/test_utils.h"
+#include "../../../../include/test_inputs_128.h"
+#include "../../../../include/test_utils_128.h"
 
 #define TEST_COUNT_TOTAL (                                                \
             (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
diff --git a/tests/tcg/mips/user/ase/msa/int-add/test_msa_addv_d.c b/tests/tcg/mips/user/ase/msa/int-add/test_msa_addv_d.c
index 0e1b76f..0f30151 100644
--- a/tests/tcg/mips/user/ase/msa/int-add/test_msa_addv_d.c
+++ b/tests/tcg/mips/user/ase/msa/int-add/test_msa_addv_d.c
@@ -23,8 +23,8 @@
 #include <stdint.h>
 
 #include "../../../../include/wrappers_msa.h"
-#include "../../../../include/test_inputs.h"
-#include "../../../../include/test_utils.h"
+#include "../../../../include/test_inputs_128.h"
+#include "../../../../include/test_utils_128.h"
 
 #define TEST_COUNT_TOTAL (                                                \
             (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
diff --git a/tests/tcg/mips/user/ase/msa/int-add/test_msa_addv_h.c b/tests/tcg/mips/user/ase/msa/int-add/test_msa_addv_h.c
index 35b79cf..c6b4cf6 100644
--- a/tests/tcg/mips/user/ase/msa/int-add/test_msa_addv_h.c
+++ b/tests/tcg/mips/user/ase/msa/int-add/test_msa_addv_h.c
@@ -23,8 +23,8 @@
 #include <stdint.h>
 
 #include "../../../../include/wrappers_msa.h"
-#include "../../../../include/test_inputs.h"
-#include "../../../../include/test_utils.h"
+#include "../../../../include/test_inputs_128.h"
+#include "../../../../include/test_utils_128.h"
 
 #define TEST_COUNT_TOTAL (                                                \
             (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
diff --git a/tests/tcg/mips/user/ase/msa/int-add/test_msa_addv_w.c b/tests/tcg/mips/user/ase/msa/int-add/test_msa_addv_w.c
index b3c8e32..2a565e8 100644
--- a/tests/tcg/mips/user/ase/msa/int-add/test_msa_addv_w.c
+++ b/tests/tcg/mips/user/ase/msa/int-add/test_msa_addv_w.c
@@ -23,8 +23,8 @@
 #include <stdint.h>
 
 #include "../../../../include/wrappers_msa.h"
-#include "../../../../include/test_inputs.h"
-#include "../../../../include/test_utils.h"
+#include "../../../../include/test_inputs_128.h"
+#include "../../../../include/test_utils_128.h"
 
 #define TEST_COUNT_TOTAL (                                                \
             (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
diff --git a/tests/tcg/mips/user/ase/msa/int-add/test_msa_hadd_s_d.c b/tests/tcg/mips/user/ase/msa/int-add/test_msa_hadd_s_d.c
index c455db5..7845dc0 100644
--- a/tests/tcg/mips/user/ase/msa/int-add/test_msa_hadd_s_d.c
+++ b/tests/tcg/mips/user/ase/msa/int-add/test_msa_hadd_s_d.c
@@ -23,8 +23,8 @@
 #include <stdint.h>
 
 #include "../../../../include/wrappers_msa.h"
-#include "../../../../include/test_inputs.h"
-#include "../../../../include/test_utils.h"
+#include "../../../../include/test_inputs_128.h"
+#include "../../../../include/test_utils_128.h"
 
 #define TEST_COUNT_TOTAL (                                                \
             (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
diff --git a/tests/tcg/mips/user/ase/msa/int-add/test_msa_hadd_s_h.c b/tests/tcg/mips/user/ase/msa/int-add/test_msa_hadd_s_h.c
index 2b0e9d2..ddc2de3 100644
--- a/tests/tcg/mips/user/ase/msa/int-add/test_msa_hadd_s_h.c
+++ b/tests/tcg/mips/user/ase/msa/int-add/test_msa_hadd_s_h.c
@@ -23,8 +23,8 @@
 #include <stdint.h>
 
 #include "../../../../include/wrappers_msa.h"
-#include "../../../../include/test_inputs.h"
-#include "../../../../include/test_utils.h"
+#include "../../../../include/test_inputs_128.h"
+#include "../../../../include/test_utils_128.h"
 
 #define TEST_COUNT_TOTAL (                                                \
             (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
diff --git a/tests/tcg/mips/user/ase/msa/int-add/test_msa_hadd_s_w.c b/tests/tcg/mips/user/ase/msa/int-add/test_msa_hadd_s_w.c
index 2c09066..887cd1c 100644
--- a/tests/tcg/mips/user/ase/msa/int-add/test_msa_hadd_s_w.c
+++ b/tests/tcg/mips/user/ase/msa/int-add/test_msa_hadd_s_w.c
@@ -23,8 +23,8 @@
 #include <stdint.h>
 
 #include "../../../../include/wrappers_msa.h"
-#include "../../../../include/test_inputs.h"
-#include "../../../../include/test_utils.h"
+#include "../../../../include/test_inputs_128.h"
+#include "../../../../include/test_utils_128.h"
 
 #define TEST_COUNT_TOTAL (                                                \
             (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
diff --git a/tests/tcg/mips/user/ase/msa/int-add/test_msa_hadd_u_d.c b/tests/tcg/mips/user/ase/msa/int-add/test_msa_hadd_u_d.c
index 5662050..f0710f1 100644
--- a/tests/tcg/mips/user/ase/msa/int-add/test_msa_hadd_u_d.c
+++ b/tests/tcg/mips/user/ase/msa/int-add/test_msa_hadd_u_d.c
@@ -23,8 +23,8 @@
 #include <stdint.h>
 
 #include "../../../../include/wrappers_msa.h"
-#include "../../../../include/test_inputs.h"
-#include "../../../../include/test_utils.h"
+#include "../../../../include/test_inputs_128.h"
+#include "../../../../include/test_utils_128.h"
 
 #define TEST_COUNT_TOTAL (                                                \
             (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
diff --git a/tests/tcg/mips/user/ase/msa/int-add/test_msa_hadd_u_h.c b/tests/tcg/mips/user/ase/msa/int-add/test_msa_hadd_u_h.c
index e23ac0a..fe55d3e 100644
--- a/tests/tcg/mips/user/ase/msa/int-add/test_msa_hadd_u_h.c
+++ b/tests/tcg/mips/user/ase/msa/int-add/test_msa_hadd_u_h.c
@@ -23,8 +23,8 @@
 #include <stdint.h>
 
 #include "../../../../include/wrappers_msa.h"
-#include "../../../../include/test_inputs.h"
-#include "../../../../include/test_utils.h"
+#include "../../../../include/test_inputs_128.h"
+#include "../../../../include/test_utils_128.h"
 
 #define TEST_COUNT_TOTAL (                                                \
             (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
diff --git a/tests/tcg/mips/user/ase/msa/int-add/test_msa_hadd_u_w.c b/tests/tcg/mips/user/ase/msa/int-add/test_msa_hadd_u_w.c
index c71d82a..babe04d 100644
--- a/tests/tcg/mips/user/ase/msa/int-add/test_msa_hadd_u_w.c
+++ b/tests/tcg/mips/user/ase/msa/int-add/test_msa_hadd_u_w.c
@@ -23,8 +23,8 @@
 #include <stdint.h>
 
 #include "../../../../include/wrappers_msa.h"
-#include "../../../../include/test_inputs.h"
-#include "../../../../include/test_utils.h"
+#include "../../../../include/test_inputs_128.h"
+#include "../../../../include/test_utils_128.h"
 
 #define TEST_COUNT_TOTAL (                                                \
             (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
diff --git a/tests/tcg/mips/user/ase/msa/int-compare/test_msa_ceq_b.c b/tests/tcg/mips/user/ase/msa/int-compare/test_msa_ceq_b.c
index 1c38460..bb884ee 100644
--- a/tests/tcg/mips/user/ase/msa/int-compare/test_msa_ceq_b.c
+++ b/tests/tcg/mips/user/ase/msa/int-compare/test_msa_ceq_b.c
@@ -23,8 +23,8 @@
 #include <stdint.h>
 
 #include "../../../../include/wrappers_msa.h"
-#include "../../../../include/test_inputs.h"
-#include "../../../../include/test_utils.h"
+#include "../../../../include/test_inputs_128.h"
+#include "../../../../include/test_utils_128.h"
 
 #define TEST_COUNT_TOTAL (                                                \
             (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
diff --git a/tests/tcg/mips/user/ase/msa/int-compare/test_msa_ceq_d.c b/tests/tcg/mips/user/ase/msa/int-compare/test_msa_ceq_d.c
index 95c7c86..ef13f7d 100644
--- a/tests/tcg/mips/user/ase/msa/int-compare/test_msa_ceq_d.c
+++ b/tests/tcg/mips/user/ase/msa/int-compare/test_msa_ceq_d.c
@@ -23,8 +23,8 @@
 #include <stdint.h>
 
 #include "../../../../include/wrappers_msa.h"
-#include "../../../../include/test_inputs.h"
-#include "../../../../include/test_utils.h"
+#include "../../../../include/test_inputs_128.h"
+#include "../../../../include/test_utils_128.h"
 
 #define TEST_COUNT_TOTAL (                                                \
             (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
diff --git a/tests/tcg/mips/user/ase/msa/int-compare/test_msa_ceq_h.c b/tests/tcg/mips/user/ase/msa/int-compare/test_msa_ceq_h.c
index c54ed95..1c43d40 100644
--- a/tests/tcg/mips/user/ase/msa/int-compare/test_msa_ceq_h.c
+++ b/tests/tcg/mips/user/ase/msa/int-compare/test_msa_ceq_h.c
@@ -23,8 +23,8 @@
 #include <stdint.h>
 
 #include "../../../../include/wrappers_msa.h"
-#include "../../../../include/test_inputs.h"
-#include "../../../../include/test_utils.h"
+#include "../../../../include/test_inputs_128.h"
+#include "../../../../include/test_utils_128.h"
 
 #define TEST_COUNT_TOTAL (                                                \
             (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
diff --git a/tests/tcg/mips/user/ase/msa/int-compare/test_msa_ceq_w.c b/tests/tcg/mips/user/ase/msa/int-compare/test_msa_ceq_w.c
index 387b15d..1297d41 100644
--- a/tests/tcg/mips/user/ase/msa/int-compare/test_msa_ceq_w.c
+++ b/tests/tcg/mips/user/ase/msa/int-compare/test_msa_ceq_w.c
@@ -23,8 +23,8 @@
 #include <stdint.h>
 
 #include "../../../../include/wrappers_msa.h"
-#include "../../../../include/test_inputs.h"
-#include "../../../../include/test_utils.h"
+#include "../../../../include/test_inputs_128.h"
+#include "../../../../include/test_utils_128.h"
 
 #define TEST_COUNT_TOTAL (                                                \
             (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
diff --git a/tests/tcg/mips/user/ase/msa/int-compare/test_msa_cle_s_b.c b/tests/tcg/mips/user/ase/msa/int-compare/test_msa_cle_s_b.c
index 4c266cd..afd5f635 100644
--- a/tests/tcg/mips/user/ase/msa/int-compare/test_msa_cle_s_b.c
+++ b/tests/tcg/mips/user/ase/msa/int-compare/test_msa_cle_s_b.c
@@ -23,8 +23,8 @@
 #include <stdint.h>
 
 #include "../../../../include/wrappers_msa.h"
-#include "../../../../include/test_inputs.h"
-#include "../../../../include/test_utils.h"
+#include "../../../../include/test_inputs_128.h"
+#include "../../../../include/test_utils_128.h"
 
 #define TEST_COUNT_TOTAL (                                                \
             (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
diff --git a/tests/tcg/mips/user/ase/msa/int-compare/test_msa_cle_s_d.c b/tests/tcg/mips/user/ase/msa/int-compare/test_msa_cle_s_d.c
index d35ff2a..04d58d1 100644
--- a/tests/tcg/mips/user/ase/msa/int-compare/test_msa_cle_s_d.c
+++ b/tests/tcg/mips/user/ase/msa/int-compare/test_msa_cle_s_d.c
@@ -23,8 +23,8 @@
 #include <stdint.h>
 
 #include "../../../../include/wrappers_msa.h"
-#include "../../../../include/test_inputs.h"
-#include "../../../../include/test_utils.h"
+#include "../../../../include/test_inputs_128.h"
+#include "../../../../include/test_utils_128.h"
 
 #define TEST_COUNT_TOTAL (                                                \
             (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
diff --git a/tests/tcg/mips/user/ase/msa/int-compare/test_msa_cle_s_h.c b/tests/tcg/mips/user/ase/msa/int-compare/test_msa_cle_s_h.c
index 1dd23de..ed1a1e2 100644
--- a/tests/tcg/mips/user/ase/msa/int-compare/test_msa_cle_s_h.c
+++ b/tests/tcg/mips/user/ase/msa/int-compare/test_msa_cle_s_h.c
@@ -23,8 +23,8 @@
 #include <stdint.h>
 
 #include "../../../../include/wrappers_msa.h"
-#include "../../../../include/test_inputs.h"
-#include "../../../../include/test_utils.h"
+#include "../../../../include/test_inputs_128.h"
+#include "../../../../include/test_utils_128.h"
 
 #define TEST_COUNT_TOTAL (                                                \
             (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
diff --git a/tests/tcg/mips/user/ase/msa/int-compare/test_msa_cle_s_w.c b/tests/tcg/mips/user/ase/msa/int-compare/test_msa_cle_s_w.c
index 54c9696..ea4dc1a 100644
--- a/tests/tcg/mips/user/ase/msa/int-compare/test_msa_cle_s_w.c
+++ b/tests/tcg/mips/user/ase/msa/int-compare/test_msa_cle_s_w.c
@@ -23,8 +23,8 @@
 #include <stdint.h>
 
 #include "../../../../include/wrappers_msa.h"
-#include "../../../../include/test_inputs.h"
-#include "../../../../include/test_utils.h"
+#include "../../../../include/test_inputs_128.h"
+#include "../../../../include/test_utils_128.h"
 
 #define TEST_COUNT_TOTAL (                                                \
             (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
diff --git a/tests/tcg/mips/user/ase/msa/int-compare/test_msa_cle_u_b.c b/tests/tcg/mips/user/ase/msa/int-compare/test_msa_cle_u_b.c
index b8cc844..6e4fdd8 100644
--- a/tests/tcg/mips/user/ase/msa/int-compare/test_msa_cle_u_b.c
+++ b/tests/tcg/mips/user/ase/msa/int-compare/test_msa_cle_u_b.c
@@ -23,8 +23,8 @@
 #include <stdint.h>
 
 #include "../../../../include/wrappers_msa.h"
-#include "../../../../include/test_inputs.h"
-#include "../../../../include/test_utils.h"
+#include "../../../../include/test_inputs_128.h"
+#include "../../../../include/test_utils_128.h"
 
 #define TEST_COUNT_TOTAL (                                                \
             (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
diff --git a/tests/tcg/mips/user/ase/msa/int-compare/test_msa_cle_u_d.c b/tests/tcg/mips/user/ase/msa/int-compare/test_msa_cle_u_d.c
index e10e35f..b2b2f55 100644
--- a/tests/tcg/mips/user/ase/msa/int-compare/test_msa_cle_u_d.c
+++ b/tests/tcg/mips/user/ase/msa/int-compare/test_msa_cle_u_d.c
@@ -23,8 +23,8 @@
 #include <stdint.h>
 
 #include "../../../../include/wrappers_msa.h"
-#include "../../../../include/test_inputs.h"
-#include "../../../../include/test_utils.h"
+#include "../../../../include/test_inputs_128.h"
+#include "../../../../include/test_utils_128.h"
 
 #define TEST_COUNT_TOTAL (                                                \
             (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
diff --git a/tests/tcg/mips/user/ase/msa/int-compare/test_msa_cle_u_h.c b/tests/tcg/mips/user/ase/msa/int-compare/test_msa_cle_u_h.c
index af151f4..b226775 100644
--- a/tests/tcg/mips/user/ase/msa/int-compare/test_msa_cle_u_h.c
+++ b/tests/tcg/mips/user/ase/msa/int-compare/test_msa_cle_u_h.c
@@ -23,8 +23,8 @@
 #include <stdint.h>
 
 #include "../../../../include/wrappers_msa.h"
-#include "../../../../include/test_inputs.h"
-#include "../../../../include/test_utils.h"
+#include "../../../../include/test_inputs_128.h"
+#include "../../../../include/test_utils_128.h"
 
 #define TEST_COUNT_TOTAL (                                                \
             (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
diff --git a/tests/tcg/mips/user/ase/msa/int-compare/test_msa_cle_u_w.c b/tests/tcg/mips/user/ase/msa/int-compare/test_msa_cle_u_w.c
index 3ff612e..00e930c 100644
--- a/tests/tcg/mips/user/ase/msa/int-compare/test_msa_cle_u_w.c
+++ b/tests/tcg/mips/user/ase/msa/int-compare/test_msa_cle_u_w.c
@@ -23,8 +23,8 @@
 #include <stdint.h>
 
 #include "../../../../include/wrappers_msa.h"
-#include "../../../../include/test_inputs.h"
-#include "../../../../include/test_utils.h"
+#include "../../../../include/test_inputs_128.h"
+#include "../../../../include/test_utils_128.h"
 
 #define TEST_COUNT_TOTAL (                                                \
             (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
diff --git a/tests/tcg/mips/user/ase/msa/int-compare/test_msa_clt_s_b.c b/tests/tcg/mips/user/ase/msa/int-compare/test_msa_clt_s_b.c
index 32e6348..4a52ebe 100644
--- a/tests/tcg/mips/user/ase/msa/int-compare/test_msa_clt_s_b.c
+++ b/tests/tcg/mips/user/ase/msa/int-compare/test_msa_clt_s_b.c
@@ -23,8 +23,8 @@
 #include <stdint.h>
 
 #include "../../../../include/wrappers_msa.h"
-#include "../../../../include/test_inputs.h"
-#include "../../../../include/test_utils.h"
+#include "../../../../include/test_inputs_128.h"
+#include "../../../../include/test_utils_128.h"
 
 #define TEST_COUNT_TOTAL (                                                \
             (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
diff --git a/tests/tcg/mips/user/ase/msa/int-compare/test_msa_clt_s_d.c b/tests/tcg/mips/user/ase/msa/int-compare/test_msa_clt_s_d.c
index 39796cb..cc945cd 100644
--- a/tests/tcg/mips/user/ase/msa/int-compare/test_msa_clt_s_d.c
+++ b/tests/tcg/mips/user/ase/msa/int-compare/test_msa_clt_s_d.c
@@ -23,8 +23,8 @@
 #include <stdint.h>
 
 #include "../../../../include/wrappers_msa.h"
-#include "../../../../include/test_inputs.h"
-#include "../../../../include/test_utils.h"
+#include "../../../../include/test_inputs_128.h"
+#include "../../../../include/test_utils_128.h"
 
 #define TEST_COUNT_TOTAL (                                                \
             (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
diff --git a/tests/tcg/mips/user/ase/msa/int-compare/test_msa_clt_s_h.c b/tests/tcg/mips/user/ase/msa/int-compare/test_msa_clt_s_h.c
index ab9f6bc..b228dfe 100644
--- a/tests/tcg/mips/user/ase/msa/int-compare/test_msa_clt_s_h.c
+++ b/tests/tcg/mips/user/ase/msa/int-compare/test_msa_clt_s_h.c
@@ -23,8 +23,8 @@
 #include <stdint.h>
 
 #include "../../../../include/wrappers_msa.h"
-#include "../../../../include/test_inputs.h"
-#include "../../../../include/test_utils.h"
+#include "../../../../include/test_inputs_128.h"
+#include "../../../../include/test_utils_128.h"
 
 #define TEST_COUNT_TOTAL (                                                \
             (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
diff --git a/tests/tcg/mips/user/ase/msa/int-compare/test_msa_clt_s_w.c b/tests/tcg/mips/user/ase/msa/int-compare/test_msa_clt_s_w.c
index f7d0db4..6cb192a 100644
--- a/tests/tcg/mips/user/ase/msa/int-compare/test_msa_clt_s_w.c
+++ b/tests/tcg/mips/user/ase/msa/int-compare/test_msa_clt_s_w.c
@@ -23,8 +23,8 @@
 #include <stdint.h>
 
 #include "../../../../include/wrappers_msa.h"
-#include "../../../../include/test_inputs.h"
-#include "../../../../include/test_utils.h"
+#include "../../../../include/test_inputs_128.h"
+#include "../../../../include/test_utils_128.h"
 
 #define TEST_COUNT_TOTAL (                                                \
             (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
diff --git a/tests/tcg/mips/user/ase/msa/int-compare/test_msa_clt_u_b.c b/tests/tcg/mips/user/ase/msa/int-compare/test_msa_clt_u_b.c
index fc7a497..b6189d6 100644
--- a/tests/tcg/mips/user/ase/msa/int-compare/test_msa_clt_u_b.c
+++ b/tests/tcg/mips/user/ase/msa/int-compare/test_msa_clt_u_b.c
@@ -23,8 +23,8 @@
 #include <stdint.h>
 
 #include "../../../../include/wrappers_msa.h"
-#include "../../../../include/test_inputs.h"
-#include "../../../../include/test_utils.h"
+#include "../../../../include/test_inputs_128.h"
+#include "../../../../include/test_utils_128.h"
 
 #define TEST_COUNT_TOTAL (                                                \
             (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
diff --git a/tests/tcg/mips/user/ase/msa/int-compare/test_msa_clt_u_d.c b/tests/tcg/mips/user/ase/msa/int-compare/test_msa_clt_u_d.c
index 5072d09..4f547d8 100644
--- a/tests/tcg/mips/user/ase/msa/int-compare/test_msa_clt_u_d.c
+++ b/tests/tcg/mips/user/ase/msa/int-compare/test_msa_clt_u_d.c
@@ -23,8 +23,8 @@
 #include <stdint.h>
 
 #include "../../../../include/wrappers_msa.h"
-#include "../../../../include/test_inputs.h"
-#include "../../../../include/test_utils.h"
+#include "../../../../include/test_inputs_128.h"
+#include "../../../../include/test_utils_128.h"
 
 #define TEST_COUNT_TOTAL (                                                \
             (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
diff --git a/tests/tcg/mips/user/ase/msa/int-compare/test_msa_clt_u_h.c b/tests/tcg/mips/user/ase/msa/int-compare/test_msa_clt_u_h.c
index face857..9fcd81c 100644
--- a/tests/tcg/mips/user/ase/msa/int-compare/test_msa_clt_u_h.c
+++ b/tests/tcg/mips/user/ase/msa/int-compare/test_msa_clt_u_h.c
@@ -23,8 +23,8 @@
 #include <stdint.h>
 
 #include "../../../../include/wrappers_msa.h"
-#include "../../../../include/test_inputs.h"
-#include "../../../../include/test_utils.h"
+#include "../../../../include/test_inputs_128.h"
+#include "../../../../include/test_utils_128.h"
 
 #define TEST_COUNT_TOTAL (                                                \
             (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
diff --git a/tests/tcg/mips/user/ase/msa/int-compare/test_msa_clt_u_w.c b/tests/tcg/mips/user/ase/msa/int-compare/test_msa_clt_u_w.c
index bddda8a..8f648af 100644
--- a/tests/tcg/mips/user/ase/msa/int-compare/test_msa_clt_u_w.c
+++ b/tests/tcg/mips/user/ase/msa/int-compare/test_msa_clt_u_w.c
@@ -23,8 +23,8 @@
 #include <stdint.h>
 
 #include "../../../../include/wrappers_msa.h"
-#include "../../../../include/test_inputs.h"
-#include "../../../../include/test_utils.h"
+#include "../../../../include/test_inputs_128.h"
+#include "../../../../include/test_utils_128.h"
 
 #define TEST_COUNT_TOTAL (                                                \
             (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
diff --git a/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_a_b.c b/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_a_b.c
index c9e3bd5..5fa2644 100644
--- a/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_a_b.c
+++ b/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_a_b.c
@@ -23,8 +23,8 @@
 #include <stdint.h>
 
 #include "../../../../include/wrappers_msa.h"
-#include "../../../../include/test_inputs.h"
-#include "../../../../include/test_utils.h"
+#include "../../../../include/test_inputs_128.h"
+#include "../../../../include/test_utils_128.h"
 
 #define TEST_COUNT_TOTAL (                                                \
             (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
diff --git a/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_a_d.c b/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_a_d.c
index efe4569..9d97982 100644
--- a/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_a_d.c
+++ b/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_a_d.c
@@ -23,8 +23,8 @@
 #include <stdint.h>
 
 #include "../../../../include/wrappers_msa.h"
-#include "../../../../include/test_inputs.h"
-#include "../../../../include/test_utils.h"
+#include "../../../../include/test_inputs_128.h"
+#include "../../../../include/test_utils_128.h"
 
 #define TEST_COUNT_TOTAL (                                                \
             (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
diff --git a/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_a_h.c b/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_a_h.c
index e8cee19..3365f72 100644
--- a/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_a_h.c
+++ b/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_a_h.c
@@ -23,8 +23,8 @@
 #include <stdint.h>
 
 #include "../../../../include/wrappers_msa.h"
-#include "../../../../include/test_inputs.h"
-#include "../../../../include/test_utils.h"
+#include "../../../../include/test_inputs_128.h"
+#include "../../../../include/test_utils_128.h"
 
 #define TEST_COUNT_TOTAL (                                                \
             (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
diff --git a/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_a_w.c b/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_a_w.c
index 6f1eb68..b33f4b7 100644
--- a/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_a_w.c
+++ b/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_a_w.c
@@ -23,8 +23,8 @@
 #include <stdint.h>
 
 #include "../../../../include/wrappers_msa.h"
-#include "../../../../include/test_inputs.h"
-#include "../../../../include/test_utils.h"
+#include "../../../../include/test_inputs_128.h"
+#include "../../../../include/test_utils_128.h"
 
 #define TEST_COUNT_TOTAL (                                                \
             (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
diff --git a/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_s_b.c b/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_s_b.c
index c26ef59..71e571d 100644
--- a/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_s_b.c
+++ b/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_s_b.c
@@ -23,8 +23,8 @@
 #include <stdint.h>
 
 #include "../../../../include/wrappers_msa.h"
-#include "../../../../include/test_inputs.h"
-#include "../../../../include/test_utils.h"
+#include "../../../../include/test_inputs_128.h"
+#include "../../../../include/test_utils_128.h"
 
 #define TEST_COUNT_TOTAL (                                                \
             (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
diff --git a/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_s_d.c b/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_s_d.c
index b5407b0..e088ab9 100644
--- a/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_s_d.c
+++ b/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_s_d.c
@@ -23,8 +23,8 @@
 #include <stdint.h>
 
 #include "../../../../include/wrappers_msa.h"
-#include "../../../../include/test_inputs.h"
-#include "../../../../include/test_utils.h"
+#include "../../../../include/test_inputs_128.h"
+#include "../../../../include/test_utils_128.h"
 
 #define TEST_COUNT_TOTAL (                                                \
             (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
diff --git a/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_s_h.c b/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_s_h.c
index 8c3d58c..6d1b81a 100644
--- a/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_s_h.c
+++ b/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_s_h.c
@@ -23,8 +23,8 @@
 #include <stdint.h>
 
 #include "../../../../include/wrappers_msa.h"
-#include "../../../../include/test_inputs.h"
-#include "../../../../include/test_utils.h"
+#include "../../../../include/test_inputs_128.h"
+#include "../../../../include/test_utils_128.h"
 
 #define TEST_COUNT_TOTAL (                                                \
             (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
diff --git a/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_s_w.c b/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_s_w.c
index aa22faf..bd64294 100644
--- a/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_s_w.c
+++ b/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_s_w.c
@@ -23,8 +23,8 @@
 #include <stdint.h>
 
 #include "../../../../include/wrappers_msa.h"
-#include "../../../../include/test_inputs.h"
-#include "../../../../include/test_utils.h"
+#include "../../../../include/test_inputs_128.h"
+#include "../../../../include/test_utils_128.h"
 
 #define TEST_COUNT_TOTAL (                                                \
             (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
diff --git a/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_u_b.c b/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_u_b.c
index 5e648dc..206d907 100644
--- a/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_u_b.c
+++ b/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_u_b.c
@@ -23,8 +23,8 @@
 #include <stdint.h>
 
 #include "../../../../include/wrappers_msa.h"
-#include "../../../../include/test_inputs.h"
-#include "../../../../include/test_utils.h"
+#include "../../../../include/test_inputs_128.h"
+#include "../../../../include/test_utils_128.h"
 
 #define TEST_COUNT_TOTAL (                                                \
             (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
diff --git a/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_u_d.c b/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_u_d.c
index 17067d3..4dd247f 100644
--- a/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_u_d.c
+++ b/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_u_d.c
@@ -23,8 +23,8 @@
 #include <stdint.h>
 
 #include "../../../../include/wrappers_msa.h"
-#include "../../../../include/test_inputs.h"
-#include "../../../../include/test_utils.h"
+#include "../../../../include/test_inputs_128.h"
+#include "../../../../include/test_utils_128.h"
 
 #define TEST_COUNT_TOTAL (                                                \
             (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
diff --git a/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_u_h.c b/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_u_h.c
index 8bf11a0..0e6a765 100644
--- a/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_u_h.c
+++ b/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_u_h.c
@@ -23,8 +23,8 @@
 #include <stdint.h>
 
 #include "../../../../include/wrappers_msa.h"
-#include "../../../../include/test_inputs.h"
-#include "../../../../include/test_utils.h"
+#include "../../../../include/test_inputs_128.h"
+#include "../../../../include/test_utils_128.h"
 
 #define TEST_COUNT_TOTAL (                                                \
             (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
diff --git a/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_u_w.c b/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_u_w.c
index 6eecc46..db61440 100644
--- a/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_u_w.c
+++ b/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_max_u_w.c
@@ -23,8 +23,8 @@
 #include <stdint.h>
 
 #include "../../../../include/wrappers_msa.h"
-#include "../../../../include/test_inputs.h"
-#include "../../../../include/test_utils.h"
+#include "../../../../include/test_inputs_128.h"
+#include "../../../../include/test_utils_128.h"
 
 #define TEST_COUNT_TOTAL (                                                \
             (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
diff --git a/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_a_b.c b/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_a_b.c
index 48026a2..d2a93a2 100644
--- a/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_a_b.c
+++ b/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_a_b.c
@@ -23,8 +23,8 @@
 #include <stdint.h>
 
 #include "../../../../include/wrappers_msa.h"
-#include "../../../../include/test_inputs.h"
-#include "../../../../include/test_utils.h"
+#include "../../../../include/test_inputs_128.h"
+#include "../../../../include/test_utils_128.h"
 
 #define TEST_COUNT_TOTAL (                                                \
             (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
diff --git a/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_a_d.c b/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_a_d.c
index 5f65fb4..69fd3c7 100644
--- a/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_a_d.c
+++ b/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_a_d.c
@@ -23,8 +23,8 @@
 #include <stdint.h>
 
 #include "../../../../include/wrappers_msa.h"
-#include "../../../../include/test_inputs.h"
-#include "../../../../include/test_utils.h"
+#include "../../../../include/test_inputs_128.h"
+#include "../../../../include/test_utils_128.h"
 
 #define TEST_COUNT_TOTAL (                                                \
             (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
diff --git a/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_a_h.c b/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_a_h.c
index a2eb7fa..9f45b55 100644
--- a/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_a_h.c
+++ b/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_a_h.c
@@ -23,8 +23,8 @@
 #include <stdint.h>
 
 #include "../../../../include/wrappers_msa.h"
-#include "../../../../include/test_inputs.h"
-#include "../../../../include/test_utils.h"
+#include "../../../../include/test_inputs_128.h"
+#include "../../../../include/test_utils_128.h"
 
 #define TEST_COUNT_TOTAL (                                                \
             (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
diff --git a/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_a_w.c b/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_a_w.c
index ca1acfb..b08231d 100644
--- a/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_a_w.c
+++ b/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_a_w.c
@@ -23,8 +23,8 @@
 #include <stdint.h>
 
 #include "../../../../include/wrappers_msa.h"
-#include "../../../../include/test_inputs.h"
-#include "../../../../include/test_utils.h"
+#include "../../../../include/test_inputs_128.h"
+#include "../../../../include/test_utils_128.h"
 
 #define TEST_COUNT_TOTAL (                                                \
             (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
diff --git a/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_s_b.c b/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_s_b.c
index ce56619..80b5201 100644
--- a/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_s_b.c
+++ b/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_s_b.c
@@ -23,8 +23,8 @@
 #include <stdint.h>
 
 #include "../../../../include/wrappers_msa.h"
-#include "../../../../include/test_inputs.h"
-#include "../../../../include/test_utils.h"
+#include "../../../../include/test_inputs_128.h"
+#include "../../../../include/test_utils_128.h"
 
 #define TEST_COUNT_TOTAL (                                                \
             (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
diff --git a/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_s_d.c b/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_s_d.c
index d775889..0ed3190 100644
--- a/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_s_d.c
+++ b/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_s_d.c
@@ -23,8 +23,8 @@
 #include <stdint.h>
 
 #include "../../../../include/wrappers_msa.h"
-#include "../../../../include/test_inputs.h"
-#include "../../../../include/test_utils.h"
+#include "../../../../include/test_inputs_128.h"
+#include "../../../../include/test_utils_128.h"
 
 #define TEST_COUNT_TOTAL (                                                \
             (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
diff --git a/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_s_h.c b/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_s_h.c
index 5a984d3..b049054 100644
--- a/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_s_h.c
+++ b/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_s_h.c
@@ -23,8 +23,8 @@
 #include <stdint.h>
 
 #include "../../../../include/wrappers_msa.h"
-#include "../../../../include/test_inputs.h"
-#include "../../../../include/test_utils.h"
+#include "../../../../include/test_inputs_128.h"
+#include "../../../../include/test_utils_128.h"
 
 #define TEST_COUNT_TOTAL (                                                \
             (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
diff --git a/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_s_w.c b/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_s_w.c
index 9e6ee5a..2bcd0a0 100644
--- a/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_s_w.c
+++ b/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_s_w.c
@@ -23,8 +23,8 @@
 #include <stdint.h>
 
 #include "../../../../include/wrappers_msa.h"
-#include "../../../../include/test_inputs.h"
-#include "../../../../include/test_utils.h"
+#include "../../../../include/test_inputs_128.h"
+#include "../../../../include/test_utils_128.h"
 
 #define TEST_COUNT_TOTAL (                                                \
             (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
diff --git a/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_u_b.c b/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_u_b.c
index 57b702d..2a06b43 100644
--- a/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_u_b.c
+++ b/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_u_b.c
@@ -23,8 +23,8 @@
 #include <stdint.h>
 
 #include "../../../../include/wrappers_msa.h"
-#include "../../../../include/test_inputs.h"
-#include "../../../../include/test_utils.h"
+#include "../../../../include/test_inputs_128.h"
+#include "../../../../include/test_utils_128.h"
 
 #define TEST_COUNT_TOTAL (                                                \
             (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
diff --git a/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_u_d.c b/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_u_d.c
index f2f98ac..37924f3 100644
--- a/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_u_d.c
+++ b/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_u_d.c
@@ -23,8 +23,8 @@
 #include <stdint.h>
 
 #include "../../../../include/wrappers_msa.h"
-#include "../../../../include/test_inputs.h"
-#include "../../../../include/test_utils.h"
+#include "../../../../include/test_inputs_128.h"
+#include "../../../../include/test_utils_128.h"
 
 #define TEST_COUNT_TOTAL (                                                \
             (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
diff --git a/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_u_h.c b/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_u_h.c
index b89ba3b..1846995 100644
--- a/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_u_h.c
+++ b/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_u_h.c
@@ -23,8 +23,8 @@
 #include <stdint.h>
 
 #include "../../../../include/wrappers_msa.h"
-#include "../../../../include/test_inputs.h"
-#include "../../../../include/test_utils.h"
+#include "../../../../include/test_inputs_128.h"
+#include "../../../../include/test_utils_128.h"
 
 #define TEST_COUNT_TOTAL (                                                \
             (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
diff --git a/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_u_w.c b/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_u_w.c
index 20992b3..8b20c05 100644
--- a/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_u_w.c
+++ b/tests/tcg/mips/user/ase/msa/int-max-min/test_msa_min_u_w.c
@@ -23,8 +23,8 @@
 #include <stdint.h>
 
 #include "../../../../include/wrappers_msa.h"
-#include "../../../../include/test_inputs.h"
-#include "../../../../include/test_utils.h"
+#include "../../../../include/test_inputs_128.h"
+#include "../../../../include/test_utils_128.h"
 
 #define TEST_COUNT_TOTAL (                                                \
             (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
diff --git a/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvev_b.c b/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvev_b.c
index 5690c5c..d720dc3 100644
--- a/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvev_b.c
+++ b/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvev_b.c
@@ -23,8 +23,8 @@
 #include <stdint.h>
 
 #include "../../../../include/wrappers_msa.h"
-#include "../../../../include/test_inputs.h"
-#include "../../../../include/test_utils.h"
+#include "../../../../include/test_inputs_128.h"
+#include "../../../../include/test_utils_128.h"
 
 #define TEST_COUNT_TOTAL (                                                \
             (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
diff --git a/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvev_d.c b/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvev_d.c
index a8b1a0a..8323994 100644
--- a/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvev_d.c
+++ b/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvev_d.c
@@ -23,8 +23,8 @@
 #include <stdint.h>
 
 #include "../../../../include/wrappers_msa.h"
-#include "../../../../include/test_inputs.h"
-#include "../../../../include/test_utils.h"
+#include "../../../../include/test_inputs_128.h"
+#include "../../../../include/test_utils_128.h"
 
 #define TEST_COUNT_TOTAL (                                                \
             (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
diff --git a/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvev_h.c b/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvev_h.c
index 5bd7189..3f6fc26 100644
--- a/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvev_h.c
+++ b/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvev_h.c
@@ -23,8 +23,8 @@
 #include <stdint.h>
 
 #include "../../../../include/wrappers_msa.h"
-#include "../../../../include/test_inputs.h"
-#include "../../../../include/test_utils.h"
+#include "../../../../include/test_inputs_128.h"
+#include "../../../../include/test_utils_128.h"
 
 #define TEST_COUNT_TOTAL (                                                \
             (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
diff --git a/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvev_w.c b/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvev_w.c
index ecb3ded..30d2e38 100644
--- a/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvev_w.c
+++ b/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvev_w.c
@@ -23,8 +23,8 @@
 #include <stdint.h>
 
 #include "../../../../include/wrappers_msa.h"
-#include "../../../../include/test_inputs.h"
-#include "../../../../include/test_utils.h"
+#include "../../../../include/test_inputs_128.h"
+#include "../../../../include/test_utils_128.h"
 
 #define TEST_COUNT_TOTAL (                                                \
             (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
diff --git a/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvl_b.c b/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvl_b.c
index acf0ebf..c771287 100644
--- a/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvl_b.c
+++ b/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvl_b.c
@@ -23,8 +23,8 @@
 #include <stdint.h>
 
 #include "../../../../include/wrappers_msa.h"
-#include "../../../../include/test_inputs.h"
-#include "../../../../include/test_utils.h"
+#include "../../../../include/test_inputs_128.h"
+#include "../../../../include/test_utils_128.h"
 
 #define TEST_COUNT_TOTAL (                                                \
             (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
diff --git a/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvl_d.c b/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvl_d.c
index ef31f0d..b7d5fcd 100644
--- a/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvl_d.c
+++ b/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvl_d.c
@@ -23,8 +23,8 @@
 #include <stdint.h>
 
 #include "../../../../include/wrappers_msa.h"
-#include "../../../../include/test_inputs.h"
-#include "../../../../include/test_utils.h"
+#include "../../../../include/test_inputs_128.h"
+#include "../../../../include/test_utils_128.h"
 
 #define TEST_COUNT_TOTAL (                                                \
             (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
diff --git a/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvl_h.c b/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvl_h.c
index dc4066b..af72876 100644
--- a/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvl_h.c
+++ b/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvl_h.c
@@ -23,8 +23,8 @@
 #include <stdint.h>
 
 #include "../../../../include/wrappers_msa.h"
-#include "../../../../include/test_inputs.h"
-#include "../../../../include/test_utils.h"
+#include "../../../../include/test_inputs_128.h"
+#include "../../../../include/test_utils_128.h"
 
 #define TEST_COUNT_TOTAL (                                                \
             (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
diff --git a/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvl_w.c b/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvl_w.c
index 68e5562..e06c9d9 100644
--- a/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvl_w.c
+++ b/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvl_w.c
@@ -23,8 +23,8 @@
 #include <stdint.h>
 
 #include "../../../../include/wrappers_msa.h"
-#include "../../../../include/test_inputs.h"
-#include "../../../../include/test_utils.h"
+#include "../../../../include/test_inputs_128.h"
+#include "../../../../include/test_utils_128.h"
 
 #define TEST_COUNT_TOTAL (                                                \
             (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
diff --git a/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvod_b.c b/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvod_b.c
index 8923caf..8e7f1c4 100644
--- a/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvod_b.c
+++ b/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvod_b.c
@@ -23,8 +23,8 @@
 #include <stdint.h>
 
 #include "../../../../include/wrappers_msa.h"
-#include "../../../../include/test_inputs.h"
-#include "../../../../include/test_utils.h"
+#include "../../../../include/test_inputs_128.h"
+#include "../../../../include/test_utils_128.h"
 
 #define TEST_COUNT_TOTAL (                                                \
             (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
diff --git a/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvod_d.c b/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvod_d.c
index 1580080..acbd94a 100644
--- a/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvod_d.c
+++ b/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvod_d.c
@@ -23,8 +23,8 @@
 #include <stdint.h>
 
 #include "../../../../include/wrappers_msa.h"
-#include "../../../../include/test_inputs.h"
-#include "../../../../include/test_utils.h"
+#include "../../../../include/test_inputs_128.h"
+#include "../../../../include/test_utils_128.h"
 
 #define TEST_COUNT_TOTAL (                                                \
             (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
diff --git a/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvod_h.c b/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvod_h.c
index 32c2a4e..8a82def4 100644
--- a/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvod_h.c
+++ b/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvod_h.c
@@ -23,8 +23,8 @@
 #include <stdint.h>
 
 #include "../../../../include/wrappers_msa.h"
-#include "../../../../include/test_inputs.h"
-#include "../../../../include/test_utils.h"
+#include "../../../../include/test_inputs_128.h"
+#include "../../../../include/test_utils_128.h"
 
 #define TEST_COUNT_TOTAL (                                                \
             (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
diff --git a/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvod_w.c b/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvod_w.c
index 7f65239..e19170c 100644
--- a/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvod_w.c
+++ b/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvod_w.c
@@ -23,8 +23,8 @@
 #include <stdint.h>
 
 #include "../../../../include/wrappers_msa.h"
-#include "../../../../include/test_inputs.h"
-#include "../../../../include/test_utils.h"
+#include "../../../../include/test_inputs_128.h"
+#include "../../../../include/test_utils_128.h"
 
 #define TEST_COUNT_TOTAL (                                                \
             (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
diff --git a/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvr_b.c b/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvr_b.c
index ddf2eef..1e519e6 100644
--- a/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvr_b.c
+++ b/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvr_b.c
@@ -23,8 +23,8 @@
 #include <stdint.h>
 
 #include "../../../../include/wrappers_msa.h"
-#include "../../../../include/test_inputs.h"
-#include "../../../../include/test_utils.h"
+#include "../../../../include/test_inputs_128.h"
+#include "../../../../include/test_utils_128.h"
 
 #define TEST_COUNT_TOTAL (                                                \
             (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
diff --git a/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvr_d.c b/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvr_d.c
index 898b4e3..be76043 100644
--- a/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvr_d.c
+++ b/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvr_d.c
@@ -23,8 +23,8 @@
 #include <stdint.h>
 
 #include "../../../../include/wrappers_msa.h"
-#include "../../../../include/test_inputs.h"
-#include "../../../../include/test_utils.h"
+#include "../../../../include/test_inputs_128.h"
+#include "../../../../include/test_utils_128.h"
 
 #define TEST_COUNT_TOTAL (                                                \
             (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
diff --git a/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvr_h.c b/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvr_h.c
index 3295ed8..cbd4685 100644
--- a/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvr_h.c
+++ b/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvr_h.c
@@ -23,8 +23,8 @@
 #include <stdint.h>
 
 #include "../../../../include/wrappers_msa.h"
-#include "../../../../include/test_inputs.h"
-#include "../../../../include/test_utils.h"
+#include "../../../../include/test_inputs_128.h"
+#include "../../../../include/test_utils_128.h"
 
 #define TEST_COUNT_TOTAL (                                                \
             (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
diff --git a/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvr_w.c b/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvr_w.c
index 2c1ebc7..5f4cfd0 100644
--- a/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvr_w.c
+++ b/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvr_w.c
@@ -23,8 +23,8 @@
 #include <stdint.h>
 
 #include "../../../../include/wrappers_msa.h"
-#include "../../../../include/test_inputs.h"
-#include "../../../../include/test_utils.h"
+#include "../../../../include/test_inputs_128.h"
+#include "../../../../include/test_utils_128.h"
 
 #define TEST_COUNT_TOTAL (                                                \
             (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
diff --git a/tests/tcg/mips/user/ase/msa/logic/test_msa_and_v.c b/tests/tcg/mips/user/ase/msa/logic/test_msa_and_v.c
index 42479ef..534c420 100644
--- a/tests/tcg/mips/user/ase/msa/logic/test_msa_and_v.c
+++ b/tests/tcg/mips/user/ase/msa/logic/test_msa_and_v.c
@@ -23,8 +23,8 @@
 #include <stdint.h>
 
 #include "../../../../include/wrappers_msa.h"
-#include "../../../../include/test_inputs.h"
-#include "../../../../include/test_utils.h"
+#include "../../../../include/test_inputs_128.h"
+#include "../../../../include/test_utils_128.h"
 
 #define TEST_COUNT_TOTAL (                                                \
             (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
diff --git a/tests/tcg/mips/user/ase/msa/logic/test_msa_nor_v.c b/tests/tcg/mips/user/ase/msa/logic/test_msa_nor_v.c
index a956e03..f781a8b 100644
--- a/tests/tcg/mips/user/ase/msa/logic/test_msa_nor_v.c
+++ b/tests/tcg/mips/user/ase/msa/logic/test_msa_nor_v.c
@@ -23,8 +23,8 @@
 #include <stdint.h>
 
 #include "../../../../include/wrappers_msa.h"
-#include "../../../../include/test_inputs.h"
-#include "../../../../include/test_utils.h"
+#include "../../../../include/test_inputs_128.h"
+#include "../../../../include/test_utils_128.h"
 
 #define TEST_COUNT_TOTAL (                                                \
             (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
diff --git a/tests/tcg/mips/user/ase/msa/logic/test_msa_or_v.c b/tests/tcg/mips/user/ase/msa/logic/test_msa_or_v.c
index 46ac112..924f216 100644
--- a/tests/tcg/mips/user/ase/msa/logic/test_msa_or_v.c
+++ b/tests/tcg/mips/user/ase/msa/logic/test_msa_or_v.c
@@ -23,8 +23,8 @@
 #include <stdint.h>
 
 #include "../../../../include/wrappers_msa.h"
-#include "../../../../include/test_inputs.h"
-#include "../../../../include/test_utils.h"
+#include "../../../../include/test_inputs_128.h"
+#include "../../../../include/test_utils_128.h"
 
 #define TEST_COUNT_TOTAL (                                                \
             (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
diff --git a/tests/tcg/mips/user/ase/msa/logic/test_msa_xor_v.c b/tests/tcg/mips/user/ase/msa/logic/test_msa_xor_v.c
index dd3668c..f0442e6 100644
--- a/tests/tcg/mips/user/ase/msa/logic/test_msa_xor_v.c
+++ b/tests/tcg/mips/user/ase/msa/logic/test_msa_xor_v.c
@@ -23,8 +23,8 @@
 #include <stdint.h>
 
 #include "../../../../include/wrappers_msa.h"
-#include "../../../../include/test_inputs.h"
-#include "../../../../include/test_utils.h"
+#include "../../../../include/test_inputs_128.h"
+#include "../../../../include/test_utils_128.h"
 
 #define TEST_COUNT_TOTAL (                                                \
             (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
diff --git a/tests/tcg/mips/user/ase/msa/pack/test_msa_pckev_b.c b/tests/tcg/mips/user/ase/msa/pack/test_msa_pckev_b.c
index ee1aa5d..409773d 100644
--- a/tests/tcg/mips/user/ase/msa/pack/test_msa_pckev_b.c
+++ b/tests/tcg/mips/user/ase/msa/pack/test_msa_pckev_b.c
@@ -23,8 +23,8 @@
 #include <stdint.h>
 
 #include "../../../../include/wrappers_msa.h"
-#include "../../../../include/test_inputs.h"
-#include "../../../../include/test_utils.h"
+#include "../../../../include/test_inputs_128.h"
+#include "../../../../include/test_utils_128.h"
 
 #define TEST_COUNT_TOTAL (                                                \
             (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
diff --git a/tests/tcg/mips/user/ase/msa/pack/test_msa_pckev_d.c b/tests/tcg/mips/user/ase/msa/pack/test_msa_pckev_d.c
index 5df658a..8e89716 100644
--- a/tests/tcg/mips/user/ase/msa/pack/test_msa_pckev_d.c
+++ b/tests/tcg/mips/user/ase/msa/pack/test_msa_pckev_d.c
@@ -23,8 +23,8 @@
 #include <stdint.h>
 
 #include "../../../../include/wrappers_msa.h"
-#include "../../../../include/test_inputs.h"
-#include "../../../../include/test_utils.h"
+#include "../../../../include/test_inputs_128.h"
+#include "../../../../include/test_utils_128.h"
 
 #define TEST_COUNT_TOTAL (                                                \
             (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
diff --git a/tests/tcg/mips/user/ase/msa/pack/test_msa_pckev_h.c b/tests/tcg/mips/user/ase/msa/pack/test_msa_pckev_h.c
index 90a5123..b389587 100644
--- a/tests/tcg/mips/user/ase/msa/pack/test_msa_pckev_h.c
+++ b/tests/tcg/mips/user/ase/msa/pack/test_msa_pckev_h.c
@@ -23,8 +23,8 @@
 #include <stdint.h>
 
 #include "../../../../include/wrappers_msa.h"
-#include "../../../../include/test_inputs.h"
-#include "../../../../include/test_utils.h"
+#include "../../../../include/test_inputs_128.h"
+#include "../../../../include/test_utils_128.h"
 
 #define TEST_COUNT_TOTAL (                                                \
             (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
diff --git a/tests/tcg/mips/user/ase/msa/pack/test_msa_pckev_w.c b/tests/tcg/mips/user/ase/msa/pack/test_msa_pckev_w.c
index 364b835..d393ad50 100644
--- a/tests/tcg/mips/user/ase/msa/pack/test_msa_pckev_w.c
+++ b/tests/tcg/mips/user/ase/msa/pack/test_msa_pckev_w.c
@@ -23,8 +23,8 @@
 #include <stdint.h>
 
 #include "../../../../include/wrappers_msa.h"
-#include "../../../../include/test_inputs.h"
-#include "../../../../include/test_utils.h"
+#include "../../../../include/test_inputs_128.h"
+#include "../../../../include/test_utils_128.h"
 
 #define TEST_COUNT_TOTAL (                                                \
             (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
diff --git a/tests/tcg/mips/user/ase/msa/pack/test_msa_pckod_b.c b/tests/tcg/mips/user/ase/msa/pack/test_msa_pckod_b.c
index e637237..ab363a0 100644
--- a/tests/tcg/mips/user/ase/msa/pack/test_msa_pckod_b.c
+++ b/tests/tcg/mips/user/ase/msa/pack/test_msa_pckod_b.c
@@ -23,8 +23,8 @@
 #include <stdint.h>
 
 #include "../../../../include/wrappers_msa.h"
-#include "../../../../include/test_inputs.h"
-#include "../../../../include/test_utils.h"
+#include "../../../../include/test_inputs_128.h"
+#include "../../../../include/test_utils_128.h"
 
 #define TEST_COUNT_TOTAL (                                                \
             (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
diff --git a/tests/tcg/mips/user/ase/msa/pack/test_msa_pckod_d.c b/tests/tcg/mips/user/ase/msa/pack/test_msa_pckod_d.c
index d0b17f4..09a6140 100644
--- a/tests/tcg/mips/user/ase/msa/pack/test_msa_pckod_d.c
+++ b/tests/tcg/mips/user/ase/msa/pack/test_msa_pckod_d.c
@@ -23,8 +23,8 @@
 #include <stdint.h>
 
 #include "../../../../include/wrappers_msa.h"
-#include "../../../../include/test_inputs.h"
-#include "../../../../include/test_utils.h"
+#include "../../../../include/test_inputs_128.h"
+#include "../../../../include/test_utils_128.h"
 
 #define TEST_COUNT_TOTAL (                                                \
             (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
diff --git a/tests/tcg/mips/user/ase/msa/pack/test_msa_pckod_h.c b/tests/tcg/mips/user/ase/msa/pack/test_msa_pckod_h.c
index 034c9e8..d7a8c5b 100644
--- a/tests/tcg/mips/user/ase/msa/pack/test_msa_pckod_h.c
+++ b/tests/tcg/mips/user/ase/msa/pack/test_msa_pckod_h.c
@@ -23,8 +23,8 @@
 #include <stdint.h>
 
 #include "../../../../include/wrappers_msa.h"
-#include "../../../../include/test_inputs.h"
-#include "../../../../include/test_utils.h"
+#include "../../../../include/test_inputs_128.h"
+#include "../../../../include/test_utils_128.h"
 
 #define TEST_COUNT_TOTAL (                                                \
             (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
diff --git a/tests/tcg/mips/user/ase/msa/pack/test_msa_pckod_w.c b/tests/tcg/mips/user/ase/msa/pack/test_msa_pckod_w.c
index 2ff1c36..4b732d0 100644
--- a/tests/tcg/mips/user/ase/msa/pack/test_msa_pckod_w.c
+++ b/tests/tcg/mips/user/ase/msa/pack/test_msa_pckod_w.c
@@ -23,8 +23,8 @@
 #include <stdint.h>
 
 #include "../../../../include/wrappers_msa.h"
-#include "../../../../include/test_inputs.h"
-#include "../../../../include/test_utils.h"
+#include "../../../../include/test_inputs_128.h"
+#include "../../../../include/test_utils_128.h"
 
 #define TEST_COUNT_TOTAL (                                                \
             (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
diff --git a/tests/tcg/mips/user/ase/msa/pack/test_msa_vshf_b.c b/tests/tcg/mips/user/ase/msa/pack/test_msa_vshf_b.c
index 1f4853a..d9ccf57 100644
--- a/tests/tcg/mips/user/ase/msa/pack/test_msa_vshf_b.c
+++ b/tests/tcg/mips/user/ase/msa/pack/test_msa_vshf_b.c
@@ -23,8 +23,8 @@
 #include <stdint.h>
 
 #include "../../../../include/wrappers_msa.h"
-#include "../../../../include/test_inputs.h"
-#include "../../../../include/test_utils.h"
+#include "../../../../include/test_inputs_128.h"
+#include "../../../../include/test_utils_128.h"
 
 #define TEST_COUNT_TOTAL (                                                \
             (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
diff --git a/tests/tcg/mips/user/ase/msa/pack/test_msa_vshf_d.c b/tests/tcg/mips/user/ase/msa/pack/test_msa_vshf_d.c
index 0c42d27..6c555fb 100644
--- a/tests/tcg/mips/user/ase/msa/pack/test_msa_vshf_d.c
+++ b/tests/tcg/mips/user/ase/msa/pack/test_msa_vshf_d.c
@@ -23,8 +23,8 @@
 #include <stdint.h>
 
 #include "../../../../include/wrappers_msa.h"
-#include "../../../../include/test_inputs.h"
-#include "../../../../include/test_utils.h"
+#include "../../../../include/test_inputs_128.h"
+#include "../../../../include/test_utils_128.h"
 
 #define TEST_COUNT_TOTAL (                                                \
             (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
diff --git a/tests/tcg/mips/user/ase/msa/pack/test_msa_vshf_h.c b/tests/tcg/mips/user/ase/msa/pack/test_msa_vshf_h.c
index f3f0e93..9dfcb51 100644
--- a/tests/tcg/mips/user/ase/msa/pack/test_msa_vshf_h.c
+++ b/tests/tcg/mips/user/ase/msa/pack/test_msa_vshf_h.c
@@ -23,8 +23,8 @@
 #include <stdint.h>
 
 #include "../../../../include/wrappers_msa.h"
-#include "../../../../include/test_inputs.h"
-#include "../../../../include/test_utils.h"
+#include "../../../../include/test_inputs_128.h"
+#include "../../../../include/test_utils_128.h"
 
 #define TEST_COUNT_TOTAL (                                                \
             (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
diff --git a/tests/tcg/mips/user/ase/msa/pack/test_msa_vshf_w.c b/tests/tcg/mips/user/ase/msa/pack/test_msa_vshf_w.c
index c5f2026..97074c0 100644
--- a/tests/tcg/mips/user/ase/msa/pack/test_msa_vshf_w.c
+++ b/tests/tcg/mips/user/ase/msa/pack/test_msa_vshf_w.c
@@ -23,8 +23,8 @@
 #include <stdint.h>
 
 #include "../../../../include/wrappers_msa.h"
-#include "../../../../include/test_inputs.h"
-#include "../../../../include/test_utils.h"
+#include "../../../../include/test_inputs_128.h"
+#include "../../../../include/test_utils_128.h"
 
 #define TEST_COUNT_TOTAL (                                                \
             (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [Qemu-devel] [PULL 3/7] target/mips: Add tests for a variety of MSA integer average instructions
  2019-03-11 14:24 [Qemu-devel] [PULL 0/7] MIPS queue for March 11th, 2019 Aleksandar Markovic
  2019-03-11 14:24 ` [Qemu-devel] [PULL 1/7] tests/tcg: target/mips: Correct preambles of test source files Aleksandar Markovic
  2019-03-11 14:24 ` [Qemu-devel] [PULL 2/7] tests/tcg: target/mips: Rename two header files for consistency Aleksandar Markovic
@ 2019-03-11 14:24 ` Aleksandar Markovic
  2019-03-11 14:24 ` [Qemu-devel] [PULL 4/7] target/mips: Add tests for a variety of MSA integer divide instructions Aleksandar Markovic
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Aleksandar Markovic @ 2019-03-11 14:24 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell, amarkovic

From: Mateja Marjanovic <Mateja.Marjanovic@rt-rk.com>

Add tests for a variety of MSA integer average instructions.

Signed-off-by: Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com>
Reviewed-by: Aleksandar Markovic <amarkovic@wavecomp.com>
Message-Id: <1551964929-17845-2-git-send-email-mateja.marjanovic@rt-rk.com>
---
 .../user/ase/msa/int-average/test_msa_ave_s_b.c    | 151 +++++++++++++++++++++
 .../user/ase/msa/int-average/test_msa_ave_s_d.c    | 151 +++++++++++++++++++++
 .../user/ase/msa/int-average/test_msa_ave_s_h.c    | 151 +++++++++++++++++++++
 .../user/ase/msa/int-average/test_msa_ave_s_w.c    | 151 +++++++++++++++++++++
 .../user/ase/msa/int-average/test_msa_ave_u_b.c    | 151 +++++++++++++++++++++
 .../user/ase/msa/int-average/test_msa_ave_u_d.c    | 151 +++++++++++++++++++++
 .../user/ase/msa/int-average/test_msa_ave_u_h.c    | 151 +++++++++++++++++++++
 .../user/ase/msa/int-average/test_msa_ave_u_w.c    | 151 +++++++++++++++++++++
 .../user/ase/msa/int-average/test_msa_aver_s_b.c   | 151 +++++++++++++++++++++
 .../user/ase/msa/int-average/test_msa_aver_s_d.c   | 151 +++++++++++++++++++++
 .../user/ase/msa/int-average/test_msa_aver_s_h.c   | 151 +++++++++++++++++++++
 .../user/ase/msa/int-average/test_msa_aver_s_w.c   | 151 +++++++++++++++++++++
 .../user/ase/msa/int-average/test_msa_aver_u_b.c   | 151 +++++++++++++++++++++
 .../user/ase/msa/int-average/test_msa_aver_u_d.c   | 151 +++++++++++++++++++++
 .../user/ase/msa/int-average/test_msa_aver_u_h.c   | 151 +++++++++++++++++++++
 .../user/ase/msa/int-average/test_msa_aver_u_w.c   | 151 +++++++++++++++++++++
 16 files changed, 2416 insertions(+)
 create mode 100644 tests/tcg/mips/user/ase/msa/int-average/test_msa_ave_s_b.c
 create mode 100644 tests/tcg/mips/user/ase/msa/int-average/test_msa_ave_s_d.c
 create mode 100644 tests/tcg/mips/user/ase/msa/int-average/test_msa_ave_s_h.c
 create mode 100644 tests/tcg/mips/user/ase/msa/int-average/test_msa_ave_s_w.c
 create mode 100644 tests/tcg/mips/user/ase/msa/int-average/test_msa_ave_u_b.c
 create mode 100644 tests/tcg/mips/user/ase/msa/int-average/test_msa_ave_u_d.c
 create mode 100644 tests/tcg/mips/user/ase/msa/int-average/test_msa_ave_u_h.c
 create mode 100644 tests/tcg/mips/user/ase/msa/int-average/test_msa_ave_u_w.c
 create mode 100644 tests/tcg/mips/user/ase/msa/int-average/test_msa_aver_s_b.c
 create mode 100644 tests/tcg/mips/user/ase/msa/int-average/test_msa_aver_s_d.c
 create mode 100644 tests/tcg/mips/user/ase/msa/int-average/test_msa_aver_s_h.c
 create mode 100644 tests/tcg/mips/user/ase/msa/int-average/test_msa_aver_s_w.c
 create mode 100644 tests/tcg/mips/user/ase/msa/int-average/test_msa_aver_u_b.c
 create mode 100644 tests/tcg/mips/user/ase/msa/int-average/test_msa_aver_u_d.c
 create mode 100644 tests/tcg/mips/user/ase/msa/int-average/test_msa_aver_u_h.c
 create mode 100644 tests/tcg/mips/user/ase/msa/int-average/test_msa_aver_u_w.c

diff --git a/tests/tcg/mips/user/ase/msa/int-average/test_msa_ave_s_b.c b/tests/tcg/mips/user/ase/msa/int-average/test_msa_ave_s_b.c
new file mode 100644
index 0000000..675fb90
--- /dev/null
+++ b/tests/tcg/mips/user/ase/msa/int-average/test_msa_ave_s_b.c
@@ -0,0 +1,151 @@
+/*
+ *  Test program for MSA instruction AVE_S.B
+ *
+ *  Copyright (C) 2018  Wave Computing, Inc.
+ *  Copyright (C) 2018  Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
+ *
+ *  This program is free software: you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation, either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <sys/time.h>
+#include <stdint.h>
+
+#include "../../../../include/wrappers_msa.h"
+#include "../../../../include/test_inputs.h"
+#include "../../../../include/test_utils.h"
+
+#define TEST_COUNT_TOTAL (                                                \
+            (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
+            (RANDOM_INPUTS_SHORT_COUNT) * (RANDOM_INPUTS_SHORT_COUNT))
+
+
+int32_t main(void)
+{
+    char *instruction_name = "AVE_S.B";
+    int32_t ret;
+    uint32_t i, j;
+    struct timeval start, end;
+    double elapsed_time;
+
+    uint64_t b128_result[TEST_COUNT_TOTAL][2];
+    uint64_t b128_expect[TEST_COUNT_TOTAL][2] = {
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },    /*   0  */
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0xd4d4d4d4d4d4d4d4ULL, 0xd4d4d4d4d4d4d4d4ULL, },
+        { 0x2a2a2a2a2a2a2a2aULL, 0x2a2a2a2a2a2a2a2aULL, },
+        { 0xe5e5e5e5e5e5e5e5ULL, 0xe5e5e5e5e5e5e5e5ULL, },
+        { 0x1919191919191919ULL, 0x1919191919191919ULL, },
+        { 0xf1c61bf1c61bf1c6ULL, 0x1bf1c61bf1c61bf1ULL, },
+        { 0x0d38e30d38e30d38ULL, 0xe30d38e30d38e30dULL, },
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },    /*   8  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0xd5d5d5d5d5d5d5d5ULL, 0xd5d5d5d5d5d5d5d5ULL, },
+        { 0x2a2a2a2a2a2a2a2aULL, 0x2a2a2a2a2a2a2a2aULL, },
+        { 0xe6e6e6e6e6e6e6e6ULL, 0xe6e6e6e6e6e6e6e6ULL, },
+        { 0x1919191919191919ULL, 0x1919191919191919ULL, },
+        { 0xf1c71cf1c71cf1c7ULL, 0x1cf1c71cf1c71cf1ULL, },
+        { 0x0e38e30e38e30e38ULL, 0xe30e38e30e38e30eULL, },
+        { 0xd4d4d4d4d4d4d4d4ULL, 0xd4d4d4d4d4d4d4d4ULL, },    /*  16  */
+        { 0xd5d5d5d5d5d5d5d5ULL, 0xd5d5d5d5d5d5d5d5ULL, },
+        { 0xaaaaaaaaaaaaaaaaULL, 0xaaaaaaaaaaaaaaaaULL, },
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0xbbbbbbbbbbbbbbbbULL, 0xbbbbbbbbbbbbbbbbULL, },
+        { 0xeeeeeeeeeeeeeeeeULL, 0xeeeeeeeeeeeeeeeeULL, },
+        { 0xc69cf1c69cf1c69cULL, 0xf1c69cf1c69cf1c6ULL, },
+        { 0xe30db8e30db8e30dULL, 0xb8e30db8e30db8e3ULL, },
+        { 0x2a2a2a2a2a2a2a2aULL, 0x2a2a2a2a2a2a2a2aULL, },    /*  24  */
+        { 0x2a2a2a2a2a2a2a2aULL, 0x2a2a2a2a2a2a2a2aULL, },
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0x5555555555555555ULL, 0x5555555555555555ULL, },
+        { 0x1010101010101010ULL, 0x1010101010101010ULL, },
+        { 0x4444444444444444ULL, 0x4444444444444444ULL, },
+        { 0x1cf1461cf1461cf1ULL, 0x461cf1461cf1461cULL, },
+        { 0x38630e38630e3863ULL, 0x0e38630e38630e38ULL, },
+        { 0xe5e5e5e5e5e5e5e5ULL, 0xe5e5e5e5e5e5e5e5ULL, },    /*  32  */
+        { 0xe6e6e6e6e6e6e6e6ULL, 0xe6e6e6e6e6e6e6e6ULL, },
+        { 0xbbbbbbbbbbbbbbbbULL, 0xbbbbbbbbbbbbbbbbULL, },
+        { 0x1010101010101010ULL, 0x1010101010101010ULL, },
+        { 0xccccccccccccccccULL, 0xccccccccccccccccULL, },
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0xd7ad02d7ad02d7adULL, 0x02d7ad02d7ad02d7ULL, },
+        { 0xf41ec9f41ec9f41eULL, 0xc9f41ec9f41ec9f4ULL, },
+        { 0x1919191919191919ULL, 0x1919191919191919ULL, },    /*  40  */
+        { 0x1919191919191919ULL, 0x1919191919191919ULL, },
+        { 0xeeeeeeeeeeeeeeeeULL, 0xeeeeeeeeeeeeeeeeULL, },
+        { 0x4444444444444444ULL, 0x4444444444444444ULL, },
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0x3333333333333333ULL, 0x3333333333333333ULL, },
+        { 0x0be0350be0350be0ULL, 0x350be0350be0350bULL, },
+        { 0x2752fd2752fd2752ULL, 0xfd2752fd2752fd27ULL, },
+        { 0xf1c61bf1c61bf1c6ULL, 0x1bf1c61bf1c61bf1ULL, },    /*  48  */
+        { 0xf1c71cf1c71cf1c7ULL, 0x1cf1c71cf1c71cf1ULL, },
+        { 0xc69cf1c69cf1c69cULL, 0xf1c69cf1c69cf1c6ULL, },
+        { 0x1cf1461cf1461cf1ULL, 0x461cf1461cf1461cULL, },
+        { 0xd7ad02d7ad02d7adULL, 0x02d7ad02d7ad02d7ULL, },
+        { 0x0be0350be0350be0ULL, 0x350be0350be0350bULL, },
+        { 0xe38e38e38e38e38eULL, 0x38e38e38e38e38e3ULL, },
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0x0d38e30d38e30d38ULL, 0xe30d38e30d38e30dULL, },    /*  56  */
+        { 0x0e38e30e38e30e38ULL, 0xe30e38e30e38e30eULL, },
+        { 0xe30db8e30db8e30dULL, 0xb8e30db8e30db8e3ULL, },
+        { 0x38630e38630e3863ULL, 0x0e38630e38630e38ULL, },
+        { 0xf41ec9f41ec9f41eULL, 0xc9f41ec9f41ec9f4ULL, },
+        { 0x2752fd2752fd2752ULL, 0xfd2752fd2752fd27ULL, },
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0x1c71c71c71c71c71ULL, 0xc71c71c71c71c71cULL, },
+        { 0x886ae6cc28625540ULL, 0x4b670b5efe7bb00cULL, },    /*  64  */
+        { 0xc114f3173afa0e24ULL, 0x2e2fe33c095d0104ULL, },
+        { 0x9a62cabbf018f0e0ULL, 0x391fe82ed453ea10ULL, },
+        { 0xfc5cfe0c43491b47ULL, 0xec2cc91bd35ec9d6ULL, },
+        { 0xc114f3173afa0e24ULL, 0x2e2fe33c095d0104ULL, },
+        { 0xfbbe00634d93c708ULL, 0x12f7bb1a153f52fcULL, },
+        { 0xd30cd70603b1a9c4ULL, 0x1ce7c00ce0353b08ULL, },
+        { 0x35060b5855e2d42bULL, 0xcff4a1f9df401aceULL, },
+        { 0x9a62cabbf018f0e0ULL, 0x391fe82ed453ea10ULL, },    /*  72  */
+        { 0xd30cd70603b1a9c4ULL, 0x1ce7c00ce0353b08ULL, },
+        { 0xac5aaeaab9cf8b80ULL, 0x27d8c6ffab2b2514ULL, },
+        { 0x0e54e2fb0b00b6e7ULL, 0xdae4a7ebaa3603daULL, },
+        { 0xfc5cfe0c43491b47ULL, 0xec2cc91bd35ec9d6ULL, },
+        { 0x35060b5855e2d42bULL, 0xcff4a1f9df401aceULL, },
+};
+
+    gettimeofday(&start, NULL);
+
+    for (i = 0; i < PATTERN_INPUTS_SHORT_COUNT; i++) {
+        for (j = 0; j < PATTERN_INPUTS_SHORT_COUNT; j++) {
+            do_msa_AVE_S_B(b128_pattern[i], b128_pattern[j],
+                           b128_result[PATTERN_INPUTS_SHORT_COUNT * i + j]);
+        }
+    }
+
+    for (i = 0; i < RANDOM_INPUTS_SHORT_COUNT; i++) {
+        for (j = 0; j < RANDOM_INPUTS_SHORT_COUNT; j++) {
+            do_msa_AVE_S_B(b128_random[i], b128_random[j],
+                           b128_result[((PATTERN_INPUTS_SHORT_COUNT) *
+                                        (PATTERN_INPUTS_SHORT_COUNT)) +
+                                       RANDOM_INPUTS_SHORT_COUNT * i + j]);
+        }
+    }
+
+    gettimeofday(&end, NULL);
+
+    elapsed_time = (end.tv_sec - start.tv_sec) * 1000.0;
+    elapsed_time += (end.tv_usec - start.tv_usec) / 1000.0;
+
+    ret = check_results(instruction_name, TEST_COUNT_TOTAL, elapsed_time,
+                        &b128_result[0][0], &b128_expect[0][0]);
+
+    return ret;
+}
diff --git a/tests/tcg/mips/user/ase/msa/int-average/test_msa_ave_s_d.c b/tests/tcg/mips/user/ase/msa/int-average/test_msa_ave_s_d.c
new file mode 100644
index 0000000..e87d414
--- /dev/null
+++ b/tests/tcg/mips/user/ase/msa/int-average/test_msa_ave_s_d.c
@@ -0,0 +1,151 @@
+/*
+ *  Test program for MSA instruction AVE_S.D
+ *
+ *  Copyright (C) 2018  Wave Computing, Inc.
+ *  Copyright (C) 2018  Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
+ *
+ *  This program is free software: you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation, either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <sys/time.h>
+#include <stdint.h>
+
+#include "../../../../include/wrappers_msa.h"
+#include "../../../../include/test_inputs.h"
+#include "../../../../include/test_utils.h"
+
+#define TEST_COUNT_TOTAL (                                                \
+            (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
+            (RANDOM_INPUTS_SHORT_COUNT) * (RANDOM_INPUTS_SHORT_COUNT))
+
+
+int32_t main(void)
+{
+    char *instruction_name = "AVE_S.D";
+    int32_t ret;
+    uint32_t i, j;
+    struct timeval start, end;
+    double elapsed_time;
+
+    uint64_t b128_result[TEST_COUNT_TOTAL][2];
+    uint64_t b128_expect[TEST_COUNT_TOTAL][2] = {
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },    /*   0  */
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0xd555555555555554ULL, 0xd555555555555554ULL, },
+        { 0x2aaaaaaaaaaaaaaaULL, 0x2aaaaaaaaaaaaaaaULL, },
+        { 0xe666666666666665ULL, 0xe666666666666665ULL, },
+        { 0x1999999999999999ULL, 0x1999999999999999ULL, },
+        { 0xf1c71c71c71c71c6ULL, 0x1c71c71c71c71c71ULL, },
+        { 0x0e38e38e38e38e38ULL, 0xe38e38e38e38e38dULL, },
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },    /*   8  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0xd555555555555555ULL, 0xd555555555555555ULL, },
+        { 0x2aaaaaaaaaaaaaaaULL, 0x2aaaaaaaaaaaaaaaULL, },
+        { 0xe666666666666666ULL, 0xe666666666666666ULL, },
+        { 0x1999999999999999ULL, 0x1999999999999999ULL, },
+        { 0xf1c71c71c71c71c7ULL, 0x1c71c71c71c71c71ULL, },
+        { 0x0e38e38e38e38e38ULL, 0xe38e38e38e38e38eULL, },
+        { 0xd555555555555554ULL, 0xd555555555555554ULL, },    /*  16  */
+        { 0xd555555555555555ULL, 0xd555555555555555ULL, },
+        { 0xaaaaaaaaaaaaaaaaULL, 0xaaaaaaaaaaaaaaaaULL, },
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0xbbbbbbbbbbbbbbbbULL, 0xbbbbbbbbbbbbbbbbULL, },
+        { 0xeeeeeeeeeeeeeeeeULL, 0xeeeeeeeeeeeeeeeeULL, },
+        { 0xc71c71c71c71c71cULL, 0xf1c71c71c71c71c6ULL, },
+        { 0xe38e38e38e38e38dULL, 0xb8e38e38e38e38e3ULL, },
+        { 0x2aaaaaaaaaaaaaaaULL, 0x2aaaaaaaaaaaaaaaULL, },    /*  24  */
+        { 0x2aaaaaaaaaaaaaaaULL, 0x2aaaaaaaaaaaaaaaULL, },
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0x5555555555555555ULL, 0x5555555555555555ULL, },
+        { 0x1111111111111110ULL, 0x1111111111111110ULL, },
+        { 0x4444444444444444ULL, 0x4444444444444444ULL, },
+        { 0x1c71c71c71c71c71ULL, 0x471c71c71c71c71cULL, },
+        { 0x38e38e38e38e38e3ULL, 0x0e38e38e38e38e38ULL, },
+        { 0xe666666666666665ULL, 0xe666666666666665ULL, },    /*  32  */
+        { 0xe666666666666666ULL, 0xe666666666666666ULL, },
+        { 0xbbbbbbbbbbbbbbbbULL, 0xbbbbbbbbbbbbbbbbULL, },
+        { 0x1111111111111110ULL, 0x1111111111111110ULL, },
+        { 0xccccccccccccccccULL, 0xccccccccccccccccULL, },
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0xd82d82d82d82d82dULL, 0x02d82d82d82d82d7ULL, },
+        { 0xf49f49f49f49f49eULL, 0xc9f49f49f49f49f4ULL, },
+        { 0x1999999999999999ULL, 0x1999999999999999ULL, },    /*  40  */
+        { 0x1999999999999999ULL, 0x1999999999999999ULL, },
+        { 0xeeeeeeeeeeeeeeeeULL, 0xeeeeeeeeeeeeeeeeULL, },
+        { 0x4444444444444444ULL, 0x4444444444444444ULL, },
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0x3333333333333333ULL, 0x3333333333333333ULL, },
+        { 0x0b60b60b60b60b60ULL, 0x360b60b60b60b60bULL, },
+        { 0x27d27d27d27d27d2ULL, 0xfd27d27d27d27d27ULL, },
+        { 0xf1c71c71c71c71c6ULL, 0x1c71c71c71c71c71ULL, },    /*  48  */
+        { 0xf1c71c71c71c71c7ULL, 0x1c71c71c71c71c71ULL, },
+        { 0xc71c71c71c71c71cULL, 0xf1c71c71c71c71c6ULL, },
+        { 0x1c71c71c71c71c71ULL, 0x471c71c71c71c71cULL, },
+        { 0xd82d82d82d82d82dULL, 0x02d82d82d82d82d7ULL, },
+        { 0x0b60b60b60b60b60ULL, 0x360b60b60b60b60bULL, },
+        { 0xe38e38e38e38e38eULL, 0x38e38e38e38e38e3ULL, },
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0x0e38e38e38e38e38ULL, 0xe38e38e38e38e38dULL, },    /*  56  */
+        { 0x0e38e38e38e38e38ULL, 0xe38e38e38e38e38eULL, },
+        { 0xe38e38e38e38e38dULL, 0xb8e38e38e38e38e3ULL, },
+        { 0x38e38e38e38e38e3ULL, 0x0e38e38e38e38e38ULL, },
+        { 0xf49f49f49f49f49eULL, 0xc9f49f49f49f49f4ULL, },
+        { 0x27d27d27d27d27d2ULL, 0xfd27d27d27d27d27ULL, },
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0x1c71c71c71c71c71ULL, 0xc71c71c71c71c71cULL, },
+        { 0x886ae6cc28625540ULL, 0x4b670b5efe7bb00cULL, },    /*  64  */
+        { 0xc2147397bafb0e24ULL, 0x2f2f633c89dd8184ULL, },
+        { 0x9a62cabb7118f060ULL, 0x399fe92f54d36a90ULL, },
+        { 0xfc5cfe8cc34a1bc7ULL, 0xecac4a1bd3df4956ULL, },
+        { 0xc2147397bafb0e24ULL, 0x2f2f633c89dd8184ULL, },
+        { 0xfbbe00634d93c708ULL, 0x12f7bb1a153f52fcULL, },
+        { 0xd40c578703b1a944ULL, 0x1d68410ce0353c08ULL, },
+        { 0x36068b5855e2d4abULL, 0xd074a1f95f411aceULL, },
+        { 0x9a62cabb7118f060ULL, 0x399fe92f54d36a90ULL, },    /*  72  */
+        { 0xd40c578703b1a944ULL, 0x1d68410ce0353c08ULL, },
+        { 0xac5aaeaab9cf8b80ULL, 0x27d8c6ffab2b2514ULL, },
+        { 0x0e54e27c0c00b6e7ULL, 0xdae527ec2a3703daULL, },
+        { 0xfc5cfe8cc34a1bc7ULL, 0xecac4a1bd3df4956ULL, },
+        { 0x36068b5855e2d4abULL, 0xd074a1f95f411aceULL, },
+};
+
+    gettimeofday(&start, NULL);
+
+    for (i = 0; i < PATTERN_INPUTS_SHORT_COUNT; i++) {
+        for (j = 0; j < PATTERN_INPUTS_SHORT_COUNT; j++) {
+            do_msa_AVE_S_D(b128_pattern[i], b128_pattern[j],
+                           b128_result[PATTERN_INPUTS_SHORT_COUNT * i + j]);
+        }
+    }
+
+    for (i = 0; i < RANDOM_INPUTS_SHORT_COUNT; i++) {
+        for (j = 0; j < RANDOM_INPUTS_SHORT_COUNT; j++) {
+            do_msa_AVE_S_D(b128_random[i], b128_random[j],
+                           b128_result[((PATTERN_INPUTS_SHORT_COUNT) *
+                                        (PATTERN_INPUTS_SHORT_COUNT)) +
+                                       RANDOM_INPUTS_SHORT_COUNT * i + j]);
+        }
+    }
+
+    gettimeofday(&end, NULL);
+
+    elapsed_time = (end.tv_sec - start.tv_sec) * 1000.0;
+    elapsed_time += (end.tv_usec - start.tv_usec) / 1000.0;
+
+    ret = check_results(instruction_name, TEST_COUNT_TOTAL, elapsed_time,
+                        &b128_result[0][0], &b128_expect[0][0]);
+
+    return ret;
+}
diff --git a/tests/tcg/mips/user/ase/msa/int-average/test_msa_ave_s_h.c b/tests/tcg/mips/user/ase/msa/int-average/test_msa_ave_s_h.c
new file mode 100644
index 0000000..c850543
--- /dev/null
+++ b/tests/tcg/mips/user/ase/msa/int-average/test_msa_ave_s_h.c
@@ -0,0 +1,151 @@
+/*
+ *  Test program for MSA instruction AVE_S.H
+ *
+ *  Copyright (C) 2018  Wave Computing, Inc.
+ *  Copyright (C) 2018  Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
+ *
+ *  This program is free software: you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation, either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <sys/time.h>
+#include <stdint.h>
+
+#include "../../../../include/wrappers_msa.h"
+#include "../../../../include/test_inputs.h"
+#include "../../../../include/test_utils.h"
+
+#define TEST_COUNT_TOTAL (                                                \
+            (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
+            (RANDOM_INPUTS_SHORT_COUNT) * (RANDOM_INPUTS_SHORT_COUNT))
+
+
+int32_t main(void)
+{
+    char *instruction_name = "AVE_S.H";
+    int32_t ret;
+    uint32_t i, j;
+    struct timeval start, end;
+    double elapsed_time;
+
+    uint64_t b128_result[TEST_COUNT_TOTAL][2];
+    uint64_t b128_expect[TEST_COUNT_TOTAL][2] = {
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },    /*   0  */
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0xd554d554d554d554ULL, 0xd554d554d554d554ULL, },
+        { 0x2aaa2aaa2aaa2aaaULL, 0x2aaa2aaa2aaa2aaaULL, },
+        { 0xe665e665e665e665ULL, 0xe665e665e665e665ULL, },
+        { 0x1999199919991999ULL, 0x1999199919991999ULL, },
+        { 0xf1c61c71c71bf1c6ULL, 0x1c71c71bf1c61c71ULL, },
+        { 0x0e38e38d38e30e38ULL, 0xe38d38e30e38e38dULL, },
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },    /*   8  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0xd555d555d555d555ULL, 0xd555d555d555d555ULL, },
+        { 0x2aaa2aaa2aaa2aaaULL, 0x2aaa2aaa2aaa2aaaULL, },
+        { 0xe666e666e666e666ULL, 0xe666e666e666e666ULL, },
+        { 0x1999199919991999ULL, 0x1999199919991999ULL, },
+        { 0xf1c71c71c71cf1c7ULL, 0x1c71c71cf1c71c71ULL, },
+        { 0x0e38e38e38e30e38ULL, 0xe38e38e30e38e38eULL, },
+        { 0xd554d554d554d554ULL, 0xd554d554d554d554ULL, },    /*  16  */
+        { 0xd555d555d555d555ULL, 0xd555d555d555d555ULL, },
+        { 0xaaaaaaaaaaaaaaaaULL, 0xaaaaaaaaaaaaaaaaULL, },
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0xbbbbbbbbbbbbbbbbULL, 0xbbbbbbbbbbbbbbbbULL, },
+        { 0xeeeeeeeeeeeeeeeeULL, 0xeeeeeeeeeeeeeeeeULL, },
+        { 0xc71cf1c69c71c71cULL, 0xf1c69c71c71cf1c6ULL, },
+        { 0xe38db8e30e38e38dULL, 0xb8e30e38e38db8e3ULL, },
+        { 0x2aaa2aaa2aaa2aaaULL, 0x2aaa2aaa2aaa2aaaULL, },    /*  24  */
+        { 0x2aaa2aaa2aaa2aaaULL, 0x2aaa2aaa2aaa2aaaULL, },
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0x5555555555555555ULL, 0x5555555555555555ULL, },
+        { 0x1110111011101110ULL, 0x1110111011101110ULL, },
+        { 0x4444444444444444ULL, 0x4444444444444444ULL, },
+        { 0x1c71471cf1c61c71ULL, 0x471cf1c61c71471cULL, },
+        { 0x38e30e38638e38e3ULL, 0x0e38638e38e30e38ULL, },
+        { 0xe665e665e665e665ULL, 0xe665e665e665e665ULL, },    /*  32  */
+        { 0xe666e666e666e666ULL, 0xe666e666e666e666ULL, },
+        { 0xbbbbbbbbbbbbbbbbULL, 0xbbbbbbbbbbbbbbbbULL, },
+        { 0x1110111011101110ULL, 0x1110111011101110ULL, },
+        { 0xccccccccccccccccULL, 0xccccccccccccccccULL, },
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0xd82d02d7ad82d82dULL, 0x02d7ad82d82d02d7ULL, },
+        { 0xf49ec9f41f49f49eULL, 0xc9f41f49f49ec9f4ULL, },
+        { 0x1999199919991999ULL, 0x1999199919991999ULL, },    /*  40  */
+        { 0x1999199919991999ULL, 0x1999199919991999ULL, },
+        { 0xeeeeeeeeeeeeeeeeULL, 0xeeeeeeeeeeeeeeeeULL, },
+        { 0x4444444444444444ULL, 0x4444444444444444ULL, },
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0x3333333333333333ULL, 0x3333333333333333ULL, },
+        { 0x0b60360be0b50b60ULL, 0x360be0b50b60360bULL, },
+        { 0x27d2fd27527d27d2ULL, 0xfd27527d27d2fd27ULL, },
+        { 0xf1c61c71c71bf1c6ULL, 0x1c71c71bf1c61c71ULL, },    /*  48  */
+        { 0xf1c71c71c71cf1c7ULL, 0x1c71c71cf1c71c71ULL, },
+        { 0xc71cf1c69c71c71cULL, 0xf1c69c71c71cf1c6ULL, },
+        { 0x1c71471cf1c61c71ULL, 0x471cf1c61c71471cULL, },
+        { 0xd82d02d7ad82d82dULL, 0x02d7ad82d82d02d7ULL, },
+        { 0x0b60360be0b50b60ULL, 0x360be0b50b60360bULL, },
+        { 0xe38e38e38e38e38eULL, 0x38e38e38e38e38e3ULL, },
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0x0e38e38d38e30e38ULL, 0xe38d38e30e38e38dULL, },    /*  56  */
+        { 0x0e38e38e38e30e38ULL, 0xe38e38e30e38e38eULL, },
+        { 0xe38db8e30e38e38dULL, 0xb8e30e38e38db8e3ULL, },
+        { 0x38e30e38638e38e3ULL, 0x0e38638e38e30e38ULL, },
+        { 0xf49ec9f41f49f49eULL, 0xc9f41f49f49ec9f4ULL, },
+        { 0x27d2fd27527d27d2ULL, 0xfd27527d27d2fd27ULL, },
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0x1c71c71c71c71c71ULL, 0xc71c71c71c71c71cULL, },
+        { 0x886ae6cc28625540ULL, 0x4b670b5efe7bb00cULL, },    /*  64  */
+        { 0xc214f3973afa0e24ULL, 0x2f2fe33c09dd0184ULL, },
+        { 0x9a62cabbf118f060ULL, 0x399fe92ed4d3ea90ULL, },
+        { 0xfc5cfe8c43491bc7ULL, 0xecacca1bd3dec956ULL, },
+        { 0xc214f3973afa0e24ULL, 0x2f2fe33c09dd0184ULL, },
+        { 0xfbbe00634d93c708ULL, 0x12f7bb1a153f52fcULL, },
+        { 0xd40cd78603b1a944ULL, 0x1d67c10ce0353c08ULL, },
+        { 0x36060b5855e2d4abULL, 0xd074a1f9df401aceULL, },
+        { 0x9a62cabbf118f060ULL, 0x399fe92ed4d3ea90ULL, },    /*  72  */
+        { 0xd40cd78603b1a944ULL, 0x1d67c10ce0353c08ULL, },
+        { 0xac5aaeaab9cf8b80ULL, 0x27d8c6ffab2b2514ULL, },
+        { 0x0e54e27b0c00b6e7ULL, 0xdae4a7ebaa3603daULL, },
+        { 0xfc5cfe8c43491bc7ULL, 0xecacca1bd3dec956ULL, },
+        { 0x36060b5855e2d4abULL, 0xd074a1f9df401aceULL, },
+};
+
+    gettimeofday(&start, NULL);
+
+    for (i = 0; i < PATTERN_INPUTS_SHORT_COUNT; i++) {
+        for (j = 0; j < PATTERN_INPUTS_SHORT_COUNT; j++) {
+            do_msa_AVE_S_H(b128_pattern[i], b128_pattern[j],
+                           b128_result[PATTERN_INPUTS_SHORT_COUNT * i + j]);
+        }
+    }
+
+    for (i = 0; i < RANDOM_INPUTS_SHORT_COUNT; i++) {
+        for (j = 0; j < RANDOM_INPUTS_SHORT_COUNT; j++) {
+            do_msa_AVE_S_H(b128_random[i], b128_random[j],
+                           b128_result[((PATTERN_INPUTS_SHORT_COUNT) *
+                                        (PATTERN_INPUTS_SHORT_COUNT)) +
+                                       RANDOM_INPUTS_SHORT_COUNT * i + j]);
+        }
+    }
+
+    gettimeofday(&end, NULL);
+
+    elapsed_time = (end.tv_sec - start.tv_sec) * 1000.0;
+    elapsed_time += (end.tv_usec - start.tv_usec) / 1000.0;
+
+    ret = check_results(instruction_name, TEST_COUNT_TOTAL, elapsed_time,
+                        &b128_result[0][0], &b128_expect[0][0]);
+
+    return ret;
+}
diff --git a/tests/tcg/mips/user/ase/msa/int-average/test_msa_ave_s_w.c b/tests/tcg/mips/user/ase/msa/int-average/test_msa_ave_s_w.c
new file mode 100644
index 0000000..3220574
--- /dev/null
+++ b/tests/tcg/mips/user/ase/msa/int-average/test_msa_ave_s_w.c
@@ -0,0 +1,151 @@
+/*
+ *  Test program for MSA instruction AVE_S.W
+ *
+ *  Copyright (C) 2018  Wave Computing, Inc.
+ *  Copyright (C) 2018  Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
+ *
+ *  This program is free software: you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation, either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <sys/time.h>
+#include <stdint.h>
+
+#include "../../../../include/wrappers_msa.h"
+#include "../../../../include/test_inputs.h"
+#include "../../../../include/test_utils.h"
+
+#define TEST_COUNT_TOTAL (                                                \
+            (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
+            (RANDOM_INPUTS_SHORT_COUNT) * (RANDOM_INPUTS_SHORT_COUNT))
+
+
+int32_t main(void)
+{
+    char *instruction_name = "AVE_S.W";
+    int32_t ret;
+    uint32_t i, j;
+    struct timeval start, end;
+    double elapsed_time;
+
+    uint64_t b128_result[TEST_COUNT_TOTAL][2];
+    uint64_t b128_expect[TEST_COUNT_TOTAL][2] = {
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },    /*   0  */
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0xd5555554d5555554ULL, 0xd5555554d5555554ULL, },
+        { 0x2aaaaaaa2aaaaaaaULL, 0x2aaaaaaa2aaaaaaaULL, },
+        { 0xe6666665e6666665ULL, 0xe6666665e6666665ULL, },
+        { 0x1999999919999999ULL, 0x1999999919999999ULL, },
+        { 0xf1c71c71c71c71c6ULL, 0x1c71c71bf1c71c71ULL, },
+        { 0x0e38e38d38e38e38ULL, 0xe38e38e30e38e38dULL, },
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },    /*   8  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0xd5555555d5555555ULL, 0xd5555555d5555555ULL, },
+        { 0x2aaaaaaa2aaaaaaaULL, 0x2aaaaaaa2aaaaaaaULL, },
+        { 0xe6666666e6666666ULL, 0xe6666666e6666666ULL, },
+        { 0x1999999919999999ULL, 0x1999999919999999ULL, },
+        { 0xf1c71c71c71c71c7ULL, 0x1c71c71cf1c71c71ULL, },
+        { 0x0e38e38e38e38e38ULL, 0xe38e38e30e38e38eULL, },
+        { 0xd5555554d5555554ULL, 0xd5555554d5555554ULL, },    /*  16  */
+        { 0xd5555555d5555555ULL, 0xd5555555d5555555ULL, },
+        { 0xaaaaaaaaaaaaaaaaULL, 0xaaaaaaaaaaaaaaaaULL, },
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0xbbbbbbbbbbbbbbbbULL, 0xbbbbbbbbbbbbbbbbULL, },
+        { 0xeeeeeeeeeeeeeeeeULL, 0xeeeeeeeeeeeeeeeeULL, },
+        { 0xc71c71c69c71c71cULL, 0xf1c71c71c71c71c6ULL, },
+        { 0xe38e38e30e38e38dULL, 0xb8e38e38e38e38e3ULL, },
+        { 0x2aaaaaaa2aaaaaaaULL, 0x2aaaaaaa2aaaaaaaULL, },    /*  24  */
+        { 0x2aaaaaaa2aaaaaaaULL, 0x2aaaaaaa2aaaaaaaULL, },
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0x5555555555555555ULL, 0x5555555555555555ULL, },
+        { 0x1111111011111110ULL, 0x1111111011111110ULL, },
+        { 0x4444444444444444ULL, 0x4444444444444444ULL, },
+        { 0x1c71c71cf1c71c71ULL, 0x471c71c61c71c71cULL, },
+        { 0x38e38e38638e38e3ULL, 0x0e38e38e38e38e38ULL, },
+        { 0xe6666665e6666665ULL, 0xe6666665e6666665ULL, },    /*  32  */
+        { 0xe6666666e6666666ULL, 0xe6666666e6666666ULL, },
+        { 0xbbbbbbbbbbbbbbbbULL, 0xbbbbbbbbbbbbbbbbULL, },
+        { 0x1111111011111110ULL, 0x1111111011111110ULL, },
+        { 0xccccccccccccccccULL, 0xccccccccccccccccULL, },
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0xd82d82d7ad82d82dULL, 0x02d82d82d82d82d7ULL, },
+        { 0xf49f49f41f49f49eULL, 0xc9f49f49f49f49f4ULL, },
+        { 0x1999999919999999ULL, 0x1999999919999999ULL, },    /*  40  */
+        { 0x1999999919999999ULL, 0x1999999919999999ULL, },
+        { 0xeeeeeeeeeeeeeeeeULL, 0xeeeeeeeeeeeeeeeeULL, },
+        { 0x4444444444444444ULL, 0x4444444444444444ULL, },
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0x3333333333333333ULL, 0x3333333333333333ULL, },
+        { 0x0b60b60be0b60b60ULL, 0x360b60b50b60b60bULL, },
+        { 0x27d27d27527d27d2ULL, 0xfd27d27d27d27d27ULL, },
+        { 0xf1c71c71c71c71c6ULL, 0x1c71c71bf1c71c71ULL, },    /*  48  */
+        { 0xf1c71c71c71c71c7ULL, 0x1c71c71cf1c71c71ULL, },
+        { 0xc71c71c69c71c71cULL, 0xf1c71c71c71c71c6ULL, },
+        { 0x1c71c71cf1c71c71ULL, 0x471c71c61c71c71cULL, },
+        { 0xd82d82d7ad82d82dULL, 0x02d82d82d82d82d7ULL, },
+        { 0x0b60b60be0b60b60ULL, 0x360b60b50b60b60bULL, },
+        { 0xe38e38e38e38e38eULL, 0x38e38e38e38e38e3ULL, },
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0x0e38e38d38e38e38ULL, 0xe38e38e30e38e38dULL, },    /*  56  */
+        { 0x0e38e38e38e38e38ULL, 0xe38e38e30e38e38eULL, },
+        { 0xe38e38e30e38e38dULL, 0xb8e38e38e38e38e3ULL, },
+        { 0x38e38e38638e38e3ULL, 0x0e38e38e38e38e38ULL, },
+        { 0xf49f49f41f49f49eULL, 0xc9f49f49f49f49f4ULL, },
+        { 0x27d27d27527d27d2ULL, 0xfd27d27d27d27d27ULL, },
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0x1c71c71c71c71c71ULL, 0xc71c71c71c71c71cULL, },
+        { 0x886ae6cc28625540ULL, 0x4b670b5efe7bb00cULL, },    /*  64  */
+        { 0xc21473973afb0e24ULL, 0x2f2f633c09dd8184ULL, },
+        { 0x9a62cabbf118f060ULL, 0x399fe92ed4d36a90ULL, },
+        { 0xfc5cfe8c434a1bc7ULL, 0xecac4a1bd3df4956ULL, },
+        { 0xc21473973afb0e24ULL, 0x2f2f633c09dd8184ULL, },
+        { 0xfbbe00634d93c708ULL, 0x12f7bb1a153f52fcULL, },
+        { 0xd40c578603b1a944ULL, 0x1d68410ce0353c08ULL, },
+        { 0x36068b5855e2d4abULL, 0xd074a1f9df411aceULL, },
+        { 0x9a62cabbf118f060ULL, 0x399fe92ed4d36a90ULL, },    /*  72  */
+        { 0xd40c578603b1a944ULL, 0x1d68410ce0353c08ULL, },
+        { 0xac5aaeaab9cf8b80ULL, 0x27d8c6ffab2b2514ULL, },
+        { 0x0e54e27b0c00b6e7ULL, 0xdae527ebaa3703daULL, },
+        { 0xfc5cfe8c434a1bc7ULL, 0xecac4a1bd3df4956ULL, },
+        { 0x36068b5855e2d4abULL, 0xd074a1f9df411aceULL, },
+};
+
+    gettimeofday(&start, NULL);
+
+    for (i = 0; i < PATTERN_INPUTS_SHORT_COUNT; i++) {
+        for (j = 0; j < PATTERN_INPUTS_SHORT_COUNT; j++) {
+            do_msa_AVE_S_W(b128_pattern[i], b128_pattern[j],
+                           b128_result[PATTERN_INPUTS_SHORT_COUNT * i + j]);
+        }
+    }
+
+    for (i = 0; i < RANDOM_INPUTS_SHORT_COUNT; i++) {
+        for (j = 0; j < RANDOM_INPUTS_SHORT_COUNT; j++) {
+            do_msa_AVE_S_W(b128_random[i], b128_random[j],
+                           b128_result[((PATTERN_INPUTS_SHORT_COUNT) *
+                                        (PATTERN_INPUTS_SHORT_COUNT)) +
+                                       RANDOM_INPUTS_SHORT_COUNT * i + j]);
+        }
+    }
+
+    gettimeofday(&end, NULL);
+
+    elapsed_time = (end.tv_sec - start.tv_sec) * 1000.0;
+    elapsed_time += (end.tv_usec - start.tv_usec) / 1000.0;
+
+    ret = check_results(instruction_name, TEST_COUNT_TOTAL, elapsed_time,
+                        &b128_result[0][0], &b128_expect[0][0]);
+
+    return ret;
+}
diff --git a/tests/tcg/mips/user/ase/msa/int-average/test_msa_ave_u_b.c b/tests/tcg/mips/user/ase/msa/int-average/test_msa_ave_u_b.c
new file mode 100644
index 0000000..c3f96a6
--- /dev/null
+++ b/tests/tcg/mips/user/ase/msa/int-average/test_msa_ave_u_b.c
@@ -0,0 +1,151 @@
+/*
+ *  Test program for MSA instruction AVE_U.B
+ *
+ *  Copyright (C) 2018  Wave Computing, Inc.
+ *  Copyright (C) 2018  Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
+ *
+ *  This program is free software: you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation, either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <sys/time.h>
+#include <stdint.h>
+
+#include "../../../../include/wrappers_msa.h"
+#include "../../../../include/test_inputs.h"
+#include "../../../../include/test_utils.h"
+
+#define TEST_COUNT_TOTAL (                                                \
+            (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
+            (RANDOM_INPUTS_SHORT_COUNT) * (RANDOM_INPUTS_SHORT_COUNT))
+
+
+int32_t main(void)
+{
+    char *instruction_name = "AVE_U.B";
+    int32_t ret;
+    uint32_t i, j;
+    struct timeval start, end;
+    double elapsed_time;
+
+    uint64_t b128_result[TEST_COUNT_TOTAL][2];
+    uint64_t b128_expect[TEST_COUNT_TOTAL][2] = {
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },    /*   0  */
+        { 0x7f7f7f7f7f7f7f7fULL, 0x7f7f7f7f7f7f7f7fULL, },
+        { 0xd4d4d4d4d4d4d4d4ULL, 0xd4d4d4d4d4d4d4d4ULL, },
+        { 0xaaaaaaaaaaaaaaaaULL, 0xaaaaaaaaaaaaaaaaULL, },
+        { 0xe5e5e5e5e5e5e5e5ULL, 0xe5e5e5e5e5e5e5e5ULL, },
+        { 0x9999999999999999ULL, 0x9999999999999999ULL, },
+        { 0xf1c69bf1c69bf1c6ULL, 0x9bf1c69bf1c69bf1ULL, },
+        { 0x8db8e38db8e38db8ULL, 0xe38db8e38db8e38dULL, },
+        { 0x7f7f7f7f7f7f7f7fULL, 0x7f7f7f7f7f7f7f7fULL, },    /*   8  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x5555555555555555ULL, 0x5555555555555555ULL, },
+        { 0x2a2a2a2a2a2a2a2aULL, 0x2a2a2a2a2a2a2a2aULL, },
+        { 0x6666666666666666ULL, 0x6666666666666666ULL, },
+        { 0x1919191919191919ULL, 0x1919191919191919ULL, },
+        { 0x71471c71471c7147ULL, 0x1c71471c71471c71ULL, },
+        { 0x0e38630e38630e38ULL, 0x630e38630e38630eULL, },
+        { 0xd4d4d4d4d4d4d4d4ULL, 0xd4d4d4d4d4d4d4d4ULL, },    /*  16  */
+        { 0x5555555555555555ULL, 0x5555555555555555ULL, },
+        { 0xaaaaaaaaaaaaaaaaULL, 0xaaaaaaaaaaaaaaaaULL, },
+        { 0x7f7f7f7f7f7f7f7fULL, 0x7f7f7f7f7f7f7f7fULL, },
+        { 0xbbbbbbbbbbbbbbbbULL, 0xbbbbbbbbbbbbbbbbULL, },
+        { 0x6e6e6e6e6e6e6e6eULL, 0x6e6e6e6e6e6e6e6eULL, },
+        { 0xc69c71c69c71c69cULL, 0x71c69c71c69c71c6ULL, },
+        { 0x638db8638db8638dULL, 0xb8638db8638db863ULL, },
+        { 0xaaaaaaaaaaaaaaaaULL, 0xaaaaaaaaaaaaaaaaULL, },    /*  24  */
+        { 0x2a2a2a2a2a2a2a2aULL, 0x2a2a2a2a2a2a2a2aULL, },
+        { 0x7f7f7f7f7f7f7f7fULL, 0x7f7f7f7f7f7f7f7fULL, },
+        { 0x5555555555555555ULL, 0x5555555555555555ULL, },
+        { 0x9090909090909090ULL, 0x9090909090909090ULL, },
+        { 0x4444444444444444ULL, 0x4444444444444444ULL, },
+        { 0x9c71469c71469c71ULL, 0x469c71469c71469cULL, },
+        { 0x38638e38638e3863ULL, 0x8e38638e38638e38ULL, },
+        { 0xe5e5e5e5e5e5e5e5ULL, 0xe5e5e5e5e5e5e5e5ULL, },    /*  32  */
+        { 0x6666666666666666ULL, 0x6666666666666666ULL, },
+        { 0xbbbbbbbbbbbbbbbbULL, 0xbbbbbbbbbbbbbbbbULL, },
+        { 0x9090909090909090ULL, 0x9090909090909090ULL, },
+        { 0xccccccccccccccccULL, 0xccccccccccccccccULL, },
+        { 0x7f7f7f7f7f7f7f7fULL, 0x7f7f7f7f7f7f7f7fULL, },
+        { 0xd7ad82d7ad82d7adULL, 0x82d7ad82d7ad82d7ULL, },
+        { 0x749ec9749ec9749eULL, 0xc9749ec9749ec974ULL, },
+        { 0x9999999999999999ULL, 0x9999999999999999ULL, },    /*  40  */
+        { 0x1919191919191919ULL, 0x1919191919191919ULL, },
+        { 0x6e6e6e6e6e6e6e6eULL, 0x6e6e6e6e6e6e6e6eULL, },
+        { 0x4444444444444444ULL, 0x4444444444444444ULL, },
+        { 0x7f7f7f7f7f7f7f7fULL, 0x7f7f7f7f7f7f7f7fULL, },
+        { 0x3333333333333333ULL, 0x3333333333333333ULL, },
+        { 0x8b60358b60358b60ULL, 0x358b60358b60358bULL, },
+        { 0x27527d27527d2752ULL, 0x7d27527d27527d27ULL, },
+        { 0xf1c69bf1c69bf1c6ULL, 0x9bf1c69bf1c69bf1ULL, },    /*  48  */
+        { 0x71471c71471c7147ULL, 0x1c71471c71471c71ULL, },
+        { 0xc69c71c69c71c69cULL, 0x71c69c71c69c71c6ULL, },
+        { 0x9c71469c71469c71ULL, 0x469c71469c71469cULL, },
+        { 0xd7ad82d7ad82d7adULL, 0x82d7ad82d7ad82d7ULL, },
+        { 0x8b60358b60358b60ULL, 0x358b60358b60358bULL, },
+        { 0xe38e38e38e38e38eULL, 0x38e38e38e38e38e3ULL, },
+        { 0x7f7f7f7f7f7f7f7fULL, 0x7f7f7f7f7f7f7f7fULL, },
+        { 0x8db8e38db8e38db8ULL, 0xe38db8e38db8e38dULL, },    /*  56  */
+        { 0x0e38630e38630e38ULL, 0x630e38630e38630eULL, },
+        { 0x638db8638db8638dULL, 0xb8638db8638db863ULL, },
+        { 0x38638e38638e3863ULL, 0x8e38638e38638e38ULL, },
+        { 0x749ec9749ec9749eULL, 0xc9749ec9749ec974ULL, },
+        { 0x27527d27527d2752ULL, 0x7d27527d27527d27ULL, },
+        { 0x7f7f7f7f7f7f7f7fULL, 0x7f7f7f7f7f7f7f7fULL, },
+        { 0x1c71c71c71c71c71ULL, 0xc71c71c71c71c71cULL, },
+        { 0x886ae6cc28625540ULL, 0x4b670b5efe7bb00cULL, },    /*  64  */
+        { 0xc19473973a7a8e24ULL, 0x2eaf633c895d8184ULL, },
+        { 0x9a62cabb70987060ULL, 0x399f68aed4536a10ULL, },
+        { 0x7c5c7e8c43499b47ULL, 0x6cac499bd35ec956ULL, },
+        { 0xc19473973a7a8e24ULL, 0x2eaf633c895d8184ULL, },
+        { 0xfbbe00634d93c708ULL, 0x12f7bb1a153f52fcULL, },
+        { 0xd38c578683b1a944ULL, 0x1ce7c08c60353b88ULL, },
+        { 0xb5860b585562d42bULL, 0x4ff4a1795f409aceULL, },
+        { 0x9a62cabb70987060ULL, 0x399f68aed4536a10ULL, },    /*  72  */
+        { 0xd38c578683b1a944ULL, 0x1ce7c08c60353b88ULL, },
+        { 0xac5aaeaab9cf8b80ULL, 0x27d8c6ffab2b2514ULL, },
+        { 0x8e54627b8b80b667ULL, 0x5ae4a7ebaa36835aULL, },
+        { 0x7c5c7e8c43499b47ULL, 0x6cac499bd35ec956ULL, },
+        { 0xb5860b585562d42bULL, 0x4ff4a1795f409aceULL, },
+};
+
+    gettimeofday(&start, NULL);
+
+    for (i = 0; i < PATTERN_INPUTS_SHORT_COUNT; i++) {
+        for (j = 0; j < PATTERN_INPUTS_SHORT_COUNT; j++) {
+            do_msa_AVE_U_B(b128_pattern[i], b128_pattern[j],
+                           b128_result[PATTERN_INPUTS_SHORT_COUNT * i + j]);
+        }
+    }
+
+    for (i = 0; i < RANDOM_INPUTS_SHORT_COUNT; i++) {
+        for (j = 0; j < RANDOM_INPUTS_SHORT_COUNT; j++) {
+            do_msa_AVE_U_B(b128_random[i], b128_random[j],
+                           b128_result[((PATTERN_INPUTS_SHORT_COUNT) *
+                                        (PATTERN_INPUTS_SHORT_COUNT)) +
+                                       RANDOM_INPUTS_SHORT_COUNT * i + j]);
+        }
+    }
+
+    gettimeofday(&end, NULL);
+
+    elapsed_time = (end.tv_sec - start.tv_sec) * 1000.0;
+    elapsed_time += (end.tv_usec - start.tv_usec) / 1000.0;
+
+    ret = check_results(instruction_name, TEST_COUNT_TOTAL, elapsed_time,
+                        &b128_result[0][0], &b128_expect[0][0]);
+
+    return ret;
+}
diff --git a/tests/tcg/mips/user/ase/msa/int-average/test_msa_ave_u_d.c b/tests/tcg/mips/user/ase/msa/int-average/test_msa_ave_u_d.c
new file mode 100644
index 0000000..3a78629
--- /dev/null
+++ b/tests/tcg/mips/user/ase/msa/int-average/test_msa_ave_u_d.c
@@ -0,0 +1,151 @@
+/*
+ *  Test program for MSA instruction AVE_U.D
+ *
+ *  Copyright (C) 2018  Wave Computing, Inc.
+ *  Copyright (C) 2018  Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
+ *
+ *  This program is free software: you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation, either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <sys/time.h>
+#include <stdint.h>
+
+#include "../../../../include/wrappers_msa.h"
+#include "../../../../include/test_inputs.h"
+#include "../../../../include/test_utils.h"
+
+#define TEST_COUNT_TOTAL (                                                \
+            (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
+            (RANDOM_INPUTS_SHORT_COUNT) * (RANDOM_INPUTS_SHORT_COUNT))
+
+
+int32_t main(void)
+{
+    char *instruction_name = "AVE_U.D";
+    int32_t ret;
+    uint32_t i, j;
+    struct timeval start, end;
+    double elapsed_time;
+
+    uint64_t b128_result[TEST_COUNT_TOTAL][2];
+    uint64_t b128_expect[TEST_COUNT_TOTAL][2] = {
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },    /*   0  */
+        { 0x7fffffffffffffffULL, 0x7fffffffffffffffULL, },
+        { 0xd555555555555554ULL, 0xd555555555555554ULL, },
+        { 0xaaaaaaaaaaaaaaaaULL, 0xaaaaaaaaaaaaaaaaULL, },
+        { 0xe666666666666665ULL, 0xe666666666666665ULL, },
+        { 0x9999999999999999ULL, 0x9999999999999999ULL, },
+        { 0xf1c71c71c71c71c6ULL, 0x9c71c71c71c71c71ULL, },
+        { 0x8e38e38e38e38e38ULL, 0xe38e38e38e38e38dULL, },
+        { 0x7fffffffffffffffULL, 0x7fffffffffffffffULL, },    /*   8  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x5555555555555555ULL, 0x5555555555555555ULL, },
+        { 0x2aaaaaaaaaaaaaaaULL, 0x2aaaaaaaaaaaaaaaULL, },
+        { 0x6666666666666666ULL, 0x6666666666666666ULL, },
+        { 0x1999999999999999ULL, 0x1999999999999999ULL, },
+        { 0x71c71c71c71c71c7ULL, 0x1c71c71c71c71c71ULL, },
+        { 0x0e38e38e38e38e38ULL, 0x638e38e38e38e38eULL, },
+        { 0xd555555555555554ULL, 0xd555555555555554ULL, },    /*  16  */
+        { 0x5555555555555555ULL, 0x5555555555555555ULL, },
+        { 0xaaaaaaaaaaaaaaaaULL, 0xaaaaaaaaaaaaaaaaULL, },
+        { 0x7fffffffffffffffULL, 0x7fffffffffffffffULL, },
+        { 0xbbbbbbbbbbbbbbbbULL, 0xbbbbbbbbbbbbbbbbULL, },
+        { 0x6eeeeeeeeeeeeeeeULL, 0x6eeeeeeeeeeeeeeeULL, },
+        { 0xc71c71c71c71c71cULL, 0x71c71c71c71c71c6ULL, },
+        { 0x638e38e38e38e38dULL, 0xb8e38e38e38e38e3ULL, },
+        { 0xaaaaaaaaaaaaaaaaULL, 0xaaaaaaaaaaaaaaaaULL, },    /*  24  */
+        { 0x2aaaaaaaaaaaaaaaULL, 0x2aaaaaaaaaaaaaaaULL, },
+        { 0x7fffffffffffffffULL, 0x7fffffffffffffffULL, },
+        { 0x5555555555555555ULL, 0x5555555555555555ULL, },
+        { 0x9111111111111110ULL, 0x9111111111111110ULL, },
+        { 0x4444444444444444ULL, 0x4444444444444444ULL, },
+        { 0x9c71c71c71c71c71ULL, 0x471c71c71c71c71cULL, },
+        { 0x38e38e38e38e38e3ULL, 0x8e38e38e38e38e38ULL, },
+        { 0xe666666666666665ULL, 0xe666666666666665ULL, },    /*  32  */
+        { 0x6666666666666666ULL, 0x6666666666666666ULL, },
+        { 0xbbbbbbbbbbbbbbbbULL, 0xbbbbbbbbbbbbbbbbULL, },
+        { 0x9111111111111110ULL, 0x9111111111111110ULL, },
+        { 0xccccccccccccccccULL, 0xccccccccccccccccULL, },
+        { 0x7fffffffffffffffULL, 0x7fffffffffffffffULL, },
+        { 0xd82d82d82d82d82dULL, 0x82d82d82d82d82d7ULL, },
+        { 0x749f49f49f49f49eULL, 0xc9f49f49f49f49f4ULL, },
+        { 0x9999999999999999ULL, 0x9999999999999999ULL, },    /*  40  */
+        { 0x1999999999999999ULL, 0x1999999999999999ULL, },
+        { 0x6eeeeeeeeeeeeeeeULL, 0x6eeeeeeeeeeeeeeeULL, },
+        { 0x4444444444444444ULL, 0x4444444444444444ULL, },
+        { 0x7fffffffffffffffULL, 0x7fffffffffffffffULL, },
+        { 0x3333333333333333ULL, 0x3333333333333333ULL, },
+        { 0x8b60b60b60b60b60ULL, 0x360b60b60b60b60bULL, },
+        { 0x27d27d27d27d27d2ULL, 0x7d27d27d27d27d27ULL, },
+        { 0xf1c71c71c71c71c6ULL, 0x9c71c71c71c71c71ULL, },    /*  48  */
+        { 0x71c71c71c71c71c7ULL, 0x1c71c71c71c71c71ULL, },
+        { 0xc71c71c71c71c71cULL, 0x71c71c71c71c71c6ULL, },
+        { 0x9c71c71c71c71c71ULL, 0x471c71c71c71c71cULL, },
+        { 0xd82d82d82d82d82dULL, 0x82d82d82d82d82d7ULL, },
+        { 0x8b60b60b60b60b60ULL, 0x360b60b60b60b60bULL, },
+        { 0xe38e38e38e38e38eULL, 0x38e38e38e38e38e3ULL, },
+        { 0x7fffffffffffffffULL, 0x7fffffffffffffffULL, },
+        { 0x8e38e38e38e38e38ULL, 0xe38e38e38e38e38dULL, },    /*  56  */
+        { 0x0e38e38e38e38e38ULL, 0x638e38e38e38e38eULL, },
+        { 0x638e38e38e38e38dULL, 0xb8e38e38e38e38e3ULL, },
+        { 0x38e38e38e38e38e3ULL, 0x8e38e38e38e38e38ULL, },
+        { 0x749f49f49f49f49eULL, 0xc9f49f49f49f49f4ULL, },
+        { 0x27d27d27d27d27d2ULL, 0x7d27d27d27d27d27ULL, },
+        { 0x7fffffffffffffffULL, 0x7fffffffffffffffULL, },
+        { 0x1c71c71c71c71c71ULL, 0xc71c71c71c71c71cULL, },
+        { 0x886ae6cc28625540ULL, 0x4b670b5efe7bb00cULL, },    /*  64  */
+        { 0xc2147397bafb0e24ULL, 0x2f2f633c89dd8184ULL, },
+        { 0x9a62cabb7118f060ULL, 0x399fe92f54d36a90ULL, },
+        { 0x7c5cfe8cc34a1bc7ULL, 0x6cac4a1bd3df4956ULL, },
+        { 0xc2147397bafb0e24ULL, 0x2f2f633c89dd8184ULL, },
+        { 0xfbbe00634d93c708ULL, 0x12f7bb1a153f52fcULL, },
+        { 0xd40c578703b1a944ULL, 0x1d68410ce0353c08ULL, },
+        { 0xb6068b5855e2d4abULL, 0x5074a1f95f411aceULL, },
+        { 0x9a62cabb7118f060ULL, 0x399fe92f54d36a90ULL, },    /*  72  */
+        { 0xd40c578703b1a944ULL, 0x1d68410ce0353c08ULL, },
+        { 0xac5aaeaab9cf8b80ULL, 0x27d8c6ffab2b2514ULL, },
+        { 0x8e54e27c0c00b6e7ULL, 0x5ae527ec2a3703daULL, },
+        { 0x7c5cfe8cc34a1bc7ULL, 0x6cac4a1bd3df4956ULL, },
+        { 0xb6068b5855e2d4abULL, 0x5074a1f95f411aceULL, },
+};
+
+    gettimeofday(&start, NULL);
+
+    for (i = 0; i < PATTERN_INPUTS_SHORT_COUNT; i++) {
+        for (j = 0; j < PATTERN_INPUTS_SHORT_COUNT; j++) {
+            do_msa_AVE_U_D(b128_pattern[i], b128_pattern[j],
+                           b128_result[PATTERN_INPUTS_SHORT_COUNT * i + j]);
+        }
+    }
+
+    for (i = 0; i < RANDOM_INPUTS_SHORT_COUNT; i++) {
+        for (j = 0; j < RANDOM_INPUTS_SHORT_COUNT; j++) {
+            do_msa_AVE_U_D(b128_random[i], b128_random[j],
+                           b128_result[((PATTERN_INPUTS_SHORT_COUNT) *
+                                        (PATTERN_INPUTS_SHORT_COUNT)) +
+                                       RANDOM_INPUTS_SHORT_COUNT * i + j]);
+        }
+    }
+
+    gettimeofday(&end, NULL);
+
+    elapsed_time = (end.tv_sec - start.tv_sec) * 1000.0;
+    elapsed_time += (end.tv_usec - start.tv_usec) / 1000.0;
+
+    ret = check_results(instruction_name, TEST_COUNT_TOTAL, elapsed_time,
+                        &b128_result[0][0], &b128_expect[0][0]);
+
+    return ret;
+}
diff --git a/tests/tcg/mips/user/ase/msa/int-average/test_msa_ave_u_h.c b/tests/tcg/mips/user/ase/msa/int-average/test_msa_ave_u_h.c
new file mode 100644
index 0000000..b7db518
--- /dev/null
+++ b/tests/tcg/mips/user/ase/msa/int-average/test_msa_ave_u_h.c
@@ -0,0 +1,151 @@
+/*
+ *  Test program for MSA instruction AVE_U.H
+ *
+ *  Copyright (C) 2018  Wave Computing, Inc.
+ *  Copyright (C) 2018  Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
+ *
+ *  This program is free software: you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation, either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <sys/time.h>
+#include <stdint.h>
+
+#include "../../../../include/wrappers_msa.h"
+#include "../../../../include/test_inputs.h"
+#include "../../../../include/test_utils.h"
+
+#define TEST_COUNT_TOTAL (                                                \
+            (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
+            (RANDOM_INPUTS_SHORT_COUNT) * (RANDOM_INPUTS_SHORT_COUNT))
+
+
+int32_t main(void)
+{
+    char *instruction_name = "AVE_U.H";
+    int32_t ret;
+    uint32_t i, j;
+    struct timeval start, end;
+    double elapsed_time;
+
+    uint64_t b128_result[TEST_COUNT_TOTAL][2];
+    uint64_t b128_expect[TEST_COUNT_TOTAL][2] = {
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },    /*   0  */
+        { 0x7fff7fff7fff7fffULL, 0x7fff7fff7fff7fffULL, },
+        { 0xd554d554d554d554ULL, 0xd554d554d554d554ULL, },
+        { 0xaaaaaaaaaaaaaaaaULL, 0xaaaaaaaaaaaaaaaaULL, },
+        { 0xe665e665e665e665ULL, 0xe665e665e665e665ULL, },
+        { 0x9999999999999999ULL, 0x9999999999999999ULL, },
+        { 0xf1c69c71c71bf1c6ULL, 0x9c71c71bf1c69c71ULL, },
+        { 0x8e38e38db8e38e38ULL, 0xe38db8e38e38e38dULL, },
+        { 0x7fff7fff7fff7fffULL, 0x7fff7fff7fff7fffULL, },    /*   8  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x5555555555555555ULL, 0x5555555555555555ULL, },
+        { 0x2aaa2aaa2aaa2aaaULL, 0x2aaa2aaa2aaa2aaaULL, },
+        { 0x6666666666666666ULL, 0x6666666666666666ULL, },
+        { 0x1999199919991999ULL, 0x1999199919991999ULL, },
+        { 0x71c71c71471c71c7ULL, 0x1c71471c71c71c71ULL, },
+        { 0x0e38638e38e30e38ULL, 0x638e38e30e38638eULL, },
+        { 0xd554d554d554d554ULL, 0xd554d554d554d554ULL, },    /*  16  */
+        { 0x5555555555555555ULL, 0x5555555555555555ULL, },
+        { 0xaaaaaaaaaaaaaaaaULL, 0xaaaaaaaaaaaaaaaaULL, },
+        { 0x7fff7fff7fff7fffULL, 0x7fff7fff7fff7fffULL, },
+        { 0xbbbbbbbbbbbbbbbbULL, 0xbbbbbbbbbbbbbbbbULL, },
+        { 0x6eee6eee6eee6eeeULL, 0x6eee6eee6eee6eeeULL, },
+        { 0xc71c71c69c71c71cULL, 0x71c69c71c71c71c6ULL, },
+        { 0x638db8e38e38638dULL, 0xb8e38e38638db8e3ULL, },
+        { 0xaaaaaaaaaaaaaaaaULL, 0xaaaaaaaaaaaaaaaaULL, },    /*  24  */
+        { 0x2aaa2aaa2aaa2aaaULL, 0x2aaa2aaa2aaa2aaaULL, },
+        { 0x7fff7fff7fff7fffULL, 0x7fff7fff7fff7fffULL, },
+        { 0x5555555555555555ULL, 0x5555555555555555ULL, },
+        { 0x9110911091109110ULL, 0x9110911091109110ULL, },
+        { 0x4444444444444444ULL, 0x4444444444444444ULL, },
+        { 0x9c71471c71c69c71ULL, 0x471c71c69c71471cULL, },
+        { 0x38e38e38638e38e3ULL, 0x8e38638e38e38e38ULL, },
+        { 0xe665e665e665e665ULL, 0xe665e665e665e665ULL, },    /*  32  */
+        { 0x6666666666666666ULL, 0x6666666666666666ULL, },
+        { 0xbbbbbbbbbbbbbbbbULL, 0xbbbbbbbbbbbbbbbbULL, },
+        { 0x9110911091109110ULL, 0x9110911091109110ULL, },
+        { 0xccccccccccccccccULL, 0xccccccccccccccccULL, },
+        { 0x7fff7fff7fff7fffULL, 0x7fff7fff7fff7fffULL, },
+        { 0xd82d82d7ad82d82dULL, 0x82d7ad82d82d82d7ULL, },
+        { 0x749ec9f49f49749eULL, 0xc9f49f49749ec9f4ULL, },
+        { 0x9999999999999999ULL, 0x9999999999999999ULL, },    /*  40  */
+        { 0x1999199919991999ULL, 0x1999199919991999ULL, },
+        { 0x6eee6eee6eee6eeeULL, 0x6eee6eee6eee6eeeULL, },
+        { 0x4444444444444444ULL, 0x4444444444444444ULL, },
+        { 0x7fff7fff7fff7fffULL, 0x7fff7fff7fff7fffULL, },
+        { 0x3333333333333333ULL, 0x3333333333333333ULL, },
+        { 0x8b60360b60b58b60ULL, 0x360b60b58b60360bULL, },
+        { 0x27d27d27527d27d2ULL, 0x7d27527d27d27d27ULL, },
+        { 0xf1c69c71c71bf1c6ULL, 0x9c71c71bf1c69c71ULL, },    /*  48  */
+        { 0x71c71c71471c71c7ULL, 0x1c71471c71c71c71ULL, },
+        { 0xc71c71c69c71c71cULL, 0x71c69c71c71c71c6ULL, },
+        { 0x9c71471c71c69c71ULL, 0x471c71c69c71471cULL, },
+        { 0xd82d82d7ad82d82dULL, 0x82d7ad82d82d82d7ULL, },
+        { 0x8b60360b60b58b60ULL, 0x360b60b58b60360bULL, },
+        { 0xe38e38e38e38e38eULL, 0x38e38e38e38e38e3ULL, },
+        { 0x7fff7fff7fff7fffULL, 0x7fff7fff7fff7fffULL, },
+        { 0x8e38e38db8e38e38ULL, 0xe38db8e38e38e38dULL, },    /*  56  */
+        { 0x0e38638e38e30e38ULL, 0x638e38e30e38638eULL, },
+        { 0x638db8e38e38638dULL, 0xb8e38e38638db8e3ULL, },
+        { 0x38e38e38638e38e3ULL, 0x8e38638e38e38e38ULL, },
+        { 0x749ec9f49f49749eULL, 0xc9f49f49749ec9f4ULL, },
+        { 0x27d27d27527d27d2ULL, 0x7d27527d27d27d27ULL, },
+        { 0x7fff7fff7fff7fffULL, 0x7fff7fff7fff7fffULL, },
+        { 0x1c71c71c71c71c71ULL, 0xc71c71c71c71c71cULL, },
+        { 0x886ae6cc28625540ULL, 0x4b670b5efe7bb00cULL, },    /*  64  */
+        { 0xc21473973afa8e24ULL, 0x2f2f633c89dd8184ULL, },
+        { 0x9a62cabb71187060ULL, 0x399f692ed4d36a90ULL, },
+        { 0x7c5c7e8c43499bc7ULL, 0x6cac4a1bd3dec956ULL, },
+        { 0xc21473973afa8e24ULL, 0x2f2f633c89dd8184ULL, },
+        { 0xfbbe00634d93c708ULL, 0x12f7bb1a153f52fcULL, },
+        { 0xd40c578683b1a944ULL, 0x1d67c10c60353c08ULL, },
+        { 0xb6060b5855e2d4abULL, 0x5074a1f95f409aceULL, },
+        { 0x9a62cabb71187060ULL, 0x399f692ed4d36a90ULL, },    /*  72  */
+        { 0xd40c578683b1a944ULL, 0x1d67c10c60353c08ULL, },
+        { 0xac5aaeaab9cf8b80ULL, 0x27d8c6ffab2b2514ULL, },
+        { 0x8e54627b8c00b6e7ULL, 0x5ae4a7ebaa3683daULL, },
+        { 0x7c5c7e8c43499bc7ULL, 0x6cac4a1bd3dec956ULL, },
+        { 0xb6060b5855e2d4abULL, 0x5074a1f95f409aceULL, },
+};
+
+    gettimeofday(&start, NULL);
+
+    for (i = 0; i < PATTERN_INPUTS_SHORT_COUNT; i++) {
+        for (j = 0; j < PATTERN_INPUTS_SHORT_COUNT; j++) {
+            do_msa_AVE_U_H(b128_pattern[i], b128_pattern[j],
+                           b128_result[PATTERN_INPUTS_SHORT_COUNT * i + j]);
+        }
+    }
+
+    for (i = 0; i < RANDOM_INPUTS_SHORT_COUNT; i++) {
+        for (j = 0; j < RANDOM_INPUTS_SHORT_COUNT; j++) {
+            do_msa_AVE_U_H(b128_random[i], b128_random[j],
+                           b128_result[((PATTERN_INPUTS_SHORT_COUNT) *
+                                        (PATTERN_INPUTS_SHORT_COUNT)) +
+                                       RANDOM_INPUTS_SHORT_COUNT * i + j]);
+        }
+    }
+
+    gettimeofday(&end, NULL);
+
+    elapsed_time = (end.tv_sec - start.tv_sec) * 1000.0;
+    elapsed_time += (end.tv_usec - start.tv_usec) / 1000.0;
+
+    ret = check_results(instruction_name, TEST_COUNT_TOTAL, elapsed_time,
+                        &b128_result[0][0], &b128_expect[0][0]);
+
+    return ret;
+}
diff --git a/tests/tcg/mips/user/ase/msa/int-average/test_msa_ave_u_w.c b/tests/tcg/mips/user/ase/msa/int-average/test_msa_ave_u_w.c
new file mode 100644
index 0000000..75e2409
--- /dev/null
+++ b/tests/tcg/mips/user/ase/msa/int-average/test_msa_ave_u_w.c
@@ -0,0 +1,151 @@
+/*
+ *  Test program for MSA instruction AVE_U.W
+ *
+ *  Copyright (C) 2018  Wave Computing, Inc.
+ *  Copyright (C) 2018  Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
+ *
+ *  This program is free software: you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation, either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <sys/time.h>
+#include <stdint.h>
+
+#include "../../../../include/wrappers_msa.h"
+#include "../../../../include/test_inputs.h"
+#include "../../../../include/test_utils.h"
+
+#define TEST_COUNT_TOTAL (                                                \
+            (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
+            (RANDOM_INPUTS_SHORT_COUNT) * (RANDOM_INPUTS_SHORT_COUNT))
+
+
+int32_t main(void)
+{
+    char *instruction_name = "AVE_U.W";
+    int32_t ret;
+    uint32_t i, j;
+    struct timeval start, end;
+    double elapsed_time;
+
+    uint64_t b128_result[TEST_COUNT_TOTAL][2];
+    uint64_t b128_expect[TEST_COUNT_TOTAL][2] = {
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },    /*   0  */
+        { 0x7fffffff7fffffffULL, 0x7fffffff7fffffffULL, },
+        { 0xd5555554d5555554ULL, 0xd5555554d5555554ULL, },
+        { 0xaaaaaaaaaaaaaaaaULL, 0xaaaaaaaaaaaaaaaaULL, },
+        { 0xe6666665e6666665ULL, 0xe6666665e6666665ULL, },
+        { 0x9999999999999999ULL, 0x9999999999999999ULL, },
+        { 0xf1c71c71c71c71c6ULL, 0x9c71c71bf1c71c71ULL, },
+        { 0x8e38e38db8e38e38ULL, 0xe38e38e38e38e38dULL, },
+        { 0x7fffffff7fffffffULL, 0x7fffffff7fffffffULL, },    /*   8  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x5555555555555555ULL, 0x5555555555555555ULL, },
+        { 0x2aaaaaaa2aaaaaaaULL, 0x2aaaaaaa2aaaaaaaULL, },
+        { 0x6666666666666666ULL, 0x6666666666666666ULL, },
+        { 0x1999999919999999ULL, 0x1999999919999999ULL, },
+        { 0x71c71c71471c71c7ULL, 0x1c71c71c71c71c71ULL, },
+        { 0x0e38e38e38e38e38ULL, 0x638e38e30e38e38eULL, },
+        { 0xd5555554d5555554ULL, 0xd5555554d5555554ULL, },    /*  16  */
+        { 0x5555555555555555ULL, 0x5555555555555555ULL, },
+        { 0xaaaaaaaaaaaaaaaaULL, 0xaaaaaaaaaaaaaaaaULL, },
+        { 0x7fffffff7fffffffULL, 0x7fffffff7fffffffULL, },
+        { 0xbbbbbbbbbbbbbbbbULL, 0xbbbbbbbbbbbbbbbbULL, },
+        { 0x6eeeeeee6eeeeeeeULL, 0x6eeeeeee6eeeeeeeULL, },
+        { 0xc71c71c69c71c71cULL, 0x71c71c71c71c71c6ULL, },
+        { 0x638e38e38e38e38dULL, 0xb8e38e38638e38e3ULL, },
+        { 0xaaaaaaaaaaaaaaaaULL, 0xaaaaaaaaaaaaaaaaULL, },    /*  24  */
+        { 0x2aaaaaaa2aaaaaaaULL, 0x2aaaaaaa2aaaaaaaULL, },
+        { 0x7fffffff7fffffffULL, 0x7fffffff7fffffffULL, },
+        { 0x5555555555555555ULL, 0x5555555555555555ULL, },
+        { 0x9111111091111110ULL, 0x9111111091111110ULL, },
+        { 0x4444444444444444ULL, 0x4444444444444444ULL, },
+        { 0x9c71c71c71c71c71ULL, 0x471c71c69c71c71cULL, },
+        { 0x38e38e38638e38e3ULL, 0x8e38e38e38e38e38ULL, },
+        { 0xe6666665e6666665ULL, 0xe6666665e6666665ULL, },    /*  32  */
+        { 0x6666666666666666ULL, 0x6666666666666666ULL, },
+        { 0xbbbbbbbbbbbbbbbbULL, 0xbbbbbbbbbbbbbbbbULL, },
+        { 0x9111111091111110ULL, 0x9111111091111110ULL, },
+        { 0xccccccccccccccccULL, 0xccccccccccccccccULL, },
+        { 0x7fffffff7fffffffULL, 0x7fffffff7fffffffULL, },
+        { 0xd82d82d7ad82d82dULL, 0x82d82d82d82d82d7ULL, },
+        { 0x749f49f49f49f49eULL, 0xc9f49f49749f49f4ULL, },
+        { 0x9999999999999999ULL, 0x9999999999999999ULL, },    /*  40  */
+        { 0x1999999919999999ULL, 0x1999999919999999ULL, },
+        { 0x6eeeeeee6eeeeeeeULL, 0x6eeeeeee6eeeeeeeULL, },
+        { 0x4444444444444444ULL, 0x4444444444444444ULL, },
+        { 0x7fffffff7fffffffULL, 0x7fffffff7fffffffULL, },
+        { 0x3333333333333333ULL, 0x3333333333333333ULL, },
+        { 0x8b60b60b60b60b60ULL, 0x360b60b58b60b60bULL, },
+        { 0x27d27d27527d27d2ULL, 0x7d27d27d27d27d27ULL, },
+        { 0xf1c71c71c71c71c6ULL, 0x9c71c71bf1c71c71ULL, },    /*  48  */
+        { 0x71c71c71471c71c7ULL, 0x1c71c71c71c71c71ULL, },
+        { 0xc71c71c69c71c71cULL, 0x71c71c71c71c71c6ULL, },
+        { 0x9c71c71c71c71c71ULL, 0x471c71c69c71c71cULL, },
+        { 0xd82d82d7ad82d82dULL, 0x82d82d82d82d82d7ULL, },
+        { 0x8b60b60b60b60b60ULL, 0x360b60b58b60b60bULL, },
+        { 0xe38e38e38e38e38eULL, 0x38e38e38e38e38e3ULL, },
+        { 0x7fffffff7fffffffULL, 0x7fffffff7fffffffULL, },
+        { 0x8e38e38db8e38e38ULL, 0xe38e38e38e38e38dULL, },    /*  56  */
+        { 0x0e38e38e38e38e38ULL, 0x638e38e30e38e38eULL, },
+        { 0x638e38e38e38e38dULL, 0xb8e38e38638e38e3ULL, },
+        { 0x38e38e38638e38e3ULL, 0x8e38e38e38e38e38ULL, },
+        { 0x749f49f49f49f49eULL, 0xc9f49f49749f49f4ULL, },
+        { 0x27d27d27527d27d2ULL, 0x7d27d27d27d27d27ULL, },
+        { 0x7fffffff7fffffffULL, 0x7fffffff7fffffffULL, },
+        { 0x1c71c71c71c71c71ULL, 0xc71c71c71c71c71cULL, },
+        { 0x886ae6cc28625540ULL, 0x4b670b5efe7bb00cULL, },    /*  64  */
+        { 0xc21473973afb0e24ULL, 0x2f2f633c89dd8184ULL, },
+        { 0x9a62cabb7118f060ULL, 0x399fe92ed4d36a90ULL, },
+        { 0x7c5cfe8c434a1bc7ULL, 0x6cac4a1bd3df4956ULL, },
+        { 0xc21473973afb0e24ULL, 0x2f2f633c89dd8184ULL, },
+        { 0xfbbe00634d93c708ULL, 0x12f7bb1a153f52fcULL, },
+        { 0xd40c578683b1a944ULL, 0x1d68410c60353c08ULL, },
+        { 0xb6068b5855e2d4abULL, 0x5074a1f95f411aceULL, },
+        { 0x9a62cabb7118f060ULL, 0x399fe92ed4d36a90ULL, },    /*  72  */
+        { 0xd40c578683b1a944ULL, 0x1d68410c60353c08ULL, },
+        { 0xac5aaeaab9cf8b80ULL, 0x27d8c6ffab2b2514ULL, },
+        { 0x8e54e27b8c00b6e7ULL, 0x5ae527ebaa3703daULL, },
+        { 0x7c5cfe8c434a1bc7ULL, 0x6cac4a1bd3df4956ULL, },
+        { 0xb6068b5855e2d4abULL, 0x5074a1f95f411aceULL, },
+};
+
+    gettimeofday(&start, NULL);
+
+    for (i = 0; i < PATTERN_INPUTS_SHORT_COUNT; i++) {
+        for (j = 0; j < PATTERN_INPUTS_SHORT_COUNT; j++) {
+            do_msa_AVE_U_W(b128_pattern[i], b128_pattern[j],
+                           b128_result[PATTERN_INPUTS_SHORT_COUNT * i + j]);
+        }
+    }
+
+    for (i = 0; i < RANDOM_INPUTS_SHORT_COUNT; i++) {
+        for (j = 0; j < RANDOM_INPUTS_SHORT_COUNT; j++) {
+            do_msa_AVE_U_W(b128_random[i], b128_random[j],
+                           b128_result[((PATTERN_INPUTS_SHORT_COUNT) *
+                                        (PATTERN_INPUTS_SHORT_COUNT)) +
+                                       RANDOM_INPUTS_SHORT_COUNT * i + j]);
+        }
+    }
+
+    gettimeofday(&end, NULL);
+
+    elapsed_time = (end.tv_sec - start.tv_sec) * 1000.0;
+    elapsed_time += (end.tv_usec - start.tv_usec) / 1000.0;
+
+    ret = check_results(instruction_name, TEST_COUNT_TOTAL, elapsed_time,
+                        &b128_result[0][0], &b128_expect[0][0]);
+
+    return ret;
+}
diff --git a/tests/tcg/mips/user/ase/msa/int-average/test_msa_aver_s_b.c b/tests/tcg/mips/user/ase/msa/int-average/test_msa_aver_s_b.c
new file mode 100644
index 0000000..59bba28
--- /dev/null
+++ b/tests/tcg/mips/user/ase/msa/int-average/test_msa_aver_s_b.c
@@ -0,0 +1,151 @@
+/*
+ *  Test program for MSA instruction AVER_S.B
+ *
+ *  Copyright (C) 2018  Wave Computing, Inc.
+ *  Copyright (C) 2018  Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
+ *
+ *  This program is free software: you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation, either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <sys/time.h>
+#include <stdint.h>
+
+#include "../../../../include/wrappers_msa.h"
+#include "../../../../include/test_inputs.h"
+#include "../../../../include/test_utils.h"
+
+#define TEST_COUNT_TOTAL (                                                \
+            (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
+            (RANDOM_INPUTS_SHORT_COUNT) * (RANDOM_INPUTS_SHORT_COUNT))
+
+
+int32_t main(void)
+{
+    char *instruction_name = "AVER_S.B";
+    int32_t ret;
+    uint32_t i, j;
+    struct timeval start, end;
+    double elapsed_time;
+
+    uint64_t b128_result[TEST_COUNT_TOTAL][2];
+    uint64_t b128_expect[TEST_COUNT_TOTAL][2] = {
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },    /*   0  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0xd5d5d5d5d5d5d5d5ULL, 0xd5d5d5d5d5d5d5d5ULL, },
+        { 0x2a2a2a2a2a2a2a2aULL, 0x2a2a2a2a2a2a2a2aULL, },
+        { 0xe6e6e6e6e6e6e6e6ULL, 0xe6e6e6e6e6e6e6e6ULL, },
+        { 0x1919191919191919ULL, 0x1919191919191919ULL, },
+        { 0xf1c71cf1c71cf1c7ULL, 0x1cf1c71cf1c71cf1ULL, },
+        { 0x0e38e30e38e30e38ULL, 0xe30e38e30e38e30eULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*   8  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0xd5d5d5d5d5d5d5d5ULL, 0xd5d5d5d5d5d5d5d5ULL, },
+        { 0x2b2b2b2b2b2b2b2bULL, 0x2b2b2b2b2b2b2b2bULL, },
+        { 0xe6e6e6e6e6e6e6e6ULL, 0xe6e6e6e6e6e6e6e6ULL, },
+        { 0x1a1a1a1a1a1a1a1aULL, 0x1a1a1a1a1a1a1a1aULL, },
+        { 0xf2c71cf2c71cf2c7ULL, 0x1cf2c71cf2c71cf2ULL, },
+        { 0x0e39e40e39e40e39ULL, 0xe40e39e40e39e40eULL, },
+        { 0xd5d5d5d5d5d5d5d5ULL, 0xd5d5d5d5d5d5d5d5ULL, },    /*  16  */
+        { 0xd5d5d5d5d5d5d5d5ULL, 0xd5d5d5d5d5d5d5d5ULL, },
+        { 0xaaaaaaaaaaaaaaaaULL, 0xaaaaaaaaaaaaaaaaULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0xbbbbbbbbbbbbbbbbULL, 0xbbbbbbbbbbbbbbbbULL, },
+        { 0xefefefefefefefefULL, 0xefefefefefefefefULL, },
+        { 0xc79cf1c79cf1c79cULL, 0xf1c79cf1c79cf1c7ULL, },
+        { 0xe30eb9e30eb9e30eULL, 0xb9e30eb9e30eb9e3ULL, },
+        { 0x2a2a2a2a2a2a2a2aULL, 0x2a2a2a2a2a2a2a2aULL, },    /*  24  */
+        { 0x2b2b2b2b2b2b2b2bULL, 0x2b2b2b2b2b2b2b2bULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x5555555555555555ULL, 0x5555555555555555ULL, },
+        { 0x1111111111111111ULL, 0x1111111111111111ULL, },
+        { 0x4444444444444444ULL, 0x4444444444444444ULL, },
+        { 0x1cf2471cf2471cf2ULL, 0x471cf2471cf2471cULL, },
+        { 0x39630e39630e3963ULL, 0x0e39630e39630e39ULL, },
+        { 0xe6e6e6e6e6e6e6e6ULL, 0xe6e6e6e6e6e6e6e6ULL, },    /*  32  */
+        { 0xe6e6e6e6e6e6e6e6ULL, 0xe6e6e6e6e6e6e6e6ULL, },
+        { 0xbbbbbbbbbbbbbbbbULL, 0xbbbbbbbbbbbbbbbbULL, },
+        { 0x1111111111111111ULL, 0x1111111111111111ULL, },
+        { 0xccccccccccccccccULL, 0xccccccccccccccccULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0xd8ad02d8ad02d8adULL, 0x02d8ad02d8ad02d8ULL, },
+        { 0xf41fcaf41fcaf41fULL, 0xcaf41fcaf41fcaf4ULL, },
+        { 0x1919191919191919ULL, 0x1919191919191919ULL, },    /*  40  */
+        { 0x1a1a1a1a1a1a1a1aULL, 0x1a1a1a1a1a1a1a1aULL, },
+        { 0xefefefefefefefefULL, 0xefefefefefefefefULL, },
+        { 0x4444444444444444ULL, 0x4444444444444444ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x3333333333333333ULL, 0x3333333333333333ULL, },
+        { 0x0be1360be1360be1ULL, 0x360be1360be1360bULL, },
+        { 0x2852fd2852fd2852ULL, 0xfd2852fd2852fd28ULL, },
+        { 0xf1c71cf1c71cf1c7ULL, 0x1cf1c71cf1c71cf1ULL, },    /*  48  */
+        { 0xf2c71cf2c71cf2c7ULL, 0x1cf2c71cf2c71cf2ULL, },
+        { 0xc79cf1c79cf1c79cULL, 0xf1c79cf1c79cf1c7ULL, },
+        { 0x1cf2471cf2471cf2ULL, 0x471cf2471cf2471cULL, },
+        { 0xd8ad02d8ad02d8adULL, 0x02d8ad02d8ad02d8ULL, },
+        { 0x0be1360be1360be1ULL, 0x360be1360be1360bULL, },
+        { 0xe38e38e38e38e38eULL, 0x38e38e38e38e38e3ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0e38e30e38e30e38ULL, 0xe30e38e30e38e30eULL, },    /*  56  */
+        { 0x0e39e40e39e40e39ULL, 0xe40e39e40e39e40eULL, },
+        { 0xe30eb9e30eb9e30eULL, 0xb9e30eb9e30eb9e3ULL, },
+        { 0x39630e39630e3963ULL, 0x0e39630e39630e39ULL, },
+        { 0xf41fcaf41fcaf41fULL, 0xcaf41fcaf41fcaf4ULL, },
+        { 0x2852fd2852fd2852ULL, 0xfd2852fd2852fd28ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x1c71c71c71c71c71ULL, 0xc71c71c71c71c71cULL, },
+        { 0x886ae6cc28625540ULL, 0x4b670b5efe7bb00cULL, },    /*  64  */
+        { 0xc214f3183bfb0e24ULL, 0x2f2fe33c0a5d0104ULL, },
+        { 0x9a62cabbf119f0e0ULL, 0x3920e92fd553eb10ULL, },
+        { 0xfc5dfe0d434a1c47ULL, 0xec2cca1bd45fc9d6ULL, },
+        { 0xc214f3183bfb0e24ULL, 0x2f2fe33c0a5d0104ULL, },
+        { 0xfbbe00634d93c708ULL, 0x12f7bb1a153f52fcULL, },
+        { 0xd40cd70703b1a9c4ULL, 0x1de8c10de0353c08ULL, },
+        { 0x36070b5856e2d52bULL, 0xd0f4a2f9df411aceULL, },
+        { 0x9a62cabbf119f0e0ULL, 0x3920e92fd553eb10ULL, },    /*  72  */
+        { 0xd40cd70703b1a9c4ULL, 0x1de8c10de0353c08ULL, },
+        { 0xac5aaeaab9cf8b80ULL, 0x27d8c6ffab2b2514ULL, },
+        { 0x0e55e2fc0c00b7e7ULL, 0xdae5a7ecaa3704daULL, },
+        { 0xfc5dfe0d434a1c47ULL, 0xec2cca1bd45fc9d6ULL, },
+        { 0x36070b5856e2d52bULL, 0xd0f4a2f9df411aceULL, },
+};
+
+    gettimeofday(&start, NULL);
+
+    for (i = 0; i < PATTERN_INPUTS_SHORT_COUNT; i++) {
+        for (j = 0; j < PATTERN_INPUTS_SHORT_COUNT; j++) {
+            do_msa_AVER_S_B(b128_pattern[i], b128_pattern[j],
+                           b128_result[PATTERN_INPUTS_SHORT_COUNT * i + j]);
+        }
+    }
+
+    for (i = 0; i < RANDOM_INPUTS_SHORT_COUNT; i++) {
+        for (j = 0; j < RANDOM_INPUTS_SHORT_COUNT; j++) {
+            do_msa_AVER_S_B(b128_random[i], b128_random[j],
+                           b128_result[((PATTERN_INPUTS_SHORT_COUNT) *
+                                        (PATTERN_INPUTS_SHORT_COUNT)) +
+                                       RANDOM_INPUTS_SHORT_COUNT * i + j]);
+        }
+    }
+
+    gettimeofday(&end, NULL);
+
+    elapsed_time = (end.tv_sec - start.tv_sec) * 1000.0;
+    elapsed_time += (end.tv_usec - start.tv_usec) / 1000.0;
+
+    ret = check_results(instruction_name, TEST_COUNT_TOTAL, elapsed_time,
+                        &b128_result[0][0], &b128_expect[0][0]);
+
+    return ret;
+}
diff --git a/tests/tcg/mips/user/ase/msa/int-average/test_msa_aver_s_d.c b/tests/tcg/mips/user/ase/msa/int-average/test_msa_aver_s_d.c
new file mode 100644
index 0000000..435c09f
--- /dev/null
+++ b/tests/tcg/mips/user/ase/msa/int-average/test_msa_aver_s_d.c
@@ -0,0 +1,151 @@
+/*
+ *  Test program for MSA instruction AVER_S.D
+ *
+ *  Copyright (C) 2018  Wave Computing, Inc.
+ *  Copyright (C) 2018  Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
+ *
+ *  This program is free software: you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation, either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <sys/time.h>
+#include <stdint.h>
+
+#include "../../../../include/wrappers_msa.h"
+#include "../../../../include/test_inputs.h"
+#include "../../../../include/test_utils.h"
+
+#define TEST_COUNT_TOTAL (                                                \
+            (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
+            (RANDOM_INPUTS_SHORT_COUNT) * (RANDOM_INPUTS_SHORT_COUNT))
+
+
+int32_t main(void)
+{
+    char *instruction_name = "AVER_S.D";
+    int32_t ret;
+    uint32_t i, j;
+    struct timeval start, end;
+    double elapsed_time;
+
+    uint64_t b128_result[TEST_COUNT_TOTAL][2];
+    uint64_t b128_expect[TEST_COUNT_TOTAL][2] = {
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },    /*   0  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0xd555555555555555ULL, 0xd555555555555555ULL, },
+        { 0x2aaaaaaaaaaaaaaaULL, 0x2aaaaaaaaaaaaaaaULL, },
+        { 0xe666666666666666ULL, 0xe666666666666666ULL, },
+        { 0x1999999999999999ULL, 0x1999999999999999ULL, },
+        { 0xf1c71c71c71c71c7ULL, 0x1c71c71c71c71c71ULL, },
+        { 0x0e38e38e38e38e38ULL, 0xe38e38e38e38e38eULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*   8  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0xd555555555555555ULL, 0xd555555555555555ULL, },
+        { 0x2aaaaaaaaaaaaaabULL, 0x2aaaaaaaaaaaaaabULL, },
+        { 0xe666666666666666ULL, 0xe666666666666666ULL, },
+        { 0x199999999999999aULL, 0x199999999999999aULL, },
+        { 0xf1c71c71c71c71c7ULL, 0x1c71c71c71c71c72ULL, },
+        { 0x0e38e38e38e38e39ULL, 0xe38e38e38e38e38eULL, },
+        { 0xd555555555555555ULL, 0xd555555555555555ULL, },    /*  16  */
+        { 0xd555555555555555ULL, 0xd555555555555555ULL, },
+        { 0xaaaaaaaaaaaaaaaaULL, 0xaaaaaaaaaaaaaaaaULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0xbbbbbbbbbbbbbbbbULL, 0xbbbbbbbbbbbbbbbbULL, },
+        { 0xeeeeeeeeeeeeeeefULL, 0xeeeeeeeeeeeeeeefULL, },
+        { 0xc71c71c71c71c71cULL, 0xf1c71c71c71c71c7ULL, },
+        { 0xe38e38e38e38e38eULL, 0xb8e38e38e38e38e3ULL, },
+        { 0x2aaaaaaaaaaaaaaaULL, 0x2aaaaaaaaaaaaaaaULL, },    /*  24  */
+        { 0x2aaaaaaaaaaaaaabULL, 0x2aaaaaaaaaaaaaabULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x5555555555555555ULL, 0x5555555555555555ULL, },
+        { 0x1111111111111111ULL, 0x1111111111111111ULL, },
+        { 0x4444444444444444ULL, 0x4444444444444444ULL, },
+        { 0x1c71c71c71c71c72ULL, 0x471c71c71c71c71cULL, },
+        { 0x38e38e38e38e38e3ULL, 0x0e38e38e38e38e39ULL, },
+        { 0xe666666666666666ULL, 0xe666666666666666ULL, },    /*  32  */
+        { 0xe666666666666666ULL, 0xe666666666666666ULL, },
+        { 0xbbbbbbbbbbbbbbbbULL, 0xbbbbbbbbbbbbbbbbULL, },
+        { 0x1111111111111111ULL, 0x1111111111111111ULL, },
+        { 0xccccccccccccccccULL, 0xccccccccccccccccULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0xd82d82d82d82d82dULL, 0x02d82d82d82d82d8ULL, },
+        { 0xf49f49f49f49f49fULL, 0xc9f49f49f49f49f4ULL, },
+        { 0x1999999999999999ULL, 0x1999999999999999ULL, },    /*  40  */
+        { 0x199999999999999aULL, 0x199999999999999aULL, },
+        { 0xeeeeeeeeeeeeeeefULL, 0xeeeeeeeeeeeeeeefULL, },
+        { 0x4444444444444444ULL, 0x4444444444444444ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x3333333333333333ULL, 0x3333333333333333ULL, },
+        { 0x0b60b60b60b60b61ULL, 0x360b60b60b60b60bULL, },
+        { 0x27d27d27d27d27d2ULL, 0xfd27d27d27d27d28ULL, },
+        { 0xf1c71c71c71c71c7ULL, 0x1c71c71c71c71c71ULL, },    /*  48  */
+        { 0xf1c71c71c71c71c7ULL, 0x1c71c71c71c71c72ULL, },
+        { 0xc71c71c71c71c71cULL, 0xf1c71c71c71c71c7ULL, },
+        { 0x1c71c71c71c71c72ULL, 0x471c71c71c71c71cULL, },
+        { 0xd82d82d82d82d82dULL, 0x02d82d82d82d82d8ULL, },
+        { 0x0b60b60b60b60b61ULL, 0x360b60b60b60b60bULL, },
+        { 0xe38e38e38e38e38eULL, 0x38e38e38e38e38e3ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0e38e38e38e38e38ULL, 0xe38e38e38e38e38eULL, },    /*  56  */
+        { 0x0e38e38e38e38e39ULL, 0xe38e38e38e38e38eULL, },
+        { 0xe38e38e38e38e38eULL, 0xb8e38e38e38e38e3ULL, },
+        { 0x38e38e38e38e38e3ULL, 0x0e38e38e38e38e39ULL, },
+        { 0xf49f49f49f49f49fULL, 0xc9f49f49f49f49f4ULL, },
+        { 0x27d27d27d27d27d2ULL, 0xfd27d27d27d27d28ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x1c71c71c71c71c71ULL, 0xc71c71c71c71c71cULL, },
+        { 0x886ae6cc28625540ULL, 0x4b670b5efe7bb00cULL, },    /*  64  */
+        { 0xc2147397bafb0e24ULL, 0x2f2f633c89dd8184ULL, },
+        { 0x9a62cabb7118f060ULL, 0x399fe92f54d36a90ULL, },
+        { 0xfc5cfe8cc34a1bc7ULL, 0xecac4a1bd3df4956ULL, },
+        { 0xc2147397bafb0e24ULL, 0x2f2f633c89dd8184ULL, },
+        { 0xfbbe00634d93c708ULL, 0x12f7bb1a153f52fcULL, },
+        { 0xd40c578703b1a944ULL, 0x1d68410ce0353c08ULL, },
+        { 0x36068b5855e2d4abULL, 0xd074a1f95f411aceULL, },
+        { 0x9a62cabb7118f060ULL, 0x399fe92f54d36a90ULL, },    /*  72  */
+        { 0xd40c578703b1a944ULL, 0x1d68410ce0353c08ULL, },
+        { 0xac5aaeaab9cf8b80ULL, 0x27d8c6ffab2b2514ULL, },
+        { 0x0e54e27c0c00b6e7ULL, 0xdae527ec2a3703daULL, },
+        { 0xfc5cfe8cc34a1bc7ULL, 0xecac4a1bd3df4956ULL, },
+        { 0x36068b5855e2d4abULL, 0xd074a1f95f411aceULL, },
+};
+
+    gettimeofday(&start, NULL);
+
+    for (i = 0; i < PATTERN_INPUTS_SHORT_COUNT; i++) {
+        for (j = 0; j < PATTERN_INPUTS_SHORT_COUNT; j++) {
+            do_msa_AVER_S_D(b128_pattern[i], b128_pattern[j],
+                           b128_result[PATTERN_INPUTS_SHORT_COUNT * i + j]);
+        }
+    }
+
+    for (i = 0; i < RANDOM_INPUTS_SHORT_COUNT; i++) {
+        for (j = 0; j < RANDOM_INPUTS_SHORT_COUNT; j++) {
+            do_msa_AVER_S_D(b128_random[i], b128_random[j],
+                           b128_result[((PATTERN_INPUTS_SHORT_COUNT) *
+                                        (PATTERN_INPUTS_SHORT_COUNT)) +
+                                       RANDOM_INPUTS_SHORT_COUNT * i + j]);
+        }
+    }
+
+    gettimeofday(&end, NULL);
+
+    elapsed_time = (end.tv_sec - start.tv_sec) * 1000.0;
+    elapsed_time += (end.tv_usec - start.tv_usec) / 1000.0;
+
+    ret = check_results(instruction_name, TEST_COUNT_TOTAL, elapsed_time,
+                        &b128_result[0][0], &b128_expect[0][0]);
+
+    return ret;
+}
diff --git a/tests/tcg/mips/user/ase/msa/int-average/test_msa_aver_s_h.c b/tests/tcg/mips/user/ase/msa/int-average/test_msa_aver_s_h.c
new file mode 100644
index 0000000..0902e50
--- /dev/null
+++ b/tests/tcg/mips/user/ase/msa/int-average/test_msa_aver_s_h.c
@@ -0,0 +1,151 @@
+/*
+ *  Test program for MSA instruction AVER_S.H
+ *
+ *  Copyright (C) 2018  Wave Computing, Inc.
+ *  Copyright (C) 2018  Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
+ *
+ *  This program is free software: you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation, either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <sys/time.h>
+#include <stdint.h>
+
+#include "../../../../include/wrappers_msa.h"
+#include "../../../../include/test_inputs.h"
+#include "../../../../include/test_utils.h"
+
+#define TEST_COUNT_TOTAL (                                                \
+            (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
+            (RANDOM_INPUTS_SHORT_COUNT) * (RANDOM_INPUTS_SHORT_COUNT))
+
+
+int32_t main(void)
+{
+    char *instruction_name = "AVER_S.H";
+    int32_t ret;
+    uint32_t i, j;
+    struct timeval start, end;
+    double elapsed_time;
+
+    uint64_t b128_result[TEST_COUNT_TOTAL][2];
+    uint64_t b128_expect[TEST_COUNT_TOTAL][2] = {
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },    /*   0  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0xd555d555d555d555ULL, 0xd555d555d555d555ULL, },
+        { 0x2aaa2aaa2aaa2aaaULL, 0x2aaa2aaa2aaa2aaaULL, },
+        { 0xe666e666e666e666ULL, 0xe666e666e666e666ULL, },
+        { 0x1999199919991999ULL, 0x1999199919991999ULL, },
+        { 0xf1c71c71c71cf1c7ULL, 0x1c71c71cf1c71c71ULL, },
+        { 0x0e38e38e38e30e38ULL, 0xe38e38e30e38e38eULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*   8  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0xd555d555d555d555ULL, 0xd555d555d555d555ULL, },
+        { 0x2aab2aab2aab2aabULL, 0x2aab2aab2aab2aabULL, },
+        { 0xe666e666e666e666ULL, 0xe666e666e666e666ULL, },
+        { 0x199a199a199a199aULL, 0x199a199a199a199aULL, },
+        { 0xf1c71c72c71cf1c7ULL, 0x1c72c71cf1c71c72ULL, },
+        { 0x0e39e38e38e40e39ULL, 0xe38e38e40e39e38eULL, },
+        { 0xd555d555d555d555ULL, 0xd555d555d555d555ULL, },    /*  16  */
+        { 0xd555d555d555d555ULL, 0xd555d555d555d555ULL, },
+        { 0xaaaaaaaaaaaaaaaaULL, 0xaaaaaaaaaaaaaaaaULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0xbbbbbbbbbbbbbbbbULL, 0xbbbbbbbbbbbbbbbbULL, },
+        { 0xeeefeeefeeefeeefULL, 0xeeefeeefeeefeeefULL, },
+        { 0xc71cf1c79c71c71cULL, 0xf1c79c71c71cf1c7ULL, },
+        { 0xe38eb8e30e39e38eULL, 0xb8e30e39e38eb8e3ULL, },
+        { 0x2aaa2aaa2aaa2aaaULL, 0x2aaa2aaa2aaa2aaaULL, },    /*  24  */
+        { 0x2aab2aab2aab2aabULL, 0x2aab2aab2aab2aabULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x5555555555555555ULL, 0x5555555555555555ULL, },
+        { 0x1111111111111111ULL, 0x1111111111111111ULL, },
+        { 0x4444444444444444ULL, 0x4444444444444444ULL, },
+        { 0x1c72471cf1c71c72ULL, 0x471cf1c71c72471cULL, },
+        { 0x38e30e39638e38e3ULL, 0x0e39638e38e30e39ULL, },
+        { 0xe666e666e666e666ULL, 0xe666e666e666e666ULL, },    /*  32  */
+        { 0xe666e666e666e666ULL, 0xe666e666e666e666ULL, },
+        { 0xbbbbbbbbbbbbbbbbULL, 0xbbbbbbbbbbbbbbbbULL, },
+        { 0x1111111111111111ULL, 0x1111111111111111ULL, },
+        { 0xccccccccccccccccULL, 0xccccccccccccccccULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0xd82d02d8ad82d82dULL, 0x02d8ad82d82d02d8ULL, },
+        { 0xf49fc9f41f4af49fULL, 0xc9f41f4af49fc9f4ULL, },
+        { 0x1999199919991999ULL, 0x1999199919991999ULL, },    /*  40  */
+        { 0x199a199a199a199aULL, 0x199a199a199a199aULL, },
+        { 0xeeefeeefeeefeeefULL, 0xeeefeeefeeefeeefULL, },
+        { 0x4444444444444444ULL, 0x4444444444444444ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x3333333333333333ULL, 0x3333333333333333ULL, },
+        { 0x0b61360be0b60b61ULL, 0x360be0b60b61360bULL, },
+        { 0x27d2fd28527d27d2ULL, 0xfd28527d27d2fd28ULL, },
+        { 0xf1c71c71c71cf1c7ULL, 0x1c71c71cf1c71c71ULL, },    /*  48  */
+        { 0xf1c71c72c71cf1c7ULL, 0x1c72c71cf1c71c72ULL, },
+        { 0xc71cf1c79c71c71cULL, 0xf1c79c71c71cf1c7ULL, },
+        { 0x1c72471cf1c71c72ULL, 0x471cf1c71c72471cULL, },
+        { 0xd82d02d8ad82d82dULL, 0x02d8ad82d82d02d8ULL, },
+        { 0x0b61360be0b60b61ULL, 0x360be0b60b61360bULL, },
+        { 0xe38e38e38e38e38eULL, 0x38e38e38e38e38e3ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0e38e38e38e30e38ULL, 0xe38e38e30e38e38eULL, },    /*  56  */
+        { 0x0e39e38e38e40e39ULL, 0xe38e38e40e39e38eULL, },
+        { 0xe38eb8e30e39e38eULL, 0xb8e30e39e38eb8e3ULL, },
+        { 0x38e30e39638e38e3ULL, 0x0e39638e38e30e39ULL, },
+        { 0xf49fc9f41f4af49fULL, 0xc9f41f4af49fc9f4ULL, },
+        { 0x27d2fd28527d27d2ULL, 0xfd28527d27d2fd28ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x1c71c71c71c71c71ULL, 0xc71c71c71c71c71cULL, },
+        { 0x886ae6cc28625540ULL, 0x4b670b5efe7bb00cULL, },    /*  64  */
+        { 0xc214f3983afb0e24ULL, 0x2f2fe33c09dd0184ULL, },
+        { 0x9a62cabbf119f060ULL, 0x39a0e92fd4d3ea90ULL, },
+        { 0xfc5dfe8d434a1bc7ULL, 0xecacca1bd3dfc956ULL, },
+        { 0xc214f3983afb0e24ULL, 0x2f2fe33c09dd0184ULL, },
+        { 0xfbbe00634d93c708ULL, 0x12f7bb1a153f52fcULL, },
+        { 0xd40cd78703b1a944ULL, 0x1d68c10de0353c08ULL, },
+        { 0x36070b5855e2d4abULL, 0xd074a1f9df411aceULL, },
+        { 0x9a62cabbf119f060ULL, 0x39a0e92fd4d3ea90ULL, },    /*  72  */
+        { 0xd40cd78703b1a944ULL, 0x1d68c10de0353c08ULL, },
+        { 0xac5aaeaab9cf8b80ULL, 0x27d8c6ffab2b2514ULL, },
+        { 0x0e55e27c0c00b6e7ULL, 0xdae5a7ecaa3703daULL, },
+        { 0xfc5dfe8d434a1bc7ULL, 0xecacca1bd3dfc956ULL, },
+        { 0x36070b5855e2d4abULL, 0xd074a1f9df411aceULL, },
+};
+
+    gettimeofday(&start, NULL);
+
+    for (i = 0; i < PATTERN_INPUTS_SHORT_COUNT; i++) {
+        for (j = 0; j < PATTERN_INPUTS_SHORT_COUNT; j++) {
+            do_msa_AVER_S_H(b128_pattern[i], b128_pattern[j],
+                           b128_result[PATTERN_INPUTS_SHORT_COUNT * i + j]);
+        }
+    }
+
+    for (i = 0; i < RANDOM_INPUTS_SHORT_COUNT; i++) {
+        for (j = 0; j < RANDOM_INPUTS_SHORT_COUNT; j++) {
+            do_msa_AVER_S_H(b128_random[i], b128_random[j],
+                           b128_result[((PATTERN_INPUTS_SHORT_COUNT) *
+                                        (PATTERN_INPUTS_SHORT_COUNT)) +
+                                       RANDOM_INPUTS_SHORT_COUNT * i + j]);
+        }
+    }
+
+    gettimeofday(&end, NULL);
+
+    elapsed_time = (end.tv_sec - start.tv_sec) * 1000.0;
+    elapsed_time += (end.tv_usec - start.tv_usec) / 1000.0;
+
+    ret = check_results(instruction_name, TEST_COUNT_TOTAL, elapsed_time,
+                        &b128_result[0][0], &b128_expect[0][0]);
+
+    return ret;
+}
diff --git a/tests/tcg/mips/user/ase/msa/int-average/test_msa_aver_s_w.c b/tests/tcg/mips/user/ase/msa/int-average/test_msa_aver_s_w.c
new file mode 100644
index 0000000..31f4553
--- /dev/null
+++ b/tests/tcg/mips/user/ase/msa/int-average/test_msa_aver_s_w.c
@@ -0,0 +1,151 @@
+/*
+ *  Test program for MSA instruction AVER_S.W
+ *
+ *  Copyright (C) 2018  Wave Computing, Inc.
+ *  Copyright (C) 2018  Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
+ *
+ *  This program is free software: you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation, either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <sys/time.h>
+#include <stdint.h>
+
+#include "../../../../include/wrappers_msa.h"
+#include "../../../../include/test_inputs.h"
+#include "../../../../include/test_utils.h"
+
+#define TEST_COUNT_TOTAL (                                                \
+            (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
+            (RANDOM_INPUTS_SHORT_COUNT) * (RANDOM_INPUTS_SHORT_COUNT))
+
+
+int32_t main(void)
+{
+    char *instruction_name = "AVER_S.W";
+    int32_t ret;
+    uint32_t i, j;
+    struct timeval start, end;
+    double elapsed_time;
+
+    uint64_t b128_result[TEST_COUNT_TOTAL][2];
+    uint64_t b128_expect[TEST_COUNT_TOTAL][2] = {
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },    /*   0  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0xd5555555d5555555ULL, 0xd5555555d5555555ULL, },
+        { 0x2aaaaaaa2aaaaaaaULL, 0x2aaaaaaa2aaaaaaaULL, },
+        { 0xe6666666e6666666ULL, 0xe6666666e6666666ULL, },
+        { 0x1999999919999999ULL, 0x1999999919999999ULL, },
+        { 0xf1c71c71c71c71c7ULL, 0x1c71c71cf1c71c71ULL, },
+        { 0x0e38e38e38e38e38ULL, 0xe38e38e30e38e38eULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*   8  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0xd5555555d5555555ULL, 0xd5555555d5555555ULL, },
+        { 0x2aaaaaab2aaaaaabULL, 0x2aaaaaab2aaaaaabULL, },
+        { 0xe6666666e6666666ULL, 0xe6666666e6666666ULL, },
+        { 0x1999999a1999999aULL, 0x1999999a1999999aULL, },
+        { 0xf1c71c72c71c71c7ULL, 0x1c71c71cf1c71c72ULL, },
+        { 0x0e38e38e38e38e39ULL, 0xe38e38e40e38e38eULL, },
+        { 0xd5555555d5555555ULL, 0xd5555555d5555555ULL, },    /*  16  */
+        { 0xd5555555d5555555ULL, 0xd5555555d5555555ULL, },
+        { 0xaaaaaaaaaaaaaaaaULL, 0xaaaaaaaaaaaaaaaaULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0xbbbbbbbbbbbbbbbbULL, 0xbbbbbbbbbbbbbbbbULL, },
+        { 0xeeeeeeefeeeeeeefULL, 0xeeeeeeefeeeeeeefULL, },
+        { 0xc71c71c79c71c71cULL, 0xf1c71c71c71c71c7ULL, },
+        { 0xe38e38e30e38e38eULL, 0xb8e38e39e38e38e3ULL, },
+        { 0x2aaaaaaa2aaaaaaaULL, 0x2aaaaaaa2aaaaaaaULL, },    /*  24  */
+        { 0x2aaaaaab2aaaaaabULL, 0x2aaaaaab2aaaaaabULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x5555555555555555ULL, 0x5555555555555555ULL, },
+        { 0x1111111111111111ULL, 0x1111111111111111ULL, },
+        { 0x4444444444444444ULL, 0x4444444444444444ULL, },
+        { 0x1c71c71cf1c71c72ULL, 0x471c71c71c71c71cULL, },
+        { 0x38e38e39638e38e3ULL, 0x0e38e38e38e38e39ULL, },
+        { 0xe6666666e6666666ULL, 0xe6666666e6666666ULL, },    /*  32  */
+        { 0xe6666666e6666666ULL, 0xe6666666e6666666ULL, },
+        { 0xbbbbbbbbbbbbbbbbULL, 0xbbbbbbbbbbbbbbbbULL, },
+        { 0x1111111111111111ULL, 0x1111111111111111ULL, },
+        { 0xccccccccccccccccULL, 0xccccccccccccccccULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0xd82d82d8ad82d82dULL, 0x02d82d82d82d82d8ULL, },
+        { 0xf49f49f41f49f49fULL, 0xc9f49f4af49f49f4ULL, },
+        { 0x1999999919999999ULL, 0x1999999919999999ULL, },    /*  40  */
+        { 0x1999999a1999999aULL, 0x1999999a1999999aULL, },
+        { 0xeeeeeeefeeeeeeefULL, 0xeeeeeeefeeeeeeefULL, },
+        { 0x4444444444444444ULL, 0x4444444444444444ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x3333333333333333ULL, 0x3333333333333333ULL, },
+        { 0x0b60b60be0b60b61ULL, 0x360b60b60b60b60bULL, },
+        { 0x27d27d28527d27d2ULL, 0xfd27d27d27d27d28ULL, },
+        { 0xf1c71c71c71c71c7ULL, 0x1c71c71cf1c71c71ULL, },    /*  48  */
+        { 0xf1c71c72c71c71c7ULL, 0x1c71c71cf1c71c72ULL, },
+        { 0xc71c71c79c71c71cULL, 0xf1c71c71c71c71c7ULL, },
+        { 0x1c71c71cf1c71c72ULL, 0x471c71c71c71c71cULL, },
+        { 0xd82d82d8ad82d82dULL, 0x02d82d82d82d82d8ULL, },
+        { 0x0b60b60be0b60b61ULL, 0x360b60b60b60b60bULL, },
+        { 0xe38e38e38e38e38eULL, 0x38e38e38e38e38e3ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0e38e38e38e38e38ULL, 0xe38e38e30e38e38eULL, },    /*  56  */
+        { 0x0e38e38e38e38e39ULL, 0xe38e38e40e38e38eULL, },
+        { 0xe38e38e30e38e38eULL, 0xb8e38e39e38e38e3ULL, },
+        { 0x38e38e39638e38e3ULL, 0x0e38e38e38e38e39ULL, },
+        { 0xf49f49f41f49f49fULL, 0xc9f49f4af49f49f4ULL, },
+        { 0x27d27d28527d27d2ULL, 0xfd27d27d27d27d28ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x1c71c71c71c71c71ULL, 0xc71c71c71c71c71cULL, },
+        { 0x886ae6cc28625540ULL, 0x4b670b5efe7bb00cULL, },    /*  64  */
+        { 0xc21473983afb0e24ULL, 0x2f2f633c09dd8184ULL, },
+        { 0x9a62cabbf118f060ULL, 0x399fe92fd4d36a90ULL, },
+        { 0xfc5cfe8d434a1bc7ULL, 0xecac4a1bd3df4956ULL, },
+        { 0xc21473983afb0e24ULL, 0x2f2f633c09dd8184ULL, },
+        { 0xfbbe00634d93c708ULL, 0x12f7bb1a153f52fcULL, },
+        { 0xd40c578703b1a944ULL, 0x1d68410de0353c08ULL, },
+        { 0x36068b5855e2d4abULL, 0xd074a1f9df411aceULL, },
+        { 0x9a62cabbf118f060ULL, 0x399fe92fd4d36a90ULL, },    /*  72  */
+        { 0xd40c578703b1a944ULL, 0x1d68410de0353c08ULL, },
+        { 0xac5aaeaab9cf8b80ULL, 0x27d8c6ffab2b2514ULL, },
+        { 0x0e54e27c0c00b6e7ULL, 0xdae527ecaa3703daULL, },
+        { 0xfc5cfe8d434a1bc7ULL, 0xecac4a1bd3df4956ULL, },
+        { 0x36068b5855e2d4abULL, 0xd074a1f9df411aceULL, },
+};
+
+    gettimeofday(&start, NULL);
+
+    for (i = 0; i < PATTERN_INPUTS_SHORT_COUNT; i++) {
+        for (j = 0; j < PATTERN_INPUTS_SHORT_COUNT; j++) {
+            do_msa_AVER_S_W(b128_pattern[i], b128_pattern[j],
+                           b128_result[PATTERN_INPUTS_SHORT_COUNT * i + j]);
+        }
+    }
+
+    for (i = 0; i < RANDOM_INPUTS_SHORT_COUNT; i++) {
+        for (j = 0; j < RANDOM_INPUTS_SHORT_COUNT; j++) {
+            do_msa_AVER_S_W(b128_random[i], b128_random[j],
+                           b128_result[((PATTERN_INPUTS_SHORT_COUNT) *
+                                        (PATTERN_INPUTS_SHORT_COUNT)) +
+                                       RANDOM_INPUTS_SHORT_COUNT * i + j]);
+        }
+    }
+
+    gettimeofday(&end, NULL);
+
+    elapsed_time = (end.tv_sec - start.tv_sec) * 1000.0;
+    elapsed_time += (end.tv_usec - start.tv_usec) / 1000.0;
+
+    ret = check_results(instruction_name, TEST_COUNT_TOTAL, elapsed_time,
+                        &b128_result[0][0], &b128_expect[0][0]);
+
+    return ret;
+}
diff --git a/tests/tcg/mips/user/ase/msa/int-average/test_msa_aver_u_b.c b/tests/tcg/mips/user/ase/msa/int-average/test_msa_aver_u_b.c
new file mode 100644
index 0000000..8aa7ec6
--- /dev/null
+++ b/tests/tcg/mips/user/ase/msa/int-average/test_msa_aver_u_b.c
@@ -0,0 +1,151 @@
+/*
+ *  Test program for MSA instruction AVER_U.B
+ *
+ *  Copyright (C) 2018  Wave Computing, Inc.
+ *  Copyright (C) 2018  Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
+ *
+ *  This program is free software: you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation, either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <sys/time.h>
+#include <stdint.h>
+
+#include "../../../../include/wrappers_msa.h"
+#include "../../../../include/test_inputs.h"
+#include "../../../../include/test_utils.h"
+
+#define TEST_COUNT_TOTAL (                                                \
+            (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
+            (RANDOM_INPUTS_SHORT_COUNT) * (RANDOM_INPUTS_SHORT_COUNT))
+
+
+int32_t main(void)
+{
+    char *instruction_name = "AVER_U.B";
+    int32_t ret;
+    uint32_t i, j;
+    struct timeval start, end;
+    double elapsed_time;
+
+    uint64_t b128_result[TEST_COUNT_TOTAL][2];
+    uint64_t b128_expect[TEST_COUNT_TOTAL][2] = {
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },    /*   0  */
+        { 0x8080808080808080ULL, 0x8080808080808080ULL, },
+        { 0xd5d5d5d5d5d5d5d5ULL, 0xd5d5d5d5d5d5d5d5ULL, },
+        { 0xaaaaaaaaaaaaaaaaULL, 0xaaaaaaaaaaaaaaaaULL, },
+        { 0xe6e6e6e6e6e6e6e6ULL, 0xe6e6e6e6e6e6e6e6ULL, },
+        { 0x9999999999999999ULL, 0x9999999999999999ULL, },
+        { 0xf1c79cf1c79cf1c7ULL, 0x9cf1c79cf1c79cf1ULL, },
+        { 0x8eb8e38eb8e38eb8ULL, 0xe38eb8e38eb8e38eULL, },
+        { 0x8080808080808080ULL, 0x8080808080808080ULL, },    /*   8  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x5555555555555555ULL, 0x5555555555555555ULL, },
+        { 0x2b2b2b2b2b2b2b2bULL, 0x2b2b2b2b2b2b2b2bULL, },
+        { 0x6666666666666666ULL, 0x6666666666666666ULL, },
+        { 0x1a1a1a1a1a1a1a1aULL, 0x1a1a1a1a1a1a1a1aULL, },
+        { 0x72471c72471c7247ULL, 0x1c72471c72471c72ULL, },
+        { 0x0e39640e39640e39ULL, 0x640e39640e39640eULL, },
+        { 0xd5d5d5d5d5d5d5d5ULL, 0xd5d5d5d5d5d5d5d5ULL, },    /*  16  */
+        { 0x5555555555555555ULL, 0x5555555555555555ULL, },
+        { 0xaaaaaaaaaaaaaaaaULL, 0xaaaaaaaaaaaaaaaaULL, },
+        { 0x8080808080808080ULL, 0x8080808080808080ULL, },
+        { 0xbbbbbbbbbbbbbbbbULL, 0xbbbbbbbbbbbbbbbbULL, },
+        { 0x6f6f6f6f6f6f6f6fULL, 0x6f6f6f6f6f6f6f6fULL, },
+        { 0xc79c71c79c71c79cULL, 0x71c79c71c79c71c7ULL, },
+        { 0x638eb9638eb9638eULL, 0xb9638eb9638eb963ULL, },
+        { 0xaaaaaaaaaaaaaaaaULL, 0xaaaaaaaaaaaaaaaaULL, },    /*  24  */
+        { 0x2b2b2b2b2b2b2b2bULL, 0x2b2b2b2b2b2b2b2bULL, },
+        { 0x8080808080808080ULL, 0x8080808080808080ULL, },
+        { 0x5555555555555555ULL, 0x5555555555555555ULL, },
+        { 0x9191919191919191ULL, 0x9191919191919191ULL, },
+        { 0x4444444444444444ULL, 0x4444444444444444ULL, },
+        { 0x9c72479c72479c72ULL, 0x479c72479c72479cULL, },
+        { 0x39638e39638e3963ULL, 0x8e39638e39638e39ULL, },
+        { 0xe6e6e6e6e6e6e6e6ULL, 0xe6e6e6e6e6e6e6e6ULL, },    /*  32  */
+        { 0x6666666666666666ULL, 0x6666666666666666ULL, },
+        { 0xbbbbbbbbbbbbbbbbULL, 0xbbbbbbbbbbbbbbbbULL, },
+        { 0x9191919191919191ULL, 0x9191919191919191ULL, },
+        { 0xccccccccccccccccULL, 0xccccccccccccccccULL, },
+        { 0x8080808080808080ULL, 0x8080808080808080ULL, },
+        { 0xd8ad82d8ad82d8adULL, 0x82d8ad82d8ad82d8ULL, },
+        { 0x749fca749fca749fULL, 0xca749fca749fca74ULL, },
+        { 0x9999999999999999ULL, 0x9999999999999999ULL, },    /*  40  */
+        { 0x1a1a1a1a1a1a1a1aULL, 0x1a1a1a1a1a1a1a1aULL, },
+        { 0x6f6f6f6f6f6f6f6fULL, 0x6f6f6f6f6f6f6f6fULL, },
+        { 0x4444444444444444ULL, 0x4444444444444444ULL, },
+        { 0x8080808080808080ULL, 0x8080808080808080ULL, },
+        { 0x3333333333333333ULL, 0x3333333333333333ULL, },
+        { 0x8b61368b61368b61ULL, 0x368b61368b61368bULL, },
+        { 0x28527d28527d2852ULL, 0x7d28527d28527d28ULL, },
+        { 0xf1c79cf1c79cf1c7ULL, 0x9cf1c79cf1c79cf1ULL, },    /*  48  */
+        { 0x72471c72471c7247ULL, 0x1c72471c72471c72ULL, },
+        { 0xc79c71c79c71c79cULL, 0x71c79c71c79c71c7ULL, },
+        { 0x9c72479c72479c72ULL, 0x479c72479c72479cULL, },
+        { 0xd8ad82d8ad82d8adULL, 0x82d8ad82d8ad82d8ULL, },
+        { 0x8b61368b61368b61ULL, 0x368b61368b61368bULL, },
+        { 0xe38e38e38e38e38eULL, 0x38e38e38e38e38e3ULL, },
+        { 0x8080808080808080ULL, 0x8080808080808080ULL, },
+        { 0x8eb8e38eb8e38eb8ULL, 0xe38eb8e38eb8e38eULL, },    /*  56  */
+        { 0x0e39640e39640e39ULL, 0x640e39640e39640eULL, },
+        { 0x638eb9638eb9638eULL, 0xb9638eb9638eb963ULL, },
+        { 0x39638e39638e3963ULL, 0x8e39638e39638e39ULL, },
+        { 0x749fca749fca749fULL, 0xca749fca749fca74ULL, },
+        { 0x28527d28527d2852ULL, 0x7d28527d28527d28ULL, },
+        { 0x8080808080808080ULL, 0x8080808080808080ULL, },
+        { 0x1c71c71c71c71c71ULL, 0xc71c71c71c71c71cULL, },
+        { 0x886ae6cc28625540ULL, 0x4b670b5efe7bb00cULL, },    /*  64  */
+        { 0xc29473983b7b8e24ULL, 0x2faf633c8a5d8184ULL, },
+        { 0x9a62cabb71997060ULL, 0x39a069afd5536b10ULL, },
+        { 0x7c5d7e8d434a9c47ULL, 0x6cac4a9bd45fc956ULL, },
+        { 0xc29473983b7b8e24ULL, 0x2faf633c8a5d8184ULL, },
+        { 0xfbbe00634d93c708ULL, 0x12f7bb1a153f52fcULL, },
+        { 0xd48c578783b1a944ULL, 0x1de8c18d60353c88ULL, },
+        { 0xb6870b585662d52bULL, 0x50f4a2795f419aceULL, },
+        { 0x9a62cabb71997060ULL, 0x39a069afd5536b10ULL, },    /*  72  */
+        { 0xd48c578783b1a944ULL, 0x1de8c18d60353c88ULL, },
+        { 0xac5aaeaab9cf8b80ULL, 0x27d8c6ffab2b2514ULL, },
+        { 0x8e55627c8c80b767ULL, 0x5ae5a7ecaa37845aULL, },
+        { 0x7c5d7e8d434a9c47ULL, 0x6cac4a9bd45fc956ULL, },
+        { 0xb6870b585662d52bULL, 0x50f4a2795f419aceULL, },
+};
+
+    gettimeofday(&start, NULL);
+
+    for (i = 0; i < PATTERN_INPUTS_SHORT_COUNT; i++) {
+        for (j = 0; j < PATTERN_INPUTS_SHORT_COUNT; j++) {
+            do_msa_AVER_U_B(b128_pattern[i], b128_pattern[j],
+                           b128_result[PATTERN_INPUTS_SHORT_COUNT * i + j]);
+        }
+    }
+
+    for (i = 0; i < RANDOM_INPUTS_SHORT_COUNT; i++) {
+        for (j = 0; j < RANDOM_INPUTS_SHORT_COUNT; j++) {
+            do_msa_AVER_U_B(b128_random[i], b128_random[j],
+                           b128_result[((PATTERN_INPUTS_SHORT_COUNT) *
+                                        (PATTERN_INPUTS_SHORT_COUNT)) +
+                                       RANDOM_INPUTS_SHORT_COUNT * i + j]);
+        }
+    }
+
+    gettimeofday(&end, NULL);
+
+    elapsed_time = (end.tv_sec - start.tv_sec) * 1000.0;
+    elapsed_time += (end.tv_usec - start.tv_usec) / 1000.0;
+
+    ret = check_results(instruction_name, TEST_COUNT_TOTAL, elapsed_time,
+                        &b128_result[0][0], &b128_expect[0][0]);
+
+    return ret;
+}
diff --git a/tests/tcg/mips/user/ase/msa/int-average/test_msa_aver_u_d.c b/tests/tcg/mips/user/ase/msa/int-average/test_msa_aver_u_d.c
new file mode 100644
index 0000000..9b16e12
--- /dev/null
+++ b/tests/tcg/mips/user/ase/msa/int-average/test_msa_aver_u_d.c
@@ -0,0 +1,151 @@
+/*
+ *  Test program for MSA instruction AVER_U.D
+ *
+ *  Copyright (C) 2018  Wave Computing, Inc.
+ *  Copyright (C) 2018  Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
+ *
+ *  This program is free software: you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation, either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <sys/time.h>
+#include <stdint.h>
+
+#include "../../../../include/wrappers_msa.h"
+#include "../../../../include/test_inputs.h"
+#include "../../../../include/test_utils.h"
+
+#define TEST_COUNT_TOTAL (                                                \
+            (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
+            (RANDOM_INPUTS_SHORT_COUNT) * (RANDOM_INPUTS_SHORT_COUNT))
+
+
+int32_t main(void)
+{
+    char *instruction_name = "AVER_U.D";
+    int32_t ret;
+    uint32_t i, j;
+    struct timeval start, end;
+    double elapsed_time;
+
+    uint64_t b128_result[TEST_COUNT_TOTAL][2];
+    uint64_t b128_expect[TEST_COUNT_TOTAL][2] = {
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },    /*   0  */
+        { 0x8000000000000000ULL, 0x8000000000000000ULL, },
+        { 0xd555555555555555ULL, 0xd555555555555555ULL, },
+        { 0xaaaaaaaaaaaaaaaaULL, 0xaaaaaaaaaaaaaaaaULL, },
+        { 0xe666666666666666ULL, 0xe666666666666666ULL, },
+        { 0x9999999999999999ULL, 0x9999999999999999ULL, },
+        { 0xf1c71c71c71c71c7ULL, 0x9c71c71c71c71c71ULL, },
+        { 0x8e38e38e38e38e38ULL, 0xe38e38e38e38e38eULL, },
+        { 0x8000000000000000ULL, 0x8000000000000000ULL, },    /*   8  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x5555555555555555ULL, 0x5555555555555555ULL, },
+        { 0x2aaaaaaaaaaaaaabULL, 0x2aaaaaaaaaaaaaabULL, },
+        { 0x6666666666666666ULL, 0x6666666666666666ULL, },
+        { 0x199999999999999aULL, 0x199999999999999aULL, },
+        { 0x71c71c71c71c71c7ULL, 0x1c71c71c71c71c72ULL, },
+        { 0x0e38e38e38e38e39ULL, 0x638e38e38e38e38eULL, },
+        { 0xd555555555555555ULL, 0xd555555555555555ULL, },    /*  16  */
+        { 0x5555555555555555ULL, 0x5555555555555555ULL, },
+        { 0xaaaaaaaaaaaaaaaaULL, 0xaaaaaaaaaaaaaaaaULL, },
+        { 0x8000000000000000ULL, 0x8000000000000000ULL, },
+        { 0xbbbbbbbbbbbbbbbbULL, 0xbbbbbbbbbbbbbbbbULL, },
+        { 0x6eeeeeeeeeeeeeefULL, 0x6eeeeeeeeeeeeeefULL, },
+        { 0xc71c71c71c71c71cULL, 0x71c71c71c71c71c7ULL, },
+        { 0x638e38e38e38e38eULL, 0xb8e38e38e38e38e3ULL, },
+        { 0xaaaaaaaaaaaaaaaaULL, 0xaaaaaaaaaaaaaaaaULL, },    /*  24  */
+        { 0x2aaaaaaaaaaaaaabULL, 0x2aaaaaaaaaaaaaabULL, },
+        { 0x8000000000000000ULL, 0x8000000000000000ULL, },
+        { 0x5555555555555555ULL, 0x5555555555555555ULL, },
+        { 0x9111111111111111ULL, 0x9111111111111111ULL, },
+        { 0x4444444444444444ULL, 0x4444444444444444ULL, },
+        { 0x9c71c71c71c71c72ULL, 0x471c71c71c71c71cULL, },
+        { 0x38e38e38e38e38e3ULL, 0x8e38e38e38e38e39ULL, },
+        { 0xe666666666666666ULL, 0xe666666666666666ULL, },    /*  32  */
+        { 0x6666666666666666ULL, 0x6666666666666666ULL, },
+        { 0xbbbbbbbbbbbbbbbbULL, 0xbbbbbbbbbbbbbbbbULL, },
+        { 0x9111111111111111ULL, 0x9111111111111111ULL, },
+        { 0xccccccccccccccccULL, 0xccccccccccccccccULL, },
+        { 0x8000000000000000ULL, 0x8000000000000000ULL, },
+        { 0xd82d82d82d82d82dULL, 0x82d82d82d82d82d8ULL, },
+        { 0x749f49f49f49f49fULL, 0xc9f49f49f49f49f4ULL, },
+        { 0x9999999999999999ULL, 0x9999999999999999ULL, },    /*  40  */
+        { 0x199999999999999aULL, 0x199999999999999aULL, },
+        { 0x6eeeeeeeeeeeeeefULL, 0x6eeeeeeeeeeeeeefULL, },
+        { 0x4444444444444444ULL, 0x4444444444444444ULL, },
+        { 0x8000000000000000ULL, 0x8000000000000000ULL, },
+        { 0x3333333333333333ULL, 0x3333333333333333ULL, },
+        { 0x8b60b60b60b60b61ULL, 0x360b60b60b60b60bULL, },
+        { 0x27d27d27d27d27d2ULL, 0x7d27d27d27d27d28ULL, },
+        { 0xf1c71c71c71c71c7ULL, 0x9c71c71c71c71c71ULL, },    /*  48  */
+        { 0x71c71c71c71c71c7ULL, 0x1c71c71c71c71c72ULL, },
+        { 0xc71c71c71c71c71cULL, 0x71c71c71c71c71c7ULL, },
+        { 0x9c71c71c71c71c72ULL, 0x471c71c71c71c71cULL, },
+        { 0xd82d82d82d82d82dULL, 0x82d82d82d82d82d8ULL, },
+        { 0x8b60b60b60b60b61ULL, 0x360b60b60b60b60bULL, },
+        { 0xe38e38e38e38e38eULL, 0x38e38e38e38e38e3ULL, },
+        { 0x8000000000000000ULL, 0x8000000000000000ULL, },
+        { 0x8e38e38e38e38e38ULL, 0xe38e38e38e38e38eULL, },    /*  56  */
+        { 0x0e38e38e38e38e39ULL, 0x638e38e38e38e38eULL, },
+        { 0x638e38e38e38e38eULL, 0xb8e38e38e38e38e3ULL, },
+        { 0x38e38e38e38e38e3ULL, 0x8e38e38e38e38e39ULL, },
+        { 0x749f49f49f49f49fULL, 0xc9f49f49f49f49f4ULL, },
+        { 0x27d27d27d27d27d2ULL, 0x7d27d27d27d27d28ULL, },
+        { 0x8000000000000000ULL, 0x8000000000000000ULL, },
+        { 0x1c71c71c71c71c71ULL, 0xc71c71c71c71c71cULL, },
+        { 0x886ae6cc28625540ULL, 0x4b670b5efe7bb00cULL, },    /*  64  */
+        { 0xc2147397bafb0e24ULL, 0x2f2f633c89dd8184ULL, },
+        { 0x9a62cabb7118f060ULL, 0x399fe92f54d36a90ULL, },
+        { 0x7c5cfe8cc34a1bc7ULL, 0x6cac4a1bd3df4956ULL, },
+        { 0xc2147397bafb0e24ULL, 0x2f2f633c89dd8184ULL, },
+        { 0xfbbe00634d93c708ULL, 0x12f7bb1a153f52fcULL, },
+        { 0xd40c578703b1a944ULL, 0x1d68410ce0353c08ULL, },
+        { 0xb6068b5855e2d4abULL, 0x5074a1f95f411aceULL, },
+        { 0x9a62cabb7118f060ULL, 0x399fe92f54d36a90ULL, },    /*  72  */
+        { 0xd40c578703b1a944ULL, 0x1d68410ce0353c08ULL, },
+        { 0xac5aaeaab9cf8b80ULL, 0x27d8c6ffab2b2514ULL, },
+        { 0x8e54e27c0c00b6e7ULL, 0x5ae527ec2a3703daULL, },
+        { 0x7c5cfe8cc34a1bc7ULL, 0x6cac4a1bd3df4956ULL, },
+        { 0xb6068b5855e2d4abULL, 0x5074a1f95f411aceULL, },
+};
+
+    gettimeofday(&start, NULL);
+
+    for (i = 0; i < PATTERN_INPUTS_SHORT_COUNT; i++) {
+        for (j = 0; j < PATTERN_INPUTS_SHORT_COUNT; j++) {
+            do_msa_AVER_U_D(b128_pattern[i], b128_pattern[j],
+                           b128_result[PATTERN_INPUTS_SHORT_COUNT * i + j]);
+        }
+    }
+
+    for (i = 0; i < RANDOM_INPUTS_SHORT_COUNT; i++) {
+        for (j = 0; j < RANDOM_INPUTS_SHORT_COUNT; j++) {
+            do_msa_AVER_U_D(b128_random[i], b128_random[j],
+                           b128_result[((PATTERN_INPUTS_SHORT_COUNT) *
+                                        (PATTERN_INPUTS_SHORT_COUNT)) +
+                                       RANDOM_INPUTS_SHORT_COUNT * i + j]);
+        }
+    }
+
+    gettimeofday(&end, NULL);
+
+    elapsed_time = (end.tv_sec - start.tv_sec) * 1000.0;
+    elapsed_time += (end.tv_usec - start.tv_usec) / 1000.0;
+
+    ret = check_results(instruction_name, TEST_COUNT_TOTAL, elapsed_time,
+                        &b128_result[0][0], &b128_expect[0][0]);
+
+    return ret;
+}
diff --git a/tests/tcg/mips/user/ase/msa/int-average/test_msa_aver_u_h.c b/tests/tcg/mips/user/ase/msa/int-average/test_msa_aver_u_h.c
new file mode 100644
index 0000000..191e4ac
--- /dev/null
+++ b/tests/tcg/mips/user/ase/msa/int-average/test_msa_aver_u_h.c
@@ -0,0 +1,151 @@
+/*
+ *  Test program for MSA instruction AVER_U.H
+ *
+ *  Copyright (C) 2018  Wave Computing, Inc.
+ *  Copyright (C) 2018  Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
+ *
+ *  This program is free software: you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation, either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <sys/time.h>
+#include <stdint.h>
+
+#include "../../../../include/wrappers_msa.h"
+#include "../../../../include/test_inputs.h"
+#include "../../../../include/test_utils.h"
+
+#define TEST_COUNT_TOTAL (                                                \
+            (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
+            (RANDOM_INPUTS_SHORT_COUNT) * (RANDOM_INPUTS_SHORT_COUNT))
+
+
+int32_t main(void)
+{
+    char *instruction_name = "AVER_U.H";
+    int32_t ret;
+    uint32_t i, j;
+    struct timeval start, end;
+    double elapsed_time;
+
+    uint64_t b128_result[TEST_COUNT_TOTAL][2];
+    uint64_t b128_expect[TEST_COUNT_TOTAL][2] = {
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },    /*   0  */
+        { 0x8000800080008000ULL, 0x8000800080008000ULL, },
+        { 0xd555d555d555d555ULL, 0xd555d555d555d555ULL, },
+        { 0xaaaaaaaaaaaaaaaaULL, 0xaaaaaaaaaaaaaaaaULL, },
+        { 0xe666e666e666e666ULL, 0xe666e666e666e666ULL, },
+        { 0x9999999999999999ULL, 0x9999999999999999ULL, },
+        { 0xf1c79c71c71cf1c7ULL, 0x9c71c71cf1c79c71ULL, },
+        { 0x8e38e38eb8e38e38ULL, 0xe38eb8e38e38e38eULL, },
+        { 0x8000800080008000ULL, 0x8000800080008000ULL, },    /*   8  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x5555555555555555ULL, 0x5555555555555555ULL, },
+        { 0x2aab2aab2aab2aabULL, 0x2aab2aab2aab2aabULL, },
+        { 0x6666666666666666ULL, 0x6666666666666666ULL, },
+        { 0x199a199a199a199aULL, 0x199a199a199a199aULL, },
+        { 0x71c71c72471c71c7ULL, 0x1c72471c71c71c72ULL, },
+        { 0x0e39638e38e40e39ULL, 0x638e38e40e39638eULL, },
+        { 0xd555d555d555d555ULL, 0xd555d555d555d555ULL, },    /*  16  */
+        { 0x5555555555555555ULL, 0x5555555555555555ULL, },
+        { 0xaaaaaaaaaaaaaaaaULL, 0xaaaaaaaaaaaaaaaaULL, },
+        { 0x8000800080008000ULL, 0x8000800080008000ULL, },
+        { 0xbbbbbbbbbbbbbbbbULL, 0xbbbbbbbbbbbbbbbbULL, },
+        { 0x6eef6eef6eef6eefULL, 0x6eef6eef6eef6eefULL, },
+        { 0xc71c71c79c71c71cULL, 0x71c79c71c71c71c7ULL, },
+        { 0x638eb8e38e39638eULL, 0xb8e38e39638eb8e3ULL, },
+        { 0xaaaaaaaaaaaaaaaaULL, 0xaaaaaaaaaaaaaaaaULL, },    /*  24  */
+        { 0x2aab2aab2aab2aabULL, 0x2aab2aab2aab2aabULL, },
+        { 0x8000800080008000ULL, 0x8000800080008000ULL, },
+        { 0x5555555555555555ULL, 0x5555555555555555ULL, },
+        { 0x9111911191119111ULL, 0x9111911191119111ULL, },
+        { 0x4444444444444444ULL, 0x4444444444444444ULL, },
+        { 0x9c72471c71c79c72ULL, 0x471c71c79c72471cULL, },
+        { 0x38e38e39638e38e3ULL, 0x8e39638e38e38e39ULL, },
+        { 0xe666e666e666e666ULL, 0xe666e666e666e666ULL, },    /*  32  */
+        { 0x6666666666666666ULL, 0x6666666666666666ULL, },
+        { 0xbbbbbbbbbbbbbbbbULL, 0xbbbbbbbbbbbbbbbbULL, },
+        { 0x9111911191119111ULL, 0x9111911191119111ULL, },
+        { 0xccccccccccccccccULL, 0xccccccccccccccccULL, },
+        { 0x8000800080008000ULL, 0x8000800080008000ULL, },
+        { 0xd82d82d8ad82d82dULL, 0x82d8ad82d82d82d8ULL, },
+        { 0x749fc9f49f4a749fULL, 0xc9f49f4a749fc9f4ULL, },
+        { 0x9999999999999999ULL, 0x9999999999999999ULL, },    /*  40  */
+        { 0x199a199a199a199aULL, 0x199a199a199a199aULL, },
+        { 0x6eef6eef6eef6eefULL, 0x6eef6eef6eef6eefULL, },
+        { 0x4444444444444444ULL, 0x4444444444444444ULL, },
+        { 0x8000800080008000ULL, 0x8000800080008000ULL, },
+        { 0x3333333333333333ULL, 0x3333333333333333ULL, },
+        { 0x8b61360b60b68b61ULL, 0x360b60b68b61360bULL, },
+        { 0x27d27d28527d27d2ULL, 0x7d28527d27d27d28ULL, },
+        { 0xf1c79c71c71cf1c7ULL, 0x9c71c71cf1c79c71ULL, },    /*  48  */
+        { 0x71c71c72471c71c7ULL, 0x1c72471c71c71c72ULL, },
+        { 0xc71c71c79c71c71cULL, 0x71c79c71c71c71c7ULL, },
+        { 0x9c72471c71c79c72ULL, 0x471c71c79c72471cULL, },
+        { 0xd82d82d8ad82d82dULL, 0x82d8ad82d82d82d8ULL, },
+        { 0x8b61360b60b68b61ULL, 0x360b60b68b61360bULL, },
+        { 0xe38e38e38e38e38eULL, 0x38e38e38e38e38e3ULL, },
+        { 0x8000800080008000ULL, 0x8000800080008000ULL, },
+        { 0x8e38e38eb8e38e38ULL, 0xe38eb8e38e38e38eULL, },    /*  56  */
+        { 0x0e39638e38e40e39ULL, 0x638e38e40e39638eULL, },
+        { 0x638eb8e38e39638eULL, 0xb8e38e39638eb8e3ULL, },
+        { 0x38e38e39638e38e3ULL, 0x8e39638e38e38e39ULL, },
+        { 0x749fc9f49f4a749fULL, 0xc9f49f4a749fc9f4ULL, },
+        { 0x27d27d28527d27d2ULL, 0x7d28527d27d27d28ULL, },
+        { 0x8000800080008000ULL, 0x8000800080008000ULL, },
+        { 0x1c71c71c71c71c71ULL, 0xc71c71c71c71c71cULL, },
+        { 0x886ae6cc28625540ULL, 0x4b670b5efe7bb00cULL, },    /*  64  */
+        { 0xc21473983afb8e24ULL, 0x2f2f633c89dd8184ULL, },
+        { 0x9a62cabb71197060ULL, 0x39a0692fd4d36a90ULL, },
+        { 0x7c5d7e8d434a9bc7ULL, 0x6cac4a1bd3dfc956ULL, },
+        { 0xc21473983afb8e24ULL, 0x2f2f633c89dd8184ULL, },
+        { 0xfbbe00634d93c708ULL, 0x12f7bb1a153f52fcULL, },
+        { 0xd40c578783b1a944ULL, 0x1d68c10d60353c08ULL, },
+        { 0xb6070b5855e2d4abULL, 0x5074a1f95f419aceULL, },
+        { 0x9a62cabb71197060ULL, 0x39a0692fd4d36a90ULL, },    /*  72  */
+        { 0xd40c578783b1a944ULL, 0x1d68c10d60353c08ULL, },
+        { 0xac5aaeaab9cf8b80ULL, 0x27d8c6ffab2b2514ULL, },
+        { 0x8e55627c8c00b6e7ULL, 0x5ae5a7ecaa3783daULL, },
+        { 0x7c5d7e8d434a9bc7ULL, 0x6cac4a1bd3dfc956ULL, },
+        { 0xb6070b5855e2d4abULL, 0x5074a1f95f419aceULL, },
+};
+
+    gettimeofday(&start, NULL);
+
+    for (i = 0; i < PATTERN_INPUTS_SHORT_COUNT; i++) {
+        for (j = 0; j < PATTERN_INPUTS_SHORT_COUNT; j++) {
+            do_msa_AVER_U_H(b128_pattern[i], b128_pattern[j],
+                           b128_result[PATTERN_INPUTS_SHORT_COUNT * i + j]);
+        }
+    }
+
+    for (i = 0; i < RANDOM_INPUTS_SHORT_COUNT; i++) {
+        for (j = 0; j < RANDOM_INPUTS_SHORT_COUNT; j++) {
+            do_msa_AVER_U_H(b128_random[i], b128_random[j],
+                           b128_result[((PATTERN_INPUTS_SHORT_COUNT) *
+                                        (PATTERN_INPUTS_SHORT_COUNT)) +
+                                       RANDOM_INPUTS_SHORT_COUNT * i + j]);
+        }
+    }
+
+    gettimeofday(&end, NULL);
+
+    elapsed_time = (end.tv_sec - start.tv_sec) * 1000.0;
+    elapsed_time += (end.tv_usec - start.tv_usec) / 1000.0;
+
+    ret = check_results(instruction_name, TEST_COUNT_TOTAL, elapsed_time,
+                        &b128_result[0][0], &b128_expect[0][0]);
+
+    return ret;
+}
diff --git a/tests/tcg/mips/user/ase/msa/int-average/test_msa_aver_u_w.c b/tests/tcg/mips/user/ase/msa/int-average/test_msa_aver_u_w.c
new file mode 100644
index 0000000..e0d6b17
--- /dev/null
+++ b/tests/tcg/mips/user/ase/msa/int-average/test_msa_aver_u_w.c
@@ -0,0 +1,151 @@
+/*
+ *  Test program for MSA instruction AVER_U.W
+ *
+ *  Copyright (C) 2018  Wave Computing, Inc.
+ *  Copyright (C) 2018  Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
+ *
+ *  This program is free software: you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation, either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <sys/time.h>
+#include <stdint.h>
+
+#include "../../../../include/wrappers_msa.h"
+#include "../../../../include/test_inputs.h"
+#include "../../../../include/test_utils.h"
+
+#define TEST_COUNT_TOTAL (                                                \
+            (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
+            (RANDOM_INPUTS_SHORT_COUNT) * (RANDOM_INPUTS_SHORT_COUNT))
+
+
+int32_t main(void)
+{
+    char *instruction_name = "AVER_U.W";
+    int32_t ret;
+    uint32_t i, j;
+    struct timeval start, end;
+    double elapsed_time;
+
+    uint64_t b128_result[TEST_COUNT_TOTAL][2];
+    uint64_t b128_expect[TEST_COUNT_TOTAL][2] = {
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },    /*   0  */
+        { 0x8000000080000000ULL, 0x8000000080000000ULL, },
+        { 0xd5555555d5555555ULL, 0xd5555555d5555555ULL, },
+        { 0xaaaaaaaaaaaaaaaaULL, 0xaaaaaaaaaaaaaaaaULL, },
+        { 0xe6666666e6666666ULL, 0xe6666666e6666666ULL, },
+        { 0x9999999999999999ULL, 0x9999999999999999ULL, },
+        { 0xf1c71c71c71c71c7ULL, 0x9c71c71cf1c71c71ULL, },
+        { 0x8e38e38eb8e38e38ULL, 0xe38e38e38e38e38eULL, },
+        { 0x8000000080000000ULL, 0x8000000080000000ULL, },    /*   8  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x5555555555555555ULL, 0x5555555555555555ULL, },
+        { 0x2aaaaaab2aaaaaabULL, 0x2aaaaaab2aaaaaabULL, },
+        { 0x6666666666666666ULL, 0x6666666666666666ULL, },
+        { 0x1999999a1999999aULL, 0x1999999a1999999aULL, },
+        { 0x71c71c72471c71c7ULL, 0x1c71c71c71c71c72ULL, },
+        { 0x0e38e38e38e38e39ULL, 0x638e38e40e38e38eULL, },
+        { 0xd5555555d5555555ULL, 0xd5555555d5555555ULL, },    /*  16  */
+        { 0x5555555555555555ULL, 0x5555555555555555ULL, },
+        { 0xaaaaaaaaaaaaaaaaULL, 0xaaaaaaaaaaaaaaaaULL, },
+        { 0x8000000080000000ULL, 0x8000000080000000ULL, },
+        { 0xbbbbbbbbbbbbbbbbULL, 0xbbbbbbbbbbbbbbbbULL, },
+        { 0x6eeeeeef6eeeeeefULL, 0x6eeeeeef6eeeeeefULL, },
+        { 0xc71c71c79c71c71cULL, 0x71c71c71c71c71c7ULL, },
+        { 0x638e38e38e38e38eULL, 0xb8e38e39638e38e3ULL, },
+        { 0xaaaaaaaaaaaaaaaaULL, 0xaaaaaaaaaaaaaaaaULL, },    /*  24  */
+        { 0x2aaaaaab2aaaaaabULL, 0x2aaaaaab2aaaaaabULL, },
+        { 0x8000000080000000ULL, 0x8000000080000000ULL, },
+        { 0x5555555555555555ULL, 0x5555555555555555ULL, },
+        { 0x9111111191111111ULL, 0x9111111191111111ULL, },
+        { 0x4444444444444444ULL, 0x4444444444444444ULL, },
+        { 0x9c71c71c71c71c72ULL, 0x471c71c79c71c71cULL, },
+        { 0x38e38e39638e38e3ULL, 0x8e38e38e38e38e39ULL, },
+        { 0xe6666666e6666666ULL, 0xe6666666e6666666ULL, },    /*  32  */
+        { 0x6666666666666666ULL, 0x6666666666666666ULL, },
+        { 0xbbbbbbbbbbbbbbbbULL, 0xbbbbbbbbbbbbbbbbULL, },
+        { 0x9111111191111111ULL, 0x9111111191111111ULL, },
+        { 0xccccccccccccccccULL, 0xccccccccccccccccULL, },
+        { 0x8000000080000000ULL, 0x8000000080000000ULL, },
+        { 0xd82d82d8ad82d82dULL, 0x82d82d82d82d82d8ULL, },
+        { 0x749f49f49f49f49fULL, 0xc9f49f4a749f49f4ULL, },
+        { 0x9999999999999999ULL, 0x9999999999999999ULL, },    /*  40  */
+        { 0x1999999a1999999aULL, 0x1999999a1999999aULL, },
+        { 0x6eeeeeef6eeeeeefULL, 0x6eeeeeef6eeeeeefULL, },
+        { 0x4444444444444444ULL, 0x4444444444444444ULL, },
+        { 0x8000000080000000ULL, 0x8000000080000000ULL, },
+        { 0x3333333333333333ULL, 0x3333333333333333ULL, },
+        { 0x8b60b60b60b60b61ULL, 0x360b60b68b60b60bULL, },
+        { 0x27d27d28527d27d2ULL, 0x7d27d27d27d27d28ULL, },
+        { 0xf1c71c71c71c71c7ULL, 0x9c71c71cf1c71c71ULL, },    /*  48  */
+        { 0x71c71c72471c71c7ULL, 0x1c71c71c71c71c72ULL, },
+        { 0xc71c71c79c71c71cULL, 0x71c71c71c71c71c7ULL, },
+        { 0x9c71c71c71c71c72ULL, 0x471c71c79c71c71cULL, },
+        { 0xd82d82d8ad82d82dULL, 0x82d82d82d82d82d8ULL, },
+        { 0x8b60b60b60b60b61ULL, 0x360b60b68b60b60bULL, },
+        { 0xe38e38e38e38e38eULL, 0x38e38e38e38e38e3ULL, },
+        { 0x8000000080000000ULL, 0x8000000080000000ULL, },
+        { 0x8e38e38eb8e38e38ULL, 0xe38e38e38e38e38eULL, },    /*  56  */
+        { 0x0e38e38e38e38e39ULL, 0x638e38e40e38e38eULL, },
+        { 0x638e38e38e38e38eULL, 0xb8e38e39638e38e3ULL, },
+        { 0x38e38e39638e38e3ULL, 0x8e38e38e38e38e39ULL, },
+        { 0x749f49f49f49f49fULL, 0xc9f49f4a749f49f4ULL, },
+        { 0x27d27d28527d27d2ULL, 0x7d27d27d27d27d28ULL, },
+        { 0x8000000080000000ULL, 0x8000000080000000ULL, },
+        { 0x1c71c71c71c71c71ULL, 0xc71c71c71c71c71cULL, },
+        { 0x886ae6cc28625540ULL, 0x4b670b5efe7bb00cULL, },    /*  64  */
+        { 0xc21473983afb0e24ULL, 0x2f2f633c89dd8184ULL, },
+        { 0x9a62cabb7118f060ULL, 0x399fe92fd4d36a90ULL, },
+        { 0x7c5cfe8d434a1bc7ULL, 0x6cac4a1bd3df4956ULL, },
+        { 0xc21473983afb0e24ULL, 0x2f2f633c89dd8184ULL, },
+        { 0xfbbe00634d93c708ULL, 0x12f7bb1a153f52fcULL, },
+        { 0xd40c578783b1a944ULL, 0x1d68410d60353c08ULL, },
+        { 0xb6068b5855e2d4abULL, 0x5074a1f95f411aceULL, },
+        { 0x9a62cabb7118f060ULL, 0x399fe92fd4d36a90ULL, },    /*  72  */
+        { 0xd40c578783b1a944ULL, 0x1d68410d60353c08ULL, },
+        { 0xac5aaeaab9cf8b80ULL, 0x27d8c6ffab2b2514ULL, },
+        { 0x8e54e27c8c00b6e7ULL, 0x5ae527ecaa3703daULL, },
+        { 0x7c5cfe8d434a1bc7ULL, 0x6cac4a1bd3df4956ULL, },
+        { 0xb6068b5855e2d4abULL, 0x5074a1f95f411aceULL, },
+};
+
+    gettimeofday(&start, NULL);
+
+    for (i = 0; i < PATTERN_INPUTS_SHORT_COUNT; i++) {
+        for (j = 0; j < PATTERN_INPUTS_SHORT_COUNT; j++) {
+            do_msa_AVER_U_W(b128_pattern[i], b128_pattern[j],
+                           b128_result[PATTERN_INPUTS_SHORT_COUNT * i + j]);
+        }
+    }
+
+    for (i = 0; i < RANDOM_INPUTS_SHORT_COUNT; i++) {
+        for (j = 0; j < RANDOM_INPUTS_SHORT_COUNT; j++) {
+            do_msa_AVER_U_W(b128_random[i], b128_random[j],
+                           b128_result[((PATTERN_INPUTS_SHORT_COUNT) *
+                                        (PATTERN_INPUTS_SHORT_COUNT)) +
+                                       RANDOM_INPUTS_SHORT_COUNT * i + j]);
+        }
+    }
+
+    gettimeofday(&end, NULL);
+
+    elapsed_time = (end.tv_sec - start.tv_sec) * 1000.0;
+    elapsed_time += (end.tv_usec - start.tv_usec) / 1000.0;
+
+    ret = check_results(instruction_name, TEST_COUNT_TOTAL, elapsed_time,
+                        &b128_result[0][0], &b128_expect[0][0]);
+
+    return ret;
+}
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [Qemu-devel] [PULL 4/7] target/mips: Add tests for a variety of MSA integer divide instructions
  2019-03-11 14:24 [Qemu-devel] [PULL 0/7] MIPS queue for March 11th, 2019 Aleksandar Markovic
                   ` (2 preceding siblings ...)
  2019-03-11 14:24 ` [Qemu-devel] [PULL 3/7] target/mips: Add tests for a variety of MSA integer average instructions Aleksandar Markovic
@ 2019-03-11 14:24 ` Aleksandar Markovic
  2019-03-11 14:24 ` [Qemu-devel] [PULL 5/7] target/mips: Add tests for a variety of MSA integer dot product instructions Aleksandar Markovic
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Aleksandar Markovic @ 2019-03-11 14:24 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell, amarkovic

From: Mateja Marjanovic <Mateja.Marjanovic@rt-rk.com>

Add tests for a variety of MSA integer divide instructions.

Signed-off-by: Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com>
Reviewed-by: Aleksandar Markovic <amarkovic@wavecomp.com>
Message-Id: <1551964929-17845-3-git-send-email-mateja.marjanovic@rt-rk.com>
---
 .../user/ase/msa/int-divide/test_msa_div_s_b.c     | 151 +++++++++++++++++++++
 .../user/ase/msa/int-divide/test_msa_div_s_d.c     | 151 +++++++++++++++++++++
 .../user/ase/msa/int-divide/test_msa_div_s_h.c     | 151 +++++++++++++++++++++
 .../user/ase/msa/int-divide/test_msa_div_s_w.c     | 151 +++++++++++++++++++++
 .../user/ase/msa/int-divide/test_msa_div_u_b.c     | 151 +++++++++++++++++++++
 .../user/ase/msa/int-divide/test_msa_div_u_d.c     | 151 +++++++++++++++++++++
 .../user/ase/msa/int-divide/test_msa_div_u_h.c     | 151 +++++++++++++++++++++
 .../user/ase/msa/int-divide/test_msa_div_u_w.c     | 151 +++++++++++++++++++++
 8 files changed, 1208 insertions(+)
 create mode 100644 tests/tcg/mips/user/ase/msa/int-divide/test_msa_div_s_b.c
 create mode 100644 tests/tcg/mips/user/ase/msa/int-divide/test_msa_div_s_d.c
 create mode 100644 tests/tcg/mips/user/ase/msa/int-divide/test_msa_div_s_h.c
 create mode 100644 tests/tcg/mips/user/ase/msa/int-divide/test_msa_div_s_w.c
 create mode 100644 tests/tcg/mips/user/ase/msa/int-divide/test_msa_div_u_b.c
 create mode 100644 tests/tcg/mips/user/ase/msa/int-divide/test_msa_div_u_d.c
 create mode 100644 tests/tcg/mips/user/ase/msa/int-divide/test_msa_div_u_h.c
 create mode 100644 tests/tcg/mips/user/ase/msa/int-divide/test_msa_div_u_w.c

diff --git a/tests/tcg/mips/user/ase/msa/int-divide/test_msa_div_s_b.c b/tests/tcg/mips/user/ase/msa/int-divide/test_msa_div_s_b.c
new file mode 100644
index 0000000..38e3670
--- /dev/null
+++ b/tests/tcg/mips/user/ase/msa/int-divide/test_msa_div_s_b.c
@@ -0,0 +1,151 @@
+/*
+ *  Test program for MSA instruction DIV_S.B
+ *
+ *  Copyright (C) 2018  Wave Computing, Inc.
+ *  Copyright (C) 2018  Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
+ *
+ *  This program is free software: you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation, either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <sys/time.h>
+#include <stdint.h>
+
+#include "../../../../include/wrappers_msa.h"
+#include "../../../../include/test_inputs.h"
+#include "../../../../include/test_utils.h"
+
+#define TEST_COUNT_TOTAL (                                                \
+            (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
+            (RANDOM_INPUTS_SHORT_COUNT) * (RANDOM_INPUTS_SHORT_COUNT))
+
+
+int32_t main(void)
+{
+    char *instruction_name = "DIV_S.B";
+    int32_t ret;
+    uint32_t i, j;
+    struct timeval start, end;
+    double elapsed_time;
+
+    uint64_t b128_result[TEST_COUNT_TOTAL][2];
+    uint64_t b128_expect[TEST_COUNT_TOTAL][2] = {
+        { 0x0101010101010101ULL, 0x0101010101010101ULL, },    /*   0  */
+        { 0x0101010101010101ULL, 0x0101010101010101ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*   8  */
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x5656565656565656ULL, 0x5656565656565656ULL, },    /*  16  */
+        { 0x0101010101010101ULL, 0x0101010101010101ULL, },
+        { 0x0101010101010101ULL, 0x0101010101010101ULL, },
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0x0101010101010101ULL, 0x0101010101010101ULL, },
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0x0200ff0200ff0200ULL, 0xff0200ff0200ff02ULL, },
+        { 0xfd0001fd0001fd00ULL, 0x01fd0001fd0001fdULL, },
+        { 0xababababababababULL, 0xababababababababULL, },    /*  24  */
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0101010101010101ULL, 0x0101010101010101ULL, },
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0x0101010101010101ULL, 0x0101010101010101ULL, },
+        { 0xfe0001fe0001fe00ULL, 0x01fe0001fe0001feULL, },
+        { 0x0300ff0300ff0300ULL, 0xff0300ff0300ff03ULL, },
+        { 0x3434343434343434ULL, 0x3434343434343434ULL, },    /*  32  */
+        { 0x0101010101010101ULL, 0x0101010101010101ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0101010101010101ULL, 0x0101010101010101ULL, },
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0x0100000100000100ULL, 0x0001000001000001ULL, },
+        { 0xff0000ff0000ff00ULL, 0x00ff0000ff0000ffULL, },
+        { 0xcdcdcdcdcdcdcdcdULL, 0xcdcdcdcdcdcdcdcdULL, },    /*  40  */
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0101010101010101ULL, 0x0101010101010101ULL, },
+        { 0xff0000ff0000ff00ULL, 0x00ff0000ff0000ffULL, },
+        { 0x0100000100000100ULL, 0x0001000001000001ULL, },
+        { 0x1d72c81d72c81d72ULL, 0xc81d72c81d72c81dULL, },    /*  48  */
+        { 0x0101ff0101ff0101ULL, 0xff0101ff0101ff01ULL, },
+        { 0x0001000001000001ULL, 0x0000010000010000ULL, },
+        { 0x00ff0000ff0000ffULL, 0x0000ff0000ff0000ULL, },
+        { 0x0002ff0002ff0002ULL, 0xff0002ff0002ff00ULL, },
+        { 0x00fe0100fe0100feULL, 0x0100fe0100fe0100ULL, },
+        { 0x0101010101010101ULL, 0x0101010101010101ULL, },
+        { 0xffff00ffff00ffffULL, 0x00ffff00ffff00ffULL, },
+        { 0xe48f39e48f39e48fULL, 0x39e48f39e48f39e4ULL, },    /*  56  */
+        { 0xffff01ffff01ffffULL, 0x01ffff01ffff01ffULL, },
+        { 0x00ff0000ff0000ffULL, 0x0000ff0000ff0000ULL, },
+        { 0x0001000001000001ULL, 0x0000010000010000ULL, },
+        { 0x00fe0100fe0100feULL, 0x0100fe0100fe0100ULL, },
+        { 0x0002ff0002ff0002ULL, 0xff0002ff0002ff00ULL, },
+        { 0x0000ff0000ff0000ULL, 0xff0000ff0000ff00ULL, },
+        { 0x0101010101010101ULL, 0x0101010101010101ULL, },
+        { 0x0101010101010101ULL, 0x0101010101010101ULL, },    /*  64  */
+        { 0x18ff01000000ff08ULL, 0x04f50003000100fdULL, },
+        { 0x0101000000fe0000ULL, 0x01fe00a20002fe00ULL, },
+        { 0xff01ff000002fe00ULL, 0x00fa00fe00010200ULL, },
+        { 0x000000ff01ff0000ULL, 0x0000fa00f600ff00ULL, },
+        { 0x0101ff0101010101ULL, 0x0101010101010101ULL, },
+        { 0x000000ffff020000ULL, 0x000001e600010200ULL, },
+        { 0x0000000100fe0100ULL, 0x000000000000fe00ULL, },
+        { 0x00000301ff00fffeULL, 0x0000fb002a000001ULL, },    /*  72  */
+        { 0x10ff0100000002f0ULL, 0x02040000fc0000fbULL, },
+        { 0x0101010101010101ULL, 0x0101010101010101ULL, },
+        { 0x0001fdff00ff03ffULL, 0x000200000000ff00ULL, },
+        { 0x000000ff02000001ULL, 0xff00f6002b0000f8ULL, },
+        { 0xeaffff0001000009ULL, 0xfa0101fffc010018ULL, },
+};
+
+    gettimeofday(&start, NULL);
+
+    for (i = 0; i < PATTERN_INPUTS_SHORT_COUNT; i++) {
+        for (j = 0; j < PATTERN_INPUTS_SHORT_COUNT; j++) {
+            do_msa_DIV_S_B(b128_pattern[i], b128_pattern[j],
+                           b128_result[PATTERN_INPUTS_SHORT_COUNT * i + j]);
+        }
+    }
+
+    for (i = 0; i < RANDOM_INPUTS_SHORT_COUNT; i++) {
+        for (j = 0; j < RANDOM_INPUTS_SHORT_COUNT; j++) {
+            do_msa_DIV_S_B(b128_random[i], b128_random[j],
+                           b128_result[((PATTERN_INPUTS_SHORT_COUNT) *
+                                        (PATTERN_INPUTS_SHORT_COUNT)) +
+                                       RANDOM_INPUTS_SHORT_COUNT * i + j]);
+        }
+    }
+
+    gettimeofday(&end, NULL);
+
+    elapsed_time = (end.tv_sec - start.tv_sec) * 1000.0;
+    elapsed_time += (end.tv_usec - start.tv_usec) / 1000.0;
+
+    ret = check_results(instruction_name, TEST_COUNT_TOTAL, elapsed_time,
+                        &b128_result[0][0], &b128_expect[0][0]);
+
+    return ret;
+}
diff --git a/tests/tcg/mips/user/ase/msa/int-divide/test_msa_div_s_d.c b/tests/tcg/mips/user/ase/msa/int-divide/test_msa_div_s_d.c
new file mode 100644
index 0000000..d92b695
--- /dev/null
+++ b/tests/tcg/mips/user/ase/msa/int-divide/test_msa_div_s_d.c
@@ -0,0 +1,151 @@
+/*
+ *  Test program for MSA instruction DIV_S.D
+ *
+ *  Copyright (C) 2018  Wave Computing, Inc.
+ *  Copyright (C) 2018  Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
+ *
+ *  This program is free software: you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation, either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <sys/time.h>
+#include <stdint.h>
+
+#include "../../../../include/wrappers_msa.h"
+#include "../../../../include/test_inputs.h"
+#include "../../../../include/test_utils.h"
+
+#define TEST_COUNT_TOTAL (                                                \
+            (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
+            (RANDOM_INPUTS_SHORT_COUNT) * (RANDOM_INPUTS_SHORT_COUNT))
+
+
+int32_t main(void)
+{
+    char *instruction_name = "DIV_S.D";
+    int32_t ret;
+    uint32_t i, j;
+    struct timeval start, end;
+    double elapsed_time;
+
+    uint64_t b128_result[TEST_COUNT_TOTAL][2];
+    uint64_t b128_expect[TEST_COUNT_TOTAL][2] = {
+        { 0x0000000000000001ULL, 0x0000000000000001ULL, },    /*   0  */
+        { 0x0000000000000001ULL, 0x0000000000000001ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*   8  */
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x5555555555555556ULL, 0x5555555555555556ULL, },    /*  16  */
+        { 0x0000000000000001ULL, 0x0000000000000001ULL, },
+        { 0x0000000000000001ULL, 0x0000000000000001ULL, },
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0x0000000000000001ULL, 0x0000000000000001ULL, },
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0x0000000000000003ULL, 0xffffffffffffffffULL, },
+        { 0xfffffffffffffffdULL, 0x0000000000000001ULL, },
+        { 0xaaaaaaaaaaaaaaabULL, 0xaaaaaaaaaaaaaaabULL, },    /*  24  */
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000001ULL, 0x0000000000000001ULL, },
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0x0000000000000001ULL, 0x0000000000000001ULL, },
+        { 0xfffffffffffffffeULL, 0x0000000000000001ULL, },
+        { 0x0000000000000003ULL, 0xffffffffffffffffULL, },
+        { 0x3333333333333334ULL, 0x3333333333333334ULL, },    /*  32  */
+        { 0x0000000000000001ULL, 0x0000000000000001ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000001ULL, 0x0000000000000001ULL, },
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0x0000000000000001ULL, 0x0000000000000000ULL, },
+        { 0xffffffffffffffffULL, 0x0000000000000000ULL, },
+        { 0xcccccccccccccccdULL, 0xcccccccccccccccdULL, },    /*  40  */
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000001ULL, 0x0000000000000001ULL, },
+        { 0xffffffffffffffffULL, 0x0000000000000000ULL, },
+        { 0x0000000000000001ULL, 0x0000000000000000ULL, },
+        { 0x1c71c71c71c71c72ULL, 0xc71c71c71c71c71dULL, },    /*  48  */
+        { 0x0000000000000001ULL, 0xffffffffffffffffULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0xffffffffffffffffULL, },
+        { 0x0000000000000000ULL, 0x0000000000000001ULL, },
+        { 0x0000000000000001ULL, 0x0000000000000001ULL, },
+        { 0xffffffffffffffffULL, 0x0000000000000000ULL, },
+        { 0xe38e38e38e38e38fULL, 0x38e38e38e38e38e4ULL, },    /*  56  */
+        { 0xffffffffffffffffULL, 0x0000000000000001ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000001ULL, },
+        { 0x0000000000000000ULL, 0xffffffffffffffffULL, },
+        { 0x0000000000000000ULL, 0xffffffffffffffffULL, },
+        { 0x0000000000000001ULL, 0x0000000000000001ULL, },
+        { 0x0000000000000001ULL, 0x0000000000000001ULL, },    /*  64  */
+        { 0x000000000000001cULL, 0x0000000000000003ULL, },
+        { 0x0000000000000001ULL, 0x0000000000000001ULL, },
+        { 0xffffffffffffffffULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000001ULL, 0x0000000000000001ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*  72  */
+        { 0x0000000000000013ULL, 0x0000000000000002ULL, },
+        { 0x0000000000000001ULL, 0x0000000000000001ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0xffffffffffffffffULL, },
+        { 0xffffffffffffffe6ULL, 0xfffffffffffffffaULL, },
+};
+
+    gettimeofday(&start, NULL);
+
+    for (i = 0; i < PATTERN_INPUTS_SHORT_COUNT; i++) {
+        for (j = 0; j < PATTERN_INPUTS_SHORT_COUNT; j++) {
+            do_msa_DIV_S_D(b128_pattern[i], b128_pattern[j],
+                           b128_result[PATTERN_INPUTS_SHORT_COUNT * i + j]);
+        }
+    }
+
+    for (i = 0; i < RANDOM_INPUTS_SHORT_COUNT; i++) {
+        for (j = 0; j < RANDOM_INPUTS_SHORT_COUNT; j++) {
+            do_msa_DIV_S_D(b128_random[i], b128_random[j],
+                           b128_result[((PATTERN_INPUTS_SHORT_COUNT) *
+                                        (PATTERN_INPUTS_SHORT_COUNT)) +
+                                       RANDOM_INPUTS_SHORT_COUNT * i + j]);
+        }
+    }
+
+    gettimeofday(&end, NULL);
+
+    elapsed_time = (end.tv_sec - start.tv_sec) * 1000.0;
+    elapsed_time += (end.tv_usec - start.tv_usec) / 1000.0;
+
+    ret = check_results(instruction_name, TEST_COUNT_TOTAL, elapsed_time,
+                        &b128_result[0][0], &b128_expect[0][0]);
+
+    return ret;
+}
diff --git a/tests/tcg/mips/user/ase/msa/int-divide/test_msa_div_s_h.c b/tests/tcg/mips/user/ase/msa/int-divide/test_msa_div_s_h.c
new file mode 100644
index 0000000..f191b98
--- /dev/null
+++ b/tests/tcg/mips/user/ase/msa/int-divide/test_msa_div_s_h.c
@@ -0,0 +1,151 @@
+/*
+ *  Test program for MSA instruction DIV_S.H
+ *
+ *  Copyright (C) 2018  Wave Computing, Inc.
+ *  Copyright (C) 2018  Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
+ *
+ *  This program is free software: you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation, either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <sys/time.h>
+#include <stdint.h>
+
+#include "../../../../include/wrappers_msa.h"
+#include "../../../../include/test_inputs.h"
+#include "../../../../include/test_utils.h"
+
+#define TEST_COUNT_TOTAL (                                                \
+            (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
+            (RANDOM_INPUTS_SHORT_COUNT) * (RANDOM_INPUTS_SHORT_COUNT))
+
+
+int32_t main(void)
+{
+    char *instruction_name = "DIV_S.H";
+    int32_t ret;
+    uint32_t i, j;
+    struct timeval start, end;
+    double elapsed_time;
+
+    uint64_t b128_result[TEST_COUNT_TOTAL][2];
+    uint64_t b128_expect[TEST_COUNT_TOTAL][2] = {
+        { 0x0001000100010001ULL, 0x0001000100010001ULL, },    /*   0  */
+        { 0x0001000100010001ULL, 0x0001000100010001ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*   8  */
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x5556555655565556ULL, 0x5556555655565556ULL, },    /*  16  */
+        { 0x0001000100010001ULL, 0x0001000100010001ULL, },
+        { 0x0001000100010001ULL, 0x0001000100010001ULL, },
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0x0001000100010001ULL, 0x0001000100010001ULL, },
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0x0003ffff00000003ULL, 0xffff00000003ffffULL, },
+        { 0xfffd00010000fffdULL, 0x00010000fffd0001ULL, },
+        { 0xaaabaaabaaabaaabULL, 0xaaabaaabaaabaaabULL, },    /*  24  */
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0001000100010001ULL, 0x0001000100010001ULL, },
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0x0001000100010001ULL, 0x0001000100010001ULL, },
+        { 0xfffe00010000fffeULL, 0x00010000fffe0001ULL, },
+        { 0x0003ffff00000003ULL, 0xffff00000003ffffULL, },
+        { 0x3334333433343334ULL, 0x3334333433343334ULL, },    /*  32  */
+        { 0x0001000100010001ULL, 0x0001000100010001ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0001000100010001ULL, 0x0001000100010001ULL, },
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0x0001000000000001ULL, 0x0000000000010000ULL, },
+        { 0xffff00000000ffffULL, 0x00000000ffff0000ULL, },
+        { 0xcccdcccdcccdcccdULL, 0xcccdcccdcccdcccdULL, },    /*  40  */
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0001000100010001ULL, 0x0001000100010001ULL, },
+        { 0xffff00000000ffffULL, 0x00000000ffff0000ULL, },
+        { 0x0001000000000001ULL, 0x0000000000010000ULL, },
+        { 0x1c72c71d71c81c72ULL, 0xc71d71c81c72c71dULL, },    /*  48  */
+        { 0x0001ffff00010001ULL, 0xffff00010001ffffULL, },
+        { 0x0000000000010000ULL, 0x0000000100000000ULL, },
+        { 0x00000000ffff0000ULL, 0x0000ffff00000000ULL, },
+        { 0x0000ffff00020000ULL, 0xffff00020000ffffULL, },
+        { 0x00000001fffe0000ULL, 0x0001fffe00000001ULL, },
+        { 0x0001000100010001ULL, 0x0001000100010001ULL, },
+        { 0xffff0000ffffffffULL, 0x0000ffffffff0000ULL, },
+        { 0xe38f38e48e39e38fULL, 0x38e48e39e38f38e4ULL, },    /*  56  */
+        { 0xffff0001ffffffffULL, 0x0001ffffffff0001ULL, },
+        { 0x00000000ffff0000ULL, 0x0000ffff00000000ULL, },
+        { 0x0000000000010000ULL, 0x0000000100000000ULL, },
+        { 0x00000001fffe0000ULL, 0x0001fffe00000001ULL, },
+        { 0x0000ffff00020000ULL, 0xffff00020000ffffULL, },
+        { 0x0000ffff00000000ULL, 0xffff00000000ffffULL, },
+        { 0x0001000100010001ULL, 0x0001000100010001ULL, },
+        { 0x0001000100010001ULL, 0x0001000100010001ULL, },    /*  64  */
+        { 0x001cffbf0000ffffULL, 0x0003000000000000ULL, },
+        { 0x0001000000000000ULL, 0x000100000000fffeULL, },
+        { 0xffffffff0000fffeULL, 0x0000000000000002ULL, },
+        { 0x0000000000010000ULL, 0x0000fffafff3ffffULL, },
+        { 0x0001000100010001ULL, 0x0001000100010001ULL, },
+        { 0x00000000ffff0000ULL, 0x0000000100000002ULL, },
+        { 0x0000000000000001ULL, 0x000000000000fffeULL, },
+        { 0x00000003ffffffffULL, 0x0000fffb00370000ULL, },    /*  72  */
+        { 0x0013ff2e00000002ULL, 0x00020000fffd0000ULL, },
+        { 0x0001000100010001ULL, 0x0001000100010001ULL, },
+        { 0x0000fffd00000003ULL, 0x000000000000ffffULL, },
+        { 0x0000000000020000ULL, 0xfffffff600390000ULL, },
+        { 0xffe6003900010000ULL, 0xfffa0001fffc0000ULL, },
+};
+
+    gettimeofday(&start, NULL);
+
+    for (i = 0; i < PATTERN_INPUTS_SHORT_COUNT; i++) {
+        for (j = 0; j < PATTERN_INPUTS_SHORT_COUNT; j++) {
+            do_msa_DIV_S_H(b128_pattern[i], b128_pattern[j],
+                           b128_result[PATTERN_INPUTS_SHORT_COUNT * i + j]);
+        }
+    }
+
+    for (i = 0; i < RANDOM_INPUTS_SHORT_COUNT; i++) {
+        for (j = 0; j < RANDOM_INPUTS_SHORT_COUNT; j++) {
+            do_msa_DIV_S_H(b128_random[i], b128_random[j],
+                           b128_result[((PATTERN_INPUTS_SHORT_COUNT) *
+                                        (PATTERN_INPUTS_SHORT_COUNT)) +
+                                       RANDOM_INPUTS_SHORT_COUNT * i + j]);
+        }
+    }
+
+    gettimeofday(&end, NULL);
+
+    elapsed_time = (end.tv_sec - start.tv_sec) * 1000.0;
+    elapsed_time += (end.tv_usec - start.tv_usec) / 1000.0;
+
+    ret = check_results(instruction_name, TEST_COUNT_TOTAL, elapsed_time,
+                        &b128_result[0][0], &b128_expect[0][0]);
+
+    return ret;
+}
diff --git a/tests/tcg/mips/user/ase/msa/int-divide/test_msa_div_s_w.c b/tests/tcg/mips/user/ase/msa/int-divide/test_msa_div_s_w.c
new file mode 100644
index 0000000..0baaff1
--- /dev/null
+++ b/tests/tcg/mips/user/ase/msa/int-divide/test_msa_div_s_w.c
@@ -0,0 +1,151 @@
+/*
+ *  Test program for MSA instruction DIV_S.W
+ *
+ *  Copyright (C) 2018  Wave Computing, Inc.
+ *  Copyright (C) 2018  Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
+ *
+ *  This program is free software: you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation, either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <sys/time.h>
+#include <stdint.h>
+
+#include "../../../../include/wrappers_msa.h"
+#include "../../../../include/test_inputs.h"
+#include "../../../../include/test_utils.h"
+
+#define TEST_COUNT_TOTAL (                                                \
+            (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
+            (RANDOM_INPUTS_SHORT_COUNT) * (RANDOM_INPUTS_SHORT_COUNT))
+
+
+int32_t main(void)
+{
+    char *instruction_name = "DIV_S.W";
+    int32_t ret;
+    uint32_t i, j;
+    struct timeval start, end;
+    double elapsed_time;
+
+    uint64_t b128_result[TEST_COUNT_TOTAL][2];
+    uint64_t b128_expect[TEST_COUNT_TOTAL][2] = {
+        { 0x0000000100000001ULL, 0x0000000100000001ULL, },    /*   0  */
+        { 0x0000000100000001ULL, 0x0000000100000001ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*   8  */
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x5555555655555556ULL, 0x5555555655555556ULL, },    /*  16  */
+        { 0x0000000100000001ULL, 0x0000000100000001ULL, },
+        { 0x0000000100000001ULL, 0x0000000100000001ULL, },
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0x0000000100000001ULL, 0x0000000100000001ULL, },
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0x0000000200000000ULL, 0xffffffff00000002ULL, },
+        { 0xfffffffd00000000ULL, 0x00000001fffffffdULL, },
+        { 0xaaaaaaabaaaaaaabULL, 0xaaaaaaabaaaaaaabULL, },    /*  24  */
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000100000001ULL, 0x0000000100000001ULL, },
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0x0000000100000001ULL, 0x0000000100000001ULL, },
+        { 0xfffffffe00000000ULL, 0x00000001fffffffeULL, },
+        { 0x0000000300000000ULL, 0xffffffff00000003ULL, },
+        { 0x3333333433333334ULL, 0x3333333433333334ULL, },    /*  32  */
+        { 0x0000000100000001ULL, 0x0000000100000001ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000100000001ULL, 0x0000000100000001ULL, },
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0x0000000100000000ULL, 0x0000000000000001ULL, },
+        { 0xffffffff00000000ULL, 0x00000000ffffffffULL, },
+        { 0xcccccccdcccccccdULL, 0xcccccccdcccccccdULL, },    /*  40  */
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000100000001ULL, 0x0000000100000001ULL, },
+        { 0xffffffff00000000ULL, 0x00000000ffffffffULL, },
+        { 0x0000000100000000ULL, 0x0000000000000001ULL, },
+        { 0x1c71c71d71c71c72ULL, 0xc71c71c81c71c71dULL, },    /*  48  */
+        { 0x0000000100000001ULL, 0xffffffff00000001ULL, },
+        { 0x0000000000000001ULL, 0x0000000000000000ULL, },
+        { 0x00000000ffffffffULL, 0x0000000000000000ULL, },
+        { 0x0000000000000002ULL, 0xffffffff00000000ULL, },
+        { 0x00000000fffffffeULL, 0x0000000100000000ULL, },
+        { 0x0000000100000001ULL, 0x0000000100000001ULL, },
+        { 0xffffffffffffffffULL, 0x00000000ffffffffULL, },
+        { 0xe38e38e48e38e38fULL, 0x38e38e39e38e38e4ULL, },    /*  56  */
+        { 0xffffffffffffffffULL, 0x00000001ffffffffULL, },
+        { 0x00000000ffffffffULL, 0x0000000000000000ULL, },
+        { 0x0000000000000001ULL, 0x0000000000000000ULL, },
+        { 0x00000000fffffffeULL, 0x0000000100000000ULL, },
+        { 0x0000000000000002ULL, 0xffffffff00000000ULL, },
+        { 0x0000000000000000ULL, 0xffffffff00000000ULL, },
+        { 0x0000000100000001ULL, 0x0000000100000001ULL, },
+        { 0x0000000100000001ULL, 0x0000000100000001ULL, },    /*  64  */
+        { 0x0000001c00000000ULL, 0x0000000300000000ULL, },
+        { 0x0000000100000000ULL, 0x0000000100000000ULL, },
+        { 0xffffffff00000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000001ULL, 0x00000000fffffff2ULL, },
+        { 0x0000000100000001ULL, 0x0000000100000001ULL, },
+        { 0x00000000ffffffffULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x00000000ffffffffULL, 0x0000000000000037ULL, },    /*  72  */
+        { 0x0000001300000000ULL, 0x00000002fffffffdULL, },
+        { 0x0000000100000001ULL, 0x0000000100000001ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000002ULL, 0xffffffff00000039ULL, },
+        { 0xffffffe600000001ULL, 0xfffffffafffffffcULL, },
+};
+
+    gettimeofday(&start, NULL);
+
+    for (i = 0; i < PATTERN_INPUTS_SHORT_COUNT; i++) {
+        for (j = 0; j < PATTERN_INPUTS_SHORT_COUNT; j++) {
+            do_msa_DIV_S_W(b128_pattern[i], b128_pattern[j],
+                           b128_result[PATTERN_INPUTS_SHORT_COUNT * i + j]);
+        }
+    }
+
+    for (i = 0; i < RANDOM_INPUTS_SHORT_COUNT; i++) {
+        for (j = 0; j < RANDOM_INPUTS_SHORT_COUNT; j++) {
+            do_msa_DIV_S_W(b128_random[i], b128_random[j],
+                           b128_result[((PATTERN_INPUTS_SHORT_COUNT) *
+                                        (PATTERN_INPUTS_SHORT_COUNT)) +
+                                       RANDOM_INPUTS_SHORT_COUNT * i + j]);
+        }
+    }
+
+    gettimeofday(&end, NULL);
+
+    elapsed_time = (end.tv_sec - start.tv_sec) * 1000.0;
+    elapsed_time += (end.tv_usec - start.tv_usec) / 1000.0;
+
+    ret = check_results(instruction_name, TEST_COUNT_TOTAL, elapsed_time,
+                        &b128_result[0][0], &b128_expect[0][0]);
+
+    return ret;
+}
diff --git a/tests/tcg/mips/user/ase/msa/int-divide/test_msa_div_u_b.c b/tests/tcg/mips/user/ase/msa/int-divide/test_msa_div_u_b.c
new file mode 100644
index 0000000..770544a
--- /dev/null
+++ b/tests/tcg/mips/user/ase/msa/int-divide/test_msa_div_u_b.c
@@ -0,0 +1,151 @@
+/*
+ *  Test program for MSA instruction DIV_U.B
+ *
+ *  Copyright (C) 2018  Wave Computing, Inc.
+ *  Copyright (C) 2018  Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
+ *
+ *  This program is free software: you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation, either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <sys/time.h>
+#include <stdint.h>
+
+#include "../../../../include/wrappers_msa.h"
+#include "../../../../include/test_inputs.h"
+#include "../../../../include/test_utils.h"
+
+#define TEST_COUNT_TOTAL (                                                \
+            (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
+            (RANDOM_INPUTS_SHORT_COUNT) * (RANDOM_INPUTS_SHORT_COUNT))
+
+
+int32_t main(void)
+{
+    char *instruction_name = "DIV_U.B";
+    int32_t ret;
+    uint32_t i, j;
+    struct timeval start, end;
+    double elapsed_time;
+
+    uint64_t b128_result[TEST_COUNT_TOTAL][2];
+    uint64_t b128_expect[TEST_COUNT_TOTAL][2] = {
+        { 0x0101010101010101ULL, 0x0101010101010101ULL, },    /*   0  */
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0x0101010101010101ULL, 0x0101010101010101ULL, },
+        { 0x0303030303030303ULL, 0x0303030303030303ULL, },
+        { 0x0101010101010101ULL, 0x0101010101010101ULL, },
+        { 0x0505050505050505ULL, 0x0505050505050505ULL, },
+        { 0x0101040101040101ULL, 0x0401010401010401ULL, },
+        { 0x0902010902010902ULL, 0x0109020109020109ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*   8  */
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*  16  */
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0x0101010101010101ULL, 0x0101010101010101ULL, },
+        { 0x0202020202020202ULL, 0x0202020202020202ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0303030303030303ULL, 0x0303030303030303ULL, },
+        { 0x0001030001030001ULL, 0x0300010300010300ULL, },
+        { 0x0601000601000601ULL, 0x0006010006010006ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*  24  */
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0101010101010101ULL, 0x0101010101010101ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0101010101010101ULL, 0x0101010101010101ULL, },
+        { 0x0000010000010000ULL, 0x0100000100000100ULL, },
+        { 0x0300000300000300ULL, 0x0003000003000003ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*  32  */
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0x0101010101010101ULL, 0x0101010101010101ULL, },
+        { 0x0202020202020202ULL, 0x0202020202020202ULL, },
+        { 0x0101010101010101ULL, 0x0101010101010101ULL, },
+        { 0x0404040404040404ULL, 0x0404040404040404ULL, },
+        { 0x0001030001030001ULL, 0x0300010300010300ULL, },
+        { 0x0701010701010701ULL, 0x0107010107010107ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*  40  */
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0101010101010101ULL, 0x0101010101010101ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0100000100000100ULL, 0x0001000001000001ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*  48  */
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0x0100000100000100ULL, 0x0001000001000001ULL, },
+        { 0x0201000201000201ULL, 0x0002010002010002ULL, },
+        { 0x0100000100000100ULL, 0x0001000001000001ULL, },
+        { 0x0402010402010402ULL, 0x0104020104020104ULL, },
+        { 0x0101010101010101ULL, 0x0101010101010101ULL, },
+        { 0x0801000801000801ULL, 0x0008010008010008ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*  56  */
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0x0000010000010000ULL, 0x0100000100000100ULL, },
+        { 0x0001020001020001ULL, 0x0200010200010200ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0002030002030002ULL, 0x0300020300020300ULL, },
+        { 0x0000030000030000ULL, 0x0300000300000300ULL, },
+        { 0x0101010101010101ULL, 0x0101010101010101ULL, },
+        { 0x0101010101010101ULL, 0x0101010101010101ULL, },    /*  64  */
+        { 0x0000ff0200000008ULL, 0x040000030c010200ULL, },
+        { 0x0001010100000000ULL, 0x0100000001020400ULL, },
+        { 0x01010a0200020000ULL, 0x0000000001010000ULL, },
+        { 0x0101000001010200ULL, 0x0002110000000015ULL, },
+        { 0x0101ff0101010101ULL, 0x0101010101010101ULL, },
+        { 0x0102000000000100ULL, 0x000100000001020cULL, },
+        { 0x0202000100030000ULL, 0x0001010000000001ULL, },
+        { 0x0100000004020102ULL, 0x0002120200000001ULL, },    /*  72  */
+        { 0x0000ff0102010010ULL, 0x0200010908000000ULL, },
+        { 0x0101010101010101ULL, 0x0101010101010101ULL, },
+        { 0x0101070201040001ULL, 0x0000010101000000ULL, },
+        { 0x0000000002000201ULL, 0x01020c020000010dULL, },
+        { 0x0000ff0001000109ULL, 0x0700000808010200ULL, },
+};
+
+    gettimeofday(&start, NULL);
+
+    for (i = 0; i < PATTERN_INPUTS_SHORT_COUNT; i++) {
+        for (j = 0; j < PATTERN_INPUTS_SHORT_COUNT; j++) {
+            do_msa_DIV_U_B(b128_pattern[i], b128_pattern[j],
+                           b128_result[PATTERN_INPUTS_SHORT_COUNT * i + j]);
+        }
+    }
+
+    for (i = 0; i < RANDOM_INPUTS_SHORT_COUNT; i++) {
+        for (j = 0; j < RANDOM_INPUTS_SHORT_COUNT; j++) {
+            do_msa_DIV_U_B(b128_random[i], b128_random[j],
+                           b128_result[((PATTERN_INPUTS_SHORT_COUNT) *
+                                        (PATTERN_INPUTS_SHORT_COUNT)) +
+                                       RANDOM_INPUTS_SHORT_COUNT * i + j]);
+        }
+    }
+
+    gettimeofday(&end, NULL);
+
+    elapsed_time = (end.tv_sec - start.tv_sec) * 1000.0;
+    elapsed_time += (end.tv_usec - start.tv_usec) / 1000.0;
+
+    ret = check_results(instruction_name, TEST_COUNT_TOTAL, elapsed_time,
+                        &b128_result[0][0], &b128_expect[0][0]);
+
+    return ret;
+}
diff --git a/tests/tcg/mips/user/ase/msa/int-divide/test_msa_div_u_d.c b/tests/tcg/mips/user/ase/msa/int-divide/test_msa_div_u_d.c
new file mode 100644
index 0000000..9653e7d
--- /dev/null
+++ b/tests/tcg/mips/user/ase/msa/int-divide/test_msa_div_u_d.c
@@ -0,0 +1,151 @@
+/*
+ *  Test program for MSA instruction DIV_U.D
+ *
+ *  Copyright (C) 2018  Wave Computing, Inc.
+ *  Copyright (C) 2018  Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
+ *
+ *  This program is free software: you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation, either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <sys/time.h>
+#include <stdint.h>
+
+#include "../../../../include/wrappers_msa.h"
+#include "../../../../include/test_inputs.h"
+#include "../../../../include/test_utils.h"
+
+#define TEST_COUNT_TOTAL (                                                \
+            (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
+            (RANDOM_INPUTS_SHORT_COUNT) * (RANDOM_INPUTS_SHORT_COUNT))
+
+
+int32_t main(void)
+{
+    char *instruction_name = "DIV_U.D";
+    int32_t ret;
+    uint32_t i, j;
+    struct timeval start, end;
+    double elapsed_time;
+
+    uint64_t b128_result[TEST_COUNT_TOTAL][2];
+    uint64_t b128_expect[TEST_COUNT_TOTAL][2] = {
+        { 0x0000000000000001ULL, 0x0000000000000001ULL, },    /*   0  */
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0x0000000000000001ULL, 0x0000000000000001ULL, },
+        { 0x0000000000000003ULL, 0x0000000000000003ULL, },
+        { 0x0000000000000001ULL, 0x0000000000000001ULL, },
+        { 0x0000000000000005ULL, 0x0000000000000005ULL, },
+        { 0x0000000000000001ULL, 0x0000000000000004ULL, },
+        { 0x0000000000000009ULL, 0x0000000000000001ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*   8  */
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*  16  */
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0x0000000000000001ULL, 0x0000000000000001ULL, },
+        { 0x0000000000000002ULL, 0x0000000000000002ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000003ULL, 0x0000000000000003ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000003ULL, },
+        { 0x0000000000000006ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*  24  */
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000001ULL, 0x0000000000000001ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000001ULL, 0x0000000000000001ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000001ULL, },
+        { 0x0000000000000003ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*  32  */
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0x0000000000000001ULL, 0x0000000000000001ULL, },
+        { 0x0000000000000002ULL, 0x0000000000000002ULL, },
+        { 0x0000000000000001ULL, 0x0000000000000001ULL, },
+        { 0x0000000000000004ULL, 0x0000000000000004ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000003ULL, },
+        { 0x0000000000000007ULL, 0x0000000000000001ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*  40  */
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000001ULL, 0x0000000000000001ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000001ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*  48  */
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0x0000000000000001ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000002ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000001ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000004ULL, 0x0000000000000001ULL, },
+        { 0x0000000000000001ULL, 0x0000000000000001ULL, },
+        { 0x0000000000000008ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*  56  */
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0x0000000000000000ULL, 0x0000000000000001ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000002ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000003ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000003ULL, },
+        { 0x0000000000000001ULL, 0x0000000000000001ULL, },
+        { 0x0000000000000001ULL, 0x0000000000000001ULL, },    /*  64  */
+        { 0x0000000000000000ULL, 0x0000000000000003ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000001ULL, },
+        { 0x0000000000000001ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000001ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000001ULL, 0x0000000000000001ULL, },
+        { 0x0000000000000001ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000002ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000001ULL, 0x0000000000000000ULL, },    /*  72  */
+        { 0x0000000000000000ULL, 0x0000000000000002ULL, },
+        { 0x0000000000000001ULL, 0x0000000000000001ULL, },
+        { 0x0000000000000001ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000001ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000007ULL, },
+};
+
+    gettimeofday(&start, NULL);
+
+    for (i = 0; i < PATTERN_INPUTS_SHORT_COUNT; i++) {
+        for (j = 0; j < PATTERN_INPUTS_SHORT_COUNT; j++) {
+            do_msa_DIV_U_D(b128_pattern[i], b128_pattern[j],
+                           b128_result[PATTERN_INPUTS_SHORT_COUNT * i + j]);
+        }
+    }
+
+    for (i = 0; i < RANDOM_INPUTS_SHORT_COUNT; i++) {
+        for (j = 0; j < RANDOM_INPUTS_SHORT_COUNT; j++) {
+            do_msa_DIV_U_D(b128_random[i], b128_random[j],
+                           b128_result[((PATTERN_INPUTS_SHORT_COUNT) *
+                                        (PATTERN_INPUTS_SHORT_COUNT)) +
+                                       RANDOM_INPUTS_SHORT_COUNT * i + j]);
+        }
+    }
+
+    gettimeofday(&end, NULL);
+
+    elapsed_time = (end.tv_sec - start.tv_sec) * 1000.0;
+    elapsed_time += (end.tv_usec - start.tv_usec) / 1000.0;
+
+    ret = check_results(instruction_name, TEST_COUNT_TOTAL, elapsed_time,
+                        &b128_result[0][0], &b128_expect[0][0]);
+
+    return ret;
+}
diff --git a/tests/tcg/mips/user/ase/msa/int-divide/test_msa_div_u_h.c b/tests/tcg/mips/user/ase/msa/int-divide/test_msa_div_u_h.c
new file mode 100644
index 0000000..3dcd30b
--- /dev/null
+++ b/tests/tcg/mips/user/ase/msa/int-divide/test_msa_div_u_h.c
@@ -0,0 +1,151 @@
+/*
+ *  Test program for MSA instruction DIV_U.H
+ *
+ *  Copyright (C) 2018  Wave Computing, Inc.
+ *  Copyright (C) 2018  Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
+ *
+ *  This program is free software: you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation, either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <sys/time.h>
+#include <stdint.h>
+
+#include "../../../../include/wrappers_msa.h"
+#include "../../../../include/test_inputs.h"
+#include "../../../../include/test_utils.h"
+
+#define TEST_COUNT_TOTAL (                                                \
+            (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
+            (RANDOM_INPUTS_SHORT_COUNT) * (RANDOM_INPUTS_SHORT_COUNT))
+
+
+int32_t main(void)
+{
+    char *instruction_name = "DIV_U.H";
+    int32_t ret;
+    uint32_t i, j;
+    struct timeval start, end;
+    double elapsed_time;
+
+    uint64_t b128_result[TEST_COUNT_TOTAL][2];
+    uint64_t b128_expect[TEST_COUNT_TOTAL][2] = {
+        { 0x0001000100010001ULL, 0x0001000100010001ULL, },    /*   0  */
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0x0001000100010001ULL, 0x0001000100010001ULL, },
+        { 0x0003000300030003ULL, 0x0003000300030003ULL, },
+        { 0x0001000100010001ULL, 0x0001000100010001ULL, },
+        { 0x0005000500050005ULL, 0x0005000500050005ULL, },
+        { 0x0001000400010001ULL, 0x0004000100010004ULL, },
+        { 0x0009000100020009ULL, 0x0001000200090001ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*   8  */
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*  16  */
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0x0001000100010001ULL, 0x0001000100010001ULL, },
+        { 0x0002000200020002ULL, 0x0002000200020002ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0003000300030003ULL, 0x0003000300030003ULL, },
+        { 0x0000000300010000ULL, 0x0003000100000003ULL, },
+        { 0x0006000000010006ULL, 0x0000000100060000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*  24  */
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0001000100010001ULL, 0x0001000100010001ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0001000100010001ULL, 0x0001000100010001ULL, },
+        { 0x0000000100000000ULL, 0x0001000000000001ULL, },
+        { 0x0003000000000003ULL, 0x0000000000030000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*  32  */
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0x0001000100010001ULL, 0x0001000100010001ULL, },
+        { 0x0002000200020002ULL, 0x0002000200020002ULL, },
+        { 0x0001000100010001ULL, 0x0001000100010001ULL, },
+        { 0x0004000400040004ULL, 0x0004000400040004ULL, },
+        { 0x0000000300010000ULL, 0x0003000100000003ULL, },
+        { 0x0007000100010007ULL, 0x0001000100070001ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*  40  */
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0001000100010001ULL, 0x0001000100010001ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0001000000000001ULL, 0x0000000000010000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*  48  */
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0x0001000000000001ULL, 0x0000000000010000ULL, },
+        { 0x0002000000010002ULL, 0x0000000100020000ULL, },
+        { 0x0001000000000001ULL, 0x0000000000010000ULL, },
+        { 0x0004000100020004ULL, 0x0001000200040001ULL, },
+        { 0x0001000100010001ULL, 0x0001000100010001ULL, },
+        { 0x0008000000010008ULL, 0x0000000100080000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*  56  */
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0x0000000100000000ULL, 0x0001000000000001ULL, },
+        { 0x0000000200010000ULL, 0x0002000100000002ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000300020000ULL, 0x0003000200000003ULL, },
+        { 0x0000000300000000ULL, 0x0003000000000003ULL, },
+        { 0x0001000100010001ULL, 0x0001000100010001ULL, },
+        { 0x0001000100010001ULL, 0x0001000100010001ULL, },    /*  64  */
+        { 0x0000025400000000ULL, 0x00030000000b0002ULL, },
+        { 0x0000000100000000ULL, 0x0001000000010004ULL, },
+        { 0x0001000a00000000ULL, 0x0000000000010000ULL, },
+        { 0x0001000000010002ULL, 0x0000001000000000ULL, },
+        { 0x0001000100010001ULL, 0x0001000100010001ULL, },
+        { 0x0001000000000001ULL, 0x0000000000000002ULL, },
+        { 0x0002000000000000ULL, 0x0000000100000000ULL, },
+        { 0x0001000000040001ULL, 0x0000001100000000ULL, },    /*  72  */
+        { 0x000001c300020000ULL, 0x0002000100080000ULL, },
+        { 0x0001000100010001ULL, 0x0001000100010001ULL, },
+        { 0x0001000700010000ULL, 0x0000000100010000ULL, },
+        { 0x0000000000020002ULL, 0x0001000c00000001ULL, },
+        { 0x0000003900010001ULL, 0x0007000000070002ULL, },
+};
+
+    gettimeofday(&start, NULL);
+
+    for (i = 0; i < PATTERN_INPUTS_SHORT_COUNT; i++) {
+        for (j = 0; j < PATTERN_INPUTS_SHORT_COUNT; j++) {
+            do_msa_DIV_U_H(b128_pattern[i], b128_pattern[j],
+                           b128_result[PATTERN_INPUTS_SHORT_COUNT * i + j]);
+        }
+    }
+
+    for (i = 0; i < RANDOM_INPUTS_SHORT_COUNT; i++) {
+        for (j = 0; j < RANDOM_INPUTS_SHORT_COUNT; j++) {
+            do_msa_DIV_U_H(b128_random[i], b128_random[j],
+                           b128_result[((PATTERN_INPUTS_SHORT_COUNT) *
+                                        (PATTERN_INPUTS_SHORT_COUNT)) +
+                                       RANDOM_INPUTS_SHORT_COUNT * i + j]);
+        }
+    }
+
+    gettimeofday(&end, NULL);
+
+    elapsed_time = (end.tv_sec - start.tv_sec) * 1000.0;
+    elapsed_time += (end.tv_usec - start.tv_usec) / 1000.0;
+
+    ret = check_results(instruction_name, TEST_COUNT_TOTAL, elapsed_time,
+                        &b128_result[0][0], &b128_expect[0][0]);
+
+    return ret;
+}
diff --git a/tests/tcg/mips/user/ase/msa/int-divide/test_msa_div_u_w.c b/tests/tcg/mips/user/ase/msa/int-divide/test_msa_div_u_w.c
new file mode 100644
index 0000000..fd395ef
--- /dev/null
+++ b/tests/tcg/mips/user/ase/msa/int-divide/test_msa_div_u_w.c
@@ -0,0 +1,151 @@
+/*
+ *  Test program for MSA instruction DIV_U.W
+ *
+ *  Copyright (C) 2018  Wave Computing, Inc.
+ *  Copyright (C) 2018  Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
+ *
+ *  This program is free software: you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation, either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <sys/time.h>
+#include <stdint.h>
+
+#include "../../../../include/wrappers_msa.h"
+#include "../../../../include/test_inputs.h"
+#include "../../../../include/test_utils.h"
+
+#define TEST_COUNT_TOTAL (                                                \
+            (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
+            (RANDOM_INPUTS_SHORT_COUNT) * (RANDOM_INPUTS_SHORT_COUNT))
+
+
+int32_t main(void)
+{
+    char *instruction_name = "DIV_U.W";
+    int32_t ret;
+    uint32_t i, j;
+    struct timeval start, end;
+    double elapsed_time;
+
+    uint64_t b128_result[TEST_COUNT_TOTAL][2];
+    uint64_t b128_expect[TEST_COUNT_TOTAL][2] = {
+        { 0x0000000100000001ULL, 0x0000000100000001ULL, },    /*   0  */
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0x0000000100000001ULL, 0x0000000100000001ULL, },
+        { 0x0000000300000003ULL, 0x0000000300000003ULL, },
+        { 0x0000000100000001ULL, 0x0000000100000001ULL, },
+        { 0x0000000500000005ULL, 0x0000000500000005ULL, },
+        { 0x0000000100000001ULL, 0x0000000400000001ULL, },
+        { 0x0000000900000002ULL, 0x0000000100000009ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*   8  */
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*  16  */
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0x0000000100000001ULL, 0x0000000100000001ULL, },
+        { 0x0000000200000002ULL, 0x0000000200000002ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000300000003ULL, 0x0000000300000003ULL, },
+        { 0x0000000000000001ULL, 0x0000000300000000ULL, },
+        { 0x0000000600000001ULL, 0x0000000000000006ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*  24  */
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000100000001ULL, 0x0000000100000001ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000100000001ULL, 0x0000000100000001ULL, },
+        { 0x0000000000000000ULL, 0x0000000100000000ULL, },
+        { 0x0000000300000000ULL, 0x0000000000000003ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*  32  */
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0x0000000100000001ULL, 0x0000000100000001ULL, },
+        { 0x0000000200000002ULL, 0x0000000200000002ULL, },
+        { 0x0000000100000001ULL, 0x0000000100000001ULL, },
+        { 0x0000000400000004ULL, 0x0000000400000004ULL, },
+        { 0x0000000000000001ULL, 0x0000000300000000ULL, },
+        { 0x0000000700000001ULL, 0x0000000100000007ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*  40  */
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000100000001ULL, 0x0000000100000001ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000100000000ULL, 0x0000000000000001ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*  48  */
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0x0000000100000000ULL, 0x0000000000000001ULL, },
+        { 0x0000000200000001ULL, 0x0000000000000002ULL, },
+        { 0x0000000100000000ULL, 0x0000000000000001ULL, },
+        { 0x0000000400000002ULL, 0x0000000100000004ULL, },
+        { 0x0000000100000001ULL, 0x0000000100000001ULL, },
+        { 0x0000000800000001ULL, 0x0000000000000008ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*  56  */
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0x0000000000000000ULL, 0x0000000100000000ULL, },
+        { 0x0000000000000001ULL, 0x0000000200000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000002ULL, 0x0000000300000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000300000000ULL, },
+        { 0x0000000100000001ULL, 0x0000000100000001ULL, },
+        { 0x0000000100000001ULL, 0x0000000100000001ULL, },    /*  64  */
+        { 0x0000000000000000ULL, 0x000000030000000bULL, },
+        { 0x0000000000000000ULL, 0x0000000100000001ULL, },
+        { 0x0000000100000000ULL, 0x0000000000000001ULL, },
+        { 0x0000000100000001ULL, 0x0000000000000000ULL, },
+        { 0x0000000100000001ULL, 0x0000000100000001ULL, },
+        { 0x0000000100000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000200000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000100000004ULL, 0x0000000000000000ULL, },    /*  72  */
+        { 0x0000000000000002ULL, 0x0000000200000008ULL, },
+        { 0x0000000100000001ULL, 0x0000000100000001ULL, },
+        { 0x0000000100000001ULL, 0x0000000000000001ULL, },
+        { 0x0000000000000002ULL, 0x0000000100000000ULL, },
+        { 0x0000000000000001ULL, 0x0000000700000007ULL, },
+};
+
+    gettimeofday(&start, NULL);
+
+    for (i = 0; i < PATTERN_INPUTS_SHORT_COUNT; i++) {
+        for (j = 0; j < PATTERN_INPUTS_SHORT_COUNT; j++) {
+            do_msa_DIV_U_W(b128_pattern[i], b128_pattern[j],
+                           b128_result[PATTERN_INPUTS_SHORT_COUNT * i + j]);
+        }
+    }
+
+    for (i = 0; i < RANDOM_INPUTS_SHORT_COUNT; i++) {
+        for (j = 0; j < RANDOM_INPUTS_SHORT_COUNT; j++) {
+            do_msa_DIV_U_W(b128_random[i], b128_random[j],
+                           b128_result[((PATTERN_INPUTS_SHORT_COUNT) *
+                                        (PATTERN_INPUTS_SHORT_COUNT)) +
+                                       RANDOM_INPUTS_SHORT_COUNT * i + j]);
+        }
+    }
+
+    gettimeofday(&end, NULL);
+
+    elapsed_time = (end.tv_sec - start.tv_sec) * 1000.0;
+    elapsed_time += (end.tv_usec - start.tv_usec) / 1000.0;
+
+    ret = check_results(instruction_name, TEST_COUNT_TOTAL, elapsed_time,
+                        &b128_result[0][0], &b128_expect[0][0]);
+
+    return ret;
+}
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [Qemu-devel] [PULL 5/7] target/mips: Add tests for a variety of MSA integer dot product instructions
  2019-03-11 14:24 [Qemu-devel] [PULL 0/7] MIPS queue for March 11th, 2019 Aleksandar Markovic
                   ` (3 preceding siblings ...)
  2019-03-11 14:24 ` [Qemu-devel] [PULL 4/7] target/mips: Add tests for a variety of MSA integer divide instructions Aleksandar Markovic
@ 2019-03-11 14:24 ` Aleksandar Markovic
  2019-03-11 14:24 ` [Qemu-devel] [PULL 6/7] target/mips: Add tests for a variety of MSA integer multiply instructions Aleksandar Markovic
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Aleksandar Markovic @ 2019-03-11 14:24 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell, amarkovic

From: Mateja Marjanovic <Mateja.Marjanovic@rt-rk.com>

Add tests for a variety of MSA integer dot product instructions.

Signed-off-by: Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com>
Reviewed-by: Aleksandar Markovic <amarkovic@wavecomp.com>
Message-Id: <1551964929-17845-4-git-send-email-mateja.marjanovic@rt-rk.com>
---
 .../ase/msa/int-dot-product/test_msa_dotp_s_d.c    | 151 +++++++++++++++++++++
 .../ase/msa/int-dot-product/test_msa_dotp_s_h.c    | 151 +++++++++++++++++++++
 .../ase/msa/int-dot-product/test_msa_dotp_s_w.c    | 151 +++++++++++++++++++++
 .../ase/msa/int-dot-product/test_msa_dotp_u_d.c    | 151 +++++++++++++++++++++
 .../ase/msa/int-dot-product/test_msa_dotp_u_h.c    | 151 +++++++++++++++++++++
 .../ase/msa/int-dot-product/test_msa_dotp_u_w.c    | 151 +++++++++++++++++++++
 6 files changed, 906 insertions(+)
 create mode 100644 tests/tcg/mips/user/ase/msa/int-dot-product/test_msa_dotp_s_d.c
 create mode 100644 tests/tcg/mips/user/ase/msa/int-dot-product/test_msa_dotp_s_h.c
 create mode 100644 tests/tcg/mips/user/ase/msa/int-dot-product/test_msa_dotp_s_w.c
 create mode 100644 tests/tcg/mips/user/ase/msa/int-dot-product/test_msa_dotp_u_d.c
 create mode 100644 tests/tcg/mips/user/ase/msa/int-dot-product/test_msa_dotp_u_h.c
 create mode 100644 tests/tcg/mips/user/ase/msa/int-dot-product/test_msa_dotp_u_w.c

diff --git a/tests/tcg/mips/user/ase/msa/int-dot-product/test_msa_dotp_s_d.c b/tests/tcg/mips/user/ase/msa/int-dot-product/test_msa_dotp_s_d.c
new file mode 100644
index 0000000..af8d609
--- /dev/null
+++ b/tests/tcg/mips/user/ase/msa/int-dot-product/test_msa_dotp_s_d.c
@@ -0,0 +1,151 @@
+/*
+ *  Test program for MSA instruction DOTP_S.D
+ *
+ *  Copyright (C) 2018  Wave Computing, Inc.
+ *  Copyright (C) 2018  Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
+ *
+ *  This program is free software: you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation, either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <sys/time.h>
+#include <stdint.h>
+
+#include "../../../../include/wrappers_msa.h"
+#include "../../../../include/test_inputs.h"
+#include "../../../../include/test_utils.h"
+
+#define TEST_COUNT_TOTAL (                                                \
+            (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
+            (RANDOM_INPUTS_SHORT_COUNT) * (RANDOM_INPUTS_SHORT_COUNT))
+
+
+int32_t main(void)
+{
+    char *instruction_name = "DOTP_S.D";
+    int32_t ret;
+    uint32_t i, j;
+    struct timeval start, end;
+    double elapsed_time;
+
+    uint64_t b128_result[TEST_COUNT_TOTAL][2];
+    uint64_t b128_expect[TEST_COUNT_TOTAL][2] = {
+        { 0x0000000000000002ULL, 0x0000000000000002ULL, },    /*   0  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x00000000aaaaaaacULL, 0x00000000aaaaaaacULL, },
+        { 0xffffffff55555556ULL, 0xffffffff55555556ULL, },
+        { 0x0000000066666668ULL, 0x0000000066666668ULL, },
+        { 0xffffffff9999999aULL, 0xffffffff9999999aULL, },
+        { 0x000000008e38e38fULL, 0xffffffffe38e38e5ULL, },
+        { 0xffffffff71c71c73ULL, 0x000000001c71c71dULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*   8  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x00000000aaaaaaacULL, 0x00000000aaaaaaacULL, },    /*  16  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x38e38e39c71c71c8ULL, 0x38e38e39c71c71c8ULL, },
+        { 0xc71c71c6e38e38e4ULL, 0xc71c71c6e38e38e4ULL, },
+        { 0x22222222eeeeeef0ULL, 0x22222222eeeeeef0ULL, },
+        { 0xddddddddbbbbbbbcULL, 0xddddddddbbbbbbbcULL, },
+        { 0x2f684bdab425ed0aULL, 0xf684bda197b425eeULL, },
+        { 0xd097b425f684bda2ULL, 0x097b425f12f684beULL, },
+        { 0xffffffff55555556ULL, 0xffffffff55555556ULL, },    /*  24  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0xc71c71c6e38e38e4ULL, 0xc71c71c6e38e38e4ULL, },
+        { 0x38e38e3871c71c72ULL, 0x38e38e3871c71c72ULL, },
+        { 0xdddddddd77777778ULL, 0xdddddddd77777778ULL, },
+        { 0x22222221dddddddeULL, 0x22222221dddddddeULL, },
+        { 0xd097b425da12f685ULL, 0x097b425e4bda12f7ULL, },
+        { 0x2f684bd97b425ed1ULL, 0xf684bda1097b425fULL, },
+        { 0x0000000066666668ULL, 0x0000000066666668ULL, },    /*  32  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x22222222eeeeeef0ULL, 0x22222222eeeeeef0ULL, },
+        { 0xdddddddd77777778ULL, 0xdddddddd77777778ULL, },
+        { 0x147ae14851eb8520ULL, 0x147ae14851eb8520ULL, },
+        { 0xeb851eb8147ae148ULL, 0xeb851eb8147ae148ULL, },
+        { 0x1c71c71d0b60b60cULL, 0xfa4fa4fa82d82d84ULL, },
+        { 0xe38e38e35b05b05cULL, 0x05b05b05e38e38e4ULL, },
+        { 0xffffffff9999999aULL, 0xffffffff9999999aULL, },    /*  40  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0xddddddddbbbbbbbcULL, 0xddddddddbbbbbbbcULL, },
+        { 0x22222221dddddddeULL, 0x22222221dddddddeULL, },
+        { 0xeb851eb8147ae148ULL, 0xeb851eb8147ae148ULL, },
+        { 0x147ae147851eb852ULL, 0x147ae147851eb852ULL, },
+        { 0xe38e38e382d82d83ULL, 0x05b05b0560b60b61ULL, },
+        { 0x1c71c71c16c16c17ULL, 0xfa4fa4fa38e38e39ULL, },
+        { 0x000000008e38e38fULL, 0xffffffffe38e38e5ULL, },    /*  48  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x2f684bdab425ed0aULL, 0xf684bda197b425eeULL, },
+        { 0xd097b425da12f685ULL, 0x097b425e4bda12f7ULL, },
+        { 0x1c71c71d0b60b60cULL, 0xfa4fa4fa82d82d84ULL, },
+        { 0xe38e38e382d82d83ULL, 0x05b05b0560b60b61ULL, },
+        { 0x35ba78199add3c0dULL, 0x0fcd6e9dc0ca4589ULL, },
+        { 0xca4587e6f35ba782ULL, 0xf032916222c3f35cULL, },
+        { 0xffffffff71c71c73ULL, 0x000000001c71c71dULL, },    /*  56  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0xd097b425f684bda2ULL, 0x097b425f12f684beULL, },
+        { 0x2f684bd97b425ed1ULL, 0xf684bda1097b425fULL, },
+        { 0xe38e38e35b05b05cULL, 0x05b05b05e38e38e4ULL, },
+        { 0x1c71c71c16c16c17ULL, 0xfa4fa4fa38e38e39ULL, },
+        { 0xca4587e6f35ba782ULL, 0xf032916222c3f35cULL, },
+        { 0x35ba78187e6b74f1ULL, 0x0fcd6e9df9add3c1ULL, },
+        { 0x3e3ad4ae1266c290ULL, 0x1637d725aebdb714ULL, },    /*  64  */
+        { 0x0e3a0c27f7d6aae4ULL, 0x0575fbb7f08ff55cULL, },
+        { 0x1c00082337c84b78ULL, 0x0c3d39640fde8392ULL, },
+        { 0xda65cd5e9f696cdcULL, 0xdeeb6bec644a26d0ULL, },
+        { 0x0e3a0c27f7d6aae4ULL, 0x0575fbb7f08ff55cULL, },
+        { 0x17945c09b2e19689ULL, 0x032b395187d966b4ULL, },
+        { 0xec1f0e54b5aa67beULL, 0xfbe95b6e67ae6296ULL, },
+        { 0x1aad30609bff5437ULL, 0xf059a43d01b40370ULL, },
+        { 0x1c00082337c84b78ULL, 0x0c3d39640fde8392ULL, },    /*  72  */
+        { 0xec1f0e54b5aa67beULL, 0xfbe95b6e67ae6296ULL, },
+        { 0x2e9326619bb7c8e4ULL, 0x225024d84d163b91ULL, },
+        { 0xc17a5d0372a2a622ULL, 0x0afd6368668933a8ULL, },
+        { 0xda65cd5e9f696cdcULL, 0xdeeb6bec644a26d0ULL, },
+        { 0x1aad30609bff5437ULL, 0xf059a43d01b40370ULL, },
+};
+
+    gettimeofday(&start, NULL);
+
+    for (i = 0; i < PATTERN_INPUTS_SHORT_COUNT; i++) {
+        for (j = 0; j < PATTERN_INPUTS_SHORT_COUNT; j++) {
+            do_msa_DOTP_S_D(b128_pattern[i], b128_pattern[j],
+                           b128_result[PATTERN_INPUTS_SHORT_COUNT * i + j]);
+        }
+    }
+
+    for (i = 0; i < RANDOM_INPUTS_SHORT_COUNT; i++) {
+        for (j = 0; j < RANDOM_INPUTS_SHORT_COUNT; j++) {
+            do_msa_DOTP_S_D(b128_random[i], b128_random[j],
+                           b128_result[((PATTERN_INPUTS_SHORT_COUNT) *
+                                        (PATTERN_INPUTS_SHORT_COUNT)) +
+                                       RANDOM_INPUTS_SHORT_COUNT * i + j]);
+        }
+    }
+
+    gettimeofday(&end, NULL);
+
+    elapsed_time = (end.tv_sec - start.tv_sec) * 1000.0;
+    elapsed_time += (end.tv_usec - start.tv_usec) / 1000.0;
+
+    ret = check_results(instruction_name, TEST_COUNT_TOTAL, elapsed_time,
+                        &b128_result[0][0], &b128_expect[0][0]);
+
+    return ret;
+}
diff --git a/tests/tcg/mips/user/ase/msa/int-dot-product/test_msa_dotp_s_h.c b/tests/tcg/mips/user/ase/msa/int-dot-product/test_msa_dotp_s_h.c
new file mode 100644
index 0000000..40de72a
--- /dev/null
+++ b/tests/tcg/mips/user/ase/msa/int-dot-product/test_msa_dotp_s_h.c
@@ -0,0 +1,151 @@
+/*
+ *  Test program for MSA instruction DOTP_S.H
+ *
+ *  Copyright (C) 2018  Wave Computing, Inc.
+ *  Copyright (C) 2018  Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
+ *
+ *  This program is free software: you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation, either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <sys/time.h>
+#include <stdint.h>
+
+#include "../../../../include/wrappers_msa.h"
+#include "../../../../include/test_inputs.h"
+#include "../../../../include/test_utils.h"
+
+#define TEST_COUNT_TOTAL (                                                \
+            (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
+            (RANDOM_INPUTS_SHORT_COUNT) * (RANDOM_INPUTS_SHORT_COUNT))
+
+
+int32_t main(void)
+{
+    char *instruction_name = "DOTP_S.H";
+    int32_t ret;
+    uint32_t i, j;
+    struct timeval start, end;
+    double elapsed_time;
+
+    uint64_t b128_result[TEST_COUNT_TOTAL][2];
+    uint64_t b128_expect[TEST_COUNT_TOTAL][2] = {
+        { 0x0002000200020002ULL, 0x0002000200020002ULL, },    /*   0  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x00ac00ac00ac00acULL, 0x00ac00ac00ac00acULL, },
+        { 0xff56ff56ff56ff56ULL, 0xff56ff56ff56ff56ULL, },
+        { 0x0068006800680068ULL, 0x0068006800680068ULL, },
+        { 0xff9aff9aff9aff9aULL, 0xff9aff9aff9aff9aULL, },
+        { 0x008fffe5003a008fULL, 0xffe5003a008fffe5ULL, },
+        { 0xff73001dffc8ff73ULL, 0x001dffc8ff73001dULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*   8  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x00ac00ac00ac00acULL, 0x00ac00ac00ac00acULL, },    /*  16  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x39c839c839c839c8ULL, 0x39c839c839c839c8ULL, },
+        { 0xc6e4c6e4c6e4c6e4ULL, 0xc6e4c6e4c6e4c6e4ULL, },
+        { 0x22f022f022f022f0ULL, 0x22f022f022f022f0ULL, },
+        { 0xddbcddbcddbcddbcULL, 0xddbcddbcddbcddbcULL, },
+        { 0x300af6ee137c300aULL, 0xf6ee137c300af6eeULL, },
+        { 0xd0a209beed30d0a2ULL, 0x09beed30d0a209beULL, },
+        { 0xff56ff56ff56ff56ULL, 0xff56ff56ff56ff56ULL, },    /*  24  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0xc6e4c6e4c6e4c6e4ULL, 0xc6e4c6e4c6e4c6e4ULL, },
+        { 0x3872387238723872ULL, 0x3872387238723872ULL, },
+        { 0xdd78dd78dd78dd78ULL, 0xdd78dd78dd78dd78ULL, },
+        { 0x21de21de21de21deULL, 0x21de21de21de21deULL, },
+        { 0xd08508f7ecbed085ULL, 0x08f7ecbed08508f7ULL, },
+        { 0x2ed1f65f12982ed1ULL, 0xf65f12982ed1f65fULL, },
+        { 0x0068006800680068ULL, 0x0068006800680068ULL, },    /*  32  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x22f022f022f022f0ULL, 0x22f022f022f022f0ULL, },
+        { 0xdd78dd78dd78dd78ULL, 0xdd78dd78dd78dd78ULL, },
+        { 0x1520152015201520ULL, 0x1520152015201520ULL, },
+        { 0xeb48eb48eb48eb48ULL, 0xeb48eb48eb48eb48ULL, },
+        { 0x1d0cfa840bc81d0cULL, 0xfa840bc81d0cfa84ULL, },
+        { 0xe35c05e4f4a0e35cULL, 0x05e4f4a0e35c05e4ULL, },
+        { 0xff9aff9aff9aff9aULL, 0xff9aff9aff9aff9aULL, },    /*  40  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0xddbcddbcddbcddbcULL, 0xddbcddbcddbcddbcULL, },
+        { 0x21de21de21de21deULL, 0x21de21de21de21deULL, },
+        { 0xeb48eb48eb48eb48ULL, 0xeb48eb48eb48eb48ULL, },
+        { 0x1452145214521452ULL, 0x1452145214521452ULL, },
+        { 0xe3830561f472e383ULL, 0x0561f472e3830561ULL, },
+        { 0x1c17fa390b281c17ULL, 0xfa390b281c17fa39ULL, },
+        { 0x008fffe5003a008fULL, 0xffe5003a008fffe5ULL, },    /*  48  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x300af6ee137c300aULL, 0xf6ee137c300af6eeULL, },
+        { 0xd08508f7ecbed085ULL, 0x08f7ecbed08508f7ULL, },
+        { 0x1d0cfa840bc81d0cULL, 0xfa840bc81d0cfa84ULL, },
+        { 0xe3830561f472e383ULL, 0x0561f472e3830561ULL, },
+        { 0x360d0f893f04360dULL, 0x0f893f04360d0f89ULL, },
+        { 0xca82f05cc136ca82ULL, 0xf05cc136ca82f05cULL, },
+        { 0xff73001dffc8ff73ULL, 0x001dffc8ff73001dULL, },    /*  56  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0xd0a209beed30d0a2ULL, 0x09beed30d0a209beULL, },
+        { 0x2ed1f65f12982ed1ULL, 0xf65f12982ed1f65fULL, },
+        { 0xe35c05e4f4a0e35cULL, 0x05e4f4a0e35c05e4ULL, },
+        { 0x1c17fa390b281c17ULL, 0xfa390b281c17fa39ULL, },
+        { 0xca82f05cc136ca82ULL, 0xf05cc136ca82f05cULL, },
+        { 0x34f10fc13e9234f1ULL, 0x0fc13e9234f10fc1ULL, },
+        { 0x64240d342bc42c39ULL, 0x3f6a22fd3b1d1990ULL, },    /*  64  */
+        { 0xe704ebe4e24eef13ULL, 0x01a706951e1be630ULL, },
+        { 0x4ca419cce226b927ULL, 0xfb55fd241553f560ULL, },
+        { 0xec36ee202172098aULL, 0xd846ec28206404e0ULL, },
+        { 0xe704ebe4e24eef13ULL, 0x01a706951e1be630ULL, },
+        { 0x111d264945920cf1ULL, 0x0195153d113a1a54ULL, },
+        { 0xea70debeff82160dULL, 0x04260f88039c0b8aULL, },
+        { 0xe9721dc70769091eULL, 0xf8711c48091bf7e4ULL, },
+        { 0x4ca419cce226b927ULL, 0xfb55fd241553f560ULL, },    /*  72  */
+        { 0xea70debeff82160dULL, 0x04260f88039c0b8aULL, },
+        { 0x3b3437281d127579ULL, 0x0c310d25237206e9ULL, },
+        { 0xf706df16dc8de6b6ULL, 0xf0d31b5827f9f42aULL, },
+        { 0xec36ee202172098aULL, 0xd846ec28206404e0ULL, },
+        { 0xe9721dc70769091eULL, 0xf8711c48091bf7e4ULL, },
+};
+
+    gettimeofday(&start, NULL);
+
+    for (i = 0; i < PATTERN_INPUTS_SHORT_COUNT; i++) {
+        for (j = 0; j < PATTERN_INPUTS_SHORT_COUNT; j++) {
+            do_msa_DOTP_S_H(b128_pattern[i], b128_pattern[j],
+                           b128_result[PATTERN_INPUTS_SHORT_COUNT * i + j]);
+        }
+    }
+
+    for (i = 0; i < RANDOM_INPUTS_SHORT_COUNT; i++) {
+        for (j = 0; j < RANDOM_INPUTS_SHORT_COUNT; j++) {
+            do_msa_DOTP_S_H(b128_random[i], b128_random[j],
+                           b128_result[((PATTERN_INPUTS_SHORT_COUNT) *
+                                        (PATTERN_INPUTS_SHORT_COUNT)) +
+                                       RANDOM_INPUTS_SHORT_COUNT * i + j]);
+        }
+    }
+
+    gettimeofday(&end, NULL);
+
+    elapsed_time = (end.tv_sec - start.tv_sec) * 1000.0;
+    elapsed_time += (end.tv_usec - start.tv_usec) / 1000.0;
+
+    ret = check_results(instruction_name, TEST_COUNT_TOTAL, elapsed_time,
+                        &b128_result[0][0], &b128_expect[0][0]);
+
+    return ret;
+}
diff --git a/tests/tcg/mips/user/ase/msa/int-dot-product/test_msa_dotp_s_w.c b/tests/tcg/mips/user/ase/msa/int-dot-product/test_msa_dotp_s_w.c
new file mode 100644
index 0000000..2f1d23b
--- /dev/null
+++ b/tests/tcg/mips/user/ase/msa/int-dot-product/test_msa_dotp_s_w.c
@@ -0,0 +1,151 @@
+/*
+ *  Test program for MSA instruction DOTP_S.W
+ *
+ *  Copyright (C) 2018  Wave Computing, Inc.
+ *  Copyright (C) 2018  Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
+ *
+ *  This program is free software: you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation, either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <sys/time.h>
+#include <stdint.h>
+
+#include "../../../../include/wrappers_msa.h"
+#include "../../../../include/test_inputs.h"
+#include "../../../../include/test_utils.h"
+
+#define TEST_COUNT_TOTAL (                                                \
+            (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
+            (RANDOM_INPUTS_SHORT_COUNT) * (RANDOM_INPUTS_SHORT_COUNT))
+
+
+int32_t main(void)
+{
+    char *instruction_name = "DOTP_S.W";
+    int32_t ret;
+    uint32_t i, j;
+    struct timeval start, end;
+    double elapsed_time;
+
+    uint64_t b128_result[TEST_COUNT_TOTAL][2];
+    uint64_t b128_expect[TEST_COUNT_TOTAL][2] = {
+        { 0x0000000200000002ULL, 0x0000000200000002ULL, },    /*   0  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000aaac0000aaacULL, 0x0000aaac0000aaacULL, },
+        { 0xffff5556ffff5556ULL, 0xffff5556ffff5556ULL, },
+        { 0x0000666800006668ULL, 0x0000666800006668ULL, },
+        { 0xffff999affff999aULL, 0xffff999affff999aULL, },
+        { 0xffffe38f00008e3aULL, 0x000038e5ffffe38fULL, },
+        { 0x00001c73ffff71c8ULL, 0xffffc71d00001c73ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*   8  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000aaac0000aaacULL, 0x0000aaac0000aaacULL, },    /*  16  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x38e471c838e471c8ULL, 0x38e471c838e471c8ULL, },
+        { 0xc71c38e4c71c38e4ULL, 0xc71c38e4c71c38e4ULL, },
+        { 0x2222eef02222eef0ULL, 0x2222eef02222eef0ULL, },
+        { 0xddddbbbcddddbbbcULL, 0xddddbbbcddddbbbcULL, },
+        { 0xf684ed0a2f69097cULL, 0x12f725eef684ed0aULL, },
+        { 0x097bbda2d097a130ULL, 0xed0984be097bbda2ULL, },
+        { 0xffff5556ffff5556ULL, 0xffff5556ffff5556ULL, },    /*  24  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0xc71c38e4c71c38e4ULL, 0xc71c38e4c71c38e4ULL, },
+        { 0x38e31c7238e31c72ULL, 0x38e31c7238e31c72ULL, },
+        { 0xdddd7778dddd7778ULL, 0xdddd7778dddd7778ULL, },
+        { 0x2221ddde2221dddeULL, 0x2221ddde2221dddeULL, },
+        { 0x097af685d09784beULL, 0xed0912f7097af685ULL, },
+        { 0xf6845ed12f67d098ULL, 0x12f6425ff6845ed1ULL, },
+        { 0x0000666800006668ULL, 0x0000666800006668ULL, },    /*  32  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x2222eef02222eef0ULL, 0x2222eef02222eef0ULL, },
+        { 0xdddd7778dddd7778ULL, 0xdddd7778dddd7778ULL, },
+        { 0x147b8520147b8520ULL, 0x147b8520147b8520ULL, },
+        { 0xeb84e148eb84e148ULL, 0xeb84e148eb84e148ULL, },
+        { 0xfa4fb60c1c7271c8ULL, 0x0b612d84fa4fb60cULL, },
+        { 0x05b0b05ce38df4a0ULL, 0xf49f38e405b0b05cULL, },
+        { 0xffff999affff999aULL, 0xffff999affff999aULL, },    /*  40  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0xddddbbbcddddbbbcULL, 0xddddbbbcddddbbbcULL, },
+        { 0x2221ddde2221dddeULL, 0x2221ddde2221dddeULL, },
+        { 0xeb84e148eb84e148ULL, 0xeb84e148eb84e148ULL, },
+        { 0x147ab852147ab852ULL, 0x147ab852147ab852ULL, },
+        { 0x05b02d83e38e1c72ULL, 0xf49f0b6105b02d83ULL, },
+        { 0xfa4f6c171c717d28ULL, 0x0b608e39fa4f6c17ULL, },
+        { 0xffffe38f00008e3aULL, 0x000038e5ffffe38fULL, },    /*  48  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0xf684ed0a2f69097cULL, 0x12f725eef684ed0aULL, },
+        { 0x097af685d09784beULL, 0xed0912f7097af685ULL, },
+        { 0xfa4fb60c1c7271c8ULL, 0x0b612d84fa4fb60cULL, },
+        { 0x05b02d83e38e1c72ULL, 0xf49f0b6105b02d83ULL, },
+        { 0x0fcd3c0d35bb4f04ULL, 0x3f3645890fcd3c0dULL, },
+        { 0xf032a782ca453f36ULL, 0xc0c9f35cf032a782ULL, },
+        { 0x00001c73ffff71c8ULL, 0xffffc71d00001c73ULL, },    /*  56  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x097bbda2d097a130ULL, 0xed0984be097bbda2ULL, },
+        { 0xf6845ed12f67d098ULL, 0x12f6425ff6845ed1ULL, },
+        { 0x05b0b05ce38df4a0ULL, 0xf49f38e405b0b05cULL, },
+        { 0xfa4f6c171c717d28ULL, 0x0b608e39fa4f6c17ULL, },
+        { 0xf032a782ca453f36ULL, 0xc0c9f35cf032a782ULL, },
+        { 0x0fcd74f135ba3292ULL, 0x3f35d3c10fcd74f1ULL, },
+        { 0x3a57fe7422c25584ULL, 0x16b6b9f518facfa9ULL, },    /*  64  */
+        { 0x01f36d90f9441446ULL, 0x0286cfede5f4db15ULL, },
+        { 0x2f1518bcce21d93eULL, 0x0934568af4ec6499ULL, },
+        { 0xc9576c1204f83042ULL, 0xd91d3e4709b06e36ULL, },
+        { 0x01f36d90f9441446ULL, 0x0286cfede5f4db15ULL, },
+        { 0x0012474d242f32a9ULL, 0x13f2a8f51ca9cd91ULL, },
+        { 0x0144b48a04a7d0ddULL, 0x124b1c4e04fa8e45ULL, },
+        { 0xfe2a6f6923268793ULL, 0x179e9377ef4766beULL, },
+        { 0x2f1518bcce21d93eULL, 0x0934568af4ec6499ULL, },    /*  72  */
+        { 0x0144b48a04a7d0ddULL, 0x124b1c4e04fa8e45ULL, },
+        { 0x352c988848431561ULL, 0x12e4f841217b42c9ULL, },
+        { 0xd437b4e8f3b0139fULL, 0x08c7d980187d5896ULL, },
+        { 0xc9576c1204f83042ULL, 0xd91d3e4709b06e36ULL, },
+        { 0xfe2a6f6923268793ULL, 0x179e9377ef4766beULL, },
+};
+
+    gettimeofday(&start, NULL);
+
+    for (i = 0; i < PATTERN_INPUTS_SHORT_COUNT; i++) {
+        for (j = 0; j < PATTERN_INPUTS_SHORT_COUNT; j++) {
+            do_msa_DOTP_S_W(b128_pattern[i], b128_pattern[j],
+                           b128_result[PATTERN_INPUTS_SHORT_COUNT * i + j]);
+        }
+    }
+
+    for (i = 0; i < RANDOM_INPUTS_SHORT_COUNT; i++) {
+        for (j = 0; j < RANDOM_INPUTS_SHORT_COUNT; j++) {
+            do_msa_DOTP_S_W(b128_random[i], b128_random[j],
+                           b128_result[((PATTERN_INPUTS_SHORT_COUNT) *
+                                        (PATTERN_INPUTS_SHORT_COUNT)) +
+                                       RANDOM_INPUTS_SHORT_COUNT * i + j]);
+        }
+    }
+
+    gettimeofday(&end, NULL);
+
+    elapsed_time = (end.tv_sec - start.tv_sec) * 1000.0;
+    elapsed_time += (end.tv_usec - start.tv_usec) / 1000.0;
+
+    ret = check_results(instruction_name, TEST_COUNT_TOTAL, elapsed_time,
+                        &b128_result[0][0], &b128_expect[0][0]);
+
+    return ret;
+}
diff --git a/tests/tcg/mips/user/ase/msa/int-dot-product/test_msa_dotp_u_d.c b/tests/tcg/mips/user/ase/msa/int-dot-product/test_msa_dotp_u_d.c
new file mode 100644
index 0000000..e998e00
--- /dev/null
+++ b/tests/tcg/mips/user/ase/msa/int-dot-product/test_msa_dotp_u_d.c
@@ -0,0 +1,151 @@
+/*
+ *  Test program for MSA instruction DOTP_U.D
+ *
+ *  Copyright (C) 2018  Wave Computing, Inc.
+ *  Copyright (C) 2018  Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
+ *
+ *  This program is free software: you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation, either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <sys/time.h>
+#include <stdint.h>
+
+#include "../../../../include/wrappers_msa.h"
+#include "../../../../include/test_inputs.h"
+#include "../../../../include/test_utils.h"
+
+#define TEST_COUNT_TOTAL (                                                \
+            (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
+            (RANDOM_INPUTS_SHORT_COUNT) * (RANDOM_INPUTS_SHORT_COUNT))
+
+
+int32_t main(void)
+{
+    char *instruction_name = "DOTP_U.D";
+    int32_t ret;
+    uint32_t i, j;
+    struct timeval start, end;
+    double elapsed_time;
+
+    uint64_t b128_result[TEST_COUNT_TOTAL][2];
+    uint64_t b128_expect[TEST_COUNT_TOTAL][2] = {
+        { 0xfffffffc00000002ULL, 0xfffffffc00000002ULL, },    /*   0  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x55555552aaaaaaacULL, 0x55555552aaaaaaacULL, },
+        { 0xaaaaaaa955555556ULL, 0xaaaaaaa955555556ULL, },
+        { 0x9999999666666668ULL, 0x9999999666666668ULL, },
+        { 0x666666659999999aULL, 0x666666659999999aULL, },
+        { 0x71c71c6f8e38e38fULL, 0x1c71c719e38e38e5ULL, },
+        { 0x8e38e38c71c71c73ULL, 0xe38e38e21c71c71dULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*   8  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x55555552aaaaaaacULL, 0x55555552aaaaaaacULL, },    /*  16  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0xe38e38e1c71c71c8ULL, 0xe38e38e1c71c71c8ULL, },
+        { 0x71c71c70e38e38e4ULL, 0x71c71c70e38e38e4ULL, },
+        { 0x1111110eeeeeeef0ULL, 0x1111110eeeeeeef0ULL, },
+        { 0x44444443bbbbbbbcULL, 0x44444443bbbbbbbcULL, },
+        { 0xf684bd9fb425ed0aULL, 0xbda12f6697b425eeULL, },
+        { 0x5ed097b2f684bda2ULL, 0x97b425ec12f684beULL, },
+        { 0xaaaaaaa955555556ULL, 0xaaaaaaa955555556ULL, },    /*  24  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x71c71c70e38e38e4ULL, 0x71c71c70e38e38e4ULL, },
+        { 0x38e38e3871c71c72ULL, 0x38e38e3871c71c72ULL, },
+        { 0x8888888777777778ULL, 0x8888888777777778ULL, },
+        { 0x22222221dddddddeULL, 0x22222221dddddddeULL, },
+        { 0x7b425ecfda12f685ULL, 0x5ed097b34bda12f7ULL, },
+        { 0x2f684bd97b425ed1ULL, 0x4bda12f6097b425fULL, },
+        { 0x9999999666666668ULL, 0x9999999666666668ULL, },    /*  32  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x1111110eeeeeeef0ULL, 0x1111110eeeeeeef0ULL, },
+        { 0x8888888777777778ULL, 0x8888888777777778ULL, },
+        { 0x47ae147851eb8520ULL, 0x47ae147851eb8520ULL, },
+        { 0x51eb851e147ae148ULL, 0x51eb851e147ae148ULL, },
+        { 0x27d27d260b60b60cULL, 0xe38e38e182d82d84ULL, },
+        { 0x71c71c705b05b05cULL, 0xb60b60b4e38e38e4ULL, },
+        { 0x666666659999999aULL, 0x666666659999999aULL, },    /*  40  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x44444443bbbbbbbcULL, 0x44444443bbbbbbbcULL, },
+        { 0x22222221dddddddeULL, 0x22222221dddddddeULL, },
+        { 0x51eb851e147ae148ULL, 0x51eb851e147ae148ULL, },
+        { 0x147ae147851eb852ULL, 0x147ae147851eb852ULL, },
+        { 0x49f49f4982d82d83ULL, 0x38e38e3860b60b61ULL, },
+        { 0x1c71c71c16c16c17ULL, 0x2d82d82d38e38e39ULL, },
+        { 0x71c71c6f8e38e38fULL, 0x1c71c719e38e38e5ULL, },    /*  48  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0xf684bd9fb425ed0aULL, 0xbda12f6697b425eeULL, },
+        { 0x7b425ecfda12f685ULL, 0x5ed097b34bda12f7ULL, },
+        { 0x27d27d260b60b60cULL, 0xe38e38e182d82d84ULL, },
+        { 0x49f49f4982d82d83ULL, 0x38e38e3860b60b61ULL, },
+        { 0x1948b0fb9add3c0dULL, 0xd6e9e063c0ca4589ULL, },
+        { 0x587e6b73f35ba782ULL, 0x4587e6b622c3f35cULL, },
+        { 0x8e38e38c71c71c73ULL, 0xe38e38e21c71c71dULL, },    /*  56  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x5ed097b2f684bda2ULL, 0x97b425ec12f684beULL, },
+        { 0x2f684bd97b425ed1ULL, 0x4bda12f6097b425fULL, },
+        { 0x71c71c705b05b05cULL, 0xb60b60b4e38e38e4ULL, },
+        { 0x1c71c71c16c16c17ULL, 0x2d82d82d38e38e39ULL, },
+        { 0x587e6b73f35ba782ULL, 0x4587e6b622c3f35cULL, },
+        { 0x35ba78187e6b74f1ULL, 0x9e06522bf9add3c1ULL, },
+        { 0x4f10a2461266c290ULL, 0x132f373daebdb714ULL, },    /*  64  */
+        { 0x9262f356f7d6aae4ULL, 0x1ab54eb3f08ff55cULL, },
+        { 0x7927f2d937c84b78ULL, 0xb5e40e840fde8392ULL, },
+        { 0x4ab4e3ab9f696cdcULL, 0xd21109f6644a26d0ULL, },
+        { 0x9262f356f7d6aae4ULL, 0x1ab54eb3f08ff55cULL, },
+        { 0x0f105ccfb2e19689ULL, 0x032b395187d966b4ULL, },
+        { 0xe1cb8469b5aa67beULL, 0x1128ae6a67ae6296ULL, },
+        { 0x8afc46ad9bff5437ULL, 0x1890b25301b40370ULL, },
+        { 0x7927f2d937c84b78ULL, 0xb5e40e840fde8392ULL, },    /*  72  */
+        { 0xe1cb8469b5aa67beULL, 0x1128ae6a67ae6296ULL, },
+        { 0xfae79ab59bb7c8e4ULL, 0x78a66f004d163b91ULL, },
+        { 0x8ffb559e72a2a622ULL, 0x8744321b668933a8ULL, },
+        { 0x4ab4e3ab9f696cdcULL, 0xd21109f6644a26d0ULL, },
+        { 0x8afc46ad9bff5437ULL, 0x1890b25301b40370ULL, },
+};
+
+    gettimeofday(&start, NULL);
+
+    for (i = 0; i < PATTERN_INPUTS_SHORT_COUNT; i++) {
+        for (j = 0; j < PATTERN_INPUTS_SHORT_COUNT; j++) {
+            do_msa_DOTP_U_D(b128_pattern[i], b128_pattern[j],
+                           b128_result[PATTERN_INPUTS_SHORT_COUNT * i + j]);
+        }
+    }
+
+    for (i = 0; i < RANDOM_INPUTS_SHORT_COUNT; i++) {
+        for (j = 0; j < RANDOM_INPUTS_SHORT_COUNT; j++) {
+            do_msa_DOTP_U_D(b128_random[i], b128_random[j],
+                           b128_result[((PATTERN_INPUTS_SHORT_COUNT) *
+                                        (PATTERN_INPUTS_SHORT_COUNT)) +
+                                       RANDOM_INPUTS_SHORT_COUNT * i + j]);
+        }
+    }
+
+    gettimeofday(&end, NULL);
+
+    elapsed_time = (end.tv_sec - start.tv_sec) * 1000.0;
+    elapsed_time += (end.tv_usec - start.tv_usec) / 1000.0;
+
+    ret = check_results(instruction_name, TEST_COUNT_TOTAL, elapsed_time,
+                        &b128_result[0][0], &b128_expect[0][0]);
+
+    return ret;
+}
diff --git a/tests/tcg/mips/user/ase/msa/int-dot-product/test_msa_dotp_u_h.c b/tests/tcg/mips/user/ase/msa/int-dot-product/test_msa_dotp_u_h.c
new file mode 100644
index 0000000..e8db601
--- /dev/null
+++ b/tests/tcg/mips/user/ase/msa/int-dot-product/test_msa_dotp_u_h.c
@@ -0,0 +1,151 @@
+/*
+ *  Test program for MSA instruction DOTP_U.H
+ *
+ *  Copyright (C) 2018  Wave Computing, Inc.
+ *  Copyright (C) 2018  Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
+ *
+ *  This program is free software: you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation, either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <sys/time.h>
+#include <stdint.h>
+
+#include "../../../../include/wrappers_msa.h"
+#include "../../../../include/test_inputs.h"
+#include "../../../../include/test_utils.h"
+
+#define TEST_COUNT_TOTAL (                                                \
+            (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
+            (RANDOM_INPUTS_SHORT_COUNT) * (RANDOM_INPUTS_SHORT_COUNT))
+
+
+int32_t main(void)
+{
+    char *instruction_name = "DOTP_U.H";
+    int32_t ret;
+    uint32_t i, j;
+    struct timeval start, end;
+    double elapsed_time;
+
+    uint64_t b128_result[TEST_COUNT_TOTAL][2];
+    uint64_t b128_expect[TEST_COUNT_TOTAL][2] = {
+        { 0xfc02fc02fc02fc02ULL, 0xfc02fc02fc02fc02ULL, },    /*   0  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x52ac52ac52ac52acULL, 0x52ac52ac52ac52acULL, },
+        { 0xa956a956a956a956ULL, 0xa956a956a956a956ULL, },
+        { 0x9668966896689668ULL, 0x9668966896689668ULL, },
+        { 0x659a659a659a659aULL, 0x659a659a659a659aULL, },
+        { 0x6f8f19e5c53a6f8fULL, 0x19e5c53a6f8f19e5ULL, },
+        { 0x8c73e21d36c88c73ULL, 0xe21d36c88c73e21dULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*   8  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x52ac52ac52ac52acULL, 0x52ac52ac52ac52acULL, },    /*  16  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0xe1c8e1c8e1c8e1c8ULL, 0xe1c8e1c8e1c8e1c8ULL, },
+        { 0x70e470e470e470e4ULL, 0x70e470e470e470e4ULL, },
+        { 0x0ef00ef00ef00ef0ULL, 0x0ef00ef00ef00ef0ULL, },
+        { 0x43bc43bc43bc43bcULL, 0x43bc43bc43bc43bcULL, },
+        { 0xf50abbee837cf50aULL, 0xbbee837cf50abbeeULL, },
+        { 0x5da296becf305da2ULL, 0x96becf305da296beULL, },
+        { 0xa956a956a956a956ULL, 0xa956a956a956a956ULL, },    /*  24  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x70e470e470e470e4ULL, 0x70e470e470e470e4ULL, },
+        { 0x3872387238723872ULL, 0x3872387238723872ULL, },
+        { 0x8778877887788778ULL, 0x8778877887788778ULL, },
+        { 0x21de21de21de21deULL, 0x21de21de21de21deULL, },
+        { 0x7a855df741be7a85ULL, 0x5df741be7a855df7ULL, },
+        { 0x2ed14b5f67982ed1ULL, 0x4b5f67982ed14b5fULL, },
+        { 0x9668966896689668ULL, 0x9668966896689668ULL, },    /*  32  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0ef00ef00ef00ef0ULL, 0x0ef00ef00ef00ef0ULL, },
+        { 0x8778877887788778ULL, 0x8778877887788778ULL, },
+        { 0x4520452045204520ULL, 0x4520452045204520ULL, },
+        { 0x5148514851485148ULL, 0x5148514851485148ULL, },
+        { 0x260ce1849dc8260cULL, 0xe1849dc8260ce184ULL, },
+        { 0x705cb4e4f8a0705cULL, 0xb4e4f8a0705cb4e4ULL, },
+        { 0x659a659a659a659aULL, 0x659a659a659a659aULL, },    /*  40  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x43bc43bc43bc43bcULL, 0x43bc43bc43bc43bcULL, },
+        { 0x21de21de21de21deULL, 0x21de21de21de21deULL, },
+        { 0x5148514851485148ULL, 0x5148514851485148ULL, },
+        { 0x1452145214521452ULL, 0x1452145214521452ULL, },
+        { 0x4983386127724983ULL, 0x3861277249833861ULL, },
+        { 0x1c172d393e281c17ULL, 0x2d393e281c172d39ULL, },
+        { 0x6f8f19e5c53a6f8fULL, 0x19e5c53a6f8f19e5ULL, },    /*  48  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0xf50abbee837cf50aULL, 0xbbee837cf50abbeeULL, },
+        { 0x7a855df741be7a85ULL, 0x5df741be7a855df7ULL, },
+        { 0x260ce1849dc8260cULL, 0xe1849dc8260ce184ULL, },
+        { 0x4983386127724983ULL, 0x3861277249833861ULL, },
+        { 0x180dd5895b04180dULL, 0xd5895b04180dd589ULL, },
+        { 0x5782445c6a365782ULL, 0x445c6a365782445cULL, },
+        { 0x8c73e21d36c88c73ULL, 0xe21d36c88c73e21dULL, },    /*  56  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x5da296becf305da2ULL, 0x96becf305da296beULL, },
+        { 0x2ed14b5f67982ed1ULL, 0x4b5f67982ed14b5fULL, },
+        { 0x705cb4e4f8a0705cULL, 0xb4e4f8a0705cb4e4ULL, },
+        { 0x1c172d393e281c17ULL, 0x2d393e281c172d39ULL, },
+        { 0x5782445c6a365782ULL, 0x445c6a365782445cULL, },
+        { 0x34f19dc1cc9234f1ULL, 0x9dc1cc9234f19dc1ULL, },
+        { 0x742471342bc42c39ULL, 0x3f6a22fd371d7990ULL, },    /*  64  */
+        { 0xd4044ee4444e4413ULL, 0x68a71195331b4430ULL, },
+        { 0x80a423cc6c264e27ULL, 0x62556624be531a60ULL, },
+        { 0x5c36512021725e8aULL, 0x8a465528c764a2e0ULL, },
+        { 0xd4044ee4444e4413ULL, 0x68a71195331b4430ULL, },
+        { 0x831d26496b929af1ULL, 0xef958b3d113a1254ULL, },
+        { 0xeb7041beae82700dULL, 0xd326aa88189c1f8aULL, },
+        { 0xa8721dc73869b21eULL, 0xf27179481e1be5e4ULL, },
+        { 0x80a423cc6c264e27ULL, 0x62556624be531a60ULL, },    /*  72  */
+        { 0xeb7041beae82700dULL, 0xd326aa88189c1f8aULL, },
+        { 0x9334e7282d128b79ULL, 0xbc319725797206e9ULL, },
+        { 0x670642166b8da1b6ULL, 0xe0d340587bf92d2aULL, },
+        { 0x5c36512021725e8aULL, 0x8a465528c764a2e0ULL, },
+        { 0xa8721dc73869b21eULL, 0xf27179481e1be5e4ULL, },
+};
+
+    gettimeofday(&start, NULL);
+
+    for (i = 0; i < PATTERN_INPUTS_SHORT_COUNT; i++) {
+        for (j = 0; j < PATTERN_INPUTS_SHORT_COUNT; j++) {
+            do_msa_DOTP_U_H(b128_pattern[i], b128_pattern[j],
+                           b128_result[PATTERN_INPUTS_SHORT_COUNT * i + j]);
+        }
+    }
+
+    for (i = 0; i < RANDOM_INPUTS_SHORT_COUNT; i++) {
+        for (j = 0; j < RANDOM_INPUTS_SHORT_COUNT; j++) {
+            do_msa_DOTP_U_H(b128_random[i], b128_random[j],
+                           b128_result[((PATTERN_INPUTS_SHORT_COUNT) *
+                                        (PATTERN_INPUTS_SHORT_COUNT)) +
+                                       RANDOM_INPUTS_SHORT_COUNT * i + j]);
+        }
+    }
+
+    gettimeofday(&end, NULL);
+
+    elapsed_time = (end.tv_sec - start.tv_sec) * 1000.0;
+    elapsed_time += (end.tv_usec - start.tv_usec) / 1000.0;
+
+    ret = check_results(instruction_name, TEST_COUNT_TOTAL, elapsed_time,
+                        &b128_result[0][0], &b128_expect[0][0]);
+
+    return ret;
+}
diff --git a/tests/tcg/mips/user/ase/msa/int-dot-product/test_msa_dotp_u_w.c b/tests/tcg/mips/user/ase/msa/int-dot-product/test_msa_dotp_u_w.c
new file mode 100644
index 0000000..cf5bd13
--- /dev/null
+++ b/tests/tcg/mips/user/ase/msa/int-dot-product/test_msa_dotp_u_w.c
@@ -0,0 +1,151 @@
+/*
+ *  Test program for MSA instruction DOTP_U.W
+ *
+ *  Copyright (C) 2018  Wave Computing, Inc.
+ *  Copyright (C) 2018  Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
+ *
+ *  This program is free software: you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation, either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <sys/time.h>
+#include <stdint.h>
+
+#include "../../../../include/wrappers_msa.h"
+#include "../../../../include/test_inputs.h"
+#include "../../../../include/test_utils.h"
+
+#define TEST_COUNT_TOTAL (                                                \
+            (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
+            (RANDOM_INPUTS_SHORT_COUNT) * (RANDOM_INPUTS_SHORT_COUNT))
+
+
+int32_t main(void)
+{
+    char *instruction_name = "DOTP_U.W";
+    int32_t ret;
+    uint32_t i, j;
+    struct timeval start, end;
+    double elapsed_time;
+
+    uint64_t b128_result[TEST_COUNT_TOTAL][2];
+    uint64_t b128_expect[TEST_COUNT_TOTAL][2] = {
+        { 0xfffc0002fffc0002ULL, 0xfffc0002fffc0002ULL, },    /*   0  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x5552aaac5552aaacULL, 0x5552aaac5552aaacULL, },
+        { 0xaaa95556aaa95556ULL, 0xaaa95556aaa95556ULL, },
+        { 0x9996666899966668ULL, 0x9996666899966668ULL, },
+        { 0x6665999a6665999aULL, 0x6665999a6665999aULL, },
+        { 0x1c6fe38f71c48e3aULL, 0xc71a38e51c6fe38fULL, },
+        { 0xe38c1c738e3771c8ULL, 0x38e1c71de38c1c73ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*   8  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x5552aaac5552aaacULL, 0x5552aaac5552aaacULL, },    /*  16  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0xe38c71c8e38c71c8ULL, 0xe38c71c8e38c71c8ULL, },
+        { 0x71c638e471c638e4ULL, 0x71c638e471c638e4ULL, },
+        { 0x110eeef0110eeef0ULL, 0x110eeef0110eeef0ULL, },
+        { 0x4443bbbc4443bbbcULL, 0x4443bbbc4443bbbcULL, },
+        { 0xbd9fed0af683097cULL, 0x84bc25eebd9fed0aULL, },
+        { 0x97b2bda25ecfa130ULL, 0xd09684be97b2bda2ULL, },
+        { 0xaaa95556aaa95556ULL, 0xaaa95556aaa95556ULL, },    /*  24  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x71c638e471c638e4ULL, 0x71c638e471c638e4ULL, },
+        { 0x38e31c7238e31c72ULL, 0x38e31c7238e31c72ULL, },
+        { 0x8887777888877778ULL, 0x8887777888877778ULL, },
+        { 0x2221ddde2221dddeULL, 0x2221ddde2221dddeULL, },
+        { 0x5ecff6857b4184beULL, 0x425e12f75ecff685ULL, },
+        { 0x4bd95ed12f67d098ULL, 0x684b425f4bd95ed1ULL, },
+        { 0x9996666899966668ULL, 0x9996666899966668ULL, },    /*  32  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x110eeef0110eeef0ULL, 0x110eeef0110eeef0ULL, },
+        { 0x8887777888877778ULL, 0x8887777888877778ULL, },
+        { 0x47ab852047ab8520ULL, 0x47ab852047ab8520ULL, },
+        { 0x51eae14851eae148ULL, 0x51eae14851eae148ULL, },
+        { 0xe38cb60c27d071c8ULL, 0x9f482d84e38cb60cULL, },
+        { 0xb609b05c71c5f4a0ULL, 0xfa4e38e4b609b05cULL, },
+        { 0x6665999a6665999aULL, 0x6665999a6665999aULL, },    /*  40  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x4443bbbc4443bbbcULL, 0x4443bbbc4443bbbcULL, },
+        { 0x2221ddde2221dddeULL, 0x2221ddde2221dddeULL, },
+        { 0x51eae14851eae148ULL, 0x51eae14851eae148ULL, },
+        { 0x147ab852147ab852ULL, 0x147ab852147ab852ULL, },
+        { 0x38e32d8349f41c72ULL, 0x27d20b6138e32d83ULL, },
+        { 0x2d826c171c717d28ULL, 0x3e938e392d826c17ULL, },
+        { 0x1c6fe38f71c48e3aULL, 0xc71a38e51c6fe38fULL, },    /*  48  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0xbd9fed0af683097cULL, 0x84bc25eebd9fed0aULL, },
+        { 0x5ecff6857b4184beULL, 0x425e12f75ecff685ULL, },
+        { 0xe38cb60c27d071c8ULL, 0x9f482d84e38cb60cULL, },
+        { 0x38e32d8349f41c72ULL, 0x27d20b6138e32d83ULL, },
+        { 0xd6e93c0d19474f04ULL, 0x5ba64589d6e93c0dULL, },
+        { 0x4586a782587d3f36ULL, 0x6b73f35c4586a782ULL, },
+        { 0xe38c1c738e3771c8ULL, 0x38e1c71de38c1c73ULL, },    /*  56  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x97b2bda25ecfa130ULL, 0xd09684be97b2bda2ULL, },
+        { 0x4bd95ed12f67d098ULL, 0x684b425f4bd95ed1ULL, },
+        { 0xb609b05c71c5f4a0ULL, 0xfa4e38e4b609b05cULL, },
+        { 0x2d826c171c717d28ULL, 0x3e938e392d826c17ULL, },
+        { 0x4586a782587d3f36ULL, 0x6b73f35c4586a782ULL, },
+        { 0x9e0574f135ba3292ULL, 0xcd6dd3c19e0574f1ULL, },
+        { 0x18c3fe7422c25584ULL, 0x16b6b9f57608cfa9ULL, },    /*  64  */
+        { 0x867e6d904e841446ULL, 0x0de4cfed4e2fdb15ULL, },
+        { 0xf94f18bc4bc3d93eULL, 0x1492568ac3a66499ULL, },
+        { 0x4ff36c125a383042ULL, 0x2fe23e4744196e36ULL, },
+        { 0x867e6d904e841446ULL, 0x0de4cfed4e2fdb15ULL, },
+        { 0xf78e474db23f32a9ULL, 0x8a26a8f51ca9cd91ULL, },
+        { 0xa9bfb48aa4c2d0ddULL, 0x94641c4e1a398e45ULL, },
+        { 0x6e796f69cc7c8793ULL, 0x6e879377578266beULL, },
+        { 0xf94f18bc4bc3d93eULL, 0x1492568ac3a66499ULL, },    /*  72  */
+        { 0xa9bfb48aa4c2d0ddULL, 0x94641c4e1a398e45ULL, },
+        { 0xeb349888d2e11561ULL, 0xa0e2f84177d142c9ULL, },
+        { 0x5ad3b4e8bfaf139fULL, 0x8076d98091fe5896ULL, },
+        { 0x4ff36c125a383042ULL, 0x2fe23e4744196e36ULL, },
+        { 0x6e796f69cc7c8793ULL, 0x6e879377578266beULL, },
+};
+
+    gettimeofday(&start, NULL);
+
+    for (i = 0; i < PATTERN_INPUTS_SHORT_COUNT; i++) {
+        for (j = 0; j < PATTERN_INPUTS_SHORT_COUNT; j++) {
+            do_msa_DOTP_U_W(b128_pattern[i], b128_pattern[j],
+                           b128_result[PATTERN_INPUTS_SHORT_COUNT * i + j]);
+        }
+    }
+
+    for (i = 0; i < RANDOM_INPUTS_SHORT_COUNT; i++) {
+        for (j = 0; j < RANDOM_INPUTS_SHORT_COUNT; j++) {
+            do_msa_DOTP_U_W(b128_random[i], b128_random[j],
+                           b128_result[((PATTERN_INPUTS_SHORT_COUNT) *
+                                        (PATTERN_INPUTS_SHORT_COUNT)) +
+                                       RANDOM_INPUTS_SHORT_COUNT * i + j]);
+        }
+    }
+
+    gettimeofday(&end, NULL);
+
+    elapsed_time = (end.tv_sec - start.tv_sec) * 1000.0;
+    elapsed_time += (end.tv_usec - start.tv_usec) / 1000.0;
+
+    ret = check_results(instruction_name, TEST_COUNT_TOTAL, elapsed_time,
+                        &b128_result[0][0], &b128_expect[0][0]);
+
+    return ret;
+}
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [Qemu-devel] [PULL 6/7] target/mips: Add tests for a variety of MSA integer multiply instructions
  2019-03-11 14:24 [Qemu-devel] [PULL 0/7] MIPS queue for March 11th, 2019 Aleksandar Markovic
                   ` (4 preceding siblings ...)
  2019-03-11 14:24 ` [Qemu-devel] [PULL 5/7] target/mips: Add tests for a variety of MSA integer dot product instructions Aleksandar Markovic
@ 2019-03-11 14:24 ` Aleksandar Markovic
  2019-03-11 14:24 ` [Qemu-devel] [PULL 7/7] target/mips: Add tests for a variety of MSA integer subtract instructions Aleksandar Markovic
  2019-03-11 18:26 ` [Qemu-devel] [PULL 0/7] MIPS queue for March 11th, 2019 Peter Maydell
  7 siblings, 0 replies; 9+ messages in thread
From: Aleksandar Markovic @ 2019-03-11 14:24 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell, amarkovic

From: Mateja Marjanovic <Mateja.Marjanovic@rt-rk.com>

Add tests for a variety of MSA integer multiply instructions.

Signed-off-by: Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com>
Reviewed-by: Aleksandar Markovic <amarkovic@wavecomp.com>
Message-Id: <1551964929-17845-5-git-send-email-mateja.marjanovic@rt-rk.com>
---
 .../user/ase/msa/int-multiply/test_msa_mul_q_h.c   | 151 +++++++++++++++++++++
 .../user/ase/msa/int-multiply/test_msa_mul_q_w.c   | 151 +++++++++++++++++++++
 .../user/ase/msa/int-multiply/test_msa_mulr_q_h.c  | 151 +++++++++++++++++++++
 .../user/ase/msa/int-multiply/test_msa_mulr_q_w.c  | 151 +++++++++++++++++++++
 .../user/ase/msa/int-multiply/test_msa_mulv_b.c    | 151 +++++++++++++++++++++
 .../user/ase/msa/int-multiply/test_msa_mulv_d.c    | 151 +++++++++++++++++++++
 .../user/ase/msa/int-multiply/test_msa_mulv_h.c    | 151 +++++++++++++++++++++
 .../user/ase/msa/int-multiply/test_msa_mulv_w.c    | 151 +++++++++++++++++++++
 8 files changed, 1208 insertions(+)
 create mode 100644 tests/tcg/mips/user/ase/msa/int-multiply/test_msa_mul_q_h.c
 create mode 100644 tests/tcg/mips/user/ase/msa/int-multiply/test_msa_mul_q_w.c
 create mode 100644 tests/tcg/mips/user/ase/msa/int-multiply/test_msa_mulr_q_h.c
 create mode 100644 tests/tcg/mips/user/ase/msa/int-multiply/test_msa_mulr_q_w.c
 create mode 100644 tests/tcg/mips/user/ase/msa/int-multiply/test_msa_mulv_b.c
 create mode 100644 tests/tcg/mips/user/ase/msa/int-multiply/test_msa_mulv_d.c
 create mode 100644 tests/tcg/mips/user/ase/msa/int-multiply/test_msa_mulv_h.c
 create mode 100644 tests/tcg/mips/user/ase/msa/int-multiply/test_msa_mulv_w.c

diff --git a/tests/tcg/mips/user/ase/msa/int-multiply/test_msa_mul_q_h.c b/tests/tcg/mips/user/ase/msa/int-multiply/test_msa_mul_q_h.c
new file mode 100644
index 0000000..f152608
--- /dev/null
+++ b/tests/tcg/mips/user/ase/msa/int-multiply/test_msa_mul_q_h.c
@@ -0,0 +1,151 @@
+/*
+ *  Test program for MSA instruction MUL_Q.H
+ *
+ *  Copyright (C) 2018  Wave Computing, Inc.
+ *  Copyright (C) 2018  Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
+ *
+ *  This program is free software: you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation, either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <sys/time.h>
+#include <stdint.h>
+
+#include "../../../../include/wrappers_msa.h"
+#include "../../../../include/test_inputs.h"
+#include "../../../../include/test_utils.h"
+
+#define TEST_COUNT_TOTAL (                                                \
+            (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
+            (RANDOM_INPUTS_SHORT_COUNT) * (RANDOM_INPUTS_SHORT_COUNT))
+
+
+int32_t main(void)
+{
+    char *instruction_name = "MUL_Q.H";
+    int32_t ret;
+    uint32_t i, j;
+    struct timeval start, end;
+    double elapsed_time;
+
+    uint64_t b128_result[TEST_COUNT_TOTAL][2];
+    uint64_t b128_expect[TEST_COUNT_TOTAL][2] = {
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*   0  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0x0000ffff00000000ULL, 0xffff00000000ffffULL, },
+        { 0xffff0000ffffffffULL, 0x0000ffffffff0000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*   8  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*  16  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x38e438e438e438e4ULL, 0x38e438e438e438e4ULL, },
+        { 0xc71cc71cc71cc71cULL, 0xc71cc71cc71cc71cULL, },
+        { 0x2222222222222222ULL, 0x2222222222222222ULL, },
+        { 0xddddddddddddddddULL, 0xddddddddddddddddULL, },
+        { 0x12f6da134bdb12f6ULL, 0xda134bdb12f6da13ULL, },
+        { 0xed0925edb425ed09ULL, 0x25edb425ed0925edULL, },
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },    /*  24  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0xc71cc71cc71cc71cULL, 0xc71cc71cc71cc71cULL, },
+        { 0x38e338e338e338e3ULL, 0x38e338e338e338e3ULL, },
+        { 0xddddddddddddddddULL, 0xddddddddddddddddULL, },
+        { 0x2221222122212221ULL, 0x2221222122212221ULL, },
+        { 0xed0925ecb425ed09ULL, 0x25ecb425ed0925ecULL, },
+        { 0x12f5da124bd912f5ULL, 0xda124bd912f5da12ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*  32  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x2222222222222222ULL, 0x2222222222222222ULL, },
+        { 0xddddddddddddddddULL, 0xddddddddddddddddULL, },
+        { 0x147b147b147b147bULL, 0x147b147b147b147bULL, },
+        { 0xeb84eb84eb84eb84ULL, 0xeb84eb84eb84eb84ULL, },
+        { 0x0b60e93e2d830b60ULL, 0xe93e2d830b60e93eULL, },
+        { 0xf49f16c1d27cf49fULL, 0x16c1d27cf49f16c1ULL, },
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },    /*  40  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0xddddddddddddddddULL, 0xddddddddddddddddULL, },
+        { 0x2221222122212221ULL, 0x2221222122212221ULL, },
+        { 0xeb84eb84eb84eb84ULL, 0xeb84eb84eb84eb84ULL, },
+        { 0x147a147a147a147aULL, 0x147a147a147a147aULL, },
+        { 0xf49f16c1d27cf49fULL, 0x16c1d27cf49f16c1ULL, },
+        { 0x0b60e93e2d820b60ULL, 0xe93e2d820b60e93eULL, },
+        { 0x0000ffff00000000ULL, 0xffff00000000ffffULL, },    /*  48  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x12f6da134bdb12f6ULL, 0xda134bdb12f6da13ULL, },
+        { 0xed0925ecb425ed09ULL, 0x25ecb425ed0925ecULL, },
+        { 0x0b60e93e2d830b60ULL, 0xe93e2d830b60e93eULL, },
+        { 0xf49f16c1d27cf49fULL, 0x16c1d27cf49f16c1ULL, },
+        { 0x0652194865240652ULL, 0x1948652406521948ULL, },
+        { 0xf9ade6b79adcf9adULL, 0xe6b79adcf9ade6b7ULL, },
+        { 0xffff0000ffffffffULL, 0x0000ffffffff0000ULL, },    /*  56  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0xed0925edb425ed09ULL, 0x25edb425ed0925edULL, },
+        { 0x12f5da124bd912f5ULL, 0xda124bd912f5da12ULL, },
+        { 0xf49f16c1d27cf49fULL, 0x16c1d27cf49f16c1ULL, },
+        { 0x0b60e93e2d820b60ULL, 0xe93e2d820b60e93eULL, },
+        { 0xf9ade6b79adcf9adULL, 0xe6b79adcf9ade6b7ULL, },
+        { 0x0651194965220651ULL, 0x1949652206511949ULL, },
+        { 0x6fb904f60cbd38c7ULL, 0x2c6b0102000431f1ULL, },    /*  64  */
+        { 0x03faffec1879da0eULL, 0x0b2bf9e1ffbfcc2aULL, },
+        { 0x4e261003e9dab268ULL, 0x1778faf00101e8d6ULL, },
+        { 0x9712fb9b1db7ec38ULL, 0xbccff56b01071259ULL, },
+        { 0x03faffec1879da0eULL, 0x0b2bf9e1ffbfcc2aULL, },
+        { 0x002400002f03195aULL, 0x02cf2515038635ccULL, },
+        { 0x02c8ffc1d57533d9ULL, 0x05e71eaef1eb1809ULL, },
+        { 0xfc43001139150d37ULL, 0xef194023f19aecf4ULL, },
+        { 0x4e261003e9dab268ULL, 0x1778faf00101e8d6ULL, },    /*  72  */
+        { 0x02c8ffc1d57533d9ULL, 0x05e71eaef1eb1809ULL, },
+        { 0x36aa33af267d6a08ULL, 0x0c67196238380abdULL, },
+        { 0xb69bf1d4cc591b07ULL, 0xdc7e3510397df77dULL, },
+        { 0x9712fb9b1db7ec38ULL, 0xbccff56b01071259ULL, },
+        { 0xfc43001139150d37ULL, 0xef194023f19aecf4ULL, },
+};
+
+    gettimeofday(&start, NULL);
+
+    for (i = 0; i < PATTERN_INPUTS_SHORT_COUNT; i++) {
+        for (j = 0; j < PATTERN_INPUTS_SHORT_COUNT; j++) {
+            do_msa_MUL_Q_H(b128_pattern[i], b128_pattern[j],
+                           b128_result[PATTERN_INPUTS_SHORT_COUNT * i + j]);
+        }
+    }
+
+    for (i = 0; i < RANDOM_INPUTS_SHORT_COUNT; i++) {
+        for (j = 0; j < RANDOM_INPUTS_SHORT_COUNT; j++) {
+            do_msa_MUL_Q_H(b128_random[i], b128_random[j],
+                           b128_result[((PATTERN_INPUTS_SHORT_COUNT) *
+                                        (PATTERN_INPUTS_SHORT_COUNT)) +
+                                       RANDOM_INPUTS_SHORT_COUNT * i + j]);
+        }
+    }
+
+    gettimeofday(&end, NULL);
+
+    elapsed_time = (end.tv_sec - start.tv_sec) * 1000.0;
+    elapsed_time += (end.tv_usec - start.tv_usec) / 1000.0;
+
+    ret = check_results(instruction_name, TEST_COUNT_TOTAL, elapsed_time,
+                        &b128_result[0][0], &b128_expect[0][0]);
+
+    return ret;
+}
diff --git a/tests/tcg/mips/user/ase/msa/int-multiply/test_msa_mul_q_w.c b/tests/tcg/mips/user/ase/msa/int-multiply/test_msa_mul_q_w.c
new file mode 100644
index 0000000..df815ee
--- /dev/null
+++ b/tests/tcg/mips/user/ase/msa/int-multiply/test_msa_mul_q_w.c
@@ -0,0 +1,151 @@
+/*
+ *  Test program for MSA instruction MUL_Q.W
+ *
+ *  Copyright (C) 2018  Wave Computing, Inc.
+ *  Copyright (C) 2018  Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
+ *
+ *  This program is free software: you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation, either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <sys/time.h>
+#include <stdint.h>
+
+#include "../../../../include/wrappers_msa.h"
+#include "../../../../include/test_inputs.h"
+#include "../../../../include/test_utils.h"
+
+#define TEST_COUNT_TOTAL (                                                \
+            (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
+            (RANDOM_INPUTS_SHORT_COUNT) * (RANDOM_INPUTS_SHORT_COUNT))
+
+
+int32_t main(void)
+{
+    char *instruction_name = "MUL_Q.W";
+    int32_t ret;
+    uint32_t i, j;
+    struct timeval start, end;
+    double elapsed_time;
+
+    uint64_t b128_result[TEST_COUNT_TOTAL][2];
+    uint64_t b128_expect[TEST_COUNT_TOTAL][2] = {
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*   0  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0x0000000000000000ULL, 0xffffffff00000000ULL, },
+        { 0xffffffffffffffffULL, 0x00000000ffffffffULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*   8  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*  16  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x38e38e3938e38e39ULL, 0x38e38e3938e38e39ULL, },
+        { 0xc71c71c6c71c71c6ULL, 0xc71c71c6c71c71c6ULL, },
+        { 0x2222222222222222ULL, 0x2222222222222222ULL, },
+        { 0xddddddddddddddddULL, 0xddddddddddddddddULL, },
+        { 0x12f684be4bda12f7ULL, 0xda12f68512f684beULL, },
+        { 0xed097b42b425ed09ULL, 0x25ed097bed097b42ULL, },
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },    /*  24  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0xc71c71c6c71c71c6ULL, 0xc71c71c6c71c71c6ULL, },
+        { 0x38e38e3838e38e38ULL, 0x38e38e3838e38e38ULL, },
+        { 0xddddddddddddddddULL, 0xddddddddddddddddULL, },
+        { 0x2222222122222221ULL, 0x2222222122222221ULL, },
+        { 0xed097b42b425ed09ULL, 0x25ed097aed097b42ULL, },
+        { 0x12f684bd4bda12f5ULL, 0xda12f68412f684bdULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*  32  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x2222222222222222ULL, 0x2222222222222222ULL, },
+        { 0xddddddddddddddddULL, 0xddddddddddddddddULL, },
+        { 0x147ae148147ae148ULL, 0x147ae148147ae148ULL, },
+        { 0xeb851eb8eb851eb8ULL, 0xeb851eb8eb851eb8ULL, },
+        { 0x0b60b60b2d82d82eULL, 0xe93e93e90b60b60bULL, },
+        { 0xf49f49f4d27d27d2ULL, 0x16c16c17f49f49f4ULL, },
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },    /*  40  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0xddddddddddddddddULL, 0xddddddddddddddddULL, },
+        { 0x2222222122222221ULL, 0x2222222122222221ULL, },
+        { 0xeb851eb8eb851eb8ULL, 0xeb851eb8eb851eb8ULL, },
+        { 0x147ae147147ae147ULL, 0x147ae147147ae147ULL, },
+        { 0xf49f49f4d27d27d2ULL, 0x16c16c16f49f49f4ULL, },
+        { 0x0b60b60b2d82d82dULL, 0xe93e93e90b60b60bULL, },
+        { 0x0000000000000000ULL, 0xffffffff00000000ULL, },    /*  48  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x12f684be4bda12f7ULL, 0xda12f68512f684beULL, },
+        { 0xed097b42b425ed09ULL, 0x25ed097aed097b42ULL, },
+        { 0x0b60b60b2d82d82eULL, 0xe93e93e90b60b60bULL, },
+        { 0xf49f49f4d27d27d2ULL, 0x16c16c16f49f49f4ULL, },
+        { 0x06522c3f6522c3f3ULL, 0x1948b0fc06522c3fULL, },
+        { 0xf9add3c09add3c0dULL, 0xe6b74f03f9add3c0ULL, },
+        { 0xffffffffffffffffULL, 0x00000000ffffffffULL, },    /*  56  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0xed097b42b425ed09ULL, 0x25ed097bed097b42ULL, },
+        { 0x12f684bd4bda12f5ULL, 0xda12f68412f684bdULL, },
+        { 0xf49f49f4d27d27d2ULL, 0x16c16c17f49f49f4ULL, },
+        { 0x0b60b60b2d82d82dULL, 0xe93e93e90b60b60bULL, },
+        { 0xf9add3c09add3c0dULL, 0xe6b74f03f9add3c0ULL, },
+        { 0x06522c3f6522c3f1ULL, 0x1948b0fc06522c3fULL, },
+        { 0x6fb7e8890cbdc0d2ULL, 0x2c6b144600049a04ULL, },    /*  64  */
+        { 0x03fa514e1879c701ULL, 0x0b2c6ca9ffbf8ac6ULL, },
+        { 0x4e252086e9daefbfULL, 0x1779189301015a34ULL, },
+        { 0x9713a7171db7f3a5ULL, 0xbccfb4690107236fULL, },
+        { 0x03fa514e1879c701ULL, 0x0b2c6ca9ffbf8ac6ULL, },
+        { 0x002442012f047611ULL, 0x02cf8c140386e68eULL, },
+        { 0x02c84b87d575d121ULL, 0x05e79a8af1eb1c52ULL, },
+        { 0xfc439edc3916c1e4ULL, 0xef19389cf19a0fddULL, },
+        { 0x4e252086e9daefbfULL, 0x1779189301015a34ULL, },    /*  72  */
+        { 0x02c84b87d575d121ULL, 0x05e79a8af1eb1c52ULL, },
+        { 0x36a93aff267d11c3ULL, 0x0c6788643838c14cULL, },
+        { 0xb69baa39cc590fcdULL, 0xdc7e6df7397c58d9ULL, },
+        { 0x9713a7171db7f3a5ULL, 0xbccfb4690107236fULL, },
+        { 0xfc439edc3916c1e4ULL, 0xef19389cf19a0fddULL, },
+};
+
+    gettimeofday(&start, NULL);
+
+    for (i = 0; i < PATTERN_INPUTS_SHORT_COUNT; i++) {
+        for (j = 0; j < PATTERN_INPUTS_SHORT_COUNT; j++) {
+            do_msa_MUL_Q_W(b128_pattern[i], b128_pattern[j],
+                           b128_result[PATTERN_INPUTS_SHORT_COUNT * i + j]);
+        }
+    }
+
+    for (i = 0; i < RANDOM_INPUTS_SHORT_COUNT; i++) {
+        for (j = 0; j < RANDOM_INPUTS_SHORT_COUNT; j++) {
+            do_msa_MUL_Q_W(b128_random[i], b128_random[j],
+                           b128_result[((PATTERN_INPUTS_SHORT_COUNT) *
+                                        (PATTERN_INPUTS_SHORT_COUNT)) +
+                                       RANDOM_INPUTS_SHORT_COUNT * i + j]);
+        }
+    }
+
+    gettimeofday(&end, NULL);
+
+    elapsed_time = (end.tv_sec - start.tv_sec) * 1000.0;
+    elapsed_time += (end.tv_usec - start.tv_usec) / 1000.0;
+
+    ret = check_results(instruction_name, TEST_COUNT_TOTAL, elapsed_time,
+                        &b128_result[0][0], &b128_expect[0][0]);
+
+    return ret;
+}
diff --git a/tests/tcg/mips/user/ase/msa/int-multiply/test_msa_mulr_q_h.c b/tests/tcg/mips/user/ase/msa/int-multiply/test_msa_mulr_q_h.c
new file mode 100644
index 0000000..fd0a5fa
--- /dev/null
+++ b/tests/tcg/mips/user/ase/msa/int-multiply/test_msa_mulr_q_h.c
@@ -0,0 +1,151 @@
+/*
+ *  Test program for MSA instruction MULR_Q.H
+ *
+ *  Copyright (C) 2018  Wave Computing, Inc.
+ *  Copyright (C) 2018  Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
+ *
+ *  This program is free software: you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation, either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <sys/time.h>
+#include <stdint.h>
+
+#include "../../../../include/wrappers_msa.h"
+#include "../../../../include/test_inputs.h"
+#include "../../../../include/test_utils.h"
+
+#define TEST_COUNT_TOTAL (                                                \
+            (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
+            (RANDOM_INPUTS_SHORT_COUNT) * (RANDOM_INPUTS_SHORT_COUNT))
+
+
+int32_t main(void)
+{
+    char *instruction_name = "MULR_Q.H";
+    int32_t ret;
+    uint32_t i, j;
+    struct timeval start, end;
+    double elapsed_time;
+
+    uint64_t b128_result[TEST_COUNT_TOTAL][2];
+    uint64_t b128_expect[TEST_COUNT_TOTAL][2] = {
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*   0  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0001000100010001ULL, 0x0001000100010001ULL, },
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000010000ULL, 0x0000000100000000ULL, },
+        { 0x00000000ffff0000ULL, 0x0000ffff00000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*   8  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0001000100010001ULL, 0x0001000100010001ULL, },    /*  16  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x38e438e438e438e4ULL, 0x38e438e438e438e4ULL, },
+        { 0xc71cc71cc71cc71cULL, 0xc71cc71cc71cc71cULL, },
+        { 0x2223222322232223ULL, 0x2223222322232223ULL, },
+        { 0xdddedddedddedddeULL, 0xdddedddedddedddeULL, },
+        { 0x12f7da134bdb12f7ULL, 0xda134bdb12f7da13ULL, },
+        { 0xed0a25eeb425ed0aULL, 0x25eeb425ed0a25eeULL, },
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },    /*  24  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0xc71cc71cc71cc71cULL, 0xc71cc71cc71cc71cULL, },
+        { 0x38e338e338e338e3ULL, 0x38e338e338e338e3ULL, },
+        { 0xddddddddddddddddULL, 0xddddddddddddddddULL, },
+        { 0x2222222222222222ULL, 0x2222222222222222ULL, },
+        { 0xed0925edb426ed09ULL, 0x25edb426ed0925edULL, },
+        { 0x12f6da134bda12f6ULL, 0xda134bda12f6da13ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*  32  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x2223222322232223ULL, 0x2223222322232223ULL, },
+        { 0xddddddddddddddddULL, 0xddddddddddddddddULL, },
+        { 0x147c147c147c147cULL, 0x147c147c147c147cULL, },
+        { 0xeb85eb85eb85eb85ULL, 0xeb85eb85eb85eb85ULL, },
+        { 0x0b61e93e2d840b61ULL, 0xe93e2d840b61e93eULL, },
+        { 0xf49f16c2d27cf49fULL, 0x16c2d27cf49f16c2ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*  40  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0xdddedddedddedddeULL, 0xdddedddedddedddeULL, },
+        { 0x2222222222222222ULL, 0x2222222222222222ULL, },
+        { 0xeb85eb85eb85eb85ULL, 0xeb85eb85eb85eb85ULL, },
+        { 0x147b147b147b147bULL, 0x147b147b147b147bULL, },
+        { 0xf49f16c1d27df49fULL, 0x16c1d27df49f16c1ULL, },
+        { 0x0b60e93e2d830b60ULL, 0xe93e2d830b60e93eULL, },
+        { 0x0000000000010000ULL, 0x0000000100000000ULL, },    /*  48  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x12f7da134bdb12f7ULL, 0xda134bdb12f7da13ULL, },
+        { 0xed0925edb426ed09ULL, 0x25edb426ed0925edULL, },
+        { 0x0b61e93e2d840b61ULL, 0xe93e2d840b61e93eULL, },
+        { 0xf49f16c1d27df49fULL, 0x16c1d27df49f16c1ULL, },
+        { 0x0652194865240652ULL, 0x1948652406521948ULL, },
+        { 0xf9aee6b79addf9aeULL, 0xe6b79addf9aee6b7ULL, },
+        { 0x00000000ffff0000ULL, 0x0000ffff00000000ULL, },    /*  56  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0xed0a25eeb425ed0aULL, 0x25eeb425ed0a25eeULL, },
+        { 0x12f6da134bda12f6ULL, 0xda134bda12f6da13ULL, },
+        { 0xf49f16c2d27cf49fULL, 0x16c2d27cf49f16c2ULL, },
+        { 0x0b60e93e2d830b60ULL, 0xe93e2d830b60e93eULL, },
+        { 0xf9aee6b79addf9aeULL, 0xe6b79addf9aee6b7ULL, },
+        { 0x0652194965230652ULL, 0x1949652306521949ULL, },
+        { 0x6fba04f60cbe38c7ULL, 0x2c6b0102000531f1ULL, },    /*  64  */
+        { 0x03faffed1879da0fULL, 0x0b2cf9e2ffbfcc2aULL, },
+        { 0x4e261004e9dbb269ULL, 0x1779faf00102e8d7ULL, },
+        { 0x9713fb9c1db7ec39ULL, 0xbccff56b01081259ULL, },
+        { 0x03faffed1879da0fULL, 0x0b2cf9e2ffbfcc2aULL, },
+        { 0x002400002f04195bULL, 0x02cf2516038735cdULL, },
+        { 0x02c8ffc1d57633daULL, 0x05e71eaff1eb180aULL, },
+        { 0xfc44001139160d37ULL, 0xef1a4023f19aecf5ULL, },
+        { 0x4e261004e9dbb269ULL, 0x1779faf00102e8d7ULL, },    /*  72  */
+        { 0x02c8ffc1d57633daULL, 0x05e71eaff1eb180aULL, },
+        { 0x36aa33af267e6a09ULL, 0x0c67196338390abeULL, },
+        { 0xb69bf1d4cc591b07ULL, 0xdc7f3511397df77eULL, },
+        { 0x9713fb9c1db7ec39ULL, 0xbccff56b01081259ULL, },
+        { 0xfc44001139160d37ULL, 0xef1a4023f19aecf5ULL, },
+};
+
+    gettimeofday(&start, NULL);
+
+    for (i = 0; i < PATTERN_INPUTS_SHORT_COUNT; i++) {
+        for (j = 0; j < PATTERN_INPUTS_SHORT_COUNT; j++) {
+            do_msa_MULR_Q_H(b128_pattern[i], b128_pattern[j],
+                           b128_result[PATTERN_INPUTS_SHORT_COUNT * i + j]);
+        }
+    }
+
+    for (i = 0; i < RANDOM_INPUTS_SHORT_COUNT; i++) {
+        for (j = 0; j < RANDOM_INPUTS_SHORT_COUNT; j++) {
+            do_msa_MULR_Q_H(b128_random[i], b128_random[j],
+                           b128_result[((PATTERN_INPUTS_SHORT_COUNT) *
+                                        (PATTERN_INPUTS_SHORT_COUNT)) +
+                                       RANDOM_INPUTS_SHORT_COUNT * i + j]);
+        }
+    }
+
+    gettimeofday(&end, NULL);
+
+    elapsed_time = (end.tv_sec - start.tv_sec) * 1000.0;
+    elapsed_time += (end.tv_usec - start.tv_usec) / 1000.0;
+
+    ret = check_results(instruction_name, TEST_COUNT_TOTAL, elapsed_time,
+                        &b128_result[0][0], &b128_expect[0][0]);
+
+    return ret;
+}
diff --git a/tests/tcg/mips/user/ase/msa/int-multiply/test_msa_mulr_q_w.c b/tests/tcg/mips/user/ase/msa/int-multiply/test_msa_mulr_q_w.c
new file mode 100644
index 0000000..f28b0d0
--- /dev/null
+++ b/tests/tcg/mips/user/ase/msa/int-multiply/test_msa_mulr_q_w.c
@@ -0,0 +1,151 @@
+/*
+ *  Test program for MSA instruction MULR_Q.W
+ *
+ *  Copyright (C) 2018  Wave Computing, Inc.
+ *  Copyright (C) 2018  Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
+ *
+ *  This program is free software: you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation, either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <sys/time.h>
+#include <stdint.h>
+
+#include "../../../../include/wrappers_msa.h"
+#include "../../../../include/test_inputs.h"
+#include "../../../../include/test_utils.h"
+
+#define TEST_COUNT_TOTAL (                                                \
+            (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
+            (RANDOM_INPUTS_SHORT_COUNT) * (RANDOM_INPUTS_SHORT_COUNT))
+
+
+int32_t main(void)
+{
+    char *instruction_name = "MULR_Q.W";
+    int32_t ret;
+    uint32_t i, j;
+    struct timeval start, end;
+    double elapsed_time;
+
+    uint64_t b128_result[TEST_COUNT_TOTAL][2];
+    uint64_t b128_expect[TEST_COUNT_TOTAL][2] = {
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*   0  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000100000001ULL, 0x0000000100000001ULL, },
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000001ULL, 0x0000000000000000ULL, },
+        { 0x00000000ffffffffULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*   8  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000100000001ULL, 0x0000000100000001ULL, },    /*  16  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x38e38e3a38e38e3aULL, 0x38e38e3a38e38e3aULL, },
+        { 0xc71c71c7c71c71c7ULL, 0xc71c71c7c71c71c7ULL, },
+        { 0x2222222322222223ULL, 0x2222222322222223ULL, },
+        { 0xdddddddedddddddeULL, 0xdddddddedddddddeULL, },
+        { 0x12f684be4bda12f7ULL, 0xda12f68512f684beULL, },
+        { 0xed097b43b425ed09ULL, 0x25ed097ced097b43ULL, },
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },    /*  24  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0xc71c71c7c71c71c7ULL, 0xc71c71c7c71c71c7ULL, },
+        { 0x38e38e3838e38e38ULL, 0x38e38e3838e38e38ULL, },
+        { 0xddddddddddddddddULL, 0xddddddddddddddddULL, },
+        { 0x2222222222222222ULL, 0x2222222222222222ULL, },
+        { 0xed097b42b425ed0aULL, 0x25ed097bed097b42ULL, },
+        { 0x12f684bd4bda12f6ULL, 0xda12f68512f684bdULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*  32  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x2222222322222223ULL, 0x2222222322222223ULL, },
+        { 0xddddddddddddddddULL, 0xddddddddddddddddULL, },
+        { 0x147ae148147ae148ULL, 0x147ae148147ae148ULL, },
+        { 0xeb851eb8eb851eb8ULL, 0xeb851eb8eb851eb8ULL, },
+        { 0x0b60b60c2d82d82eULL, 0xe93e93e90b60b60cULL, },
+        { 0xf49f49f5d27d27d2ULL, 0x16c16c17f49f49f5ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*  40  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0xdddddddedddddddeULL, 0xdddddddedddddddeULL, },
+        { 0x2222222222222222ULL, 0x2222222222222222ULL, },
+        { 0xeb851eb8eb851eb8ULL, 0xeb851eb8eb851eb8ULL, },
+        { 0x147ae148147ae148ULL, 0x147ae148147ae148ULL, },
+        { 0xf49f49f4d27d27d3ULL, 0x16c16c16f49f49f4ULL, },
+        { 0x0b60b60b2d82d82dULL, 0xe93e93e90b60b60bULL, },
+        { 0x0000000000000001ULL, 0x0000000000000000ULL, },    /*  48  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x12f684be4bda12f7ULL, 0xda12f68512f684beULL, },
+        { 0xed097b42b425ed0aULL, 0x25ed097bed097b42ULL, },
+        { 0x0b60b60c2d82d82eULL, 0xe93e93e90b60b60cULL, },
+        { 0xf49f49f4d27d27d3ULL, 0x16c16c16f49f49f4ULL, },
+        { 0x06522c3f6522c3f4ULL, 0x1948b0fc06522c3fULL, },
+        { 0xf9add3c19add3c0dULL, 0xe6b74f04f9add3c1ULL, },
+        { 0x00000000ffffffffULL, 0x0000000000000000ULL, },    /*  56  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0xed097b43b425ed09ULL, 0x25ed097ced097b43ULL, },
+        { 0x12f684bd4bda12f6ULL, 0xda12f68512f684bdULL, },
+        { 0xf49f49f5d27d27d2ULL, 0x16c16c17f49f49f5ULL, },
+        { 0x0b60b60b2d82d82dULL, 0xe93e93e90b60b60bULL, },
+        { 0xf9add3c19add3c0dULL, 0xe6b74f04f9add3c1ULL, },
+        { 0x06522c3f6522c3f2ULL, 0x1948b0fd06522c3fULL, },
+        { 0x6fb7e8890cbdc0d3ULL, 0x2c6b144600049a05ULL, },    /*  64  */
+        { 0x03fa514e1879c702ULL, 0x0b2c6ca9ffbf8ac7ULL, },
+        { 0x4e252087e9daefc0ULL, 0x1779189301015a35ULL, },
+        { 0x9713a7171db7f3a6ULL, 0xbccfb46a0107236fULL, },
+        { 0x03fa514e1879c702ULL, 0x0b2c6ca9ffbf8ac7ULL, },
+        { 0x002442012f047612ULL, 0x02cf8c140386e68fULL, },
+        { 0x02c84b88d575d121ULL, 0x05e79a8bf1eb1c52ULL, },
+        { 0xfc439edd3916c1e4ULL, 0xef19389cf19a0fdeULL, },
+        { 0x4e252087e9daefc0ULL, 0x1779189301015a35ULL, },    /*  72  */
+        { 0x02c84b88d575d121ULL, 0x05e79a8bf1eb1c52ULL, },
+        { 0x36a93aff267d11c4ULL, 0x0c6788643838c14cULL, },
+        { 0xb69baa3acc590fcdULL, 0xdc7e6df7397c58daULL, },
+        { 0x9713a7171db7f3a6ULL, 0xbccfb46a0107236fULL, },
+        { 0xfc439edd3916c1e4ULL, 0xef19389cf19a0fdeULL, },
+};
+
+    gettimeofday(&start, NULL);
+
+    for (i = 0; i < PATTERN_INPUTS_SHORT_COUNT; i++) {
+        for (j = 0; j < PATTERN_INPUTS_SHORT_COUNT; j++) {
+            do_msa_MULR_Q_W(b128_pattern[i], b128_pattern[j],
+                           b128_result[PATTERN_INPUTS_SHORT_COUNT * i + j]);
+        }
+    }
+
+    for (i = 0; i < RANDOM_INPUTS_SHORT_COUNT; i++) {
+        for (j = 0; j < RANDOM_INPUTS_SHORT_COUNT; j++) {
+            do_msa_MULR_Q_W(b128_random[i], b128_random[j],
+                           b128_result[((PATTERN_INPUTS_SHORT_COUNT) *
+                                        (PATTERN_INPUTS_SHORT_COUNT)) +
+                                       RANDOM_INPUTS_SHORT_COUNT * i + j]);
+        }
+    }
+
+    gettimeofday(&end, NULL);
+
+    elapsed_time = (end.tv_sec - start.tv_sec) * 1000.0;
+    elapsed_time += (end.tv_usec - start.tv_usec) / 1000.0;
+
+    ret = check_results(instruction_name, TEST_COUNT_TOTAL, elapsed_time,
+                        &b128_result[0][0], &b128_expect[0][0]);
+
+    return ret;
+}
diff --git a/tests/tcg/mips/user/ase/msa/int-multiply/test_msa_mulv_b.c b/tests/tcg/mips/user/ase/msa/int-multiply/test_msa_mulv_b.c
new file mode 100644
index 0000000..6beeda9
--- /dev/null
+++ b/tests/tcg/mips/user/ase/msa/int-multiply/test_msa_mulv_b.c
@@ -0,0 +1,151 @@
+/*
+ *  Test program for MSA instruction MULV.B
+ *
+ *  Copyright (C) 2018  Wave Computing, Inc.
+ *  Copyright (C) 2018  Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
+ *
+ *  This program is free software: you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation, either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <sys/time.h>
+#include <stdint.h>
+
+#include "../../../../include/wrappers_msa.h"
+#include "../../../../include/test_inputs.h"
+#include "../../../../include/test_utils.h"
+
+#define TEST_COUNT_TOTAL (                                                \
+            (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
+            (RANDOM_INPUTS_SHORT_COUNT) * (RANDOM_INPUTS_SHORT_COUNT))
+
+
+int32_t main(void)
+{
+    char *instruction_name = "MULV.B";
+    int32_t ret;
+    uint32_t i, j;
+    struct timeval start, end;
+    double elapsed_time;
+
+    uint64_t b128_result[TEST_COUNT_TOTAL][2];
+    uint64_t b128_expect[TEST_COUNT_TOTAL][2] = {
+        { 0x0101010101010101ULL, 0x0101010101010101ULL, },    /*   0  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x5656565656565656ULL, 0x5656565656565656ULL, },
+        { 0xababababababababULL, 0xababababababababULL, },
+        { 0x3434343434343434ULL, 0x3434343434343434ULL, },
+        { 0xcdcdcdcdcdcdcdcdULL, 0xcdcdcdcdcdcdcdcdULL, },
+        { 0x1d72c81d72c81d72ULL, 0xc81d72c81d72c81dULL, },
+        { 0xe48f39e48f39e48fULL, 0x39e48f39e48f39e4ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*   8  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x5656565656565656ULL, 0x5656565656565656ULL, },    /*  16  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0xe4e4e4e4e4e4e4e4ULL, 0xe4e4e4e4e4e4e4e4ULL, },
+        { 0x7272727272727272ULL, 0x7272727272727272ULL, },
+        { 0x7878787878787878ULL, 0x7878787878787878ULL, },
+        { 0xdedededededededeULL, 0xdedededededededeULL, },
+        { 0xbe4c30be4c30be4cULL, 0x30be4c30be4c30beULL, },
+        { 0x980a26980a26980aULL, 0x26980a26980a2698ULL, },
+        { 0xababababababababULL, 0xababababababababULL, },    /*  24  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x7272727272727272ULL, 0x7272727272727272ULL, },
+        { 0x3939393939393939ULL, 0x3939393939393939ULL, },
+        { 0xbcbcbcbcbcbcbcbcULL, 0xbcbcbcbcbcbcbcbcULL, },
+        { 0xefefefefefefefefULL, 0xefefefefefefefefULL, },
+        { 0x5f26985f26985f26ULL, 0x985f26985f26985fULL, },
+        { 0x4c85134c85134c85ULL, 0x134c85134c85134cULL, },
+        { 0x3434343434343434ULL, 0x3434343434343434ULL, },    /*  32  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x7878787878787878ULL, 0x7878787878787878ULL, },
+        { 0xbcbcbcbcbcbcbcbcULL, 0xbcbcbcbcbcbcbcbcULL, },
+        { 0x9090909090909090ULL, 0x9090909090909090ULL, },
+        { 0xa4a4a4a4a4a4a4a4ULL, 0xa4a4a4a4a4a4a4a4ULL, },
+        { 0xe428a0e428a0e428ULL, 0xa0e428a0e428a0e4ULL, },
+        { 0x500c94500c94500cULL, 0x94500c94500c9450ULL, },
+        { 0xcdcdcdcdcdcdcdcdULL, 0xcdcdcdcdcdcdcdcdULL, },    /*  40  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0xdedededededededeULL, 0xdedededededededeULL, },
+        { 0xefefefefefefefefULL, 0xefefefefefefefefULL, },
+        { 0xa4a4a4a4a4a4a4a4ULL, 0xa4a4a4a4a4a4a4a4ULL, },
+        { 0x2929292929292929ULL, 0x2929292929292929ULL, },
+        { 0x394a28394a28394aULL, 0x28394a28394a2839ULL, },
+        { 0x9483a59483a59483ULL, 0xa59483a59483a594ULL, },
+        { 0x1d72c81d72c81d72ULL, 0xc81d72c81d72c81dULL, },    /*  48  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0xbe4c30be4c30be4cULL, 0x30be4c30be4c30beULL, },
+        { 0x5f26985f26985f26ULL, 0x985f26985f26985fULL, },
+        { 0xe428a0e428a0e428ULL, 0xa0e428a0e428a0e4ULL, },
+        { 0x394a28394a28394aULL, 0x28394a28394a2839ULL, },
+        { 0x49c44049c44049c4ULL, 0x4049c44049c44049ULL, },
+        { 0xd4ae88d4ae88d4aeULL, 0x88d4ae88d4ae88d4ULL, },
+        { 0xe48f39e48f39e48fULL, 0x39e48f39e48f39e4ULL, },    /*  56  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x980a26980a26980aULL, 0x26980a26980a2698ULL, },
+        { 0x4c85134c85134c85ULL, 0x134c85134c85134cULL, },
+        { 0x500c94500c94500cULL, 0x94500c94500c9450ULL, },
+        { 0x9483a59483a59483ULL, 0xa59483a59483a594ULL, },
+        { 0xd4ae88d4ae88d4aeULL, 0x88d4ae88d4ae88d4ULL, },
+        { 0x10e1b110e1b110e1ULL, 0xb110e1b110e1b110ULL, },
+        { 0x40e4a49040843900ULL, 0xf971798404190090ULL, },    /*  64  */
+        { 0x58ac00e408461300ULL, 0x4661098cd64560d0ULL, },
+        { 0x60445478e83e2700ULL, 0x6de882a2aaa970f0ULL, },
+        { 0x80b6c45cb0c20a80ULL, 0x4ff7d850aeb66080ULL, },
+        { 0x58ac00e408461300ULL, 0x4661098cd64560d0ULL, },
+        { 0x190400492969b140ULL, 0x445199a4b9814410ULL, },
+        { 0xa4cc00bea5dd0d00ULL, 0xbe68a2e60795dab0ULL, },
+        { 0xd0a200c74623ae70ULL, 0xea8758f0dd3e6480ULL, },
+        { 0x60445478e83e2700ULL, 0x6de882a2aaa970f0ULL, },    /*  72  */
+        { 0xa4cc00bea5dd0d00ULL, 0xbe68a2e60795dab0ULL, },
+        { 0x90a444e4b1617900ULL, 0xf140240139395990ULL, },
+        { 0x40c6f422ee9fb600ULL, 0x7b583028e316aa80ULL, },
+        { 0x80b6c45cb0c20a80ULL, 0x4ff7d850aeb66080ULL, },
+        { 0xd0a200c74623ae70ULL, 0xea8758f0dd3e6480ULL, },
+};
+
+    gettimeofday(&start, NULL);
+
+    for (i = 0; i < PATTERN_INPUTS_SHORT_COUNT; i++) {
+        for (j = 0; j < PATTERN_INPUTS_SHORT_COUNT; j++) {
+            do_msa_MULV_B(b128_pattern[i], b128_pattern[j],
+                           b128_result[PATTERN_INPUTS_SHORT_COUNT * i + j]);
+        }
+    }
+
+    for (i = 0; i < RANDOM_INPUTS_SHORT_COUNT; i++) {
+        for (j = 0; j < RANDOM_INPUTS_SHORT_COUNT; j++) {
+            do_msa_MULV_B(b128_random[i], b128_random[j],
+                           b128_result[((PATTERN_INPUTS_SHORT_COUNT) *
+                                        (PATTERN_INPUTS_SHORT_COUNT)) +
+                                       RANDOM_INPUTS_SHORT_COUNT * i + j]);
+        }
+    }
+
+    gettimeofday(&end, NULL);
+
+    elapsed_time = (end.tv_sec - start.tv_sec) * 1000.0;
+    elapsed_time += (end.tv_usec - start.tv_usec) / 1000.0;
+
+    ret = check_results(instruction_name, TEST_COUNT_TOTAL, elapsed_time,
+                        &b128_result[0][0], &b128_expect[0][0]);
+
+    return ret;
+}
diff --git a/tests/tcg/mips/user/ase/msa/int-multiply/test_msa_mulv_d.c b/tests/tcg/mips/user/ase/msa/int-multiply/test_msa_mulv_d.c
new file mode 100644
index 0000000..3205d4b
--- /dev/null
+++ b/tests/tcg/mips/user/ase/msa/int-multiply/test_msa_mulv_d.c
@@ -0,0 +1,151 @@
+/*
+ *  Test program for MSA instruction MULV.D
+ *
+ *  Copyright (C) 2018  Wave Computing, Inc.
+ *  Copyright (C) 2018  Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
+ *
+ *  This program is free software: you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation, either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <sys/time.h>
+#include <stdint.h>
+
+#include "../../../../include/wrappers_msa.h"
+#include "../../../../include/test_inputs.h"
+#include "../../../../include/test_utils.h"
+
+#define TEST_COUNT_TOTAL (                                                \
+            (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
+            (RANDOM_INPUTS_SHORT_COUNT) * (RANDOM_INPUTS_SHORT_COUNT))
+
+
+int32_t main(void)
+{
+    char *instruction_name = "MULV.D";
+    int32_t ret;
+    uint32_t i, j;
+    struct timeval start, end;
+    double elapsed_time;
+
+    uint64_t b128_result[TEST_COUNT_TOTAL][2];
+    uint64_t b128_expect[TEST_COUNT_TOTAL][2] = {
+        { 0x0000000000000001ULL, 0x0000000000000001ULL, },    /*   0  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x5555555555555556ULL, 0x5555555555555556ULL, },
+        { 0xaaaaaaaaaaaaaaabULL, 0xaaaaaaaaaaaaaaabULL, },
+        { 0x3333333333333334ULL, 0x3333333333333334ULL, },
+        { 0xcccccccccccccccdULL, 0xcccccccccccccccdULL, },
+        { 0x1c71c71c71c71c72ULL, 0xc71c71c71c71c71dULL, },
+        { 0xe38e38e38e38e38fULL, 0x38e38e38e38e38e4ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*   8  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x5555555555555556ULL, 0x5555555555555556ULL, },    /*  16  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x38e38e38e38e38e4ULL, 0x38e38e38e38e38e4ULL, },
+        { 0x1c71c71c71c71c72ULL, 0x1c71c71c71c71c72ULL, },
+        { 0x7777777777777778ULL, 0x7777777777777778ULL, },
+        { 0xdddddddddddddddeULL, 0xdddddddddddddddeULL, },
+        { 0x12f684bda12f684cULL, 0x2f684bda12f684beULL, },
+        { 0x425ed097b425ed0aULL, 0x25ed097b425ed098ULL, },
+        { 0xaaaaaaaaaaaaaaabULL, 0xaaaaaaaaaaaaaaabULL, },    /*  24  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x1c71c71c71c71c72ULL, 0x1c71c71c71c71c72ULL, },
+        { 0x8e38e38e38e38e39ULL, 0x8e38e38e38e38e39ULL, },
+        { 0xbbbbbbbbbbbbbbbcULL, 0xbbbbbbbbbbbbbbbcULL, },
+        { 0xeeeeeeeeeeeeeeefULL, 0xeeeeeeeeeeeeeeefULL, },
+        { 0x097b425ed097b426ULL, 0x97b425ed097b425fULL, },
+        { 0xa12f684bda12f685ULL, 0x12f684bda12f684cULL, },
+        { 0x3333333333333334ULL, 0x3333333333333334ULL, },    /*  32  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x7777777777777778ULL, 0x7777777777777778ULL, },
+        { 0xbbbbbbbbbbbbbbbcULL, 0xbbbbbbbbbbbbbbbcULL, },
+        { 0xf5c28f5c28f5c290ULL, 0xf5c28f5c28f5c290ULL, },
+        { 0x3d70a3d70a3d70a4ULL, 0x3d70a3d70a3d70a4ULL, },
+        { 0x7d27d27d27d27d28ULL, 0x38e38e38e38e38e4ULL, },
+        { 0xb60b60b60b60b60cULL, 0xfa4fa4fa4fa4fa50ULL, },
+        { 0xcccccccccccccccdULL, 0xcccccccccccccccdULL, },    /*  40  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0xdddddddddddddddeULL, 0xdddddddddddddddeULL, },
+        { 0xeeeeeeeeeeeeeeefULL, 0xeeeeeeeeeeeeeeefULL, },
+        { 0x3d70a3d70a3d70a4ULL, 0x3d70a3d70a3d70a4ULL, },
+        { 0x8f5c28f5c28f5c29ULL, 0x8f5c28f5c28f5c29ULL, },
+        { 0x9f49f49f49f49f4aULL, 0x8e38e38e38e38e39ULL, },
+        { 0x2d82d82d82d82d83ULL, 0x3e93e93e93e93e94ULL, },
+        { 0x1c71c71c71c71c72ULL, 0xc71c71c71c71c71dULL, },    /*  48  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x12f684bda12f684cULL, 0x2f684bda12f684beULL, },
+        { 0x097b425ed097b426ULL, 0x97b425ed097b425fULL, },
+        { 0x7d27d27d27d27d28ULL, 0x38e38e38e38e38e4ULL, },
+        { 0x9f49f49f49f49f4aULL, 0x8e38e38e38e38e39ULL, },
+        { 0xb0fcd6e9e06522c4ULL, 0x522c3f35ba781949ULL, },
+        { 0x6b74f0329161f9aeULL, 0x74f0329161f9add4ULL, },
+        { 0xe38e38e38e38e38fULL, 0x38e38e38e38e38e4ULL, },    /*  56  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x425ed097b425ed0aULL, 0x25ed097b425ed098ULL, },
+        { 0xa12f684bda12f685ULL, 0x12f684bda12f684cULL, },
+        { 0xb60b60b60b60b60cULL, 0xfa4fa4fa4fa4fa50ULL, },
+        { 0x2d82d82d82d82d83ULL, 0x3e93e93e93e93e94ULL, },
+        { 0x6b74f0329161f9aeULL, 0x74f0329161f9add4ULL, },
+        { 0x781948b0fcd6e9e1ULL, 0xc3f35ba781948b10ULL, },
+        { 0xad45be6961639000ULL, 0x3297fdea74988090ULL, },    /*  64  */
+        { 0xefa7a5a0e7176a00ULL, 0xb8110a1f6f1923d0ULL, },
+        { 0x08c6139fc4346000ULL, 0xab209f86581f7cf0ULL, },
+        { 0xfbe1883aee787980ULL, 0x821d25438dd09f80ULL, },
+        { 0xefa7a5a0e7176a00ULL, 0xb8110a1f6f1923d0ULL, },
+        { 0x37ae2b38fded7040ULL, 0x682476774aee6810ULL, },
+        { 0x6acb3d68be6cdc00ULL, 0xafdad2311444e7b0ULL, },
+        { 0xedbf72842143b470ULL, 0x7f8223caefce5580ULL, },
+        { 0x08c6139fc4346000ULL, 0xab209f86581f7cf0ULL, },    /*  72  */
+        { 0x6acb3d68be6cdc00ULL, 0xafdad2311444e7b0ULL, },
+        { 0x8624e5e1e5044000ULL, 0xd98178a63216c990ULL, },
+        { 0x76a5ab8089e38100ULL, 0xa1019a60d4dad480ULL, },
+        { 0xfbe1883aee787980ULL, 0x821d25438dd09f80ULL, },
+        { 0xedbf72842143b470ULL, 0x7f8223caefce5580ULL, },
+};
+
+    gettimeofday(&start, NULL);
+
+    for (i = 0; i < PATTERN_INPUTS_SHORT_COUNT; i++) {
+        for (j = 0; j < PATTERN_INPUTS_SHORT_COUNT; j++) {
+            do_msa_MULV_D(b128_pattern[i], b128_pattern[j],
+                           b128_result[PATTERN_INPUTS_SHORT_COUNT * i + j]);
+        }
+    }
+
+    for (i = 0; i < RANDOM_INPUTS_SHORT_COUNT; i++) {
+        for (j = 0; j < RANDOM_INPUTS_SHORT_COUNT; j++) {
+            do_msa_MULV_D(b128_random[i], b128_random[j],
+                           b128_result[((PATTERN_INPUTS_SHORT_COUNT) *
+                                        (PATTERN_INPUTS_SHORT_COUNT)) +
+                                       RANDOM_INPUTS_SHORT_COUNT * i + j]);
+        }
+    }
+
+    gettimeofday(&end, NULL);
+
+    elapsed_time = (end.tv_sec - start.tv_sec) * 1000.0;
+    elapsed_time += (end.tv_usec - start.tv_usec) / 1000.0;
+
+    ret = check_results(instruction_name, TEST_COUNT_TOTAL, elapsed_time,
+                        &b128_result[0][0], &b128_expect[0][0]);
+
+    return ret;
+}
diff --git a/tests/tcg/mips/user/ase/msa/int-multiply/test_msa_mulv_h.c b/tests/tcg/mips/user/ase/msa/int-multiply/test_msa_mulv_h.c
new file mode 100644
index 0000000..e7bd985
--- /dev/null
+++ b/tests/tcg/mips/user/ase/msa/int-multiply/test_msa_mulv_h.c
@@ -0,0 +1,151 @@
+/*
+ *  Test program for MSA instruction MULV.H
+ *
+ *  Copyright (C) 2018  Wave Computing, Inc.
+ *  Copyright (C) 2018  Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
+ *
+ *  This program is free software: you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation, either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <sys/time.h>
+#include <stdint.h>
+
+#include "../../../../include/wrappers_msa.h"
+#include "../../../../include/test_inputs.h"
+#include "../../../../include/test_utils.h"
+
+#define TEST_COUNT_TOTAL (                                                \
+            (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
+            (RANDOM_INPUTS_SHORT_COUNT) * (RANDOM_INPUTS_SHORT_COUNT))
+
+
+int32_t main(void)
+{
+    char *instruction_name = "MULV.H";
+    int32_t ret;
+    uint32_t i, j;
+    struct timeval start, end;
+    double elapsed_time;
+
+    uint64_t b128_result[TEST_COUNT_TOTAL][2];
+    uint64_t b128_expect[TEST_COUNT_TOTAL][2] = {
+        { 0x0001000100010001ULL, 0x0001000100010001ULL, },    /*   0  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x5556555655565556ULL, 0x5556555655565556ULL, },
+        { 0xaaabaaabaaabaaabULL, 0xaaabaaabaaabaaabULL, },
+        { 0x3334333433343334ULL, 0x3334333433343334ULL, },
+        { 0xcccdcccdcccdcccdULL, 0xcccdcccdcccdcccdULL, },
+        { 0x1c72c71d71c81c72ULL, 0xc71d71c81c72c71dULL, },
+        { 0xe38f38e48e39e38fULL, 0x38e48e39e38f38e4ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*   8  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x5556555655565556ULL, 0x5556555655565556ULL, },    /*  16  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x38e438e438e438e4ULL, 0x38e438e438e438e4ULL, },
+        { 0x1c721c721c721c72ULL, 0x1c721c721c721c72ULL, },
+        { 0x7778777877787778ULL, 0x7778777877787778ULL, },
+        { 0xdddedddedddedddeULL, 0xdddedddedddedddeULL, },
+        { 0x684c84bea130684cULL, 0x84bea130684c84beULL, },
+        { 0xed0ad098b426ed0aULL, 0xd098b426ed0ad098ULL, },
+        { 0xaaabaaabaaabaaabULL, 0xaaabaaabaaabaaabULL, },    /*  24  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x1c721c721c721c72ULL, 0x1c721c721c721c72ULL, },
+        { 0x8e398e398e398e39ULL, 0x8e398e398e398e39ULL, },
+        { 0xbbbcbbbcbbbcbbbcULL, 0xbbbcbbbcbbbcbbbcULL, },
+        { 0xeeefeeefeeefeeefULL, 0xeeefeeefeeefeeefULL, },
+        { 0xb426425fd098b426ULL, 0x425fd098b426425fULL, },
+        { 0xf685684cda13f685ULL, 0x684cda13f685684cULL, },
+        { 0x3334333433343334ULL, 0x3334333433343334ULL, },    /*  32  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x7778777877787778ULL, 0x7778777877787778ULL, },
+        { 0xbbbcbbbcbbbcbbbcULL, 0xbbbcbbbcbbbcbbbcULL, },
+        { 0xc290c290c290c290ULL, 0xc290c290c290c290ULL, },
+        { 0x70a470a470a470a4ULL, 0x70a470a470a470a4ULL, },
+        { 0x7d2838e4f4a07d28ULL, 0x38e4f4a07d2838e4ULL, },
+        { 0xb60cfa503e94b60cULL, 0xfa503e94b60cfa50ULL, },
+        { 0xcccdcccdcccdcccdULL, 0xcccdcccdcccdcccdULL, },    /*  40  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0xdddedddedddedddeULL, 0xdddedddedddedddeULL, },
+        { 0xeeefeeefeeefeeefULL, 0xeeefeeefeeefeeefULL, },
+        { 0x70a470a470a470a4ULL, 0x70a470a470a470a4ULL, },
+        { 0x5c295c295c295c29ULL, 0x5c295c295c295c29ULL, },
+        { 0x9f4a8e397d289f4aULL, 0x8e397d289f4a8e39ULL, },
+        { 0x2d833e944fa52d83ULL, 0x3e944fa52d833e94ULL, },
+        { 0x1c72c71d71c81c72ULL, 0xc71d71c81c72c71dULL, },    /*  48  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x684c84bea130684cULL, 0x84bea130684c84beULL, },
+        { 0xb426425fd098b426ULL, 0x425fd098b426425fULL, },
+        { 0x7d2838e4f4a07d28ULL, 0x38e4f4a07d2838e4ULL, },
+        { 0x9f4a8e397d289f4aULL, 0x8e397d289f4a8e39ULL, },
+        { 0x22c419492c4022c4ULL, 0x19492c4022c41949ULL, },
+        { 0xf9aeadd44588f9aeULL, 0xadd44588f9aeadd4ULL, },
+        { 0xe38f38e48e39e38fULL, 0x38e48e39e38f38e4ULL, },    /*  56  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0xed0ad098b426ed0aULL, 0xd098b426ed0ad098ULL, },
+        { 0xf685684cda13f685ULL, 0x684cda13f685684cULL, },
+        { 0xb60cfa503e94b60cULL, 0xfa503e94b60cfa50ULL, },
+        { 0x2d833e944fa52d83ULL, 0x3e944fa52d833e94ULL, },
+        { 0xf9aeadd44588f9aeULL, 0xadd44588f9aeadd4ULL, },
+        { 0xe9e18b1048b1e9e1ULL, 0x8b1048b1e9e18b10ULL, },
+        { 0xcbe43290c5849000ULL, 0x837136844f198090ULL, },    /*  64  */
+        { 0x2cac40e4aa466a00ULL, 0xfe61d18cb74523d0ULL, },
+        { 0x2d44eb78793e6000ULL, 0x4fe806a2e7a97cf0ULL, },
+        { 0x78b6f35cb6c27980ULL, 0xb6f78750ceb69f80ULL, },
+        { 0x2cac40e4aa466a00ULL, 0xfe61d18cb74523d0ULL, },
+        { 0x21042649c2697040ULL, 0xaa51fea465816810ULL, },
+        { 0x28cc8bbef4dddc00ULL, 0xa1687ae6a695e7b0ULL, },
+        { 0xcfa29fc7d323b470ULL, 0xe587adf0113e5580ULL, },
+        { 0x2d44eb78793e6000ULL, 0x4fe806a2e7a97cf0ULL, },    /*  72  */
+        { 0x28cc8bbef4dddc00ULL, 0xa1687ae6a695e7b0ULL, },
+        { 0x0fa488e4d5614000ULL, 0x864072017939c990ULL, },
+        { 0x8fc62522929f8100ULL, 0x7a585f288416d480ULL, },
+        { 0x78b6f35cb6c27980ULL, 0xb6f78750ceb69f80ULL, },
+        { 0xcfa29fc7d323b470ULL, 0xe587adf0113e5580ULL, },
+};
+
+    gettimeofday(&start, NULL);
+
+    for (i = 0; i < PATTERN_INPUTS_SHORT_COUNT; i++) {
+        for (j = 0; j < PATTERN_INPUTS_SHORT_COUNT; j++) {
+            do_msa_MULV_H(b128_pattern[i], b128_pattern[j],
+                           b128_result[PATTERN_INPUTS_SHORT_COUNT * i + j]);
+        }
+    }
+
+    for (i = 0; i < RANDOM_INPUTS_SHORT_COUNT; i++) {
+        for (j = 0; j < RANDOM_INPUTS_SHORT_COUNT; j++) {
+            do_msa_MULV_H(b128_random[i], b128_random[j],
+                           b128_result[((PATTERN_INPUTS_SHORT_COUNT) *
+                                        (PATTERN_INPUTS_SHORT_COUNT)) +
+                                       RANDOM_INPUTS_SHORT_COUNT * i + j]);
+        }
+    }
+
+    gettimeofday(&end, NULL);
+
+    elapsed_time = (end.tv_sec - start.tv_sec) * 1000.0;
+    elapsed_time += (end.tv_usec - start.tv_usec) / 1000.0;
+
+    ret = check_results(instruction_name, TEST_COUNT_TOTAL, elapsed_time,
+                        &b128_result[0][0], &b128_expect[0][0]);
+
+    return ret;
+}
diff --git a/tests/tcg/mips/user/ase/msa/int-multiply/test_msa_mulv_w.c b/tests/tcg/mips/user/ase/msa/int-multiply/test_msa_mulv_w.c
new file mode 100644
index 0000000..9c318b3
--- /dev/null
+++ b/tests/tcg/mips/user/ase/msa/int-multiply/test_msa_mulv_w.c
@@ -0,0 +1,151 @@
+/*
+ *  Test program for MSA instruction MULV.W
+ *
+ *  Copyright (C) 2018  Wave Computing, Inc.
+ *  Copyright (C) 2018  Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
+ *
+ *  This program is free software: you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation, either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <sys/time.h>
+#include <stdint.h>
+
+#include "../../../../include/wrappers_msa.h"
+#include "../../../../include/test_inputs.h"
+#include "../../../../include/test_utils.h"
+
+#define TEST_COUNT_TOTAL (                                                \
+            (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
+            (RANDOM_INPUTS_SHORT_COUNT) * (RANDOM_INPUTS_SHORT_COUNT))
+
+
+int32_t main(void)
+{
+    char *instruction_name = "MULV.W";
+    int32_t ret;
+    uint32_t i, j;
+    struct timeval start, end;
+    double elapsed_time;
+
+    uint64_t b128_result[TEST_COUNT_TOTAL][2];
+    uint64_t b128_expect[TEST_COUNT_TOTAL][2] = {
+        { 0x0000000100000001ULL, 0x0000000100000001ULL, },    /*   0  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x5555555655555556ULL, 0x5555555655555556ULL, },
+        { 0xaaaaaaabaaaaaaabULL, 0xaaaaaaabaaaaaaabULL, },
+        { 0x3333333433333334ULL, 0x3333333433333334ULL, },
+        { 0xcccccccdcccccccdULL, 0xcccccccdcccccccdULL, },
+        { 0x1c71c71d71c71c72ULL, 0xc71c71c81c71c71dULL, },
+        { 0xe38e38e48e38e38fULL, 0x38e38e39e38e38e4ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*   8  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x5555555655555556ULL, 0x5555555655555556ULL, },    /*  16  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0xe38e38e4e38e38e4ULL, 0xe38e38e4e38e38e4ULL, },
+        { 0x71c71c7271c71c72ULL, 0x71c71c7271c71c72ULL, },
+        { 0x7777777877777778ULL, 0x7777777877777778ULL, },
+        { 0xdddddddedddddddeULL, 0xdddddddedddddddeULL, },
+        { 0x12f684bea12f684cULL, 0x84bda13012f684beULL, },
+        { 0x425ed098b425ed0aULL, 0xd097b426425ed098ULL, },
+        { 0xaaaaaaabaaaaaaabULL, 0xaaaaaaabaaaaaaabULL, },    /*  24  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x71c71c7271c71c72ULL, 0x71c71c7271c71c72ULL, },
+        { 0x38e38e3938e38e39ULL, 0x38e38e3938e38e39ULL, },
+        { 0xbbbbbbbcbbbbbbbcULL, 0xbbbbbbbcbbbbbbbcULL, },
+        { 0xeeeeeeefeeeeeeefULL, 0xeeeeeeefeeeeeeefULL, },
+        { 0x097b425fd097b426ULL, 0x425ed098097b425fULL, },
+        { 0xa12f684cda12f685ULL, 0x684bda13a12f684cULL, },
+        { 0x3333333433333334ULL, 0x3333333433333334ULL, },    /*  32  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x7777777877777778ULL, 0x7777777877777778ULL, },
+        { 0xbbbbbbbcbbbbbbbcULL, 0xbbbbbbbcbbbbbbbcULL, },
+        { 0x28f5c29028f5c290ULL, 0x28f5c29028f5c290ULL, },
+        { 0x0a3d70a40a3d70a4ULL, 0x0a3d70a40a3d70a4ULL, },
+        { 0xe38e38e427d27d28ULL, 0x9f49f4a0e38e38e4ULL, },
+        { 0x4fa4fa500b60b60cULL, 0x93e93e944fa4fa50ULL, },
+        { 0xcccccccdcccccccdULL, 0xcccccccdcccccccdULL, },    /*  40  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0xdddddddedddddddeULL, 0xdddddddedddddddeULL, },
+        { 0xeeeeeeefeeeeeeefULL, 0xeeeeeeefeeeeeeefULL, },
+        { 0x0a3d70a40a3d70a4ULL, 0x0a3d70a40a3d70a4ULL, },
+        { 0xc28f5c29c28f5c29ULL, 0xc28f5c29c28f5c29ULL, },
+        { 0x38e38e3949f49f4aULL, 0x27d27d2838e38e39ULL, },
+        { 0x93e93e9482d82d83ULL, 0xa4fa4fa593e93e94ULL, },
+        { 0x1c71c71d71c71c72ULL, 0xc71c71c81c71c71dULL, },    /*  48  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x12f684bea12f684cULL, 0x84bda13012f684beULL, },
+        { 0x097b425fd097b426ULL, 0x425ed098097b425fULL, },
+        { 0xe38e38e427d27d28ULL, 0x9f49f4a0e38e38e4ULL, },
+        { 0x38e38e3949f49f4aULL, 0x27d27d2838e38e39ULL, },
+        { 0xba781949e06522c4ULL, 0x06522c40ba781949ULL, },
+        { 0x61f9add49161f9aeULL, 0xc0ca458861f9add4ULL, },
+        { 0xe38e38e48e38e38fULL, 0x38e38e39e38e38e4ULL, },    /*  56  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x425ed098b425ed0aULL, 0xd097b426425ed098ULL, },
+        { 0xa12f684cda12f685ULL, 0x684bda13a12f684cULL, },
+        { 0x4fa4fa500b60b60cULL, 0x93e93e944fa4fa50ULL, },
+        { 0x93e93e9482d82d83ULL, 0xa4fa4fa593e93e94ULL, },
+        { 0x61f9add49161f9aeULL, 0xc0ca458861f9add4ULL, },
+        { 0x81948b10fcd6e9e1ULL, 0x781948b181948b10ULL, },
+        { 0xb103329061639000ULL, 0x3a25368474988090ULL, },    /*  64  */
+        { 0x10bf40e4e7176a00ULL, 0x8176d18c6f1923d0ULL, },
+        { 0x7393eb78c4346000ULL, 0xb7bf06a2581f7cf0ULL, },
+        { 0xb0f0f35cee787980ULL, 0xd67987508dd09f80ULL, },
+        { 0x10bf40e4e7176a00ULL, 0x8176d18c6f1923d0ULL, },
+        { 0xb4f42649fded7040ULL, 0x3ceafea44aee6810ULL, },
+        { 0xf73d8bbebe6cdc00ULL, 0x53697ae61444e7b0ULL, },
+        { 0x7abb9fc72143b470ULL, 0x11e5adf0efce5580ULL, },
+        { 0x7393eb78c4346000ULL, 0xb7bf06a2581f7cf0ULL, },    /*  72  */
+        { 0xf73d8bbebe6cdc00ULL, 0x53697ae61444e7b0ULL, },
+        { 0xb6b388e4e5044000ULL, 0x1aff72013216c990ULL, },
+        { 0xe8bf252289e38100ULL, 0x91ae5f28d4dad480ULL, },
+        { 0xb0f0f35cee787980ULL, 0xd67987508dd09f80ULL, },
+        { 0x7abb9fc72143b470ULL, 0x11e5adf0efce5580ULL, },
+};
+
+    gettimeofday(&start, NULL);
+
+    for (i = 0; i < PATTERN_INPUTS_SHORT_COUNT; i++) {
+        for (j = 0; j < PATTERN_INPUTS_SHORT_COUNT; j++) {
+            do_msa_MULV_W(b128_pattern[i], b128_pattern[j],
+                           b128_result[PATTERN_INPUTS_SHORT_COUNT * i + j]);
+        }
+    }
+
+    for (i = 0; i < RANDOM_INPUTS_SHORT_COUNT; i++) {
+        for (j = 0; j < RANDOM_INPUTS_SHORT_COUNT; j++) {
+            do_msa_MULV_W(b128_random[i], b128_random[j],
+                           b128_result[((PATTERN_INPUTS_SHORT_COUNT) *
+                                        (PATTERN_INPUTS_SHORT_COUNT)) +
+                                       RANDOM_INPUTS_SHORT_COUNT * i + j]);
+        }
+    }
+
+    gettimeofday(&end, NULL);
+
+    elapsed_time = (end.tv_sec - start.tv_sec) * 1000.0;
+    elapsed_time += (end.tv_usec - start.tv_usec) / 1000.0;
+
+    ret = check_results(instruction_name, TEST_COUNT_TOTAL, elapsed_time,
+                        &b128_result[0][0], &b128_expect[0][0]);
+
+    return ret;
+}
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [Qemu-devel] [PULL 7/7] target/mips: Add tests for a variety of MSA integer subtract instructions
  2019-03-11 14:24 [Qemu-devel] [PULL 0/7] MIPS queue for March 11th, 2019 Aleksandar Markovic
                   ` (5 preceding siblings ...)
  2019-03-11 14:24 ` [Qemu-devel] [PULL 6/7] target/mips: Add tests for a variety of MSA integer multiply instructions Aleksandar Markovic
@ 2019-03-11 14:24 ` Aleksandar Markovic
  2019-03-11 18:26 ` [Qemu-devel] [PULL 0/7] MIPS queue for March 11th, 2019 Peter Maydell
  7 siblings, 0 replies; 9+ messages in thread
From: Aleksandar Markovic @ 2019-03-11 14:24 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell, amarkovic

From: Mateja Marjanovic <Mateja.Marjanovic@rt-rk.com>

Add tests for a variety of MSA integer subtract instructions.

Signed-off-by: Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com>
Reviewed-by: Aleksandar Markovic <amarkovic@wavecomp.com>
Message-Id: <1551964929-17845-6-git-send-email-mateja.marjanovic@rt-rk.com>
---
 .../user/ase/msa/int-subtract/test_msa_subs_s_b.c  | 151 ++++++++++++++++++++
 .../user/ase/msa/int-subtract/test_msa_subs_s_d.c  | 151 ++++++++++++++++++++
 .../user/ase/msa/int-subtract/test_msa_subs_s_h.c  | 151 ++++++++++++++++++++
 .../user/ase/msa/int-subtract/test_msa_subs_s_w.c  | 151 ++++++++++++++++++++
 .../user/ase/msa/int-subtract/test_msa_subs_u_b.c  | 151 ++++++++++++++++++++
 .../user/ase/msa/int-subtract/test_msa_subs_u_d.c  | 151 ++++++++++++++++++++
 .../user/ase/msa/int-subtract/test_msa_subs_u_h.c  | 151 ++++++++++++++++++++
 .../user/ase/msa/int-subtract/test_msa_subs_u_w.c  | 151 ++++++++++++++++++++
 .../ase/msa/int-subtract/test_msa_subsus_u_b.c     | 151 ++++++++++++++++++++
 .../ase/msa/int-subtract/test_msa_subsus_u_d.c     | 151 ++++++++++++++++++++
 .../ase/msa/int-subtract/test_msa_subsus_u_h.c     | 151 ++++++++++++++++++++
 .../ase/msa/int-subtract/test_msa_subsus_u_w.c     | 151 ++++++++++++++++++++
 .../ase/msa/int-subtract/test_msa_subsuu_s_b.c     | 151 ++++++++++++++++++++
 .../ase/msa/int-subtract/test_msa_subsuu_s_d.c     | 151 ++++++++++++++++++++
 .../ase/msa/int-subtract/test_msa_subsuu_s_h.c     | 151 ++++++++++++++++++++
 .../ase/msa/int-subtract/test_msa_subsuu_s_w.c     | 151 ++++++++++++++++++++
 .../user/ase/msa/int-subtract/test_msa_subv_b.c    | 151 ++++++++++++++++++++
 .../user/ase/msa/int-subtract/test_msa_subv_d.c    | 151 ++++++++++++++++++++
 .../user/ase/msa/int-subtract/test_msa_subv_h.c    | 151 ++++++++++++++++++++
 .../user/ase/msa/int-subtract/test_msa_subv_w.c    | 153 +++++++++++++++++++++
 20 files changed, 3022 insertions(+)
 create mode 100644 tests/tcg/mips/user/ase/msa/int-subtract/test_msa_subs_s_b.c
 create mode 100644 tests/tcg/mips/user/ase/msa/int-subtract/test_msa_subs_s_d.c
 create mode 100644 tests/tcg/mips/user/ase/msa/int-subtract/test_msa_subs_s_h.c
 create mode 100644 tests/tcg/mips/user/ase/msa/int-subtract/test_msa_subs_s_w.c
 create mode 100644 tests/tcg/mips/user/ase/msa/int-subtract/test_msa_subs_u_b.c
 create mode 100644 tests/tcg/mips/user/ase/msa/int-subtract/test_msa_subs_u_d.c
 create mode 100644 tests/tcg/mips/user/ase/msa/int-subtract/test_msa_subs_u_h.c
 create mode 100644 tests/tcg/mips/user/ase/msa/int-subtract/test_msa_subs_u_w.c
 create mode 100644 tests/tcg/mips/user/ase/msa/int-subtract/test_msa_subsus_u_b.c
 create mode 100644 tests/tcg/mips/user/ase/msa/int-subtract/test_msa_subsus_u_d.c
 create mode 100644 tests/tcg/mips/user/ase/msa/int-subtract/test_msa_subsus_u_h.c
 create mode 100644 tests/tcg/mips/user/ase/msa/int-subtract/test_msa_subsus_u_w.c
 create mode 100644 tests/tcg/mips/user/ase/msa/int-subtract/test_msa_subsuu_s_b.c
 create mode 100644 tests/tcg/mips/user/ase/msa/int-subtract/test_msa_subsuu_s_d.c
 create mode 100644 tests/tcg/mips/user/ase/msa/int-subtract/test_msa_subsuu_s_h.c
 create mode 100644 tests/tcg/mips/user/ase/msa/int-subtract/test_msa_subsuu_s_w.c
 create mode 100644 tests/tcg/mips/user/ase/msa/int-subtract/test_msa_subv_b.c
 create mode 100644 tests/tcg/mips/user/ase/msa/int-subtract/test_msa_subv_d.c
 create mode 100644 tests/tcg/mips/user/ase/msa/int-subtract/test_msa_subv_h.c
 create mode 100644 tests/tcg/mips/user/ase/msa/int-subtract/test_msa_subv_w.c

diff --git a/tests/tcg/mips/user/ase/msa/int-subtract/test_msa_subs_s_b.c b/tests/tcg/mips/user/ase/msa/int-subtract/test_msa_subs_s_b.c
new file mode 100644
index 0000000..04e6159
--- /dev/null
+++ b/tests/tcg/mips/user/ase/msa/int-subtract/test_msa_subs_s_b.c
@@ -0,0 +1,151 @@
+/*
+ *  Test program for MSA instruction SUBS_S.B
+ *
+ *  Copyright (C) 2018  Wave Computing, Inc.
+ *  Copyright (C) 2018  Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
+ *
+ *  This program is free software: you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation, either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <sys/time.h>
+#include <stdint.h>
+
+#include "../../../../include/wrappers_msa.h"
+#include "../../../../include/test_inputs.h"
+#include "../../../../include/test_utils.h"
+
+#define TEST_COUNT_TOTAL (                                                \
+            (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
+            (RANDOM_INPUTS_SHORT_COUNT) * (RANDOM_INPUTS_SHORT_COUNT))
+
+
+int32_t main(void)
+{
+    char *instruction_name = "SUBS_S.B";
+    int32_t ret;
+    uint32_t i, j;
+    struct timeval start, end;
+    double elapsed_time;
+
+    uint64_t b128_result[TEST_COUNT_TOTAL][2];
+    uint64_t b128_expect[TEST_COUNT_TOTAL][2] = {
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*   0  */
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0x5555555555555555ULL, 0x5555555555555555ULL, },
+        { 0xaaaaaaaaaaaaaaaaULL, 0xaaaaaaaaaaaaaaaaULL, },
+        { 0x3333333333333333ULL, 0x3333333333333333ULL, },
+        { 0xccccccccccccccccULL, 0xccccccccccccccccULL, },
+        { 0x1c71c71c71c71c71ULL, 0xc71c71c71c71c71cULL, },
+        { 0xe38e38e38e38e38eULL, 0x38e38e38e38e38e3ULL, },
+        { 0x0101010101010101ULL, 0x0101010101010101ULL, },    /*   8  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x5656565656565656ULL, 0x5656565656565656ULL, },
+        { 0xababababababababULL, 0xababababababababULL, },
+        { 0x3434343434343434ULL, 0x3434343434343434ULL, },
+        { 0xcdcdcdcdcdcdcdcdULL, 0xcdcdcdcdcdcdcdcdULL, },
+        { 0x1d72c81d72c81d72ULL, 0xc81d72c81d72c81dULL, },
+        { 0xe48f39e48f39e48fULL, 0x39e48f39e48f39e4ULL, },
+        { 0xababababababababULL, 0xababababababababULL, },    /*  16  */
+        { 0xaaaaaaaaaaaaaaaaULL, 0xaaaaaaaaaaaaaaaaULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x8080808080808080ULL, 0x8080808080808080ULL, },
+        { 0xdedededededededeULL, 0xdedededededededeULL, },
+        { 0x8080808080808080ULL, 0x8080808080808080ULL, },
+        { 0xc71c80c71c80c71cULL, 0x80c71c80c71c80c7ULL, },
+        { 0x8e80e38e80e38e80ULL, 0xe38e80e38e80e38eULL, },
+        { 0x5656565656565656ULL, 0x5656565656565656ULL, },    /*  24  */
+        { 0x5555555555555555ULL, 0x5555555555555555ULL, },
+        { 0x7f7f7f7f7f7f7f7fULL, 0x7f7f7f7f7f7f7f7fULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x7f7f7f7f7f7f7f7fULL, 0x7f7f7f7f7f7f7f7fULL, },
+        { 0x2222222222222222ULL, 0x2222222222222222ULL, },
+        { 0x727f1d727f1d727fULL, 0x1d727f1d727f1d72ULL, },
+        { 0x39e47f39e47f39e4ULL, 0x7f39e47f39e47f39ULL, },
+        { 0xcdcdcdcdcdcdcdcdULL, 0xcdcdcdcdcdcdcdcdULL, },    /*  32  */
+        { 0xccccccccccccccccULL, 0xccccccccccccccccULL, },
+        { 0x2222222222222222ULL, 0x2222222222222222ULL, },
+        { 0x8080808080808080ULL, 0x8080808080808080ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x9999999999999999ULL, 0x9999999999999999ULL, },
+        { 0xe93e94e93e94e93eULL, 0x94e93e94e93e94e9ULL, },
+        { 0xb08005b08005b080ULL, 0x05b08005b08005b0ULL, },
+        { 0x3434343434343434ULL, 0x3434343434343434ULL, },    /*  40  */
+        { 0x3333333333333333ULL, 0x3333333333333333ULL, },
+        { 0x7f7f7f7f7f7f7f7fULL, 0x7f7f7f7f7f7f7f7fULL, },
+        { 0xdedededededededeULL, 0xdedededededededeULL, },
+        { 0x6767676767676767ULL, 0x6767676767676767ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x507ffb507ffb507fULL, 0xfb507ffb507ffb50ULL, },
+        { 0x17c26c17c26c17c2ULL, 0x6c17c26c17c26c17ULL, },
+        { 0xe48f39e48f39e48fULL, 0x39e48f39e48f39e4ULL, },    /*  48  */
+        { 0xe38e38e38e38e38eULL, 0x38e38e38e38e38e3ULL, },
+        { 0x39e47f39e47f39e4ULL, 0x7f39e47f39e47f39ULL, },
+        { 0x8e80e38e80e38e80ULL, 0xe38e80e38e80e38eULL, },
+        { 0x17c26c17c26c17c2ULL, 0x6c17c26c17c26c17ULL, },
+        { 0xb08005b08005b080ULL, 0x05b08005b08005b0ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0xc78071c78071c780ULL, 0x71c78071c78071c7ULL, },
+        { 0x1d72c81d72c81d72ULL, 0xc81d72c81d72c81dULL, },    /*  56  */
+        { 0x1c71c71c71c71c71ULL, 0xc71c71c71c71c71cULL, },
+        { 0x727f1d727f1d727fULL, 0x1d727f1d727f1d72ULL, },
+        { 0xc71c80c71c80c71cULL, 0x80c71c80c71c80c7ULL, },
+        { 0x507ffb507ffb507fULL, 0xfb507ffb507ffb50ULL, },
+        { 0xe93e94e93e94e93eULL, 0x94e93e94e93e94e9ULL, },
+        { 0x397f8f397f8f397fULL, 0x8f397f8f397f8f39ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*  64  */
+        { 0x8d7fe680db7f7f38ULL, 0x39705044e93c8010ULL, },
+        { 0xdc1038226f7f7f7fULL, 0x247f455f53508bf8ULL, },
+        { 0x801bd080ca3173f2ULL, 0x7f767f7f5539ce6cULL, },
+        { 0x73801a7f258080c8ULL, 0xc790b0bc17c47ff0ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x4f80527f7fc43c7fULL, 0xeb1ff51b6a142de8ULL, },
+        { 0x8b80ea16ef80e5baULL, 0x7f0633426cfd705cULL, },
+        { 0x24f0c8de91808080ULL, 0xdc80bba1adb07508ULL, },    /*  72  */
+        { 0xb17fae80803cc480ULL, 0x15e10be596ecd318ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x800b9880809ea980ULL, 0x7fe73e2702e94374ULL, },
+        { 0x7fe5307f36cf8d0eULL, 0x808a8080abc73294ULL, },
+        { 0x757f16ea117f1b46ULL, 0x80facdbe940390a4ULL, },
+};
+
+    gettimeofday(&start, NULL);
+
+    for (i = 0; i < PATTERN_INPUTS_SHORT_COUNT; i++) {
+        for (j = 0; j < PATTERN_INPUTS_SHORT_COUNT; j++) {
+            do_msa_SUBS_S_B(b128_pattern[i], b128_pattern[j],
+                           b128_result[PATTERN_INPUTS_SHORT_COUNT * i + j]);
+        }
+    }
+
+    for (i = 0; i < RANDOM_INPUTS_SHORT_COUNT; i++) {
+        for (j = 0; j < RANDOM_INPUTS_SHORT_COUNT; j++) {
+            do_msa_SUBS_S_B(b128_random[i], b128_random[j],
+                           b128_result[((PATTERN_INPUTS_SHORT_COUNT) *
+                                        (PATTERN_INPUTS_SHORT_COUNT)) +
+                                       RANDOM_INPUTS_SHORT_COUNT * i + j]);
+        }
+    }
+
+    gettimeofday(&end, NULL);
+
+    elapsed_time = (end.tv_sec - start.tv_sec) * 1000.0;
+    elapsed_time += (end.tv_usec - start.tv_usec) / 1000.0;
+
+    ret = check_results(instruction_name, TEST_COUNT_TOTAL, elapsed_time,
+                        &b128_result[0][0], &b128_expect[0][0]);
+
+    return ret;
+}
diff --git a/tests/tcg/mips/user/ase/msa/int-subtract/test_msa_subs_s_d.c b/tests/tcg/mips/user/ase/msa/int-subtract/test_msa_subs_s_d.c
new file mode 100644
index 0000000..195137f
--- /dev/null
+++ b/tests/tcg/mips/user/ase/msa/int-subtract/test_msa_subs_s_d.c
@@ -0,0 +1,151 @@
+/*
+ *  Test program for MSA instruction SUBS_S.D
+ *
+ *  Copyright (C) 2018  Wave Computing, Inc.
+ *  Copyright (C) 2018  Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
+ *
+ *  This program is free software: you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation, either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <sys/time.h>
+#include <stdint.h>
+
+#include "../../../../include/wrappers_msa.h"
+#include "../../../../include/test_inputs.h"
+#include "../../../../include/test_utils.h"
+
+#define TEST_COUNT_TOTAL (                                                \
+            (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
+            (RANDOM_INPUTS_SHORT_COUNT) * (RANDOM_INPUTS_SHORT_COUNT))
+
+
+int32_t main(void)
+{
+    char *instruction_name = "SUBS_S.D";
+    int32_t ret;
+    uint32_t i, j;
+    struct timeval start, end;
+    double elapsed_time;
+
+    uint64_t b128_result[TEST_COUNT_TOTAL][2];
+    uint64_t b128_expect[TEST_COUNT_TOTAL][2] = {
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*   0  */
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0x5555555555555555ULL, 0x5555555555555555ULL, },
+        { 0xaaaaaaaaaaaaaaaaULL, 0xaaaaaaaaaaaaaaaaULL, },
+        { 0x3333333333333333ULL, 0x3333333333333333ULL, },
+        { 0xccccccccccccccccULL, 0xccccccccccccccccULL, },
+        { 0x1c71c71c71c71c71ULL, 0xc71c71c71c71c71cULL, },
+        { 0xe38e38e38e38e38eULL, 0x38e38e38e38e38e3ULL, },
+        { 0x0000000000000001ULL, 0x0000000000000001ULL, },    /*   8  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x5555555555555556ULL, 0x5555555555555556ULL, },
+        { 0xaaaaaaaaaaaaaaabULL, 0xaaaaaaaaaaaaaaabULL, },
+        { 0x3333333333333334ULL, 0x3333333333333334ULL, },
+        { 0xcccccccccccccccdULL, 0xcccccccccccccccdULL, },
+        { 0x1c71c71c71c71c72ULL, 0xc71c71c71c71c71dULL, },
+        { 0xe38e38e38e38e38fULL, 0x38e38e38e38e38e4ULL, },
+        { 0xaaaaaaaaaaaaaaabULL, 0xaaaaaaaaaaaaaaabULL, },    /*  16  */
+        { 0xaaaaaaaaaaaaaaaaULL, 0xaaaaaaaaaaaaaaaaULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x8000000000000000ULL, 0x8000000000000000ULL, },
+        { 0xdddddddddddddddeULL, 0xdddddddddddddddeULL, },
+        { 0x8000000000000000ULL, 0x8000000000000000ULL, },
+        { 0xc71c71c71c71c71cULL, 0x8000000000000000ULL, },
+        { 0x8e38e38e38e38e39ULL, 0xe38e38e38e38e38eULL, },
+        { 0x5555555555555556ULL, 0x5555555555555556ULL, },    /*  24  */
+        { 0x5555555555555555ULL, 0x5555555555555555ULL, },
+        { 0x7fffffffffffffffULL, 0x7fffffffffffffffULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x7fffffffffffffffULL, 0x7fffffffffffffffULL, },
+        { 0x2222222222222222ULL, 0x2222222222222222ULL, },
+        { 0x71c71c71c71c71c7ULL, 0x1c71c71c71c71c72ULL, },
+        { 0x38e38e38e38e38e4ULL, 0x7fffffffffffffffULL, },
+        { 0xcccccccccccccccdULL, 0xcccccccccccccccdULL, },    /*  32  */
+        { 0xccccccccccccccccULL, 0xccccccccccccccccULL, },
+        { 0x2222222222222222ULL, 0x2222222222222222ULL, },
+        { 0x8000000000000000ULL, 0x8000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x9999999999999999ULL, 0x9999999999999999ULL, },
+        { 0xe93e93e93e93e93eULL, 0x93e93e93e93e93e9ULL, },
+        { 0xb05b05b05b05b05bULL, 0x05b05b05b05b05b0ULL, },
+        { 0x3333333333333334ULL, 0x3333333333333334ULL, },    /*  40  */
+        { 0x3333333333333333ULL, 0x3333333333333333ULL, },
+        { 0x7fffffffffffffffULL, 0x7fffffffffffffffULL, },
+        { 0xdddddddddddddddeULL, 0xdddddddddddddddeULL, },
+        { 0x6666666666666667ULL, 0x6666666666666667ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x4fa4fa4fa4fa4fa5ULL, 0xfa4fa4fa4fa4fa50ULL, },
+        { 0x16c16c16c16c16c2ULL, 0x6c16c16c16c16c17ULL, },
+        { 0xe38e38e38e38e38fULL, 0x38e38e38e38e38e4ULL, },    /*  48  */
+        { 0xe38e38e38e38e38eULL, 0x38e38e38e38e38e3ULL, },
+        { 0x38e38e38e38e38e4ULL, 0x7fffffffffffffffULL, },
+        { 0x8e38e38e38e38e39ULL, 0xe38e38e38e38e38eULL, },
+        { 0x16c16c16c16c16c2ULL, 0x6c16c16c16c16c17ULL, },
+        { 0xb05b05b05b05b05bULL, 0x05b05b05b05b05b0ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0xc71c71c71c71c71dULL, 0x71c71c71c71c71c7ULL, },
+        { 0x1c71c71c71c71c72ULL, 0xc71c71c71c71c71dULL, },    /*  56  */
+        { 0x1c71c71c71c71c71ULL, 0xc71c71c71c71c71cULL, },
+        { 0x71c71c71c71c71c7ULL, 0x1c71c71c71c71c72ULL, },
+        { 0xc71c71c71c71c71cULL, 0x8000000000000000ULL, },
+        { 0x4fa4fa4fa4fa4fa5ULL, 0xfa4fa4fa4fa4fa50ULL, },
+        { 0xe93e93e93e93e93eULL, 0x93e93e93e93e93e9ULL, },
+        { 0x38e38e38e38e38e3ULL, 0x8e38e38e38e38e39ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*  64  */
+        { 0x8cace668dace8e38ULL, 0x386f5044e93c5d10ULL, },
+        { 0xdc1038216e92c9c0ULL, 0x238e445f53508af8ULL, },
+        { 0x8000000000000000ULL, 0x7fffffffffffffffULL, },
+        { 0x73531997253171c8ULL, 0xc790afbb16c3a2f0ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x4f6351b893c43b88ULL, 0xeb1ef41a6a142de8ULL, },
+        { 0x8b6eea15ef61e4baULL, 0x7fffffffffffffffULL, },
+        { 0x23efc7de916d3640ULL, 0xdc71bba0acaf7508ULL, },    /*  72  */
+        { 0xb09cae476c3bc478ULL, 0x14e10be595ebd218ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x8000000000000000ULL, 0x7fffffffffffffffULL, },
+        { 0x7fffffffffffffffULL, 0x8000000000000000ULL, },
+        { 0x749115ea109e1b46ULL, 0x8000000000000000ULL, },
+};
+
+    gettimeofday(&start, NULL);
+
+    for (i = 0; i < PATTERN_INPUTS_SHORT_COUNT; i++) {
+        for (j = 0; j < PATTERN_INPUTS_SHORT_COUNT; j++) {
+            do_msa_SUBS_S_D(b128_pattern[i], b128_pattern[j],
+                           b128_result[PATTERN_INPUTS_SHORT_COUNT * i + j]);
+        }
+    }
+
+    for (i = 0; i < RANDOM_INPUTS_SHORT_COUNT; i++) {
+        for (j = 0; j < RANDOM_INPUTS_SHORT_COUNT; j++) {
+            do_msa_SUBS_S_D(b128_random[i], b128_random[j],
+                           b128_result[((PATTERN_INPUTS_SHORT_COUNT) *
+                                        (PATTERN_INPUTS_SHORT_COUNT)) +
+                                       RANDOM_INPUTS_SHORT_COUNT * i + j]);
+        }
+    }
+
+    gettimeofday(&end, NULL);
+
+    elapsed_time = (end.tv_sec - start.tv_sec) * 1000.0;
+    elapsed_time += (end.tv_usec - start.tv_usec) / 1000.0;
+
+    ret = check_results(instruction_name, TEST_COUNT_TOTAL, elapsed_time,
+                        &b128_result[0][0], &b128_expect[0][0]);
+
+    return ret;
+}
diff --git a/tests/tcg/mips/user/ase/msa/int-subtract/test_msa_subs_s_h.c b/tests/tcg/mips/user/ase/msa/int-subtract/test_msa_subs_s_h.c
new file mode 100644
index 0000000..c57238d
--- /dev/null
+++ b/tests/tcg/mips/user/ase/msa/int-subtract/test_msa_subs_s_h.c
@@ -0,0 +1,151 @@
+/*
+ *  Test program for MSA instruction SUBS_S.H
+ *
+ *  Copyright (C) 2018  Wave Computing, Inc.
+ *  Copyright (C) 2018  Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
+ *
+ *  This program is free software: you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation, either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <sys/time.h>
+#include <stdint.h>
+
+#include "../../../../include/wrappers_msa.h"
+#include "../../../../include/test_inputs.h"
+#include "../../../../include/test_utils.h"
+
+#define TEST_COUNT_TOTAL (                                                \
+            (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
+            (RANDOM_INPUTS_SHORT_COUNT) * (RANDOM_INPUTS_SHORT_COUNT))
+
+
+int32_t main(void)
+{
+    char *instruction_name = "SUBS_S.H";
+    int32_t ret;
+    uint32_t i, j;
+    struct timeval start, end;
+    double elapsed_time;
+
+    uint64_t b128_result[TEST_COUNT_TOTAL][2];
+    uint64_t b128_expect[TEST_COUNT_TOTAL][2] = {
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*   0  */
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0x5555555555555555ULL, 0x5555555555555555ULL, },
+        { 0xaaaaaaaaaaaaaaaaULL, 0xaaaaaaaaaaaaaaaaULL, },
+        { 0x3333333333333333ULL, 0x3333333333333333ULL, },
+        { 0xccccccccccccccccULL, 0xccccccccccccccccULL, },
+        { 0x1c71c71c71c71c71ULL, 0xc71c71c71c71c71cULL, },
+        { 0xe38e38e38e38e38eULL, 0x38e38e38e38e38e3ULL, },
+        { 0x0001000100010001ULL, 0x0001000100010001ULL, },    /*   8  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x5556555655565556ULL, 0x5556555655565556ULL, },
+        { 0xaaabaaabaaabaaabULL, 0xaaabaaabaaabaaabULL, },
+        { 0x3334333433343334ULL, 0x3334333433343334ULL, },
+        { 0xcccdcccdcccdcccdULL, 0xcccdcccdcccdcccdULL, },
+        { 0x1c72c71d71c81c72ULL, 0xc71d71c81c72c71dULL, },
+        { 0xe38f38e48e39e38fULL, 0x38e48e39e38f38e4ULL, },
+        { 0xaaabaaabaaabaaabULL, 0xaaabaaabaaabaaabULL, },    /*  16  */
+        { 0xaaaaaaaaaaaaaaaaULL, 0xaaaaaaaaaaaaaaaaULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x8000800080008000ULL, 0x8000800080008000ULL, },
+        { 0xdddedddedddedddeULL, 0xdddedddedddedddeULL, },
+        { 0x8000800080008000ULL, 0x8000800080008000ULL, },
+        { 0xc71c80001c72c71cULL, 0x80001c72c71c8000ULL, },
+        { 0x8e39e38e80008e39ULL, 0xe38e80008e39e38eULL, },
+        { 0x5556555655565556ULL, 0x5556555655565556ULL, },    /*  24  */
+        { 0x5555555555555555ULL, 0x5555555555555555ULL, },
+        { 0x7fff7fff7fff7fffULL, 0x7fff7fff7fff7fffULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x7fff7fff7fff7fffULL, 0x7fff7fff7fff7fffULL, },
+        { 0x2222222222222222ULL, 0x2222222222222222ULL, },
+        { 0x71c71c727fff71c7ULL, 0x1c727fff71c71c72ULL, },
+        { 0x38e47fffe38e38e4ULL, 0x7fffe38e38e47fffULL, },
+        { 0xcccdcccdcccdcccdULL, 0xcccdcccdcccdcccdULL, },    /*  32  */
+        { 0xccccccccccccccccULL, 0xccccccccccccccccULL, },
+        { 0x2222222222222222ULL, 0x2222222222222222ULL, },
+        { 0x8000800080008000ULL, 0x8000800080008000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x9999999999999999ULL, 0x9999999999999999ULL, },
+        { 0xe93e93e93e94e93eULL, 0x93e93e94e93e93e9ULL, },
+        { 0xb05b05b08000b05bULL, 0x05b08000b05b05b0ULL, },
+        { 0x3334333433343334ULL, 0x3334333433343334ULL, },    /*  40  */
+        { 0x3333333333333333ULL, 0x3333333333333333ULL, },
+        { 0x7fff7fff7fff7fffULL, 0x7fff7fff7fff7fffULL, },
+        { 0xdddedddedddedddeULL, 0xdddedddedddedddeULL, },
+        { 0x6667666766676667ULL, 0x6667666766676667ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x4fa5fa507fff4fa5ULL, 0xfa507fff4fa5fa50ULL, },
+        { 0x16c26c17c16c16c2ULL, 0x6c17c16c16c26c17ULL, },
+        { 0xe38f38e48e39e38fULL, 0x38e48e39e38f38e4ULL, },    /*  48  */
+        { 0xe38e38e38e38e38eULL, 0x38e38e38e38e38e3ULL, },
+        { 0x38e47fffe38e38e4ULL, 0x7fffe38e38e47fffULL, },
+        { 0x8e39e38e80008e39ULL, 0xe38e80008e39e38eULL, },
+        { 0x16c26c17c16c16c2ULL, 0x6c17c16c16c26c17ULL, },
+        { 0xb05b05b08000b05bULL, 0x05b08000b05b05b0ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0xc71d71c78000c71dULL, 0x71c78000c71d71c7ULL, },
+        { 0x1c72c71d71c81c72ULL, 0xc71d71c81c72c71dULL, },    /*  56  */
+        { 0x1c71c71c71c71c71ULL, 0xc71c71c71c71c71cULL, },
+        { 0x71c71c727fff71c7ULL, 0x1c727fff71c71c72ULL, },
+        { 0xc71c80001c72c71cULL, 0x80001c72c71c8000ULL, },
+        { 0x4fa5fa507fff4fa5ULL, 0xfa507fff4fa5fa50ULL, },
+        { 0xe93e93e93e94e93eULL, 0x93e93e94e93e93e9ULL, },
+        { 0x38e38e397fff38e3ULL, 0x8e397fff38e38e39ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*  64  */
+        { 0x8cace669dacf7fffULL, 0x38705044e93c8000ULL, },
+        { 0xdc1038226e937fffULL, 0x238f445f53508af8ULL, },
+        { 0x8000d07fca3172f2ULL, 0x7fff7fff5539cd6cULL, },
+        { 0x7354199725318000ULL, 0xc790afbc16c47fffULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x4f6451b97fff3b88ULL, 0xeb1ff41b6a142de8ULL, },
+        { 0x8b6fea16ef62e4baULL, 0x7fff32426bfd705cULL, },
+        { 0x23f0c7de916d8000ULL, 0xdc71bba1acb07508ULL, },    /*  72  */
+        { 0xb09cae478000c478ULL, 0x14e10be595ecd218ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x8000985d8000a932ULL, 0x7fff3e2701e94274ULL, },
+        { 0x7fff2f8135cf8d0eULL, 0x80008000aac73294ULL, },
+        { 0x749115ea109e1b46ULL, 0x8000cdbe94038fa4ULL, },
+};
+
+    gettimeofday(&start, NULL);
+
+    for (i = 0; i < PATTERN_INPUTS_SHORT_COUNT; i++) {
+        for (j = 0; j < PATTERN_INPUTS_SHORT_COUNT; j++) {
+            do_msa_SUBS_S_H(b128_pattern[i], b128_pattern[j],
+                           b128_result[PATTERN_INPUTS_SHORT_COUNT * i + j]);
+        }
+    }
+
+    for (i = 0; i < RANDOM_INPUTS_SHORT_COUNT; i++) {
+        for (j = 0; j < RANDOM_INPUTS_SHORT_COUNT; j++) {
+            do_msa_SUBS_S_H(b128_random[i], b128_random[j],
+                           b128_result[((PATTERN_INPUTS_SHORT_COUNT) *
+                                        (PATTERN_INPUTS_SHORT_COUNT)) +
+                                       RANDOM_INPUTS_SHORT_COUNT * i + j]);
+        }
+    }
+
+    gettimeofday(&end, NULL);
+
+    elapsed_time = (end.tv_sec - start.tv_sec) * 1000.0;
+    elapsed_time += (end.tv_usec - start.tv_usec) / 1000.0;
+
+    ret = check_results(instruction_name, TEST_COUNT_TOTAL, elapsed_time,
+                        &b128_result[0][0], &b128_expect[0][0]);
+
+    return ret;
+}
diff --git a/tests/tcg/mips/user/ase/msa/int-subtract/test_msa_subs_s_w.c b/tests/tcg/mips/user/ase/msa/int-subtract/test_msa_subs_s_w.c
new file mode 100644
index 0000000..1cded65
--- /dev/null
+++ b/tests/tcg/mips/user/ase/msa/int-subtract/test_msa_subs_s_w.c
@@ -0,0 +1,151 @@
+/*
+ *  Test program for MSA instruction SUBS_S.W
+ *
+ *  Copyright (C) 2018  Wave Computing, Inc.
+ *  Copyright (C) 2018  Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
+ *
+ *  This program is free software: you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation, either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <sys/time.h>
+#include <stdint.h>
+
+#include "../../../../include/wrappers_msa.h"
+#include "../../../../include/test_inputs.h"
+#include "../../../../include/test_utils.h"
+
+#define TEST_COUNT_TOTAL (                                                \
+            (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
+            (RANDOM_INPUTS_SHORT_COUNT) * (RANDOM_INPUTS_SHORT_COUNT))
+
+
+int32_t main(void)
+{
+    char *instruction_name = "SUBS_S.W";
+    int32_t ret;
+    uint32_t i, j;
+    struct timeval start, end;
+    double elapsed_time;
+
+    uint64_t b128_result[TEST_COUNT_TOTAL][2];
+    uint64_t b128_expect[TEST_COUNT_TOTAL][2] = {
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*   0  */
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0x5555555555555555ULL, 0x5555555555555555ULL, },
+        { 0xaaaaaaaaaaaaaaaaULL, 0xaaaaaaaaaaaaaaaaULL, },
+        { 0x3333333333333333ULL, 0x3333333333333333ULL, },
+        { 0xccccccccccccccccULL, 0xccccccccccccccccULL, },
+        { 0x1c71c71c71c71c71ULL, 0xc71c71c71c71c71cULL, },
+        { 0xe38e38e38e38e38eULL, 0x38e38e38e38e38e3ULL, },
+        { 0x0000000100000001ULL, 0x0000000100000001ULL, },    /*   8  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x5555555655555556ULL, 0x5555555655555556ULL, },
+        { 0xaaaaaaabaaaaaaabULL, 0xaaaaaaabaaaaaaabULL, },
+        { 0x3333333433333334ULL, 0x3333333433333334ULL, },
+        { 0xcccccccdcccccccdULL, 0xcccccccdcccccccdULL, },
+        { 0x1c71c71d71c71c72ULL, 0xc71c71c81c71c71dULL, },
+        { 0xe38e38e48e38e38fULL, 0x38e38e39e38e38e4ULL, },
+        { 0xaaaaaaabaaaaaaabULL, 0xaaaaaaabaaaaaaabULL, },    /*  16  */
+        { 0xaaaaaaaaaaaaaaaaULL, 0xaaaaaaaaaaaaaaaaULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x8000000080000000ULL, 0x8000000080000000ULL, },
+        { 0xdddddddedddddddeULL, 0xdddddddedddddddeULL, },
+        { 0x8000000080000000ULL, 0x8000000080000000ULL, },
+        { 0xc71c71c71c71c71cULL, 0x80000000c71c71c7ULL, },
+        { 0x8e38e38e80000000ULL, 0xe38e38e38e38e38eULL, },
+        { 0x5555555655555556ULL, 0x5555555655555556ULL, },    /*  24  */
+        { 0x5555555555555555ULL, 0x5555555555555555ULL, },
+        { 0x7fffffff7fffffffULL, 0x7fffffff7fffffffULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x7fffffff7fffffffULL, 0x7fffffff7fffffffULL, },
+        { 0x2222222222222222ULL, 0x2222222222222222ULL, },
+        { 0x71c71c727fffffffULL, 0x1c71c71d71c71c72ULL, },
+        { 0x38e38e39e38e38e4ULL, 0x7fffffff38e38e39ULL, },
+        { 0xcccccccdcccccccdULL, 0xcccccccdcccccccdULL, },    /*  32  */
+        { 0xccccccccccccccccULL, 0xccccccccccccccccULL, },
+        { 0x2222222222222222ULL, 0x2222222222222222ULL, },
+        { 0x8000000080000000ULL, 0x8000000080000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x9999999999999999ULL, 0x9999999999999999ULL, },
+        { 0xe93e93e93e93e93eULL, 0x93e93e94e93e93e9ULL, },
+        { 0xb05b05b080000000ULL, 0x05b05b05b05b05b0ULL, },
+        { 0x3333333433333334ULL, 0x3333333433333334ULL, },    /*  40  */
+        { 0x3333333333333333ULL, 0x3333333333333333ULL, },
+        { 0x7fffffff7fffffffULL, 0x7fffffff7fffffffULL, },
+        { 0xdddddddedddddddeULL, 0xdddddddedddddddeULL, },
+        { 0x6666666766666667ULL, 0x6666666766666667ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x4fa4fa507fffffffULL, 0xfa4fa4fb4fa4fa50ULL, },
+        { 0x16c16c17c16c16c2ULL, 0x6c16c16c16c16c17ULL, },
+        { 0xe38e38e48e38e38fULL, 0x38e38e39e38e38e4ULL, },    /*  48  */
+        { 0xe38e38e38e38e38eULL, 0x38e38e38e38e38e3ULL, },
+        { 0x38e38e39e38e38e4ULL, 0x7fffffff38e38e39ULL, },
+        { 0x8e38e38e80000000ULL, 0xe38e38e38e38e38eULL, },
+        { 0x16c16c17c16c16c2ULL, 0x6c16c16c16c16c17ULL, },
+        { 0xb05b05b080000000ULL, 0x05b05b05b05b05b0ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0xc71c71c780000000ULL, 0x71c71c71c71c71c7ULL, },
+        { 0x1c71c71d71c71c72ULL, 0xc71c71c81c71c71dULL, },    /*  56  */
+        { 0x1c71c71c71c71c71ULL, 0xc71c71c71c71c71cULL, },
+        { 0x71c71c727fffffffULL, 0x1c71c71d71c71c72ULL, },
+        { 0xc71c71c71c71c71cULL, 0x80000000c71c71c7ULL, },
+        { 0x4fa4fa507fffffffULL, 0xfa4fa4fb4fa4fa50ULL, },
+        { 0xe93e93e93e93e93eULL, 0x93e93e94e93e93e9ULL, },
+        { 0x38e38e397fffffffULL, 0x8e38e38f38e38e39ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*  64  */
+        { 0x8cace669dace8e38ULL, 0x386f5044e93c5d10ULL, },
+        { 0xdc1038226e92c9c0ULL, 0x238e445f53508af8ULL, },
+        { 0x80000000ca3072f2ULL, 0x7fffffff5538cd6cULL, },
+        { 0x73531997253171c8ULL, 0xc790afbc16c3a2f0ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x4f6351b97fffffffULL, 0xeb1ef41b6a142de8ULL, },
+        { 0x8b6eea16ef61e4baULL, 0x7fffffff6bfc705cULL, },
+        { 0x23efc7de916d3640ULL, 0xdc71bba1acaf7508ULL, },    /*  72  */
+        { 0xb09cae4780000000ULL, 0x14e10be595ebd218ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x8000000080000000ULL, 0x7fffffff01e84274ULL, },
+        { 0x7fffffff35cf8d0eULL, 0x80000000aac73294ULL, },
+        { 0x749115ea109e1b46ULL, 0x8000000094038fa4ULL, },
+};
+
+    gettimeofday(&start, NULL);
+
+    for (i = 0; i < PATTERN_INPUTS_SHORT_COUNT; i++) {
+        for (j = 0; j < PATTERN_INPUTS_SHORT_COUNT; j++) {
+            do_msa_SUBS_S_W(b128_pattern[i], b128_pattern[j],
+                           b128_result[PATTERN_INPUTS_SHORT_COUNT * i + j]);
+        }
+    }
+
+    for (i = 0; i < RANDOM_INPUTS_SHORT_COUNT; i++) {
+        for (j = 0; j < RANDOM_INPUTS_SHORT_COUNT; j++) {
+            do_msa_SUBS_S_W(b128_random[i], b128_random[j],
+                           b128_result[((PATTERN_INPUTS_SHORT_COUNT) *
+                                        (PATTERN_INPUTS_SHORT_COUNT)) +
+                                       RANDOM_INPUTS_SHORT_COUNT * i + j]);
+        }
+    }
+
+    gettimeofday(&end, NULL);
+
+    elapsed_time = (end.tv_sec - start.tv_sec) * 1000.0;
+    elapsed_time += (end.tv_usec - start.tv_usec) / 1000.0;
+
+    ret = check_results(instruction_name, TEST_COUNT_TOTAL, elapsed_time,
+                        &b128_result[0][0], &b128_expect[0][0]);
+
+    return ret;
+}
diff --git a/tests/tcg/mips/user/ase/msa/int-subtract/test_msa_subs_u_b.c b/tests/tcg/mips/user/ase/msa/int-subtract/test_msa_subs_u_b.c
new file mode 100644
index 0000000..cb38f03
--- /dev/null
+++ b/tests/tcg/mips/user/ase/msa/int-subtract/test_msa_subs_u_b.c
@@ -0,0 +1,151 @@
+/*
+ *  Test program for MSA instruction SUBS_U.B
+ *
+ *  Copyright (C) 2018  Wave Computing, Inc.
+ *  Copyright (C) 2018  Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
+ *
+ *  This program is free software: you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation, either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <sys/time.h>
+#include <stdint.h>
+
+#include "../../../../include/wrappers_msa.h"
+#include "../../../../include/test_inputs.h"
+#include "../../../../include/test_utils.h"
+
+#define TEST_COUNT_TOTAL (                                                \
+            (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
+            (RANDOM_INPUTS_SHORT_COUNT) * (RANDOM_INPUTS_SHORT_COUNT))
+
+
+int32_t main(void)
+{
+    char *instruction_name = "SUBS_U.B";
+    int32_t ret;
+    uint32_t i, j;
+    struct timeval start, end;
+    double elapsed_time;
+
+    uint64_t b128_result[TEST_COUNT_TOTAL][2];
+    uint64_t b128_expect[TEST_COUNT_TOTAL][2] = {
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*   0  */
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0x5555555555555555ULL, 0x5555555555555555ULL, },
+        { 0xaaaaaaaaaaaaaaaaULL, 0xaaaaaaaaaaaaaaaaULL, },
+        { 0x3333333333333333ULL, 0x3333333333333333ULL, },
+        { 0xccccccccccccccccULL, 0xccccccccccccccccULL, },
+        { 0x1c71c71c71c71c71ULL, 0xc71c71c71c71c71cULL, },
+        { 0xe38e38e38e38e38eULL, 0x38e38e38e38e38e3ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*   8  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*  16  */
+        { 0xaaaaaaaaaaaaaaaaULL, 0xaaaaaaaaaaaaaaaaULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x5555555555555555ULL, 0x5555555555555555ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x7777777777777777ULL, 0x7777777777777777ULL, },
+        { 0x001c72001c72001cULL, 0x72001c72001c7200ULL, },
+        { 0x8e39008e39008e39ULL, 0x008e39008e39008eULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*  24  */
+        { 0x5555555555555555ULL, 0x5555555555555555ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x2222222222222222ULL, 0x2222222222222222ULL, },
+        { 0x00001d00001d0000ULL, 0x1d00001d00001d00ULL, },
+        { 0x3900003900003900ULL, 0x0039000039000039ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*  32  */
+        { 0xccccccccccccccccULL, 0xccccccccccccccccULL, },
+        { 0x2222222222222222ULL, 0x2222222222222222ULL, },
+        { 0x7777777777777777ULL, 0x7777777777777777ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x9999999999999999ULL, 0x9999999999999999ULL, },
+        { 0x003e94003e94003eULL, 0x94003e94003e9400ULL, },
+        { 0xb05b05b05b05b05bULL, 0x05b05b05b05b05b0ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*  40  */
+        { 0x3333333333333333ULL, 0x3333333333333333ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x1700001700001700ULL, 0x0017000017000017ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*  48  */
+        { 0xe38e38e38e38e38eULL, 0x38e38e38e38e38e3ULL, },
+        { 0x3900003900003900ULL, 0x0039000039000039ULL, },
+        { 0x8e39008e39008e39ULL, 0x008e39008e39008eULL, },
+        { 0x1700001700001700ULL, 0x0017000017000017ULL, },
+        { 0xb05b05b05b05b05bULL, 0x05b05b05b05b05b0ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0xc71d00c71d00c71dULL, 0x00c71d00c71d00c7ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*  56  */
+        { 0x1c71c71c71c71c71ULL, 0xc71c71c71c71c71cULL, },
+        { 0x00001d00001d0000ULL, 0x1d00001d00001d00ULL, },
+        { 0x001c72001c72001cULL, 0x72001c72001c7200ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x003e94003e94003eULL, 0x94003e94003e9400ULL, },
+        { 0x00008f00008f0000ULL, 0x8f00008f00008f00ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*  64  */
+        { 0x0000e66900000038ULL, 0x39000044e93c5e00ULL, },
+        { 0x0010382200000000ULL, 0x2400000053508b00ULL, },
+        { 0x181bd07f00310000ULL, 0x0000000055390000ULL, },
+        { 0x7354000025317200ULL, 0x0090b000000000f0ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x4f64000000003c00ULL, 0x001f000000142de8ULL, },
+        { 0x8b6f001600620000ULL, 0x000633000000005cULL, },
+        { 0x24000000916d3640ULL, 0x0071bba100000008ULL, },    /*  72  */
+        { 0x0000ae476c3c0078ULL, 0x15000be596000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x3c0b985d5b9e0032ULL, 0x00003e2702000000ULL, },
+        { 0x0000000036008d0eULL, 0x428a7d7a00003294ULL, },
+        { 0x0000160011001b46ULL, 0x7b0000be94039000ULL, },
+};
+
+    gettimeofday(&start, NULL);
+
+    for (i = 0; i < PATTERN_INPUTS_SHORT_COUNT; i++) {
+        for (j = 0; j < PATTERN_INPUTS_SHORT_COUNT; j++) {
+            do_msa_SUBS_U_B(b128_pattern[i], b128_pattern[j],
+                           b128_result[PATTERN_INPUTS_SHORT_COUNT * i + j]);
+        }
+    }
+
+    for (i = 0; i < RANDOM_INPUTS_SHORT_COUNT; i++) {
+        for (j = 0; j < RANDOM_INPUTS_SHORT_COUNT; j++) {
+            do_msa_SUBS_U_B(b128_random[i], b128_random[j],
+                           b128_result[((PATTERN_INPUTS_SHORT_COUNT) *
+                                        (PATTERN_INPUTS_SHORT_COUNT)) +
+                                       RANDOM_INPUTS_SHORT_COUNT * i + j]);
+        }
+    }
+
+    gettimeofday(&end, NULL);
+
+    elapsed_time = (end.tv_sec - start.tv_sec) * 1000.0;
+    elapsed_time += (end.tv_usec - start.tv_usec) / 1000.0;
+
+    ret = check_results(instruction_name, TEST_COUNT_TOTAL, elapsed_time,
+                        &b128_result[0][0], &b128_expect[0][0]);
+
+    return ret;
+}
diff --git a/tests/tcg/mips/user/ase/msa/int-subtract/test_msa_subs_u_d.c b/tests/tcg/mips/user/ase/msa/int-subtract/test_msa_subs_u_d.c
new file mode 100644
index 0000000..2685b2f
--- /dev/null
+++ b/tests/tcg/mips/user/ase/msa/int-subtract/test_msa_subs_u_d.c
@@ -0,0 +1,151 @@
+/*
+ *  Test program for MSA instruction SUBS_U.D
+ *
+ *  Copyright (C) 2018  Wave Computing, Inc.
+ *  Copyright (C) 2018  Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
+ *
+ *  This program is free software: you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation, either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <sys/time.h>
+#include <stdint.h>
+
+#include "../../../../include/wrappers_msa.h"
+#include "../../../../include/test_inputs.h"
+#include "../../../../include/test_utils.h"
+
+#define TEST_COUNT_TOTAL (                                                \
+            (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
+            (RANDOM_INPUTS_SHORT_COUNT) * (RANDOM_INPUTS_SHORT_COUNT))
+
+
+int32_t main(void)
+{
+    char *instruction_name = "SUBS_U.D";
+    int32_t ret;
+    uint32_t i, j;
+    struct timeval start, end;
+    double elapsed_time;
+
+    uint64_t b128_result[TEST_COUNT_TOTAL][2];
+    uint64_t b128_expect[TEST_COUNT_TOTAL][2] = {
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*   0  */
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0x5555555555555555ULL, 0x5555555555555555ULL, },
+        { 0xaaaaaaaaaaaaaaaaULL, 0xaaaaaaaaaaaaaaaaULL, },
+        { 0x3333333333333333ULL, 0x3333333333333333ULL, },
+        { 0xccccccccccccccccULL, 0xccccccccccccccccULL, },
+        { 0x1c71c71c71c71c71ULL, 0xc71c71c71c71c71cULL, },
+        { 0xe38e38e38e38e38eULL, 0x38e38e38e38e38e3ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*   8  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*  16  */
+        { 0xaaaaaaaaaaaaaaaaULL, 0xaaaaaaaaaaaaaaaaULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x5555555555555555ULL, 0x5555555555555555ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x7777777777777777ULL, 0x7777777777777777ULL, },
+        { 0x0000000000000000ULL, 0x71c71c71c71c71c7ULL, },
+        { 0x8e38e38e38e38e39ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*  24  */
+        { 0x5555555555555555ULL, 0x5555555555555555ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x2222222222222222ULL, 0x2222222222222222ULL, },
+        { 0x0000000000000000ULL, 0x1c71c71c71c71c72ULL, },
+        { 0x38e38e38e38e38e4ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*  32  */
+        { 0xccccccccccccccccULL, 0xccccccccccccccccULL, },
+        { 0x2222222222222222ULL, 0x2222222222222222ULL, },
+        { 0x7777777777777777ULL, 0x7777777777777777ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x9999999999999999ULL, 0x9999999999999999ULL, },
+        { 0x0000000000000000ULL, 0x93e93e93e93e93e9ULL, },
+        { 0xb05b05b05b05b05bULL, 0x05b05b05b05b05b0ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*  40  */
+        { 0x3333333333333333ULL, 0x3333333333333333ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x16c16c16c16c16c2ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*  48  */
+        { 0xe38e38e38e38e38eULL, 0x38e38e38e38e38e3ULL, },
+        { 0x38e38e38e38e38e4ULL, 0x0000000000000000ULL, },
+        { 0x8e38e38e38e38e39ULL, 0x0000000000000000ULL, },
+        { 0x16c16c16c16c16c2ULL, 0x0000000000000000ULL, },
+        { 0xb05b05b05b05b05bULL, 0x05b05b05b05b05b0ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0xc71c71c71c71c71dULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*  56  */
+        { 0x1c71c71c71c71c71ULL, 0xc71c71c71c71c71cULL, },
+        { 0x0000000000000000ULL, 0x1c71c71c71c71c72ULL, },
+        { 0x0000000000000000ULL, 0x71c71c71c71c71c7ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x93e93e93e93e93e9ULL, },
+        { 0x0000000000000000ULL, 0x8e38e38e38e38e39ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*  64  */
+        { 0x0000000000000000ULL, 0x386f5044e93c5d10ULL, },
+        { 0x0000000000000000ULL, 0x238e445f53508af8ULL, },
+        { 0x181bd07eca3072f2ULL, 0x0000000000000000ULL, },
+        { 0x73531997253171c8ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x4f6351b893c43b88ULL, 0x0000000000000000ULL, },
+        { 0x8b6eea15ef61e4baULL, 0x0000000000000000ULL, },
+        { 0x23efc7de916d3640ULL, 0x0000000000000000ULL, },    /*  72  */
+        { 0x0000000000000000ULL, 0x14e10be595ebd218ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x3c0b985d5b9da932ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x428a7d79aac73294ULL, },
+        { 0x0000000000000000ULL, 0x7af9cdbe94038fa4ULL, },
+};
+
+    gettimeofday(&start, NULL);
+
+    for (i = 0; i < PATTERN_INPUTS_SHORT_COUNT; i++) {
+        for (j = 0; j < PATTERN_INPUTS_SHORT_COUNT; j++) {
+            do_msa_SUBS_U_D(b128_pattern[i], b128_pattern[j],
+                           b128_result[PATTERN_INPUTS_SHORT_COUNT * i + j]);
+        }
+    }
+
+    for (i = 0; i < RANDOM_INPUTS_SHORT_COUNT; i++) {
+        for (j = 0; j < RANDOM_INPUTS_SHORT_COUNT; j++) {
+            do_msa_SUBS_U_D(b128_random[i], b128_random[j],
+                           b128_result[((PATTERN_INPUTS_SHORT_COUNT) *
+                                        (PATTERN_INPUTS_SHORT_COUNT)) +
+                                       RANDOM_INPUTS_SHORT_COUNT * i + j]);
+        }
+    }
+
+    gettimeofday(&end, NULL);
+
+    elapsed_time = (end.tv_sec - start.tv_sec) * 1000.0;
+    elapsed_time += (end.tv_usec - start.tv_usec) / 1000.0;
+
+    ret = check_results(instruction_name, TEST_COUNT_TOTAL, elapsed_time,
+                        &b128_result[0][0], &b128_expect[0][0]);
+
+    return ret;
+}
diff --git a/tests/tcg/mips/user/ase/msa/int-subtract/test_msa_subs_u_h.c b/tests/tcg/mips/user/ase/msa/int-subtract/test_msa_subs_u_h.c
new file mode 100644
index 0000000..ca6dd38
--- /dev/null
+++ b/tests/tcg/mips/user/ase/msa/int-subtract/test_msa_subs_u_h.c
@@ -0,0 +1,151 @@
+/*
+ *  Test program for MSA instruction SUBS_U.H
+ *
+ *  Copyright (C) 2018  Wave Computing, Inc.
+ *  Copyright (C) 2018  Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
+ *
+ *  This program is free software: you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation, either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <sys/time.h>
+#include <stdint.h>
+
+#include "../../../../include/wrappers_msa.h"
+#include "../../../../include/test_inputs.h"
+#include "../../../../include/test_utils.h"
+
+#define TEST_COUNT_TOTAL (                                                \
+            (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
+            (RANDOM_INPUTS_SHORT_COUNT) * (RANDOM_INPUTS_SHORT_COUNT))
+
+
+int32_t main(void)
+{
+    char *instruction_name = "SUBS_U.H";
+    int32_t ret;
+    uint32_t i, j;
+    struct timeval start, end;
+    double elapsed_time;
+
+    uint64_t b128_result[TEST_COUNT_TOTAL][2];
+    uint64_t b128_expect[TEST_COUNT_TOTAL][2] = {
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*   0  */
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0x5555555555555555ULL, 0x5555555555555555ULL, },
+        { 0xaaaaaaaaaaaaaaaaULL, 0xaaaaaaaaaaaaaaaaULL, },
+        { 0x3333333333333333ULL, 0x3333333333333333ULL, },
+        { 0xccccccccccccccccULL, 0xccccccccccccccccULL, },
+        { 0x1c71c71c71c71c71ULL, 0xc71c71c71c71c71cULL, },
+        { 0xe38e38e38e38e38eULL, 0x38e38e38e38e38e3ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*   8  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*  16  */
+        { 0xaaaaaaaaaaaaaaaaULL, 0xaaaaaaaaaaaaaaaaULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x5555555555555555ULL, 0x5555555555555555ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x7777777777777777ULL, 0x7777777777777777ULL, },
+        { 0x000071c71c720000ULL, 0x71c71c72000071c7ULL, },
+        { 0x8e39000038e38e39ULL, 0x000038e38e390000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*  24  */
+        { 0x5555555555555555ULL, 0x5555555555555555ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x2222222222222222ULL, 0x2222222222222222ULL, },
+        { 0x00001c7200000000ULL, 0x1c72000000001c72ULL, },
+        { 0x38e40000000038e4ULL, 0x0000000038e40000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*  32  */
+        { 0xccccccccccccccccULL, 0xccccccccccccccccULL, },
+        { 0x2222222222222222ULL, 0x2222222222222222ULL, },
+        { 0x7777777777777777ULL, 0x7777777777777777ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x9999999999999999ULL, 0x9999999999999999ULL, },
+        { 0x000093e93e940000ULL, 0x93e93e94000093e9ULL, },
+        { 0xb05b05b05b05b05bULL, 0x05b05b05b05b05b0ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*  40  */
+        { 0x3333333333333333ULL, 0x3333333333333333ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x16c20000000016c2ULL, 0x0000000016c20000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*  48  */
+        { 0xe38e38e38e38e38eULL, 0x38e38e38e38e38e3ULL, },
+        { 0x38e40000000038e4ULL, 0x0000000038e40000ULL, },
+        { 0x8e39000038e38e39ULL, 0x000038e38e390000ULL, },
+        { 0x16c20000000016c2ULL, 0x0000000016c20000ULL, },
+        { 0xb05b05b05b05b05bULL, 0x05b05b05b05b05b0ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0xc71d00001c71c71dULL, 0x00001c71c71d0000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*  56  */
+        { 0x1c71c71c71c71c71ULL, 0xc71c71c71c71c71cULL, },
+        { 0x00001c7200000000ULL, 0x1c72000000001c72ULL, },
+        { 0x000071c71c720000ULL, 0x71c71c72000071c7ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x000093e93e940000ULL, 0x93e93e94000093e9ULL, },
+        { 0x00008e3900000000ULL, 0x8e39000000008e39ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*  64  */
+        { 0x0000e66900000000ULL, 0x38700000e93c5d10ULL, },
+        { 0x0000382200000000ULL, 0x238f000053508af8ULL, },
+        { 0x181bd07f00000000ULL, 0x0000000055390000ULL, },
+        { 0x73540000253171c8ULL, 0x0000afbc00000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x4f64000000003b88ULL, 0x0000000000002de8ULL, },
+        { 0x8b6f000000000000ULL, 0x0000324200000000ULL, },
+        { 0x23f00000916d3640ULL, 0x0000bba100000000ULL, },    /*  72  */
+        { 0x0000ae476c3c0000ULL, 0x14e10be595ec0000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x3c0b985d5b9e0000ULL, 0x00003e2701e90000ULL, },
+        { 0x0000000035cf8d0eULL, 0x428a7d7a00003294ULL, },
+        { 0x000015ea109e1b46ULL, 0x7afa000094038fa4ULL, },
+};
+
+    gettimeofday(&start, NULL);
+
+    for (i = 0; i < PATTERN_INPUTS_SHORT_COUNT; i++) {
+        for (j = 0; j < PATTERN_INPUTS_SHORT_COUNT; j++) {
+            do_msa_SUBS_U_H(b128_pattern[i], b128_pattern[j],
+                           b128_result[PATTERN_INPUTS_SHORT_COUNT * i + j]);
+        }
+    }
+
+    for (i = 0; i < RANDOM_INPUTS_SHORT_COUNT; i++) {
+        for (j = 0; j < RANDOM_INPUTS_SHORT_COUNT; j++) {
+            do_msa_SUBS_U_H(b128_random[i], b128_random[j],
+                           b128_result[((PATTERN_INPUTS_SHORT_COUNT) *
+                                        (PATTERN_INPUTS_SHORT_COUNT)) +
+                                       RANDOM_INPUTS_SHORT_COUNT * i + j]);
+        }
+    }
+
+    gettimeofday(&end, NULL);
+
+    elapsed_time = (end.tv_sec - start.tv_sec) * 1000.0;
+    elapsed_time += (end.tv_usec - start.tv_usec) / 1000.0;
+
+    ret = check_results(instruction_name, TEST_COUNT_TOTAL, elapsed_time,
+                        &b128_result[0][0], &b128_expect[0][0]);
+
+    return ret;
+}
diff --git a/tests/tcg/mips/user/ase/msa/int-subtract/test_msa_subs_u_w.c b/tests/tcg/mips/user/ase/msa/int-subtract/test_msa_subs_u_w.c
new file mode 100644
index 0000000..42ebddb
--- /dev/null
+++ b/tests/tcg/mips/user/ase/msa/int-subtract/test_msa_subs_u_w.c
@@ -0,0 +1,151 @@
+/*
+ *  Test program for MSA instruction SUBS_U.W
+ *
+ *  Copyright (C) 2018  Wave Computing, Inc.
+ *  Copyright (C) 2018  Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
+ *
+ *  This program is free software: you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation, either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <sys/time.h>
+#include <stdint.h>
+
+#include "../../../../include/wrappers_msa.h"
+#include "../../../../include/test_inputs.h"
+#include "../../../../include/test_utils.h"
+
+#define TEST_COUNT_TOTAL (                                                \
+            (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
+            (RANDOM_INPUTS_SHORT_COUNT) * (RANDOM_INPUTS_SHORT_COUNT))
+
+
+int32_t main(void)
+{
+    char *instruction_name = "SUBS_U.W";
+    int32_t ret;
+    uint32_t i, j;
+    struct timeval start, end;
+    double elapsed_time;
+
+    uint64_t b128_result[TEST_COUNT_TOTAL][2];
+    uint64_t b128_expect[TEST_COUNT_TOTAL][2] = {
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*   0  */
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0x5555555555555555ULL, 0x5555555555555555ULL, },
+        { 0xaaaaaaaaaaaaaaaaULL, 0xaaaaaaaaaaaaaaaaULL, },
+        { 0x3333333333333333ULL, 0x3333333333333333ULL, },
+        { 0xccccccccccccccccULL, 0xccccccccccccccccULL, },
+        { 0x1c71c71c71c71c71ULL, 0xc71c71c71c71c71cULL, },
+        { 0xe38e38e38e38e38eULL, 0x38e38e38e38e38e3ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*   8  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*  16  */
+        { 0xaaaaaaaaaaaaaaaaULL, 0xaaaaaaaaaaaaaaaaULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x5555555555555555ULL, 0x5555555555555555ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x7777777777777777ULL, 0x7777777777777777ULL, },
+        { 0x000000001c71c71cULL, 0x71c71c7200000000ULL, },
+        { 0x8e38e38e38e38e39ULL, 0x000000008e38e38eULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*  24  */
+        { 0x5555555555555555ULL, 0x5555555555555555ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x2222222222222222ULL, 0x2222222222222222ULL, },
+        { 0x0000000000000000ULL, 0x1c71c71d00000000ULL, },
+        { 0x38e38e3900000000ULL, 0x0000000038e38e39ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*  32  */
+        { 0xccccccccccccccccULL, 0xccccccccccccccccULL, },
+        { 0x2222222222222222ULL, 0x2222222222222222ULL, },
+        { 0x7777777777777777ULL, 0x7777777777777777ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x9999999999999999ULL, 0x9999999999999999ULL, },
+        { 0x000000003e93e93eULL, 0x93e93e9400000000ULL, },
+        { 0xb05b05b05b05b05bULL, 0x05b05b05b05b05b0ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*  40  */
+        { 0x3333333333333333ULL, 0x3333333333333333ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x16c16c1700000000ULL, 0x0000000016c16c17ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*  48  */
+        { 0xe38e38e38e38e38eULL, 0x38e38e38e38e38e3ULL, },
+        { 0x38e38e3900000000ULL, 0x0000000038e38e39ULL, },
+        { 0x8e38e38e38e38e39ULL, 0x000000008e38e38eULL, },
+        { 0x16c16c1700000000ULL, 0x0000000016c16c17ULL, },
+        { 0xb05b05b05b05b05bULL, 0x05b05b05b05b05b0ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0xc71c71c71c71c71dULL, 0x00000000c71c71c7ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*  56  */
+        { 0x1c71c71c71c71c71ULL, 0xc71c71c71c71c71cULL, },
+        { 0x0000000000000000ULL, 0x1c71c71d00000000ULL, },
+        { 0x000000001c71c71cULL, 0x71c71c7200000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x000000003e93e93eULL, 0x93e93e9400000000ULL, },
+        { 0x0000000000000000ULL, 0x8e38e38f00000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*  64  */
+        { 0x0000000000000000ULL, 0x386f5044e93c5d10ULL, },
+        { 0x0000000000000000ULL, 0x238e445f53508af8ULL, },
+        { 0x181bd07f00000000ULL, 0x000000005538cd6cULL, },
+        { 0x73531997253171c8ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x4f6351b900000000ULL, 0x0000000000000000ULL, },
+        { 0x8b6eea1600000000ULL, 0x0000000000000000ULL, },
+        { 0x23efc7de916d3640ULL, 0x0000000000000000ULL, },    /*  72  */
+        { 0x000000006c3bc478ULL, 0x14e10be595ebd218ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x3c0b985d5b9da932ULL, 0x0000000001e84274ULL, },
+        { 0x0000000035cf8d0eULL, 0x428a7d7a00000000ULL, },
+        { 0x00000000109e1b46ULL, 0x7af9cdbe94038fa4ULL, },
+};
+
+    gettimeofday(&start, NULL);
+
+    for (i = 0; i < PATTERN_INPUTS_SHORT_COUNT; i++) {
+        for (j = 0; j < PATTERN_INPUTS_SHORT_COUNT; j++) {
+            do_msa_SUBS_U_W(b128_pattern[i], b128_pattern[j],
+                           b128_result[PATTERN_INPUTS_SHORT_COUNT * i + j]);
+        }
+    }
+
+    for (i = 0; i < RANDOM_INPUTS_SHORT_COUNT; i++) {
+        for (j = 0; j < RANDOM_INPUTS_SHORT_COUNT; j++) {
+            do_msa_SUBS_U_W(b128_random[i], b128_random[j],
+                           b128_result[((PATTERN_INPUTS_SHORT_COUNT) *
+                                        (PATTERN_INPUTS_SHORT_COUNT)) +
+                                       RANDOM_INPUTS_SHORT_COUNT * i + j]);
+        }
+    }
+
+    gettimeofday(&end, NULL);
+
+    elapsed_time = (end.tv_sec - start.tv_sec) * 1000.0;
+    elapsed_time += (end.tv_usec - start.tv_usec) / 1000.0;
+
+    ret = check_results(instruction_name, TEST_COUNT_TOTAL, elapsed_time,
+                        &b128_result[0][0], &b128_expect[0][0]);
+
+    return ret;
+}
diff --git a/tests/tcg/mips/user/ase/msa/int-subtract/test_msa_subsus_u_b.c b/tests/tcg/mips/user/ase/msa/int-subtract/test_msa_subsus_u_b.c
new file mode 100644
index 0000000..dac20cc
--- /dev/null
+++ b/tests/tcg/mips/user/ase/msa/int-subtract/test_msa_subsus_u_b.c
@@ -0,0 +1,151 @@
+/*
+ *  Test program for MSA instruction SUBSUS_U.B
+ *
+ *  Copyright (C) 2018  Wave Computing, Inc.
+ *  Copyright (C) 2018  Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
+ *
+ *  This program is free software: you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation, either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <sys/time.h>
+#include <stdint.h>
+
+#include "../../../../include/wrappers_msa.h"
+#include "../../../../include/test_inputs.h"
+#include "../../../../include/test_utils.h"
+
+#define TEST_COUNT_TOTAL (                                                \
+            (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
+            (RANDOM_INPUTS_SHORT_COUNT) * (RANDOM_INPUTS_SHORT_COUNT))
+
+
+int32_t main(void)
+{
+    char *instruction_name = "SUBSUS_U.B";
+    int32_t ret;
+    uint32_t i, j;
+    struct timeval start, end;
+    double elapsed_time;
+
+    uint64_t b128_result[TEST_COUNT_TOTAL][2];
+    uint64_t b128_expect[TEST_COUNT_TOTAL][2] = {
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },    /*   0  */
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0xaaaaaaaaaaaaaaaaULL, 0xaaaaaaaaaaaaaaaaULL, },
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0xccccccccccccccccULL, 0xccccccccccccccccULL, },
+        { 0xffffc7ffffc7ffffULL, 0xc7ffffc7ffffc7ffULL, },
+        { 0xe38effe38effe38eULL, 0xffe38effe38effe3ULL, },
+        { 0x0101010101010101ULL, 0x0101010101010101ULL, },    /*   8  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x5656565656565656ULL, 0x5656565656565656ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x3434343434343434ULL, 0x3434343434343434ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x1d72001d72001d72ULL, 0x001d72001d72001dULL, },
+        { 0x0000390000390000ULL, 0x3900003900003900ULL, },
+        { 0xababababababababULL, 0xababababababababULL, },    /*  16  */
+        { 0xaaaaaaaaaaaaaaaaULL, 0xaaaaaaaaaaaaaaaaULL, },
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0x5555555555555555ULL, 0x5555555555555555ULL, },
+        { 0xdedededededededeULL, 0xdedededededededeULL, },
+        { 0x7777777777777777ULL, 0x7777777777777777ULL, },
+        { 0xc7ff72c7ff72c7ffULL, 0x72c7ff72c7ff72c7ULL, },
+        { 0x8e39e38e39e38e39ULL, 0xe38e39e38e39e38eULL, },
+        { 0x5656565656565656ULL, 0x5656565656565656ULL, },    /*  24  */
+        { 0x5555555555555555ULL, 0x5555555555555555ULL, },
+        { 0xababababababababULL, 0xababababababababULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x8989898989898989ULL, 0x8989898989898989ULL, },
+        { 0x2222222222222222ULL, 0x2222222222222222ULL, },
+        { 0x72c71d72c71d72c7ULL, 0x1d72c71d72c71d72ULL, },
+        { 0x39008e39008e3900ULL, 0x8e39008e39008e39ULL, },
+        { 0xcdcdcdcdcdcdcdcdULL, 0xcdcdcdcdcdcdcdcdULL, },    /*  32  */
+        { 0xccccccccccccccccULL, 0xccccccccccccccccULL, },
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0x7777777777777777ULL, 0x7777777777777777ULL, },
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0x9999999999999999ULL, 0x9999999999999999ULL, },
+        { 0xe9ff94e9ff94e9ffULL, 0x94e9ff94e9ff94e9ULL, },
+        { 0xb05bffb05bffb05bULL, 0xffb05bffb05bffb0ULL, },
+        { 0x3434343434343434ULL, 0x3434343434343434ULL, },    /*  40  */
+        { 0x3333333333333333ULL, 0x3333333333333333ULL, },
+        { 0x8989898989898989ULL, 0x8989898989898989ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x6767676767676767ULL, 0x6767676767676767ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x50a50050a50050a5ULL, 0x0050a50050a50050ULL, },
+        { 0x17006c17006c1700ULL, 0x6c17006c17006c17ULL, },
+        { 0xe48f39e48f39e48fULL, 0x39e48f39e48f39e4ULL, },    /*  48  */
+        { 0xe38e38e38e38e38eULL, 0x38e38e38e38e38e3ULL, },
+        { 0xffe48effe48effe4ULL, 0x8effe48effe48effULL, },
+        { 0x8e39008e39008e39ULL, 0x008e39008e39008eULL, },
+        { 0xffc26cffc26cffc2ULL, 0x6cffc26cffc26cffULL, },
+        { 0xb05b05b05b05b05bULL, 0x05b05b05b05b05b0ULL, },
+        { 0xffff00ffff00ffffULL, 0x00ffff00ffff00ffULL, },
+        { 0xc71d71c71d71c71dULL, 0x71c71d71c71d71c7ULL, },
+        { 0x1d72c81d72c81d72ULL, 0xc81d72c81d72c81dULL, },    /*  56  */
+        { 0x1c71c71c71c71c71ULL, 0xc71c71c71c71c71cULL, },
+        { 0x72c7ff72c7ff72c7ULL, 0xff72c7ff72c7ff72ULL, },
+        { 0x001c72001c72001cULL, 0x72001c72001c7200ULL, },
+        { 0x50a5fb50a5fb50a5ULL, 0xfb50a5fb50a5fb50ULL, },
+        { 0x003e94003e94003eULL, 0x94003e94003e9400ULL, },
+        { 0x39e38f39e38f39e3ULL, 0x8f39e38f39e38f39ULL, },
+        { 0x0000ff0000ff0000ULL, 0xff0000ff0000ff00ULL, },
+        { 0xff00ffff00000000ULL, 0x00000000ff00ff00ULL, },    /*  64  */
+        { 0x8dace66900cf8e38ULL, 0x39705044e93c5e10ULL, },
+        { 0xdc10ffff6f93cac0ULL, 0x248f455fff508b00ULL, },
+        { 0x181bd07f00317300ULL, 0xbe768386ff39ce6cULL, },
+        { 0xff541a9725317200ULL, 0x0090b0001700a2f0ULL, },
+        { 0xffff000000ffff00ULL, 0x00ffff00000000ffULL, },
+        { 0xff6452b994c4ff88ULL, 0x00fff51b6a142de8ULL, },
+        { 0x8b6f00160062e500ULL, 0x85ffff426c0070ffULL, },
+        { 0xff00c8de916d3640ULL, 0x0071bba1ad007508ULL, },    /*  72  */
+        { 0xb19cae476cffc478ULL, 0x15e1ffe596000018ULL, },
+        { 0xff00ffffffffffffULL, 0x00ffffffff000000ULL, },
+        { 0x3c0b985d5b9ea932ULL, 0x9ae7ffffff004374ULL, },
+        { 0xe800308136008d0eULL, 0x428a7d7aab00ff94ULL, },
+        { 0x75911600119eff46ULL, 0x7bfacdbe940390a4ULL, },
+};
+
+    gettimeofday(&start, NULL);
+
+    for (i = 0; i < PATTERN_INPUTS_SHORT_COUNT; i++) {
+        for (j = 0; j < PATTERN_INPUTS_SHORT_COUNT; j++) {
+            do_msa_SUBSUS_U_B(b128_pattern[i], b128_pattern[j],
+                           b128_result[PATTERN_INPUTS_SHORT_COUNT * i + j]);
+        }
+    }
+
+    for (i = 0; i < RANDOM_INPUTS_SHORT_COUNT; i++) {
+        for (j = 0; j < RANDOM_INPUTS_SHORT_COUNT; j++) {
+            do_msa_SUBSUS_U_B(b128_random[i], b128_random[j],
+                           b128_result[((PATTERN_INPUTS_SHORT_COUNT) *
+                                        (PATTERN_INPUTS_SHORT_COUNT)) +
+                                       RANDOM_INPUTS_SHORT_COUNT * i + j]);
+        }
+    }
+
+    gettimeofday(&end, NULL);
+
+    elapsed_time = (end.tv_sec - start.tv_sec) * 1000.0;
+    elapsed_time += (end.tv_usec - start.tv_usec) / 1000.0;
+
+    ret = check_results(instruction_name, TEST_COUNT_TOTAL, elapsed_time,
+                        &b128_result[0][0], &b128_expect[0][0]);
+
+    return ret;
+}
diff --git a/tests/tcg/mips/user/ase/msa/int-subtract/test_msa_subsus_u_d.c b/tests/tcg/mips/user/ase/msa/int-subtract/test_msa_subsus_u_d.c
new file mode 100644
index 0000000..4485502
--- /dev/null
+++ b/tests/tcg/mips/user/ase/msa/int-subtract/test_msa_subsus_u_d.c
@@ -0,0 +1,151 @@
+/*
+ *  Test program for MSA instruction SUBSUS_U.D
+ *
+ *  Copyright (C) 2018  Wave Computing, Inc.
+ *  Copyright (C) 2018  Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
+ *
+ *  This program is free software: you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation, either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <sys/time.h>
+#include <stdint.h>
+
+#include "../../../../include/wrappers_msa.h"
+#include "../../../../include/test_inputs.h"
+#include "../../../../include/test_utils.h"
+
+#define TEST_COUNT_TOTAL (                                                \
+            (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
+            (RANDOM_INPUTS_SHORT_COUNT) * (RANDOM_INPUTS_SHORT_COUNT))
+
+
+int32_t main(void)
+{
+    char *instruction_name = "SUBSUS_U.D";
+    int32_t ret;
+    uint32_t i, j;
+    struct timeval start, end;
+    double elapsed_time;
+
+    uint64_t b128_result[TEST_COUNT_TOTAL][2];
+    uint64_t b128_expect[TEST_COUNT_TOTAL][2] = {
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },    /*   0  */
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0xaaaaaaaaaaaaaaaaULL, 0xaaaaaaaaaaaaaaaaULL, },
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0xccccccccccccccccULL, 0xccccccccccccccccULL, },
+        { 0xffffffffffffffffULL, 0xc71c71c71c71c71cULL, },
+        { 0xe38e38e38e38e38eULL, 0xffffffffffffffffULL, },
+        { 0x0000000000000001ULL, 0x0000000000000001ULL, },    /*   8  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x5555555555555556ULL, 0x5555555555555556ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x3333333333333334ULL, 0x3333333333333334ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x1c71c71c71c71c72ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x38e38e38e38e38e4ULL, },
+        { 0xaaaaaaaaaaaaaaabULL, 0xaaaaaaaaaaaaaaabULL, },    /*  16  */
+        { 0xaaaaaaaaaaaaaaaaULL, 0xaaaaaaaaaaaaaaaaULL, },
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0x5555555555555555ULL, 0x5555555555555555ULL, },
+        { 0xdddddddddddddddeULL, 0xdddddddddddddddeULL, },
+        { 0x7777777777777777ULL, 0x7777777777777777ULL, },
+        { 0xc71c71c71c71c71cULL, 0x71c71c71c71c71c7ULL, },
+        { 0x8e38e38e38e38e39ULL, 0xe38e38e38e38e38eULL, },
+        { 0x5555555555555556ULL, 0x5555555555555556ULL, },    /*  24  */
+        { 0x5555555555555555ULL, 0x5555555555555555ULL, },
+        { 0xaaaaaaaaaaaaaaabULL, 0xaaaaaaaaaaaaaaabULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x8888888888888889ULL, 0x8888888888888889ULL, },
+        { 0x2222222222222222ULL, 0x2222222222222222ULL, },
+        { 0x71c71c71c71c71c7ULL, 0x1c71c71c71c71c72ULL, },
+        { 0x38e38e38e38e38e4ULL, 0x8e38e38e38e38e39ULL, },
+        { 0xcccccccccccccccdULL, 0xcccccccccccccccdULL, },    /*  32  */
+        { 0xccccccccccccccccULL, 0xccccccccccccccccULL, },
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0x7777777777777777ULL, 0x7777777777777777ULL, },
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0x9999999999999999ULL, 0x9999999999999999ULL, },
+        { 0xe93e93e93e93e93eULL, 0x93e93e93e93e93e9ULL, },
+        { 0xb05b05b05b05b05bULL, 0xffffffffffffffffULL, },
+        { 0x3333333333333334ULL, 0x3333333333333334ULL, },    /*  40  */
+        { 0x3333333333333333ULL, 0x3333333333333333ULL, },
+        { 0x8888888888888889ULL, 0x8888888888888889ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x6666666666666667ULL, 0x6666666666666667ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x4fa4fa4fa4fa4fa5ULL, 0x0000000000000000ULL, },
+        { 0x16c16c16c16c16c2ULL, 0x6c16c16c16c16c17ULL, },
+        { 0xe38e38e38e38e38fULL, 0x38e38e38e38e38e4ULL, },    /*  48  */
+        { 0xe38e38e38e38e38eULL, 0x38e38e38e38e38e3ULL, },
+        { 0xffffffffffffffffULL, 0x8e38e38e38e38e39ULL, },
+        { 0x8e38e38e38e38e39ULL, 0x0000000000000000ULL, },
+        { 0xffffffffffffffffULL, 0x6c16c16c16c16c17ULL, },
+        { 0xb05b05b05b05b05bULL, 0x05b05b05b05b05b0ULL, },
+        { 0xffffffffffffffffULL, 0x0000000000000000ULL, },
+        { 0xc71c71c71c71c71dULL, 0x71c71c71c71c71c7ULL, },
+        { 0x1c71c71c71c71c72ULL, 0xc71c71c71c71c71dULL, },    /*  56  */
+        { 0x1c71c71c71c71c71ULL, 0xc71c71c71c71c71cULL, },
+        { 0x71c71c71c71c71c7ULL, 0xffffffffffffffffULL, },
+        { 0x0000000000000000ULL, 0x71c71c71c71c71c7ULL, },
+        { 0x4fa4fa4fa4fa4fa5ULL, 0xfa4fa4fa4fa4fa50ULL, },
+        { 0x0000000000000000ULL, 0x93e93e93e93e93e9ULL, },
+        { 0x38e38e38e38e38e3ULL, 0x8e38e38e38e38e39ULL, },
+        { 0x0000000000000000ULL, 0xffffffffffffffffULL, },
+        { 0xffffffffffffffffULL, 0x0000000000000000ULL, },    /*  64  */
+        { 0x8cace668dace8e38ULL, 0x386f5044e93c5d10ULL, },
+        { 0xdc1038216e92c9c0ULL, 0x238e445f53508af8ULL, },
+        { 0x181bd07eca3072f2ULL, 0xbd7582865538cd6cULL, },
+        { 0xffffffffffffffffULL, 0x0000000000000000ULL, },
+        { 0xffffffffffffffffULL, 0x0000000000000000ULL, },
+        { 0xffffffffffffffffULL, 0x0000000000000000ULL, },
+        { 0x8b6eea15ef61e4baULL, 0x850632416bfc705cULL, },
+        { 0xffffffffffffffffULL, 0x0000000000000000ULL, },    /*  72  */
+        { 0xb09cae476c3bc478ULL, 0x14e10be595ebd218ULL, },
+        { 0xffffffffffffffffULL, 0x0000000000000000ULL, },
+        { 0x3c0b985d5b9da932ULL, 0x99e73e2701e84274ULL, },
+        { 0xe7e42f8135cf8d0eULL, 0x428a7d79aac73294ULL, },
+        { 0x749115ea109e1b46ULL, 0x7af9cdbe94038fa4ULL, },
+};
+
+    gettimeofday(&start, NULL);
+
+    for (i = 0; i < PATTERN_INPUTS_SHORT_COUNT; i++) {
+        for (j = 0; j < PATTERN_INPUTS_SHORT_COUNT; j++) {
+            do_msa_SUBSUS_U_D(b128_pattern[i], b128_pattern[j],
+                           b128_result[PATTERN_INPUTS_SHORT_COUNT * i + j]);
+        }
+    }
+
+    for (i = 0; i < RANDOM_INPUTS_SHORT_COUNT; i++) {
+        for (j = 0; j < RANDOM_INPUTS_SHORT_COUNT; j++) {
+            do_msa_SUBSUS_U_D(b128_random[i], b128_random[j],
+                           b128_result[((PATTERN_INPUTS_SHORT_COUNT) *
+                                        (PATTERN_INPUTS_SHORT_COUNT)) +
+                                       RANDOM_INPUTS_SHORT_COUNT * i + j]);
+        }
+    }
+
+    gettimeofday(&end, NULL);
+
+    elapsed_time = (end.tv_sec - start.tv_sec) * 1000.0;
+    elapsed_time += (end.tv_usec - start.tv_usec) / 1000.0;
+
+    ret = check_results(instruction_name, TEST_COUNT_TOTAL, elapsed_time,
+                        &b128_result[0][0], &b128_expect[0][0]);
+
+    return ret;
+}
diff --git a/tests/tcg/mips/user/ase/msa/int-subtract/test_msa_subsus_u_h.c b/tests/tcg/mips/user/ase/msa/int-subtract/test_msa_subsus_u_h.c
new file mode 100644
index 0000000..9e99aee
--- /dev/null
+++ b/tests/tcg/mips/user/ase/msa/int-subtract/test_msa_subsus_u_h.c
@@ -0,0 +1,151 @@
+/*
+ *  Test program for MSA instruction SUBSUS_U.H
+ *
+ *  Copyright (C) 2018  Wave Computing, Inc.
+ *  Copyright (C) 2018  Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
+ *
+ *  This program is free software: you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation, either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <sys/time.h>
+#include <stdint.h>
+
+#include "../../../../include/wrappers_msa.h"
+#include "../../../../include/test_inputs.h"
+#include "../../../../include/test_utils.h"
+
+#define TEST_COUNT_TOTAL (                                                \
+            (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
+            (RANDOM_INPUTS_SHORT_COUNT) * (RANDOM_INPUTS_SHORT_COUNT))
+
+
+int32_t main(void)
+{
+    char *instruction_name = "SUBSUS_U.H";
+    int32_t ret;
+    uint32_t i, j;
+    struct timeval start, end;
+    double elapsed_time;
+
+    uint64_t b128_result[TEST_COUNT_TOTAL][2];
+    uint64_t b128_expect[TEST_COUNT_TOTAL][2] = {
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },    /*   0  */
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0xaaaaaaaaaaaaaaaaULL, 0xaaaaaaaaaaaaaaaaULL, },
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0xccccccccccccccccULL, 0xccccccccccccccccULL, },
+        { 0xffffc71cffffffffULL, 0xc71cffffffffc71cULL, },
+        { 0xe38effff8e38e38eULL, 0xffff8e38e38effffULL, },
+        { 0x0001000100010001ULL, 0x0001000100010001ULL, },    /*   8  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x5556555655565556ULL, 0x5556555655565556ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x3334333433343334ULL, 0x3334333433343334ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x1c72000071c81c72ULL, 0x000071c81c720000ULL, },
+        { 0x000038e400000000ULL, 0x38e40000000038e4ULL, },
+        { 0xaaabaaabaaabaaabULL, 0xaaabaaabaaabaaabULL, },    /*  16  */
+        { 0xaaaaaaaaaaaaaaaaULL, 0xaaaaaaaaaaaaaaaaULL, },
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0x5555555555555555ULL, 0x5555555555555555ULL, },
+        { 0xdddedddedddedddeULL, 0xdddedddedddedddeULL, },
+        { 0x7777777777777777ULL, 0x7777777777777777ULL, },
+        { 0xc71c71c7ffffc71cULL, 0x71c7ffffc71c71c7ULL, },
+        { 0x8e39e38e38e38e39ULL, 0xe38e38e38e39e38eULL, },
+        { 0x5556555655565556ULL, 0x5556555655565556ULL, },    /*  24  */
+        { 0x5555555555555555ULL, 0x5555555555555555ULL, },
+        { 0xaaabaaabaaabaaabULL, 0xaaabaaabaaabaaabULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x8889888988898889ULL, 0x8889888988898889ULL, },
+        { 0x2222222222222222ULL, 0x2222222222222222ULL, },
+        { 0x71c71c72c71d71c7ULL, 0x1c72c71d71c71c72ULL, },
+        { 0x38e48e39000038e4ULL, 0x8e39000038e48e39ULL, },
+        { 0xcccdcccdcccdcccdULL, 0xcccdcccdcccdcccdULL, },    /*  32  */
+        { 0xccccccccccccccccULL, 0xccccccccccccccccULL, },
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0x7777777777777777ULL, 0x7777777777777777ULL, },
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0x9999999999999999ULL, 0x9999999999999999ULL, },
+        { 0xe93e93e9ffffe93eULL, 0x93e9ffffe93e93e9ULL, },
+        { 0xb05bffff5b05b05bULL, 0xffff5b05b05bffffULL, },
+        { 0x3334333433343334ULL, 0x3334333433343334ULL, },    /*  40  */
+        { 0x3333333333333333ULL, 0x3333333333333333ULL, },
+        { 0x8889888988898889ULL, 0x8889888988898889ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x6667666766676667ULL, 0x6667666766676667ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x4fa50000a4fb4fa5ULL, 0x0000a4fb4fa50000ULL, },
+        { 0x16c26c17000016c2ULL, 0x6c17000016c26c17ULL, },
+        { 0xe38f38e48e39e38fULL, 0x38e48e39e38f38e4ULL, },    /*  48  */
+        { 0xe38e38e38e38e38eULL, 0x38e38e38e38e38e3ULL, },
+        { 0xffff8e39e38effffULL, 0x8e39e38effff8e39ULL, },
+        { 0x8e39000038e38e39ULL, 0x000038e38e390000ULL, },
+        { 0xffff6c17c16cffffULL, 0x6c17c16cffff6c17ULL, },
+        { 0xb05b05b05b05b05bULL, 0x05b05b05b05b05b0ULL, },
+        { 0xffff0000ffffffffULL, 0x0000ffffffff0000ULL, },
+        { 0xc71d71c71c71c71dULL, 0x71c71c71c71d71c7ULL, },
+        { 0x1c72c71d71c81c72ULL, 0xc71d71c81c72c71dULL, },    /*  56  */
+        { 0x1c71c71c71c71c71ULL, 0xc71c71c71c71c71cULL, },
+        { 0x71c7ffffc71d71c7ULL, 0xffffc71d71c7ffffULL, },
+        { 0x000071c71c720000ULL, 0x71c71c72000071c7ULL, },
+        { 0x4fa5fa50a4fb4fa5ULL, 0xfa50a4fb4fa5fa50ULL, },
+        { 0x000093e93e940000ULL, 0x93e93e94000093e9ULL, },
+        { 0x38e38e39e38f38e3ULL, 0x8e39e38f38e38e39ULL, },
+        { 0x0000ffff00000000ULL, 0xffff00000000ffffULL, },
+        { 0xffffffff00000000ULL, 0x00000000ffffffffULL, },    /*  64  */
+        { 0x8cace66900008e38ULL, 0x38705044e93c5d10ULL, },
+        { 0xdc10ffff6e93c9c0ULL, 0x238f445fffff8af8ULL, },
+        { 0x181bd07f000072f2ULL, 0xbd768286ffffcd6cULL, },
+        { 0xffff1997253171c8ULL, 0x0000afbc16c4a2f0ULL, },
+        { 0xffff00000000ffffULL, 0x0000ffff00000000ULL, },
+        { 0xffff51b993c4ffffULL, 0x0000f41b6a142de8ULL, },
+        { 0x8b6f00000000e4baULL, 0x8506ffff6bfd705cULL, },
+        { 0xffffc7de916d3640ULL, 0x0000bba1acb07508ULL, },    /*  72  */
+        { 0xb09cae476c3cc478ULL, 0x14e1ffff95ec0000ULL, },
+        { 0xffffffffffffffffULL, 0x0000ffffffff0000ULL, },
+        { 0x3c0b985d5b9ea932ULL, 0x99e7ffffffff4274ULL, },
+        { 0xe7e52f8135cf8d0eULL, 0x428a7d7aaac7ffffULL, },
+        { 0x749115ea109effffULL, 0x7afacdbe94038fa4ULL, },
+};
+
+    gettimeofday(&start, NULL);
+
+    for (i = 0; i < PATTERN_INPUTS_SHORT_COUNT; i++) {
+        for (j = 0; j < PATTERN_INPUTS_SHORT_COUNT; j++) {
+            do_msa_SUBSUS_U_H(b128_pattern[i], b128_pattern[j],
+                           b128_result[PATTERN_INPUTS_SHORT_COUNT * i + j]);
+        }
+    }
+
+    for (i = 0; i < RANDOM_INPUTS_SHORT_COUNT; i++) {
+        for (j = 0; j < RANDOM_INPUTS_SHORT_COUNT; j++) {
+            do_msa_SUBSUS_U_H(b128_random[i], b128_random[j],
+                           b128_result[((PATTERN_INPUTS_SHORT_COUNT) *
+                                        (PATTERN_INPUTS_SHORT_COUNT)) +
+                                       RANDOM_INPUTS_SHORT_COUNT * i + j]);
+        }
+    }
+
+    gettimeofday(&end, NULL);
+
+    elapsed_time = (end.tv_sec - start.tv_sec) * 1000.0;
+    elapsed_time += (end.tv_usec - start.tv_usec) / 1000.0;
+
+    ret = check_results(instruction_name, TEST_COUNT_TOTAL, elapsed_time,
+                        &b128_result[0][0], &b128_expect[0][0]);
+
+    return ret;
+}
diff --git a/tests/tcg/mips/user/ase/msa/int-subtract/test_msa_subsus_u_w.c b/tests/tcg/mips/user/ase/msa/int-subtract/test_msa_subsus_u_w.c
new file mode 100644
index 0000000..53a9aca
--- /dev/null
+++ b/tests/tcg/mips/user/ase/msa/int-subtract/test_msa_subsus_u_w.c
@@ -0,0 +1,151 @@
+/*
+ *  Test program for MSA instruction SUBSUS_U.W
+ *
+ *  Copyright (C) 2018  Wave Computing, Inc.
+ *  Copyright (C) 2018  Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
+ *
+ *  This program is free software: you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation, either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <sys/time.h>
+#include <stdint.h>
+
+#include "../../../../include/wrappers_msa.h"
+#include "../../../../include/test_inputs.h"
+#include "../../../../include/test_utils.h"
+
+#define TEST_COUNT_TOTAL (                                                \
+            (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
+            (RANDOM_INPUTS_SHORT_COUNT) * (RANDOM_INPUTS_SHORT_COUNT))
+
+
+int32_t main(void)
+{
+    char *instruction_name = "SUBSUS_U.W";
+    int32_t ret;
+    uint32_t i, j;
+    struct timeval start, end;
+    double elapsed_time;
+
+    uint64_t b128_result[TEST_COUNT_TOTAL][2];
+    uint64_t b128_expect[TEST_COUNT_TOTAL][2] = {
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },    /*   0  */
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0xaaaaaaaaaaaaaaaaULL, 0xaaaaaaaaaaaaaaaaULL, },
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0xccccccccccccccccULL, 0xccccccccccccccccULL, },
+        { 0xffffffffffffffffULL, 0xc71c71c7ffffffffULL, },
+        { 0xe38e38e38e38e38eULL, 0xffffffffe38e38e3ULL, },
+        { 0x0000000100000001ULL, 0x0000000100000001ULL, },    /*   8  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x5555555655555556ULL, 0x5555555655555556ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x3333333433333334ULL, 0x3333333433333334ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x1c71c71d71c71c72ULL, 0x000000001c71c71dULL, },
+        { 0x0000000000000000ULL, 0x38e38e3900000000ULL, },
+        { 0xaaaaaaabaaaaaaabULL, 0xaaaaaaabaaaaaaabULL, },    /*  16  */
+        { 0xaaaaaaaaaaaaaaaaULL, 0xaaaaaaaaaaaaaaaaULL, },
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0x5555555555555555ULL, 0x5555555555555555ULL, },
+        { 0xdddddddedddddddeULL, 0xdddddddedddddddeULL, },
+        { 0x7777777777777777ULL, 0x7777777777777777ULL, },
+        { 0xc71c71c7ffffffffULL, 0x71c71c72c71c71c7ULL, },
+        { 0x8e38e38e38e38e39ULL, 0xe38e38e38e38e38eULL, },
+        { 0x5555555655555556ULL, 0x5555555655555556ULL, },    /*  24  */
+        { 0x5555555555555555ULL, 0x5555555555555555ULL, },
+        { 0xaaaaaaabaaaaaaabULL, 0xaaaaaaabaaaaaaabULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x8888888988888889ULL, 0x8888888988888889ULL, },
+        { 0x2222222222222222ULL, 0x2222222222222222ULL, },
+        { 0x71c71c72c71c71c7ULL, 0x1c71c71d71c71c72ULL, },
+        { 0x38e38e3900000000ULL, 0x8e38e38e38e38e39ULL, },
+        { 0xcccccccdcccccccdULL, 0xcccccccdcccccccdULL, },    /*  32  */
+        { 0xccccccccccccccccULL, 0xccccccccccccccccULL, },
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0x7777777777777777ULL, 0x7777777777777777ULL, },
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0x9999999999999999ULL, 0x9999999999999999ULL, },
+        { 0xe93e93e9ffffffffULL, 0x93e93e94e93e93e9ULL, },
+        { 0xb05b05b05b05b05bULL, 0xffffffffb05b05b0ULL, },
+        { 0x3333333433333334ULL, 0x3333333433333334ULL, },    /*  40  */
+        { 0x3333333333333333ULL, 0x3333333333333333ULL, },
+        { 0x8888888988888889ULL, 0x8888888988888889ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x6666666766666667ULL, 0x6666666766666667ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x4fa4fa50a4fa4fa5ULL, 0x000000004fa4fa50ULL, },
+        { 0x16c16c1700000000ULL, 0x6c16c16c16c16c17ULL, },
+        { 0xe38e38e48e38e38fULL, 0x38e38e39e38e38e4ULL, },    /*  48  */
+        { 0xe38e38e38e38e38eULL, 0x38e38e38e38e38e3ULL, },
+        { 0xffffffffe38e38e4ULL, 0x8e38e38effffffffULL, },
+        { 0x8e38e38e38e38e39ULL, 0x000000008e38e38eULL, },
+        { 0xffffffffc16c16c2ULL, 0x6c16c16cffffffffULL, },
+        { 0xb05b05b05b05b05bULL, 0x05b05b05b05b05b0ULL, },
+        { 0xffffffffffffffffULL, 0x00000000ffffffffULL, },
+        { 0xc71c71c71c71c71dULL, 0x71c71c71c71c71c7ULL, },
+        { 0x1c71c71d71c71c72ULL, 0xc71c71c81c71c71dULL, },    /*  56  */
+        { 0x1c71c71c71c71c71ULL, 0xc71c71c71c71c71cULL, },
+        { 0x71c71c72c71c71c7ULL, 0xffffffff71c71c72ULL, },
+        { 0x000000001c71c71cULL, 0x71c71c7200000000ULL, },
+        { 0x4fa4fa50a4fa4fa5ULL, 0xfa4fa4fb4fa4fa50ULL, },
+        { 0x000000003e93e93eULL, 0x93e93e9400000000ULL, },
+        { 0x38e38e39e38e38e3ULL, 0x8e38e38f38e38e39ULL, },
+        { 0x0000000000000000ULL, 0xffffffff00000000ULL, },
+        { 0xffffffff00000000ULL, 0x00000000ffffffffULL, },    /*  64  */
+        { 0x8cace66900000000ULL, 0x386f5044e93c5d10ULL, },
+        { 0xdc1038226e92c9c0ULL, 0x238e445fffffffffULL, },
+        { 0x181bd07f00000000ULL, 0xbd758286ffffffffULL, },
+        { 0xffffffff253171c8ULL, 0x0000000016c3a2f0ULL, },
+        { 0xffffffff00000000ULL, 0x0000000000000000ULL, },
+        { 0xffffffff93c43b88ULL, 0x000000006a142de8ULL, },
+        { 0x8b6eea1600000000ULL, 0x850632426bfc705cULL, },
+        { 0xffffffff916d3640ULL, 0x00000000acaf7508ULL, },    /*  72  */
+        { 0xb09cae476c3bc478ULL, 0x14e10be595ebd218ULL, },
+        { 0xffffffffffffffffULL, 0x00000000ffffffffULL, },
+        { 0x3c0b985d5b9da932ULL, 0x99e73e27ffffffffULL, },
+        { 0xe7e42f8135cf8d0eULL, 0x428a7d7aaac73294ULL, },
+        { 0x749115ea109e1b46ULL, 0x7af9cdbe94038fa4ULL, },
+};
+
+    gettimeofday(&start, NULL);
+
+    for (i = 0; i < PATTERN_INPUTS_SHORT_COUNT; i++) {
+        for (j = 0; j < PATTERN_INPUTS_SHORT_COUNT; j++) {
+            do_msa_SUBSUS_U_W(b128_pattern[i], b128_pattern[j],
+                           b128_result[PATTERN_INPUTS_SHORT_COUNT * i + j]);
+        }
+    }
+
+    for (i = 0; i < RANDOM_INPUTS_SHORT_COUNT; i++) {
+        for (j = 0; j < RANDOM_INPUTS_SHORT_COUNT; j++) {
+            do_msa_SUBSUS_U_W(b128_random[i], b128_random[j],
+                           b128_result[((PATTERN_INPUTS_SHORT_COUNT) *
+                                        (PATTERN_INPUTS_SHORT_COUNT)) +
+                                       RANDOM_INPUTS_SHORT_COUNT * i + j]);
+        }
+    }
+
+    gettimeofday(&end, NULL);
+
+    elapsed_time = (end.tv_sec - start.tv_sec) * 1000.0;
+    elapsed_time += (end.tv_usec - start.tv_usec) / 1000.0;
+
+    ret = check_results(instruction_name, TEST_COUNT_TOTAL, elapsed_time,
+                        &b128_result[0][0], &b128_expect[0][0]);
+
+    return ret;
+}
diff --git a/tests/tcg/mips/user/ase/msa/int-subtract/test_msa_subsuu_s_b.c b/tests/tcg/mips/user/ase/msa/int-subtract/test_msa_subsuu_s_b.c
new file mode 100644
index 0000000..86fb4f3
--- /dev/null
+++ b/tests/tcg/mips/user/ase/msa/int-subtract/test_msa_subsuu_s_b.c
@@ -0,0 +1,151 @@
+/*
+ *  Test program for MSA instruction SUBSUU_S.B
+ *
+ *  Copyright (C) 2018  Wave Computing, Inc.
+ *  Copyright (C) 2018  Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
+ *
+ *  This program is free software: you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation, either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <sys/time.h>
+#include <stdint.h>
+
+#include "../../../../include/wrappers_msa.h"
+#include "../../../../include/test_inputs.h"
+#include "../../../../include/test_utils.h"
+
+#define TEST_COUNT_TOTAL (                                                \
+            (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
+            (RANDOM_INPUTS_SHORT_COUNT) * (RANDOM_INPUTS_SHORT_COUNT))
+
+
+int32_t main(void)
+{
+    char *instruction_name = "SUBSUU_S.B";
+    int32_t ret;
+    uint32_t i, j;
+    struct timeval start, end;
+    double elapsed_time;
+
+    uint64_t b128_result[TEST_COUNT_TOTAL][2];
+    uint64_t b128_expect[TEST_COUNT_TOTAL][2] = {
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*   0  */
+        { 0x7f7f7f7f7f7f7f7fULL, 0x7f7f7f7f7f7f7f7fULL, },
+        { 0x5555555555555555ULL, 0x5555555555555555ULL, },
+        { 0x7f7f7f7f7f7f7f7fULL, 0x7f7f7f7f7f7f7f7fULL, },
+        { 0x3333333333333333ULL, 0x3333333333333333ULL, },
+        { 0x7f7f7f7f7f7f7f7fULL, 0x7f7f7f7f7f7f7f7fULL, },
+        { 0x1c717f1c717f1c71ULL, 0x7f1c717f1c717f1cULL, },
+        { 0x7f7f387f7f387f7fULL, 0x387f7f387f7f387fULL, },
+        { 0x8080808080808080ULL, 0x8080808080808080ULL, },    /*   8  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x8080808080808080ULL, 0x8080808080808080ULL, },
+        { 0xababababababababULL, 0xababababababababULL, },
+        { 0x8080808080808080ULL, 0x8080808080808080ULL, },
+        { 0xcdcdcdcdcdcdcdcdULL, 0xcdcdcdcdcdcdcdcdULL, },
+        { 0x8080c88080c88080ULL, 0xc88080c88080c880ULL, },
+        { 0xe48f80e48f80e48fULL, 0x80e48f80e48f80e4ULL, },
+        { 0xababababababababULL, 0xababababababababULL, },    /*  16  */
+        { 0x7f7f7f7f7f7f7f7fULL, 0x7f7f7f7f7f7f7f7fULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x5555555555555555ULL, 0x5555555555555555ULL, },
+        { 0xdedededededededeULL, 0xdedededededededeULL, },
+        { 0x7777777777777777ULL, 0x7777777777777777ULL, },
+        { 0xc71c72c71c72c71cULL, 0x72c71c72c71c72c7ULL, },
+        { 0x7f39e37f39e37f39ULL, 0xe37f39e37f39e37fULL, },
+        { 0x8080808080808080ULL, 0x8080808080808080ULL, },    /*  24  */
+        { 0x5555555555555555ULL, 0x5555555555555555ULL, },
+        { 0xababababababababULL, 0xababababababababULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x8989898989898989ULL, 0x8989898989898989ULL, },
+        { 0x2222222222222222ULL, 0x2222222222222222ULL, },
+        { 0x80c71d80c71d80c7ULL, 0x1d80c71d80c71d80ULL, },
+        { 0x39e48e39e48e39e4ULL, 0x8e39e48e39e48e39ULL, },
+        { 0xcdcdcdcdcdcdcdcdULL, 0xcdcdcdcdcdcdcdcdULL, },    /*  32  */
+        { 0x7f7f7f7f7f7f7f7fULL, 0x7f7f7f7f7f7f7f7fULL, },
+        { 0x2222222222222222ULL, 0x2222222222222222ULL, },
+        { 0x7777777777777777ULL, 0x7777777777777777ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x7f7f7f7f7f7f7f7fULL, 0x7f7f7f7f7f7f7f7fULL, },
+        { 0xe93e7fe93e7fe93eULL, 0x7fe93e7fe93e7fe9ULL, },
+        { 0x7f5b057f5b057f5bULL, 0x057f5b057f5b057fULL, },
+        { 0x8080808080808080ULL, 0x8080808080808080ULL, },    /*  40  */
+        { 0x3333333333333333ULL, 0x3333333333333333ULL, },
+        { 0x8989898989898989ULL, 0x8989898989898989ULL, },
+        { 0xdedededededededeULL, 0xdedededededededeULL, },
+        { 0x8080808080808080ULL, 0x8080808080808080ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x80a5fb80a5fb80a5ULL, 0xfb80a5fb80a5fb80ULL, },
+        { 0x17c28017c28017c2ULL, 0x8017c28017c28017ULL, },
+        { 0xe48f80e48f80e48fULL, 0x80e48f80e48f80e4ULL, },    /*  48  */
+        { 0x7f7f387f7f387f7fULL, 0x387f7f387f7f387fULL, },
+        { 0x39e48e39e48e39e4ULL, 0x8e39e48e39e48e39ULL, },
+        { 0x7f39e37f39e37f39ULL, 0xe37f39e37f39e37fULL, },
+        { 0x17c28017c28017c2ULL, 0x8017c28017c28017ULL, },
+        { 0x7f5b057f5b057f5bULL, 0x057f5b057f5b057fULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x7f1d807f1d807f1dULL, 0x807f1d807f1d807fULL, },
+        { 0x8080c88080c88080ULL, 0xc88080c88080c880ULL, },    /*  56  */
+        { 0x1c717f1c717f1c71ULL, 0x7f1c717f1c717f1cULL, },
+        { 0x80c71d80c71d80c7ULL, 0x1d80c71d80c71d80ULL, },
+        { 0xc71c72c71c72c71cULL, 0x72c71c72c71c72c7ULL, },
+        { 0x80a5fb80a5fb80a5ULL, 0xfb80a5fb80a5fb80ULL, },
+        { 0xe93e7fe93e7fe93eULL, 0x7fe93e7fe93e7fe9ULL, },
+        { 0x80e37f80e37f80e3ULL, 0x7f80e37f80e37f80ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*  64  */
+        { 0x8dac7f69dbcf8e38ULL, 0x398080447f3c5e80ULL, },
+        { 0xdc1038228093cac0ULL, 0x248f808053507ff8ULL, },
+        { 0x181b7f7fca3180f2ULL, 0xbe8083865539ce80ULL, },
+        { 0x73548097253172c8ULL, 0xc77f7fbc80c4a27fULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x4f6480b994c43c88ULL, 0xeb1ff58080142d7fULL, },
+        { 0x7f6fea16ef62e5baULL, 0x8506338080fd805cULL, },
+        { 0x24f0c8de7f6d3640ULL, 0xdc717f7fadb08008ULL, },    /*  72  */
+        { 0xb19c7f476c3cc478ULL, 0x15e10b7f7fecd380ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x3c0b7f5d5b7fa932ULL, 0x9ae73e2702e98080ULL, },
+        { 0xe8e5808136cf7f0eULL, 0x427f7d7aabc7327fULL, },
+        { 0x809116ea119e1b46ULL, 0x7bfacd7f7f037fa4ULL, },
+};
+
+    gettimeofday(&start, NULL);
+
+    for (i = 0; i < PATTERN_INPUTS_SHORT_COUNT; i++) {
+        for (j = 0; j < PATTERN_INPUTS_SHORT_COUNT; j++) {
+            do_msa_SUBSUU_S_B(b128_pattern[i], b128_pattern[j],
+                           b128_result[PATTERN_INPUTS_SHORT_COUNT * i + j]);
+        }
+    }
+
+    for (i = 0; i < RANDOM_INPUTS_SHORT_COUNT; i++) {
+        for (j = 0; j < RANDOM_INPUTS_SHORT_COUNT; j++) {
+            do_msa_SUBSUU_S_B(b128_random[i], b128_random[j],
+                           b128_result[((PATTERN_INPUTS_SHORT_COUNT) *
+                                        (PATTERN_INPUTS_SHORT_COUNT)) +
+                                       RANDOM_INPUTS_SHORT_COUNT * i + j]);
+        }
+    }
+
+    gettimeofday(&end, NULL);
+
+    elapsed_time = (end.tv_sec - start.tv_sec) * 1000.0;
+    elapsed_time += (end.tv_usec - start.tv_usec) / 1000.0;
+
+    ret = check_results(instruction_name, TEST_COUNT_TOTAL, elapsed_time,
+                        &b128_result[0][0], &b128_expect[0][0]);
+
+    return ret;
+}
diff --git a/tests/tcg/mips/user/ase/msa/int-subtract/test_msa_subsuu_s_d.c b/tests/tcg/mips/user/ase/msa/int-subtract/test_msa_subsuu_s_d.c
new file mode 100644
index 0000000..45a1eb3
--- /dev/null
+++ b/tests/tcg/mips/user/ase/msa/int-subtract/test_msa_subsuu_s_d.c
@@ -0,0 +1,151 @@
+/*
+ *  Test program for MSA instruction SUBSUU_S.D
+ *
+ *  Copyright (C) 2018  Wave Computing, Inc.
+ *  Copyright (C) 2018  Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
+ *
+ *  This program is free software: you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation, either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <sys/time.h>
+#include <stdint.h>
+
+#include "../../../../include/wrappers_msa.h"
+#include "../../../../include/test_inputs.h"
+#include "../../../../include/test_utils.h"
+
+#define TEST_COUNT_TOTAL (                                                \
+            (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
+            (RANDOM_INPUTS_SHORT_COUNT) * (RANDOM_INPUTS_SHORT_COUNT))
+
+
+int32_t main(void)
+{
+    char *instruction_name = "SUBSUU_S.D";
+    int32_t ret;
+    uint32_t i, j;
+    struct timeval start, end;
+    double elapsed_time;
+
+    uint64_t b128_result[TEST_COUNT_TOTAL][2];
+    uint64_t b128_expect[TEST_COUNT_TOTAL][2] = {
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*   0  */
+        { 0x7fffffffffffffffULL, 0x7fffffffffffffffULL, },
+        { 0x5555555555555555ULL, 0x5555555555555555ULL, },
+        { 0x7fffffffffffffffULL, 0x7fffffffffffffffULL, },
+        { 0x3333333333333333ULL, 0x3333333333333333ULL, },
+        { 0x7fffffffffffffffULL, 0x7fffffffffffffffULL, },
+        { 0x1c71c71c71c71c71ULL, 0x7fffffffffffffffULL, },
+        { 0x7fffffffffffffffULL, 0x38e38e38e38e38e3ULL, },
+        { 0x8000000000000000ULL, 0x8000000000000000ULL, },    /*   8  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x8000000000000000ULL, 0x8000000000000000ULL, },
+        { 0xaaaaaaaaaaaaaaabULL, 0xaaaaaaaaaaaaaaabULL, },
+        { 0x8000000000000000ULL, 0x8000000000000000ULL, },
+        { 0xcccccccccccccccdULL, 0xcccccccccccccccdULL, },
+        { 0x8000000000000000ULL, 0xc71c71c71c71c71dULL, },
+        { 0xe38e38e38e38e38fULL, 0x8000000000000000ULL, },
+        { 0xaaaaaaaaaaaaaaabULL, 0xaaaaaaaaaaaaaaabULL, },    /*  16  */
+        { 0x7fffffffffffffffULL, 0x7fffffffffffffffULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x5555555555555555ULL, 0x5555555555555555ULL, },
+        { 0xdddddddddddddddeULL, 0xdddddddddddddddeULL, },
+        { 0x7777777777777777ULL, 0x7777777777777777ULL, },
+        { 0xc71c71c71c71c71cULL, 0x71c71c71c71c71c7ULL, },
+        { 0x7fffffffffffffffULL, 0xe38e38e38e38e38eULL, },
+        { 0x8000000000000000ULL, 0x8000000000000000ULL, },    /*  24  */
+        { 0x5555555555555555ULL, 0x5555555555555555ULL, },
+        { 0xaaaaaaaaaaaaaaabULL, 0xaaaaaaaaaaaaaaabULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x8888888888888889ULL, 0x8888888888888889ULL, },
+        { 0x2222222222222222ULL, 0x2222222222222222ULL, },
+        { 0x8000000000000000ULL, 0x1c71c71c71c71c72ULL, },
+        { 0x38e38e38e38e38e4ULL, 0x8e38e38e38e38e39ULL, },
+        { 0xcccccccccccccccdULL, 0xcccccccccccccccdULL, },    /*  32  */
+        { 0x7fffffffffffffffULL, 0x7fffffffffffffffULL, },
+        { 0x2222222222222222ULL, 0x2222222222222222ULL, },
+        { 0x7777777777777777ULL, 0x7777777777777777ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x7fffffffffffffffULL, 0x7fffffffffffffffULL, },
+        { 0xe93e93e93e93e93eULL, 0x7fffffffffffffffULL, },
+        { 0x7fffffffffffffffULL, 0x05b05b05b05b05b0ULL, },
+        { 0x8000000000000000ULL, 0x8000000000000000ULL, },    /*  40  */
+        { 0x3333333333333333ULL, 0x3333333333333333ULL, },
+        { 0x8888888888888889ULL, 0x8888888888888889ULL, },
+        { 0xdddddddddddddddeULL, 0xdddddddddddddddeULL, },
+        { 0x8000000000000000ULL, 0x8000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x8000000000000000ULL, 0xfa4fa4fa4fa4fa50ULL, },
+        { 0x16c16c16c16c16c2ULL, 0x8000000000000000ULL, },
+        { 0xe38e38e38e38e38fULL, 0x8000000000000000ULL, },    /*  48  */
+        { 0x7fffffffffffffffULL, 0x38e38e38e38e38e3ULL, },
+        { 0x38e38e38e38e38e4ULL, 0x8e38e38e38e38e39ULL, },
+        { 0x7fffffffffffffffULL, 0xe38e38e38e38e38eULL, },
+        { 0x16c16c16c16c16c2ULL, 0x8000000000000000ULL, },
+        { 0x7fffffffffffffffULL, 0x05b05b05b05b05b0ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x7fffffffffffffffULL, 0x8000000000000000ULL, },
+        { 0x8000000000000000ULL, 0xc71c71c71c71c71dULL, },    /*  56  */
+        { 0x1c71c71c71c71c71ULL, 0x7fffffffffffffffULL, },
+        { 0x8000000000000000ULL, 0x1c71c71c71c71c72ULL, },
+        { 0xc71c71c71c71c71cULL, 0x71c71c71c71c71c7ULL, },
+        { 0x8000000000000000ULL, 0xfa4fa4fa4fa4fa50ULL, },
+        { 0xe93e93e93e93e93eULL, 0x7fffffffffffffffULL, },
+        { 0x8000000000000000ULL, 0x7fffffffffffffffULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*  64  */
+        { 0x8cace668dace8e38ULL, 0x386f5044e93c5d10ULL, },
+        { 0xdc1038216e92c9c0ULL, 0x238e445f53508af8ULL, },
+        { 0x181bd07eca3072f2ULL, 0xbd7582865538cd6cULL, },
+        { 0x73531997253171c8ULL, 0xc790afbb16c3a2f0ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x4f6351b893c43b88ULL, 0xeb1ef41a6a142de8ULL, },
+        { 0x7fffffffffffffffULL, 0x850632416bfc705cULL, },
+        { 0x23efc7de916d3640ULL, 0xdc71bba0acaf7508ULL, },    /*  72  */
+        { 0xb09cae476c3bc478ULL, 0x14e10be595ebd218ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x3c0b985d5b9da932ULL, 0x99e73e2701e84274ULL, },
+        { 0xe7e42f8135cf8d0eULL, 0x428a7d79aac73294ULL, },
+        { 0x8000000000000000ULL, 0x7af9cdbe94038fa4ULL, },
+};
+
+    gettimeofday(&start, NULL);
+
+    for (i = 0; i < PATTERN_INPUTS_SHORT_COUNT; i++) {
+        for (j = 0; j < PATTERN_INPUTS_SHORT_COUNT; j++) {
+            do_msa_SUBSUU_S_D(b128_pattern[i], b128_pattern[j],
+                           b128_result[PATTERN_INPUTS_SHORT_COUNT * i + j]);
+        }
+    }
+
+    for (i = 0; i < RANDOM_INPUTS_SHORT_COUNT; i++) {
+        for (j = 0; j < RANDOM_INPUTS_SHORT_COUNT; j++) {
+            do_msa_SUBSUU_S_D(b128_random[i], b128_random[j],
+                           b128_result[((PATTERN_INPUTS_SHORT_COUNT) *
+                                        (PATTERN_INPUTS_SHORT_COUNT)) +
+                                       RANDOM_INPUTS_SHORT_COUNT * i + j]);
+        }
+    }
+
+    gettimeofday(&end, NULL);
+
+    elapsed_time = (end.tv_sec - start.tv_sec) * 1000.0;
+    elapsed_time += (end.tv_usec - start.tv_usec) / 1000.0;
+
+    ret = check_results(instruction_name, TEST_COUNT_TOTAL, elapsed_time,
+                        &b128_result[0][0], &b128_expect[0][0]);
+
+    return ret;
+}
diff --git a/tests/tcg/mips/user/ase/msa/int-subtract/test_msa_subsuu_s_h.c b/tests/tcg/mips/user/ase/msa/int-subtract/test_msa_subsuu_s_h.c
new file mode 100644
index 0000000..14ac7de
--- /dev/null
+++ b/tests/tcg/mips/user/ase/msa/int-subtract/test_msa_subsuu_s_h.c
@@ -0,0 +1,151 @@
+/*
+ *  Test program for MSA instruction SUBSUU_S.H
+ *
+ *  Copyright (C) 2018  Wave Computing, Inc.
+ *  Copyright (C) 2018  Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
+ *
+ *  This program is free software: you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation, either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <sys/time.h>
+#include <stdint.h>
+
+#include "../../../../include/wrappers_msa.h"
+#include "../../../../include/test_inputs.h"
+#include "../../../../include/test_utils.h"
+
+#define TEST_COUNT_TOTAL (                                                \
+            (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
+            (RANDOM_INPUTS_SHORT_COUNT) * (RANDOM_INPUTS_SHORT_COUNT))
+
+
+int32_t main(void)
+{
+    char *instruction_name = "SUBSUU_S.H";
+    int32_t ret;
+    uint32_t i, j;
+    struct timeval start, end;
+    double elapsed_time;
+
+    uint64_t b128_result[TEST_COUNT_TOTAL][2];
+    uint64_t b128_expect[TEST_COUNT_TOTAL][2] = {
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*   0  */
+        { 0x7fff7fff7fff7fffULL, 0x7fff7fff7fff7fffULL, },
+        { 0x5555555555555555ULL, 0x5555555555555555ULL, },
+        { 0x7fff7fff7fff7fffULL, 0x7fff7fff7fff7fffULL, },
+        { 0x3333333333333333ULL, 0x3333333333333333ULL, },
+        { 0x7fff7fff7fff7fffULL, 0x7fff7fff7fff7fffULL, },
+        { 0x1c717fff71c71c71ULL, 0x7fff71c71c717fffULL, },
+        { 0x7fff38e37fff7fffULL, 0x38e37fff7fff38e3ULL, },
+        { 0x8000800080008000ULL, 0x8000800080008000ULL, },    /*   8  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x8000800080008000ULL, 0x8000800080008000ULL, },
+        { 0xaaabaaabaaabaaabULL, 0xaaabaaabaaabaaabULL, },
+        { 0x8000800080008000ULL, 0x8000800080008000ULL, },
+        { 0xcccdcccdcccdcccdULL, 0xcccdcccdcccdcccdULL, },
+        { 0x8000c71d80008000ULL, 0xc71d80008000c71dULL, },
+        { 0xe38f80008e39e38fULL, 0x80008e39e38f8000ULL, },
+        { 0xaaabaaabaaabaaabULL, 0xaaabaaabaaabaaabULL, },    /*  16  */
+        { 0x7fff7fff7fff7fffULL, 0x7fff7fff7fff7fffULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x5555555555555555ULL, 0x5555555555555555ULL, },
+        { 0xdddedddedddedddeULL, 0xdddedddedddedddeULL, },
+        { 0x7777777777777777ULL, 0x7777777777777777ULL, },
+        { 0xc71c71c71c72c71cULL, 0x71c71c72c71c71c7ULL, },
+        { 0x7fffe38e38e37fffULL, 0xe38e38e37fffe38eULL, },
+        { 0x8000800080008000ULL, 0x8000800080008000ULL, },    /*  24  */
+        { 0x5555555555555555ULL, 0x5555555555555555ULL, },
+        { 0xaaabaaabaaabaaabULL, 0xaaabaaabaaabaaabULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x8889888988898889ULL, 0x8889888988898889ULL, },
+        { 0x2222222222222222ULL, 0x2222222222222222ULL, },
+        { 0x80001c72c71d8000ULL, 0x1c72c71d80001c72ULL, },
+        { 0x38e48e39e38e38e4ULL, 0x8e39e38e38e48e39ULL, },
+        { 0xcccdcccdcccdcccdULL, 0xcccdcccdcccdcccdULL, },    /*  32  */
+        { 0x7fff7fff7fff7fffULL, 0x7fff7fff7fff7fffULL, },
+        { 0x2222222222222222ULL, 0x2222222222222222ULL, },
+        { 0x7777777777777777ULL, 0x7777777777777777ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x7fff7fff7fff7fffULL, 0x7fff7fff7fff7fffULL, },
+        { 0xe93e7fff3e94e93eULL, 0x7fff3e94e93e7fffULL, },
+        { 0x7fff05b05b057fffULL, 0x05b05b057fff05b0ULL, },
+        { 0x8000800080008000ULL, 0x8000800080008000ULL, },    /*  40  */
+        { 0x3333333333333333ULL, 0x3333333333333333ULL, },
+        { 0x8889888988898889ULL, 0x8889888988898889ULL, },
+        { 0xdddedddedddedddeULL, 0xdddedddedddedddeULL, },
+        { 0x8000800080008000ULL, 0x8000800080008000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x8000fa50a4fb8000ULL, 0xfa50a4fb8000fa50ULL, },
+        { 0x16c28000c16c16c2ULL, 0x8000c16c16c28000ULL, },
+        { 0xe38f80008e39e38fULL, 0x80008e39e38f8000ULL, },    /*  48  */
+        { 0x7fff38e37fff7fffULL, 0x38e37fff7fff38e3ULL, },
+        { 0x38e48e39e38e38e4ULL, 0x8e39e38e38e48e39ULL, },
+        { 0x7fffe38e38e37fffULL, 0xe38e38e37fffe38eULL, },
+        { 0x16c28000c16c16c2ULL, 0x8000c16c16c28000ULL, },
+        { 0x7fff05b05b057fffULL, 0x05b05b057fff05b0ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x7fff80001c717fffULL, 0x80001c717fff8000ULL, },
+        { 0x8000c71d80008000ULL, 0xc71d80008000c71dULL, },    /*  56  */
+        { 0x1c717fff71c71c71ULL, 0x7fff71c71c717fffULL, },
+        { 0x80001c72c71d8000ULL, 0x1c72c71d80001c72ULL, },
+        { 0xc71c71c71c72c71cULL, 0x71c71c72c71c71c7ULL, },
+        { 0x8000fa50a4fb8000ULL, 0xfa50a4fb8000fa50ULL, },
+        { 0xe93e7fff3e94e93eULL, 0x7fff3e94e93e7fffULL, },
+        { 0x80007fffe38f8000ULL, 0x7fffe38f80007fffULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*  64  */
+        { 0x8cac7fffdacf8e38ULL, 0x387080007fff5d10ULL, },
+        { 0xdc1038228000c9c0ULL, 0x238f800053507fffULL, },
+        { 0x181b7fffca318000ULL, 0xbd7682865539cd6cULL, },
+        { 0x73548000253171c8ULL, 0xc7907fff8000a2f0ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x4f64800093c43b88ULL, 0xeb1ff41b80002de8ULL, },
+        { 0x7fffea16ef62e4baULL, 0x8506324280008000ULL, },
+        { 0x23f0c7de7fff3640ULL, 0xdc717fffacb08000ULL, },    /*  72  */
+        { 0xb09c7fff6c3cc478ULL, 0x14e10be57fffd218ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x3c0b7fff5b9ea932ULL, 0x99e73e2701e98000ULL, },
+        { 0xe7e5800035cf7fffULL, 0x428a7d7aaac73294ULL, },
+        { 0x800015ea109e1b46ULL, 0x7afacdbe7fff7fffULL, },
+};
+
+    gettimeofday(&start, NULL);
+
+    for (i = 0; i < PATTERN_INPUTS_SHORT_COUNT; i++) {
+        for (j = 0; j < PATTERN_INPUTS_SHORT_COUNT; j++) {
+            do_msa_SUBSUU_S_H(b128_pattern[i], b128_pattern[j],
+                           b128_result[PATTERN_INPUTS_SHORT_COUNT * i + j]);
+        }
+    }
+
+    for (i = 0; i < RANDOM_INPUTS_SHORT_COUNT; i++) {
+        for (j = 0; j < RANDOM_INPUTS_SHORT_COUNT; j++) {
+            do_msa_SUBSUU_S_H(b128_random[i], b128_random[j],
+                           b128_result[((PATTERN_INPUTS_SHORT_COUNT) *
+                                        (PATTERN_INPUTS_SHORT_COUNT)) +
+                                       RANDOM_INPUTS_SHORT_COUNT * i + j]);
+        }
+    }
+
+    gettimeofday(&end, NULL);
+
+    elapsed_time = (end.tv_sec - start.tv_sec) * 1000.0;
+    elapsed_time += (end.tv_usec - start.tv_usec) / 1000.0;
+
+    ret = check_results(instruction_name, TEST_COUNT_TOTAL, elapsed_time,
+                        &b128_result[0][0], &b128_expect[0][0]);
+
+    return ret;
+}
diff --git a/tests/tcg/mips/user/ase/msa/int-subtract/test_msa_subsuu_s_w.c b/tests/tcg/mips/user/ase/msa/int-subtract/test_msa_subsuu_s_w.c
new file mode 100644
index 0000000..688f469
--- /dev/null
+++ b/tests/tcg/mips/user/ase/msa/int-subtract/test_msa_subsuu_s_w.c
@@ -0,0 +1,151 @@
+/*
+ *  Test program for MSA instruction SUBSUU_S.W
+ *
+ *  Copyright (C) 2018  Wave Computing, Inc.
+ *  Copyright (C) 2018  Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
+ *
+ *  This program is free software: you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation, either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <sys/time.h>
+#include <stdint.h>
+
+#include "../../../../include/wrappers_msa.h"
+#include "../../../../include/test_inputs.h"
+#include "../../../../include/test_utils.h"
+
+#define TEST_COUNT_TOTAL (                                                \
+            (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
+            (RANDOM_INPUTS_SHORT_COUNT) * (RANDOM_INPUTS_SHORT_COUNT))
+
+
+int32_t main(void)
+{
+    char *instruction_name = "SUBSUU_S.W";
+    int32_t ret;
+    uint32_t i, j;
+    struct timeval start, end;
+    double elapsed_time;
+
+    uint64_t b128_result[TEST_COUNT_TOTAL][2];
+    uint64_t b128_expect[TEST_COUNT_TOTAL][2] = {
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*   0  */
+        { 0x7fffffff7fffffffULL, 0x7fffffff7fffffffULL, },
+        { 0x5555555555555555ULL, 0x5555555555555555ULL, },
+        { 0x7fffffff7fffffffULL, 0x7fffffff7fffffffULL, },
+        { 0x3333333333333333ULL, 0x3333333333333333ULL, },
+        { 0x7fffffff7fffffffULL, 0x7fffffff7fffffffULL, },
+        { 0x1c71c71c71c71c71ULL, 0x7fffffff1c71c71cULL, },
+        { 0x7fffffff7fffffffULL, 0x38e38e387fffffffULL, },
+        { 0x8000000080000000ULL, 0x8000000080000000ULL, },    /*   8  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x8000000080000000ULL, 0x8000000080000000ULL, },
+        { 0xaaaaaaabaaaaaaabULL, 0xaaaaaaabaaaaaaabULL, },
+        { 0x8000000080000000ULL, 0x8000000080000000ULL, },
+        { 0xcccccccdcccccccdULL, 0xcccccccdcccccccdULL, },
+        { 0x8000000080000000ULL, 0xc71c71c880000000ULL, },
+        { 0xe38e38e48e38e38fULL, 0x80000000e38e38e4ULL, },
+        { 0xaaaaaaabaaaaaaabULL, 0xaaaaaaabaaaaaaabULL, },    /*  16  */
+        { 0x7fffffff7fffffffULL, 0x7fffffff7fffffffULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x5555555555555555ULL, 0x5555555555555555ULL, },
+        { 0xdddddddedddddddeULL, 0xdddddddedddddddeULL, },
+        { 0x7777777777777777ULL, 0x7777777777777777ULL, },
+        { 0xc71c71c71c71c71cULL, 0x71c71c72c71c71c7ULL, },
+        { 0x7fffffff38e38e39ULL, 0xe38e38e37fffffffULL, },
+        { 0x8000000080000000ULL, 0x8000000080000000ULL, },    /*  24  */
+        { 0x5555555555555555ULL, 0x5555555555555555ULL, },
+        { 0xaaaaaaabaaaaaaabULL, 0xaaaaaaabaaaaaaabULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x8888888988888889ULL, 0x8888888988888889ULL, },
+        { 0x2222222222222222ULL, 0x2222222222222222ULL, },
+        { 0x80000000c71c71c7ULL, 0x1c71c71d80000000ULL, },
+        { 0x38e38e39e38e38e4ULL, 0x8e38e38e38e38e39ULL, },
+        { 0xcccccccdcccccccdULL, 0xcccccccdcccccccdULL, },    /*  32  */
+        { 0x7fffffff7fffffffULL, 0x7fffffff7fffffffULL, },
+        { 0x2222222222222222ULL, 0x2222222222222222ULL, },
+        { 0x7777777777777777ULL, 0x7777777777777777ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x7fffffff7fffffffULL, 0x7fffffff7fffffffULL, },
+        { 0xe93e93e93e93e93eULL, 0x7fffffffe93e93e9ULL, },
+        { 0x7fffffff5b05b05bULL, 0x05b05b057fffffffULL, },
+        { 0x8000000080000000ULL, 0x8000000080000000ULL, },    /*  40  */
+        { 0x3333333333333333ULL, 0x3333333333333333ULL, },
+        { 0x8888888988888889ULL, 0x8888888988888889ULL, },
+        { 0xdddddddedddddddeULL, 0xdddddddedddddddeULL, },
+        { 0x8000000080000000ULL, 0x8000000080000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x80000000a4fa4fa5ULL, 0xfa4fa4fb80000000ULL, },
+        { 0x16c16c17c16c16c2ULL, 0x8000000016c16c17ULL, },
+        { 0xe38e38e48e38e38fULL, 0x80000000e38e38e4ULL, },    /*  48  */
+        { 0x7fffffff7fffffffULL, 0x38e38e387fffffffULL, },
+        { 0x38e38e39e38e38e4ULL, 0x8e38e38e38e38e39ULL, },
+        { 0x7fffffff38e38e39ULL, 0xe38e38e37fffffffULL, },
+        { 0x16c16c17c16c16c2ULL, 0x8000000016c16c17ULL, },
+        { 0x7fffffff5b05b05bULL, 0x05b05b057fffffffULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x7fffffff1c71c71dULL, 0x800000007fffffffULL, },
+        { 0x8000000080000000ULL, 0xc71c71c880000000ULL, },    /*  56  */
+        { 0x1c71c71c71c71c71ULL, 0x7fffffff1c71c71cULL, },
+        { 0x80000000c71c71c7ULL, 0x1c71c71d80000000ULL, },
+        { 0xc71c71c71c71c71cULL, 0x71c71c72c71c71c7ULL, },
+        { 0x80000000a4fa4fa5ULL, 0xfa4fa4fb80000000ULL, },
+        { 0xe93e93e93e93e93eULL, 0x7fffffffe93e93e9ULL, },
+        { 0x80000000e38e38e3ULL, 0x7fffffff80000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*  64  */
+        { 0x8cace669dace8e38ULL, 0x386f50447fffffffULL, },
+        { 0xdc10382280000000ULL, 0x238e445f53508af8ULL, },
+        { 0x181bd07fca3072f2ULL, 0xbd7582865538cd6cULL, },
+        { 0x73531997253171c8ULL, 0xc790afbc80000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x4f6351b993c43b88ULL, 0xeb1ef41b80000000ULL, },
+        { 0x7fffffffef61e4baULL, 0x8506324280000000ULL, },
+        { 0x23efc7de7fffffffULL, 0xdc71bba1acaf7508ULL, },    /*  72  */
+        { 0xb09cae476c3bc478ULL, 0x14e10be57fffffffULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x3c0b985d5b9da932ULL, 0x99e73e2701e84274ULL, },
+        { 0xe7e42f8135cf8d0eULL, 0x428a7d7aaac73294ULL, },
+        { 0x80000000109e1b46ULL, 0x7af9cdbe7fffffffULL, },
+};
+
+    gettimeofday(&start, NULL);
+
+    for (i = 0; i < PATTERN_INPUTS_SHORT_COUNT; i++) {
+        for (j = 0; j < PATTERN_INPUTS_SHORT_COUNT; j++) {
+            do_msa_SUBSUU_S_W(b128_pattern[i], b128_pattern[j],
+                           b128_result[PATTERN_INPUTS_SHORT_COUNT * i + j]);
+        }
+    }
+
+    for (i = 0; i < RANDOM_INPUTS_SHORT_COUNT; i++) {
+        for (j = 0; j < RANDOM_INPUTS_SHORT_COUNT; j++) {
+            do_msa_SUBSUU_S_W(b128_random[i], b128_random[j],
+                           b128_result[((PATTERN_INPUTS_SHORT_COUNT) *
+                                        (PATTERN_INPUTS_SHORT_COUNT)) +
+                                       RANDOM_INPUTS_SHORT_COUNT * i + j]);
+        }
+    }
+
+    gettimeofday(&end, NULL);
+
+    elapsed_time = (end.tv_sec - start.tv_sec) * 1000.0;
+    elapsed_time += (end.tv_usec - start.tv_usec) / 1000.0;
+
+    ret = check_results(instruction_name, TEST_COUNT_TOTAL, elapsed_time,
+                        &b128_result[0][0], &b128_expect[0][0]);
+
+    return ret;
+}
diff --git a/tests/tcg/mips/user/ase/msa/int-subtract/test_msa_subv_b.c b/tests/tcg/mips/user/ase/msa/int-subtract/test_msa_subv_b.c
new file mode 100644
index 0000000..d0964dc
--- /dev/null
+++ b/tests/tcg/mips/user/ase/msa/int-subtract/test_msa_subv_b.c
@@ -0,0 +1,151 @@
+/*
+ *  Test program for MSA instruction SUBV.B
+ *
+ *  Copyright (C) 2018  Wave Computing, Inc.
+ *  Copyright (C) 2018  Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
+ *
+ *  This program is free software: you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation, either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <sys/time.h>
+#include <stdint.h>
+
+#include "../../../../include/wrappers_msa.h"
+#include "../../../../include/test_inputs.h"
+#include "../../../../include/test_utils.h"
+
+#define TEST_COUNT_TOTAL (                                                \
+            (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
+            (RANDOM_INPUTS_SHORT_COUNT) * (RANDOM_INPUTS_SHORT_COUNT))
+
+
+int32_t main(void)
+{
+    char *instruction_name = "SUBV.B";
+    int32_t ret;
+    uint32_t i, j;
+    struct timeval start, end;
+    double elapsed_time;
+
+    uint64_t b128_result[TEST_COUNT_TOTAL][2];
+    uint64_t b128_expect[TEST_COUNT_TOTAL][2] = {
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*   0  */
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0x5555555555555555ULL, 0x5555555555555555ULL, },
+        { 0xaaaaaaaaaaaaaaaaULL, 0xaaaaaaaaaaaaaaaaULL, },
+        { 0x3333333333333333ULL, 0x3333333333333333ULL, },
+        { 0xccccccccccccccccULL, 0xccccccccccccccccULL, },
+        { 0x1c71c71c71c71c71ULL, 0xc71c71c71c71c71cULL, },
+        { 0xe38e38e38e38e38eULL, 0x38e38e38e38e38e3ULL, },
+        { 0x0101010101010101ULL, 0x0101010101010101ULL, },    /*   8  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x5656565656565656ULL, 0x5656565656565656ULL, },
+        { 0xababababababababULL, 0xababababababababULL, },
+        { 0x3434343434343434ULL, 0x3434343434343434ULL, },
+        { 0xcdcdcdcdcdcdcdcdULL, 0xcdcdcdcdcdcdcdcdULL, },
+        { 0x1d72c81d72c81d72ULL, 0xc81d72c81d72c81dULL, },
+        { 0xe48f39e48f39e48fULL, 0x39e48f39e48f39e4ULL, },
+        { 0xababababababababULL, 0xababababababababULL, },    /*  16  */
+        { 0xaaaaaaaaaaaaaaaaULL, 0xaaaaaaaaaaaaaaaaULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x5555555555555555ULL, 0x5555555555555555ULL, },
+        { 0xdedededededededeULL, 0xdedededededededeULL, },
+        { 0x7777777777777777ULL, 0x7777777777777777ULL, },
+        { 0xc71c72c71c72c71cULL, 0x72c71c72c71c72c7ULL, },
+        { 0x8e39e38e39e38e39ULL, 0xe38e39e38e39e38eULL, },
+        { 0x5656565656565656ULL, 0x5656565656565656ULL, },    /*  24  */
+        { 0x5555555555555555ULL, 0x5555555555555555ULL, },
+        { 0xababababababababULL, 0xababababababababULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x8989898989898989ULL, 0x8989898989898989ULL, },
+        { 0x2222222222222222ULL, 0x2222222222222222ULL, },
+        { 0x72c71d72c71d72c7ULL, 0x1d72c71d72c71d72ULL, },
+        { 0x39e48e39e48e39e4ULL, 0x8e39e48e39e48e39ULL, },
+        { 0xcdcdcdcdcdcdcdcdULL, 0xcdcdcdcdcdcdcdcdULL, },    /*  32  */
+        { 0xccccccccccccccccULL, 0xccccccccccccccccULL, },
+        { 0x2222222222222222ULL, 0x2222222222222222ULL, },
+        { 0x7777777777777777ULL, 0x7777777777777777ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x9999999999999999ULL, 0x9999999999999999ULL, },
+        { 0xe93e94e93e94e93eULL, 0x94e93e94e93e94e9ULL, },
+        { 0xb05b05b05b05b05bULL, 0x05b05b05b05b05b0ULL, },
+        { 0x3434343434343434ULL, 0x3434343434343434ULL, },    /*  40  */
+        { 0x3333333333333333ULL, 0x3333333333333333ULL, },
+        { 0x8989898989898989ULL, 0x8989898989898989ULL, },
+        { 0xdedededededededeULL, 0xdedededededededeULL, },
+        { 0x6767676767676767ULL, 0x6767676767676767ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x50a5fb50a5fb50a5ULL, 0xfb50a5fb50a5fb50ULL, },
+        { 0x17c26c17c26c17c2ULL, 0x6c17c26c17c26c17ULL, },
+        { 0xe48f39e48f39e48fULL, 0x39e48f39e48f39e4ULL, },    /*  48  */
+        { 0xe38e38e38e38e38eULL, 0x38e38e38e38e38e3ULL, },
+        { 0x39e48e39e48e39e4ULL, 0x8e39e48e39e48e39ULL, },
+        { 0x8e39e38e39e38e39ULL, 0xe38e39e38e39e38eULL, },
+        { 0x17c26c17c26c17c2ULL, 0x6c17c26c17c26c17ULL, },
+        { 0xb05b05b05b05b05bULL, 0x05b05b05b05b05b0ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0xc71d71c71d71c71dULL, 0x71c71d71c71d71c7ULL, },
+        { 0x1d72c81d72c81d72ULL, 0xc81d72c81d72c81dULL, },    /*  56  */
+        { 0x1c71c71c71c71c71ULL, 0xc71c71c71c71c71cULL, },
+        { 0x72c71d72c71d72c7ULL, 0x1d72c71d72c71d72ULL, },
+        { 0xc71c72c71c72c71cULL, 0x72c71c72c71c72c7ULL, },
+        { 0x50a5fb50a5fb50a5ULL, 0xfb50a5fb50a5fb50ULL, },
+        { 0xe93e94e93e94e93eULL, 0x94e93e94e93e94e9ULL, },
+        { 0x39e38f39e38f39e3ULL, 0x8f39e38f39e38f39ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*  64  */
+        { 0x8dace669dbcf8e38ULL, 0x39705044e93c5e10ULL, },
+        { 0xdc1038226f93cac0ULL, 0x248f455f53508bf8ULL, },
+        { 0x181bd07fca3173f2ULL, 0xbe7683865539ce6cULL, },
+        { 0x73541a97253172c8ULL, 0xc790b0bc17c4a2f0ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x4f6452b994c43c88ULL, 0xeb1ff51b6a142de8ULL, },
+        { 0x8b6fea16ef62e5baULL, 0x850633426cfd705cULL, },
+        { 0x24f0c8de916d3640ULL, 0xdc71bba1adb07508ULL, },    /*  72  */
+        { 0xb19cae476c3cc478ULL, 0x15e10be596ecd318ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x3c0b985d5b9ea932ULL, 0x9ae73e2702e94374ULL, },
+        { 0xe8e5308136cf8d0eULL, 0x428a7d7aabc73294ULL, },
+        { 0x759116ea119e1b46ULL, 0x7bfacdbe940390a4ULL, },
+};
+
+    gettimeofday(&start, NULL);
+
+    for (i = 0; i < PATTERN_INPUTS_SHORT_COUNT; i++) {
+        for (j = 0; j < PATTERN_INPUTS_SHORT_COUNT; j++) {
+            do_msa_SUBV_B(b128_pattern[i], b128_pattern[j],
+                           b128_result[PATTERN_INPUTS_SHORT_COUNT * i + j]);
+        }
+    }
+
+    for (i = 0; i < RANDOM_INPUTS_SHORT_COUNT; i++) {
+        for (j = 0; j < RANDOM_INPUTS_SHORT_COUNT; j++) {
+            do_msa_SUBV_B(b128_random[i], b128_random[j],
+                           b128_result[((PATTERN_INPUTS_SHORT_COUNT) *
+                                        (PATTERN_INPUTS_SHORT_COUNT)) +
+                                       RANDOM_INPUTS_SHORT_COUNT * i + j]);
+        }
+    }
+
+    gettimeofday(&end, NULL);
+
+    elapsed_time = (end.tv_sec - start.tv_sec) * 1000.0;
+    elapsed_time += (end.tv_usec - start.tv_usec) / 1000.0;
+
+    ret = check_results(instruction_name, TEST_COUNT_TOTAL, elapsed_time,
+                        &b128_result[0][0], &b128_expect[0][0]);
+
+    return ret;
+}
diff --git a/tests/tcg/mips/user/ase/msa/int-subtract/test_msa_subv_d.c b/tests/tcg/mips/user/ase/msa/int-subtract/test_msa_subv_d.c
new file mode 100644
index 0000000..ec26a8e
--- /dev/null
+++ b/tests/tcg/mips/user/ase/msa/int-subtract/test_msa_subv_d.c
@@ -0,0 +1,151 @@
+/*
+ *  Test program for MSA instruction SUBV.D
+ *
+ *  Copyright (C) 2018  Wave Computing, Inc.
+ *  Copyright (C) 2018  Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
+ *
+ *  This program is free software: you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation, either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <sys/time.h>
+#include <stdint.h>
+
+#include "../../../../include/wrappers_msa.h"
+#include "../../../../include/test_inputs.h"
+#include "../../../../include/test_utils.h"
+
+#define TEST_COUNT_TOTAL (                                                \
+            (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
+            (RANDOM_INPUTS_SHORT_COUNT) * (RANDOM_INPUTS_SHORT_COUNT))
+
+
+int32_t main(void)
+{
+    char *instruction_name = "SUBV.D";
+    int32_t ret;
+    uint32_t i, j;
+    struct timeval start, end;
+    double elapsed_time;
+
+    uint64_t b128_result[TEST_COUNT_TOTAL][2];
+    uint64_t b128_expect[TEST_COUNT_TOTAL][2] = {
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*   0  */
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0x5555555555555555ULL, 0x5555555555555555ULL, },
+        { 0xaaaaaaaaaaaaaaaaULL, 0xaaaaaaaaaaaaaaaaULL, },
+        { 0x3333333333333333ULL, 0x3333333333333333ULL, },
+        { 0xccccccccccccccccULL, 0xccccccccccccccccULL, },
+        { 0x1c71c71c71c71c71ULL, 0xc71c71c71c71c71cULL, },
+        { 0xe38e38e38e38e38eULL, 0x38e38e38e38e38e3ULL, },
+        { 0x0000000000000001ULL, 0x0000000000000001ULL, },    /*   8  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x5555555555555556ULL, 0x5555555555555556ULL, },
+        { 0xaaaaaaaaaaaaaaabULL, 0xaaaaaaaaaaaaaaabULL, },
+        { 0x3333333333333334ULL, 0x3333333333333334ULL, },
+        { 0xcccccccccccccccdULL, 0xcccccccccccccccdULL, },
+        { 0x1c71c71c71c71c72ULL, 0xc71c71c71c71c71dULL, },
+        { 0xe38e38e38e38e38fULL, 0x38e38e38e38e38e4ULL, },
+        { 0xaaaaaaaaaaaaaaabULL, 0xaaaaaaaaaaaaaaabULL, },    /*  16  */
+        { 0xaaaaaaaaaaaaaaaaULL, 0xaaaaaaaaaaaaaaaaULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x5555555555555555ULL, 0x5555555555555555ULL, },
+        { 0xdddddddddddddddeULL, 0xdddddddddddddddeULL, },
+        { 0x7777777777777777ULL, 0x7777777777777777ULL, },
+        { 0xc71c71c71c71c71cULL, 0x71c71c71c71c71c7ULL, },
+        { 0x8e38e38e38e38e39ULL, 0xe38e38e38e38e38eULL, },
+        { 0x5555555555555556ULL, 0x5555555555555556ULL, },    /*  24  */
+        { 0x5555555555555555ULL, 0x5555555555555555ULL, },
+        { 0xaaaaaaaaaaaaaaabULL, 0xaaaaaaaaaaaaaaabULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x8888888888888889ULL, 0x8888888888888889ULL, },
+        { 0x2222222222222222ULL, 0x2222222222222222ULL, },
+        { 0x71c71c71c71c71c7ULL, 0x1c71c71c71c71c72ULL, },
+        { 0x38e38e38e38e38e4ULL, 0x8e38e38e38e38e39ULL, },
+        { 0xcccccccccccccccdULL, 0xcccccccccccccccdULL, },    /*  32  */
+        { 0xccccccccccccccccULL, 0xccccccccccccccccULL, },
+        { 0x2222222222222222ULL, 0x2222222222222222ULL, },
+        { 0x7777777777777777ULL, 0x7777777777777777ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x9999999999999999ULL, 0x9999999999999999ULL, },
+        { 0xe93e93e93e93e93eULL, 0x93e93e93e93e93e9ULL, },
+        { 0xb05b05b05b05b05bULL, 0x05b05b05b05b05b0ULL, },
+        { 0x3333333333333334ULL, 0x3333333333333334ULL, },    /*  40  */
+        { 0x3333333333333333ULL, 0x3333333333333333ULL, },
+        { 0x8888888888888889ULL, 0x8888888888888889ULL, },
+        { 0xdddddddddddddddeULL, 0xdddddddddddddddeULL, },
+        { 0x6666666666666667ULL, 0x6666666666666667ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x4fa4fa4fa4fa4fa5ULL, 0xfa4fa4fa4fa4fa50ULL, },
+        { 0x16c16c16c16c16c2ULL, 0x6c16c16c16c16c17ULL, },
+        { 0xe38e38e38e38e38fULL, 0x38e38e38e38e38e4ULL, },    /*  48  */
+        { 0xe38e38e38e38e38eULL, 0x38e38e38e38e38e3ULL, },
+        { 0x38e38e38e38e38e4ULL, 0x8e38e38e38e38e39ULL, },
+        { 0x8e38e38e38e38e39ULL, 0xe38e38e38e38e38eULL, },
+        { 0x16c16c16c16c16c2ULL, 0x6c16c16c16c16c17ULL, },
+        { 0xb05b05b05b05b05bULL, 0x05b05b05b05b05b0ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0xc71c71c71c71c71dULL, 0x71c71c71c71c71c7ULL, },
+        { 0x1c71c71c71c71c72ULL, 0xc71c71c71c71c71dULL, },    /*  56  */
+        { 0x1c71c71c71c71c71ULL, 0xc71c71c71c71c71cULL, },
+        { 0x71c71c71c71c71c7ULL, 0x1c71c71c71c71c72ULL, },
+        { 0xc71c71c71c71c71cULL, 0x71c71c71c71c71c7ULL, },
+        { 0x4fa4fa4fa4fa4fa5ULL, 0xfa4fa4fa4fa4fa50ULL, },
+        { 0xe93e93e93e93e93eULL, 0x93e93e93e93e93e9ULL, },
+        { 0x38e38e38e38e38e3ULL, 0x8e38e38e38e38e39ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*  64  */
+        { 0x8cace668dace8e38ULL, 0x386f5044e93c5d10ULL, },
+        { 0xdc1038216e92c9c0ULL, 0x238e445f53508af8ULL, },
+        { 0x181bd07eca3072f2ULL, 0xbd7582865538cd6cULL, },
+        { 0x73531997253171c8ULL, 0xc790afbb16c3a2f0ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x4f6351b893c43b88ULL, 0xeb1ef41a6a142de8ULL, },
+        { 0x8b6eea15ef61e4baULL, 0x850632416bfc705cULL, },
+        { 0x23efc7de916d3640ULL, 0xdc71bba0acaf7508ULL, },    /*  72  */
+        { 0xb09cae476c3bc478ULL, 0x14e10be595ebd218ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x3c0b985d5b9da932ULL, 0x99e73e2701e84274ULL, },
+        { 0xe7e42f8135cf8d0eULL, 0x428a7d79aac73294ULL, },
+        { 0x749115ea109e1b46ULL, 0x7af9cdbe94038fa4ULL, },
+};
+
+    gettimeofday(&start, NULL);
+
+    for (i = 0; i < PATTERN_INPUTS_SHORT_COUNT; i++) {
+        for (j = 0; j < PATTERN_INPUTS_SHORT_COUNT; j++) {
+            do_msa_SUBV_D(b128_pattern[i], b128_pattern[j],
+                           b128_result[PATTERN_INPUTS_SHORT_COUNT * i + j]);
+        }
+    }
+
+    for (i = 0; i < RANDOM_INPUTS_SHORT_COUNT; i++) {
+        for (j = 0; j < RANDOM_INPUTS_SHORT_COUNT; j++) {
+            do_msa_SUBV_D(b128_random[i], b128_random[j],
+                           b128_result[((PATTERN_INPUTS_SHORT_COUNT) *
+                                        (PATTERN_INPUTS_SHORT_COUNT)) +
+                                       RANDOM_INPUTS_SHORT_COUNT * i + j]);
+        }
+    }
+
+    gettimeofday(&end, NULL);
+
+    elapsed_time = (end.tv_sec - start.tv_sec) * 1000.0;
+    elapsed_time += (end.tv_usec - start.tv_usec) / 1000.0;
+
+    ret = check_results(instruction_name, TEST_COUNT_TOTAL, elapsed_time,
+                        &b128_result[0][0], &b128_expect[0][0]);
+
+    return ret;
+}
diff --git a/tests/tcg/mips/user/ase/msa/int-subtract/test_msa_subv_h.c b/tests/tcg/mips/user/ase/msa/int-subtract/test_msa_subv_h.c
new file mode 100644
index 0000000..420422e
--- /dev/null
+++ b/tests/tcg/mips/user/ase/msa/int-subtract/test_msa_subv_h.c
@@ -0,0 +1,151 @@
+/*
+ *  Test program for MSA instruction SUBV.H
+ *
+ *  Copyright (C) 2018  Wave Computing, Inc.
+ *  Copyright (C) 2018  Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
+ *
+ *  This program is free software: you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation, either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <sys/time.h>
+#include <stdint.h>
+
+#include "../../../../include/wrappers_msa.h"
+#include "../../../../include/test_inputs.h"
+#include "../../../../include/test_utils.h"
+
+#define TEST_COUNT_TOTAL (                                                \
+            (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
+            (RANDOM_INPUTS_SHORT_COUNT) * (RANDOM_INPUTS_SHORT_COUNT))
+
+
+int32_t main(void)
+{
+    char *instruction_name = "SUBV.H";
+    int32_t ret;
+    uint32_t i, j;
+    struct timeval start, end;
+    double elapsed_time;
+
+    uint64_t b128_result[TEST_COUNT_TOTAL][2];
+    uint64_t b128_expect[TEST_COUNT_TOTAL][2] = {
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*   0  */
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0x5555555555555555ULL, 0x5555555555555555ULL, },
+        { 0xaaaaaaaaaaaaaaaaULL, 0xaaaaaaaaaaaaaaaaULL, },
+        { 0x3333333333333333ULL, 0x3333333333333333ULL, },
+        { 0xccccccccccccccccULL, 0xccccccccccccccccULL, },
+        { 0x1c71c71c71c71c71ULL, 0xc71c71c71c71c71cULL, },
+        { 0xe38e38e38e38e38eULL, 0x38e38e38e38e38e3ULL, },
+        { 0x0001000100010001ULL, 0x0001000100010001ULL, },    /*   8  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x5556555655565556ULL, 0x5556555655565556ULL, },
+        { 0xaaabaaabaaabaaabULL, 0xaaabaaabaaabaaabULL, },
+        { 0x3334333433343334ULL, 0x3334333433343334ULL, },
+        { 0xcccdcccdcccdcccdULL, 0xcccdcccdcccdcccdULL, },
+        { 0x1c72c71d71c81c72ULL, 0xc71d71c81c72c71dULL, },
+        { 0xe38f38e48e39e38fULL, 0x38e48e39e38f38e4ULL, },
+        { 0xaaabaaabaaabaaabULL, 0xaaabaaabaaabaaabULL, },    /*  16  */
+        { 0xaaaaaaaaaaaaaaaaULL, 0xaaaaaaaaaaaaaaaaULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x5555555555555555ULL, 0x5555555555555555ULL, },
+        { 0xdddedddedddedddeULL, 0xdddedddedddedddeULL, },
+        { 0x7777777777777777ULL, 0x7777777777777777ULL, },
+        { 0xc71c71c71c72c71cULL, 0x71c71c72c71c71c7ULL, },
+        { 0x8e39e38e38e38e39ULL, 0xe38e38e38e39e38eULL, },
+        { 0x5556555655565556ULL, 0x5556555655565556ULL, },    /*  24  */
+        { 0x5555555555555555ULL, 0x5555555555555555ULL, },
+        { 0xaaabaaabaaabaaabULL, 0xaaabaaabaaabaaabULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x8889888988898889ULL, 0x8889888988898889ULL, },
+        { 0x2222222222222222ULL, 0x2222222222222222ULL, },
+        { 0x71c71c72c71d71c7ULL, 0x1c72c71d71c71c72ULL, },
+        { 0x38e48e39e38e38e4ULL, 0x8e39e38e38e48e39ULL, },
+        { 0xcccdcccdcccdcccdULL, 0xcccdcccdcccdcccdULL, },    /*  32  */
+        { 0xccccccccccccccccULL, 0xccccccccccccccccULL, },
+        { 0x2222222222222222ULL, 0x2222222222222222ULL, },
+        { 0x7777777777777777ULL, 0x7777777777777777ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x9999999999999999ULL, 0x9999999999999999ULL, },
+        { 0xe93e93e93e94e93eULL, 0x93e93e94e93e93e9ULL, },
+        { 0xb05b05b05b05b05bULL, 0x05b05b05b05b05b0ULL, },
+        { 0x3334333433343334ULL, 0x3334333433343334ULL, },    /*  40  */
+        { 0x3333333333333333ULL, 0x3333333333333333ULL, },
+        { 0x8889888988898889ULL, 0x8889888988898889ULL, },
+        { 0xdddedddedddedddeULL, 0xdddedddedddedddeULL, },
+        { 0x6667666766676667ULL, 0x6667666766676667ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x4fa5fa50a4fb4fa5ULL, 0xfa50a4fb4fa5fa50ULL, },
+        { 0x16c26c17c16c16c2ULL, 0x6c17c16c16c26c17ULL, },
+        { 0xe38f38e48e39e38fULL, 0x38e48e39e38f38e4ULL, },    /*  48  */
+        { 0xe38e38e38e38e38eULL, 0x38e38e38e38e38e3ULL, },
+        { 0x38e48e39e38e38e4ULL, 0x8e39e38e38e48e39ULL, },
+        { 0x8e39e38e38e38e39ULL, 0xe38e38e38e39e38eULL, },
+        { 0x16c26c17c16c16c2ULL, 0x6c17c16c16c26c17ULL, },
+        { 0xb05b05b05b05b05bULL, 0x05b05b05b05b05b0ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0xc71d71c71c71c71dULL, 0x71c71c71c71d71c7ULL, },
+        { 0x1c72c71d71c81c72ULL, 0xc71d71c81c72c71dULL, },    /*  56  */
+        { 0x1c71c71c71c71c71ULL, 0xc71c71c71c71c71cULL, },
+        { 0x71c71c72c71d71c7ULL, 0x1c72c71d71c71c72ULL, },
+        { 0xc71c71c71c72c71cULL, 0x71c71c72c71c71c7ULL, },
+        { 0x4fa5fa50a4fb4fa5ULL, 0xfa50a4fb4fa5fa50ULL, },
+        { 0xe93e93e93e94e93eULL, 0x93e93e94e93e93e9ULL, },
+        { 0x38e38e39e38f38e3ULL, 0x8e39e38f38e38e39ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*  64  */
+        { 0x8cace669dacf8e38ULL, 0x38705044e93c5d10ULL, },
+        { 0xdc1038226e93c9c0ULL, 0x238f445f53508af8ULL, },
+        { 0x181bd07fca3172f2ULL, 0xbd7682865539cd6cULL, },
+        { 0x73541997253171c8ULL, 0xc790afbc16c4a2f0ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x4f6451b993c43b88ULL, 0xeb1ff41b6a142de8ULL, },
+        { 0x8b6fea16ef62e4baULL, 0x850632426bfd705cULL, },
+        { 0x23f0c7de916d3640ULL, 0xdc71bba1acb07508ULL, },    /*  72  */
+        { 0xb09cae476c3cc478ULL, 0x14e10be595ecd218ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x3c0b985d5b9ea932ULL, 0x99e73e2701e94274ULL, },
+        { 0xe7e52f8135cf8d0eULL, 0x428a7d7aaac73294ULL, },
+        { 0x749115ea109e1b46ULL, 0x7afacdbe94038fa4ULL, },
+};
+
+    gettimeofday(&start, NULL);
+
+    for (i = 0; i < PATTERN_INPUTS_SHORT_COUNT; i++) {
+        for (j = 0; j < PATTERN_INPUTS_SHORT_COUNT; j++) {
+            do_msa_SUBV_H(b128_pattern[i], b128_pattern[j],
+                           b128_result[PATTERN_INPUTS_SHORT_COUNT * i + j]);
+        }
+    }
+
+    for (i = 0; i < RANDOM_INPUTS_SHORT_COUNT; i++) {
+        for (j = 0; j < RANDOM_INPUTS_SHORT_COUNT; j++) {
+            do_msa_SUBV_H(b128_random[i], b128_random[j],
+                           b128_result[((PATTERN_INPUTS_SHORT_COUNT) *
+                                        (PATTERN_INPUTS_SHORT_COUNT)) +
+                                       RANDOM_INPUTS_SHORT_COUNT * i + j]);
+        }
+    }
+
+    gettimeofday(&end, NULL);
+
+    elapsed_time = (end.tv_sec - start.tv_sec) * 1000.0;
+    elapsed_time += (end.tv_usec - start.tv_usec) / 1000.0;
+
+    ret = check_results(instruction_name, TEST_COUNT_TOTAL, elapsed_time,
+                        &b128_result[0][0], &b128_expect[0][0]);
+
+    return ret;
+}
diff --git a/tests/tcg/mips/user/ase/msa/int-subtract/test_msa_subv_w.c b/tests/tcg/mips/user/ase/msa/int-subtract/test_msa_subv_w.c
new file mode 100644
index 0000000..3e97005
--- /dev/null
+++ b/tests/tcg/mips/user/ase/msa/int-subtract/test_msa_subv_w.c
@@ -0,0 +1,153 @@
+/*
+ *  Test program for MSA instruction SUBV.W
+ *
+ *  Copyright (C) 2018  Wave Computing, Inc.
+ *  Copyright (C) 2018  Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
+ *
+ *  This program is free software: you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation, either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <sys/time.h>
+#include <stdint.h>
+
+#include "../../../../include/wrappers_msa.h"
+#include "../../../../include/test_inputs.h"
+#include "../../../../include/test_utils.h"
+
+#define TEST_COUNT_TOTAL (                                                \
+            (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
+            (RANDOM_INPUTS_SHORT_COUNT) * (RANDOM_INPUTS_SHORT_COUNT))
+
+
+int32_t main(void)
+{
+    char *instruction_name = "SUBV.W";
+    int32_t ret;
+    uint32_t i, j;
+    struct timeval start, end;
+    double elapsed_time;
+
+    uint64_t b128_result[TEST_COUNT_TOTAL][2];
+    uint64_t b128_expect[TEST_COUNT_TOTAL][2] = {
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*   0  */
+        { 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
+        { 0x5555555555555555ULL, 0x5555555555555555ULL, },
+        { 0xaaaaaaaaaaaaaaaaULL, 0xaaaaaaaaaaaaaaaaULL, },
+        { 0x3333333333333333ULL, 0x3333333333333333ULL, },
+        { 0xccccccccccccccccULL, 0xccccccccccccccccULL, },
+        { 0x1c71c71c71c71c71ULL, 0xc71c71c71c71c71cULL, },
+        { 0xe38e38e38e38e38eULL, 0x38e38e38e38e38e3ULL, },
+        { 0x0000000100000001ULL, 0x0000000100000001ULL, },    /*   8  */
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x5555555655555556ULL, 0x5555555655555556ULL, },
+        { 0xaaaaaaabaaaaaaabULL, 0xaaaaaaabaaaaaaabULL, },
+        { 0x3333333433333334ULL, 0x3333333433333334ULL, },
+        { 0xcccccccdcccccccdULL, 0xcccccccdcccccccdULL, },
+        { 0x1c71c71d71c71c72ULL, 0xc71c71c81c71c71dULL, },
+        { 0xe38e38e48e38e38fULL, 0x38e38e39e38e38e4ULL, },
+        { 0xaaaaaaabaaaaaaabULL, 0xaaaaaaabaaaaaaabULL, },    /*  16  */
+        { 0xaaaaaaaaaaaaaaaaULL, 0xaaaaaaaaaaaaaaaaULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x5555555555555555ULL, 0x5555555555555555ULL, },
+        { 0xdddddddedddddddeULL, 0xdddddddedddddddeULL, },
+        { 0x7777777777777777ULL, 0x7777777777777777ULL, },
+        { 0xc71c71c71c71c71cULL, 0x71c71c72c71c71c7ULL, },
+        { 0x8e38e38e38e38e39ULL, 0xe38e38e38e38e38eULL, },
+        { 0x5555555655555556ULL, 0x5555555655555556ULL, },    /*  24  */
+        { 0x5555555555555555ULL, 0x5555555555555555ULL, },
+        { 0xaaaaaaabaaaaaaabULL, 0xaaaaaaabaaaaaaabULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x8888888988888889ULL, 0x8888888988888889ULL, },
+        { 0x2222222222222222ULL, 0x2222222222222222ULL, },
+        { 0x71c71c72c71c71c7ULL, 0x1c71c71d71c71c72ULL, },
+        { 0x38e38e39e38e38e4ULL, 0x8e38e38e38e38e39ULL, },
+        { 0xcccccccdcccccccdULL, 0xcccccccdcccccccdULL, },    /*  32  */
+        { 0xccccccccccccccccULL, 0xccccccccccccccccULL, },
+        { 0x2222222222222222ULL, 0x2222222222222222ULL, },
+        { 0x7777777777777777ULL, 0x7777777777777777ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x9999999999999999ULL, 0x9999999999999999ULL, },
+        { 0xe93e93e93e93e93eULL, 0x93e93e94e93e93e9ULL, },
+        { 0xb05b05b05b05b05bULL, 0x05b05b05b05b05b0ULL, },
+        { 0x3333333433333334ULL, 0x3333333433333334ULL, },    /*  40  */
+        { 0x3333333333333333ULL, 0x3333333333333333ULL, },
+        { 0x8888888988888889ULL, 0x8888888988888889ULL, },
+        { 0xdddddddedddddddeULL, 0xdddddddedddddddeULL, },
+        { 0x6666666766666667ULL, 0x6666666766666667ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x4fa4fa50a4fa4fa5ULL, 0xfa4fa4fb4fa4fa50ULL, },
+        { 0x16c16c17c16c16c2ULL, 0x6c16c16c16c16c17ULL, },
+        { 0xe38e38e48e38e38fULL, 0x38e38e39e38e38e4ULL, },    /*  48  */
+        { 0xe38e38e38e38e38eULL, 0x38e38e38e38e38e3ULL, },
+        { 0x38e38e39e38e38e4ULL, 0x8e38e38e38e38e39ULL, },
+        { 0x8e38e38e38e38e39ULL, 0xe38e38e38e38e38eULL, },
+        { 0x16c16c17c16c16c2ULL, 0x6c16c16c16c16c17ULL, },
+        { 0xb05b05b05b05b05bULL, 0x05b05b05b05b05b0ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0xc71c71c71c71c71dULL, 0x71c71c71c71c71c7ULL, },
+        { 0x1c71c71d71c71c72ULL, 0xc71c71c81c71c71dULL, },    /*  56  */
+        { 0x1c71c71c71c71c71ULL, 0xc71c71c71c71c71cULL, },
+        { 0x71c71c72c71c71c7ULL, 0x1c71c71d71c71c72ULL, },
+        { 0xc71c71c71c71c71cULL, 0x71c71c72c71c71c7ULL, },
+        { 0x4fa4fa50a4fa4fa5ULL, 0xfa4fa4fb4fa4fa50ULL, },
+        { 0xe93e93e93e93e93eULL, 0x93e93e94e93e93e9ULL, },
+        { 0x38e38e39e38e38e3ULL, 0x8e38e38f38e38e39ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },    /*  64  */
+        { 0x8cace669dace8e38ULL, 0x386f5044e93c5d10ULL, },
+        { 0xdc1038226e92c9c0ULL, 0x238e445f53508af8ULL, },
+        { 0x181bd07fca3072f2ULL, 0xbd7582865538cd6cULL, },
+        { 0x73531997253171c8ULL, 0xc790afbc16c3a2f0ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x4f6351b993c43b88ULL, 0xeb1ef41b6a142de8ULL, },
+        { 0x8b6eea16ef61e4baULL, 0x850632426bfc705cULL, },
+        { 0x23efc7de916d3640ULL, 0xdc71bba1acaf7508ULL, },    /*  72  */
+        { 0xb09cae476c3bc478ULL, 0x14e10be595ebd218ULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+        { 0x3c0b985d5b9da932ULL, 0x99e73e2701e84274ULL, },
+        { 0xe7e42f8135cf8d0eULL, 0x428a7d7aaac73294ULL, },
+        { 0x749115ea109e1b46ULL, 0x7af9cdbe94038fa4ULL, },
+        { 0xc3f467a3a46256ceULL, 0x6618c1d9fe17bd8cULL, },
+        { 0x0000000000000000ULL, 0x0000000000000000ULL, },
+};
+
+    gettimeofday(&start, NULL);
+
+    for (i = 0; i < PATTERN_INPUTS_SHORT_COUNT; i++) {
+        for (j = 0; j < PATTERN_INPUTS_SHORT_COUNT; j++) {
+            do_msa_SUBV_W(b128_pattern[i], b128_pattern[j],
+                           b128_result[PATTERN_INPUTS_SHORT_COUNT * i + j]);
+        }
+    }
+
+    for (i = 0; i < RANDOM_INPUTS_SHORT_COUNT; i++) {
+        for (j = 0; j < RANDOM_INPUTS_SHORT_COUNT; j++) {
+            do_msa_SUBV_W(b128_random[i], b128_random[j],
+                           b128_result[((PATTERN_INPUTS_SHORT_COUNT) *
+                                        (PATTERN_INPUTS_SHORT_COUNT)) +
+                                       RANDOM_INPUTS_SHORT_COUNT * i + j]);
+        }
+    }
+
+    gettimeofday(&end, NULL);
+
+    elapsed_time = (end.tv_sec - start.tv_sec) * 1000.0;
+    elapsed_time += (end.tv_usec - start.tv_usec) / 1000.0;
+
+    ret = check_results(instruction_name, TEST_COUNT_TOTAL, elapsed_time,
+                        &b128_result[0][0], &b128_expect[0][0]);
+
+    return ret;
+}
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [Qemu-devel] [PULL 0/7] MIPS queue for March 11th, 2019
  2019-03-11 14:24 [Qemu-devel] [PULL 0/7] MIPS queue for March 11th, 2019 Aleksandar Markovic
                   ` (6 preceding siblings ...)
  2019-03-11 14:24 ` [Qemu-devel] [PULL 7/7] target/mips: Add tests for a variety of MSA integer subtract instructions Aleksandar Markovic
@ 2019-03-11 18:26 ` Peter Maydell
  7 siblings, 0 replies; 9+ messages in thread
From: Peter Maydell @ 2019-03-11 18:26 UTC (permalink / raw)
  To: Aleksandar Markovic; +Cc: QEMU Developers, Aleksandar Markovic

On Mon, 11 Mar 2019 at 14:24, Aleksandar Markovic
<aleksandar.markovic@rt-rk.com> wrote:
>
> From: Aleksandar Markovic <amarkovic@wavecomp.com>
>
> The following changes since commit e2a18635a400b0e68679614132e9ef6316105590:
>
>   Merge remote-tracking branch 'remotes/ericb/tags/pull-nbd-2019-03-08' into staging (2019-03-09 20:55:44 +0000)
>
> are available in the git repository at:
>
>   https://github.com/AMarkovic/qemu tags/mips-queue-mar-11-2019
>
> for you to fetch changes up to 53e116fed6dde572003aebf3bc32e25663eeb446:
>
>   target/mips: Add tests for a variety of MSA integer subtract instructions (2019-03-11 12:45:36 +0100)
>
> ----------------------------------------------------------------
>
> MIPS queue for March 11th, 2019
>
>   - MIPS TCG tests updates and cleanups
>
>   Note:
>
>   - six checkpatch.pl warnings on "MAINTAINERS" can be ignored
>

Applied, thanks.

Please update the changelog at https://wiki.qemu.org/ChangeLog/4.0
for any user-visible changes.

-- PMM

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2019-03-11 18:26 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-11 14:24 [Qemu-devel] [PULL 0/7] MIPS queue for March 11th, 2019 Aleksandar Markovic
2019-03-11 14:24 ` [Qemu-devel] [PULL 1/7] tests/tcg: target/mips: Correct preambles of test source files Aleksandar Markovic
2019-03-11 14:24 ` [Qemu-devel] [PULL 2/7] tests/tcg: target/mips: Rename two header files for consistency Aleksandar Markovic
2019-03-11 14:24 ` [Qemu-devel] [PULL 3/7] target/mips: Add tests for a variety of MSA integer average instructions Aleksandar Markovic
2019-03-11 14:24 ` [Qemu-devel] [PULL 4/7] target/mips: Add tests for a variety of MSA integer divide instructions Aleksandar Markovic
2019-03-11 14:24 ` [Qemu-devel] [PULL 5/7] target/mips: Add tests for a variety of MSA integer dot product instructions Aleksandar Markovic
2019-03-11 14:24 ` [Qemu-devel] [PULL 6/7] target/mips: Add tests for a variety of MSA integer multiply instructions Aleksandar Markovic
2019-03-11 14:24 ` [Qemu-devel] [PULL 7/7] target/mips: Add tests for a variety of MSA integer subtract instructions Aleksandar Markovic
2019-03-11 18:26 ` [Qemu-devel] [PULL 0/7] MIPS queue for March 11th, 2019 Peter Maydell

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.