Build the 14 per-opcode cmp tests as a single executable,
test_dsp_cmp.c, to reduce the number of test binaries.
Each opcode reports one TAP line.

Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
---
 tests/tcg/mipsel/test_dsp_cmp.c             | 87 +++++++++++++++++++++
 tests/tcg/mipsel/test_dsp_r1_cmp_eq_ph.c    |  1 -
 tests/tcg/mipsel/test_dsp_r1_cmp_le_ph.c    |  1 -
 tests/tcg/mipsel/test_dsp_r1_cmp_lt_ph.c    |  1 -
 tests/tcg/mipsel/test_dsp_r1_cmpgu_eq_qb.c  |  1 -
 tests/tcg/mipsel/test_dsp_r1_cmpgu_le_qb.c  |  1 -
 tests/tcg/mipsel/test_dsp_r1_cmpgu_lt_qb.c  |  1 -
 tests/tcg/mipsel/test_dsp_r1_cmpu_eq_qb.c   |  1 -
 tests/tcg/mipsel/test_dsp_r1_cmpu_le_qb.c   |  1 -
 tests/tcg/mipsel/test_dsp_r1_cmpu_lt_qb.c   |  1 -
 tests/tcg/mipsel/test_dsp_r1_pick_ph.c      |  1 -
 tests/tcg/mipsel/test_dsp_r1_pick_qb.c      |  1 -
 tests/tcg/mipsel/test_dsp_r2_cmpgdu_eq_qb.c |  1 -
 tests/tcg/mipsel/test_dsp_r2_cmpgdu_le_qb.c |  1 -
 tests/tcg/mipsel/test_dsp_r2_cmpgdu_lt_qb.c |  1 -
 tests/tcg/mipsel/meson.build                | 15 +---
 16 files changed, 88 insertions(+), 28 deletions(-)
 create mode 100644 tests/tcg/mipsel/test_dsp_cmp.c

diff --git a/tests/tcg/mipsel/test_dsp_cmp.c b/tests/tcg/mipsel/test_dsp_cmp.c
new file mode 100644
index 000000000000..89bc1fcfd1ca
--- /dev/null
+++ b/tests/tcg/mipsel/test_dsp_cmp.c
@@ -0,0 +1,87 @@
+/*
+ * MIPS DSP ASE tests: Compare and Pick instructions
+ *
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ */
+
+#include "test_dsp_runner.h"
+
+#define main test_dsp_r1_cmp_eq_ph
+#include "test_dsp_r1_cmp_eq_ph.c"
+#undef main
+
+#define main test_dsp_r1_cmp_le_ph
+#include "test_dsp_r1_cmp_le_ph.c"
+#undef main
+
+#define main test_dsp_r1_cmp_lt_ph
+#include "test_dsp_r1_cmp_lt_ph.c"
+#undef main
+
+#define main test_dsp_r1_cmpgu_eq_qb
+#include "test_dsp_r1_cmpgu_eq_qb.c"
+#undef main
+
+#define main test_dsp_r1_cmpgu_le_qb
+#include "test_dsp_r1_cmpgu_le_qb.c"
+#undef main
+
+#define main test_dsp_r1_cmpgu_lt_qb
+#include "test_dsp_r1_cmpgu_lt_qb.c"
+#undef main
+
+#define main test_dsp_r1_cmpu_eq_qb
+#include "test_dsp_r1_cmpu_eq_qb.c"
+#undef main
+
+#define main test_dsp_r1_cmpu_le_qb
+#include "test_dsp_r1_cmpu_le_qb.c"
+#undef main
+
+#define main test_dsp_r1_cmpu_lt_qb
+#include "test_dsp_r1_cmpu_lt_qb.c"
+#undef main
+
+#define main test_dsp_r1_pick_ph
+#include "test_dsp_r1_pick_ph.c"
+#undef main
+
+#define main test_dsp_r1_pick_qb
+#include "test_dsp_r1_pick_qb.c"
+#undef main
+
+#define main test_dsp_r2_cmpgdu_eq_qb
+#include "test_dsp_r2_cmpgdu_eq_qb.c"
+#undef main
+
+#define main test_dsp_r2_cmpgdu_le_qb
+#include "test_dsp_r2_cmpgdu_le_qb.c"
+#undef main
+
+#define main test_dsp_r2_cmpgdu_lt_qb
+#include "test_dsp_r2_cmpgdu_lt_qb.c"
+#undef main
+
+int main(void)
+{
+    int ret = 0;
+
+    RUN_TEST(test_dsp_r1_cmp_eq_ph);
+    RUN_TEST(test_dsp_r1_cmp_le_ph);
+    RUN_TEST(test_dsp_r1_cmp_lt_ph);
+    RUN_TEST(test_dsp_r1_cmpgu_eq_qb);
+    RUN_TEST(test_dsp_r1_cmpgu_le_qb);
+    RUN_TEST(test_dsp_r1_cmpgu_lt_qb);
+    RUN_TEST(test_dsp_r1_cmpu_eq_qb);
+    RUN_TEST(test_dsp_r1_cmpu_le_qb);
+    RUN_TEST(test_dsp_r1_cmpu_lt_qb);
+    RUN_TEST(test_dsp_r1_pick_ph);
+    RUN_TEST(test_dsp_r1_pick_qb);
+    RUN_TEST(test_dsp_r2_cmpgdu_eq_qb);
+    RUN_TEST(test_dsp_r2_cmpgdu_le_qb);
+    RUN_TEST(test_dsp_r2_cmpgdu_lt_qb);
+
+    DSP_TAP_PLAN();
+
+    return ret;
+}
diff --git a/tests/tcg/mipsel/test_dsp_r1_cmp_eq_ph.c 
b/tests/tcg/mipsel/test_dsp_r1_cmp_eq_ph.c
index 957bd88ce01f..47406f77c59e 100644
--- a/tests/tcg/mipsel/test_dsp_r1_cmp_eq_ph.c
+++ b/tests/tcg/mipsel/test_dsp_r1_cmp_eq_ph.c
@@ -1,5 +1,4 @@
 #include<stdio.h>
-#include<assert.h>
 
 int main()
 {
diff --git a/tests/tcg/mipsel/test_dsp_r1_cmp_le_ph.c 
b/tests/tcg/mipsel/test_dsp_r1_cmp_le_ph.c
index 356f156c5d1f..811646d78e84 100644
--- a/tests/tcg/mipsel/test_dsp_r1_cmp_le_ph.c
+++ b/tests/tcg/mipsel/test_dsp_r1_cmp_le_ph.c
@@ -1,5 +1,4 @@
 #include<stdio.h>
-#include<assert.h>
 
 int main()
 {
diff --git a/tests/tcg/mipsel/test_dsp_r1_cmp_lt_ph.c 
b/tests/tcg/mipsel/test_dsp_r1_cmp_lt_ph.c
index 3fb4827ad761..430953a77215 100644
--- a/tests/tcg/mipsel/test_dsp_r1_cmp_lt_ph.c
+++ b/tests/tcg/mipsel/test_dsp_r1_cmp_lt_ph.c
@@ -1,5 +1,4 @@
 #include<stdio.h>
-#include<assert.h>
 
 int main()
 {
diff --git a/tests/tcg/mipsel/test_dsp_r1_cmpgu_eq_qb.c 
b/tests/tcg/mipsel/test_dsp_r1_cmpgu_eq_qb.c
index 2615c84c75c7..1fd5b523a44e 100644
--- a/tests/tcg/mipsel/test_dsp_r1_cmpgu_eq_qb.c
+++ b/tests/tcg/mipsel/test_dsp_r1_cmpgu_eq_qb.c
@@ -1,5 +1,4 @@
 #include<stdio.h>
-#include<assert.h>
 
 int main()
 {
diff --git a/tests/tcg/mipsel/test_dsp_r1_cmpgu_le_qb.c 
b/tests/tcg/mipsel/test_dsp_r1_cmpgu_le_qb.c
index 65d0813c3b19..da1277065246 100644
--- a/tests/tcg/mipsel/test_dsp_r1_cmpgu_le_qb.c
+++ b/tests/tcg/mipsel/test_dsp_r1_cmpgu_le_qb.c
@@ -1,5 +1,4 @@
 #include<stdio.h>
-#include<assert.h>
 
 int main()
 {
diff --git a/tests/tcg/mipsel/test_dsp_r1_cmpgu_lt_qb.c 
b/tests/tcg/mipsel/test_dsp_r1_cmpgu_lt_qb.c
index 7dddad98532c..9317f9a3fa44 100644
--- a/tests/tcg/mipsel/test_dsp_r1_cmpgu_lt_qb.c
+++ b/tests/tcg/mipsel/test_dsp_r1_cmpgu_lt_qb.c
@@ -1,5 +1,4 @@
 #include<stdio.h>
-#include<assert.h>
 
 int main()
 {
diff --git a/tests/tcg/mipsel/test_dsp_r1_cmpu_eq_qb.c 
b/tests/tcg/mipsel/test_dsp_r1_cmpu_eq_qb.c
index 680f2a1999d8..8736e7fc45ad 100644
--- a/tests/tcg/mipsel/test_dsp_r1_cmpu_eq_qb.c
+++ b/tests/tcg/mipsel/test_dsp_r1_cmpu_eq_qb.c
@@ -1,5 +1,4 @@
 #include<stdio.h>
-#include<assert.h>
 
 int main()
 {
diff --git a/tests/tcg/mipsel/test_dsp_r1_cmpu_le_qb.c 
b/tests/tcg/mipsel/test_dsp_r1_cmpu_le_qb.c
index 43cfa509ca3c..fbc620adf95d 100644
--- a/tests/tcg/mipsel/test_dsp_r1_cmpu_le_qb.c
+++ b/tests/tcg/mipsel/test_dsp_r1_cmpu_le_qb.c
@@ -1,5 +1,4 @@
 #include<stdio.h>
-#include<assert.h>
 
 int main()
 {
diff --git a/tests/tcg/mipsel/test_dsp_r1_cmpu_lt_qb.c 
b/tests/tcg/mipsel/test_dsp_r1_cmpu_lt_qb.c
index 074ca5b402de..8132b13a97c2 100644
--- a/tests/tcg/mipsel/test_dsp_r1_cmpu_lt_qb.c
+++ b/tests/tcg/mipsel/test_dsp_r1_cmpu_lt_qb.c
@@ -1,5 +1,4 @@
 #include<stdio.h>
-#include<assert.h>
 
 int main()
 {
diff --git a/tests/tcg/mipsel/test_dsp_r1_pick_ph.c 
b/tests/tcg/mipsel/test_dsp_r1_pick_ph.c
index 929a002e7544..0a11b5d12ce3 100644
--- a/tests/tcg/mipsel/test_dsp_r1_pick_ph.c
+++ b/tests/tcg/mipsel/test_dsp_r1_pick_ph.c
@@ -1,5 +1,4 @@
 #include<stdio.h>
-#include<assert.h>
 
 int main()
 {
diff --git a/tests/tcg/mipsel/test_dsp_r1_pick_qb.c 
b/tests/tcg/mipsel/test_dsp_r1_pick_qb.c
index a79047524662..8def9559d632 100644
--- a/tests/tcg/mipsel/test_dsp_r1_pick_qb.c
+++ b/tests/tcg/mipsel/test_dsp_r1_pick_qb.c
@@ -1,5 +1,4 @@
 #include<stdio.h>
-#include<assert.h>
 
 int main()
 {
diff --git a/tests/tcg/mipsel/test_dsp_r2_cmpgdu_eq_qb.c 
b/tests/tcg/mipsel/test_dsp_r2_cmpgdu_eq_qb.c
index 2d6340d6fb12..cfc71839591a 100644
--- a/tests/tcg/mipsel/test_dsp_r2_cmpgdu_eq_qb.c
+++ b/tests/tcg/mipsel/test_dsp_r2_cmpgdu_eq_qb.c
@@ -1,5 +1,4 @@
 #include<stdio.h>
-#include<assert.h>
 
 int main()
 {
diff --git a/tests/tcg/mipsel/test_dsp_r2_cmpgdu_le_qb.c 
b/tests/tcg/mipsel/test_dsp_r2_cmpgdu_le_qb.c
index a0ecdca2ac2e..9e7d8260cfa7 100644
--- a/tests/tcg/mipsel/test_dsp_r2_cmpgdu_le_qb.c
+++ b/tests/tcg/mipsel/test_dsp_r2_cmpgdu_le_qb.c
@@ -1,5 +1,4 @@
 #include<stdio.h>
-#include<assert.h>
 
 int main()
 {
diff --git a/tests/tcg/mipsel/test_dsp_r2_cmpgdu_lt_qb.c 
b/tests/tcg/mipsel/test_dsp_r2_cmpgdu_lt_qb.c
index dba99e392c29..ec964e39074f 100644
--- a/tests/tcg/mipsel/test_dsp_r2_cmpgdu_lt_qb.c
+++ b/tests/tcg/mipsel/test_dsp_r2_cmpgdu_lt_qb.c
@@ -1,5 +1,4 @@
 #include<stdio.h>
-#include<assert.h>
 
 int main()
 {
diff --git a/tests/tcg/mipsel/meson.build b/tests/tcg/mipsel/meson.build
index e7e576ad6c19..e8737308c40d 100644
--- a/tests/tcg/mipsel/meson.build
+++ b/tests/tcg/mipsel/meson.build
@@ -6,17 +6,9 @@ tests += tcg_tests['multiarch-linux-user']['tests']
 tests_dsp = [
   'test_dsp_acc.c',
   'test_dsp_arith.c',
+  'test_dsp_cmp.c',
   'test_dsp_r1_bitrev.c',
   'test_dsp_r1_bposge32.c',
-  'test_dsp_r1_cmp_eq_ph.c',
-  'test_dsp_r1_cmp_le_ph.c',
-  'test_dsp_r1_cmp_lt_ph.c',
-  'test_dsp_r1_cmpgu_eq_qb.c',
-  'test_dsp_r1_cmpgu_le_qb.c',
-  'test_dsp_r1_cmpgu_lt_qb.c',
-  'test_dsp_r1_cmpu_eq_qb.c',
-  'test_dsp_r1_cmpu_le_qb.c',
-  'test_dsp_r1_cmpu_lt_qb.c',
   'test_dsp_r1_dpaq_s_w_ph.c',
   'test_dsp_r1_dpaq_sa_l_w.c',
   'test_dsp_r1_dpau_h_qbl.c',
@@ -45,8 +37,6 @@ tests_dsp = [
   'test_dsp_r1_mult.c',
   'test_dsp_r1_multu.c',
   'test_dsp_r1_packrl_ph.c',
-  'test_dsp_r1_pick_ph.c',
-  'test_dsp_r1_pick_qb.c',
   'test_dsp_r1_preceq_w_phl.c',
   'test_dsp_r1_preceq_w_phr.c',
   'test_dsp_r1_precequ_ph_qbl.c',
@@ -85,9 +75,6 @@ tests_dsp = [
   'test_dsp_r1_wrdsp.c',
   'test_dsp_r2_append.c',
   'test_dsp_r2_balign.c',
-  'test_dsp_r2_cmpgdu_eq_qb.c',
-  'test_dsp_r2_cmpgdu_le_qb.c',
-  'test_dsp_r2_cmpgdu_lt_qb.c',
   'test_dsp_r2_dpa_w_ph.c',
   'test_dsp_r2_dpaqx_s_w_ph.c',
   'test_dsp_r2_dpaqx_sa_w_ph.c',
-- 
2.55.0


Reply via email to