Build the 22 per-opcode shift tests as a single executable, test_dsp_shift.c, to reduce the number of test binaries. Each opcode reports one TAP line.
All DSP tests now emit TAP: select it in the meson setup. Signed-off-by: Philippe Mathieu-Daudé <[email protected]> --- tests/tcg/mipsel/test_dsp_r1_shll_ph.c | 1 - tests/tcg/mipsel/test_dsp_r1_shll_qb.c | 1 - tests/tcg/mipsel/test_dsp_r1_shll_s_ph.c | 1 - tests/tcg/mipsel/test_dsp_r1_shll_s_w.c | 1 - tests/tcg/mipsel/test_dsp_r1_shllv_ph.c | 1 - tests/tcg/mipsel/test_dsp_r1_shllv_qb.c | 1 - tests/tcg/mipsel/test_dsp_r1_shllv_s_ph.c | 1 - tests/tcg/mipsel/test_dsp_r1_shllv_s_w.c | 1 - tests/tcg/mipsel/test_dsp_r1_shra_ph.c | 1 - tests/tcg/mipsel/test_dsp_r1_shra_r_ph.c | 1 - tests/tcg/mipsel/test_dsp_r1_shra_r_w.c | 1 - tests/tcg/mipsel/test_dsp_r1_shrav_ph.c | 1 - tests/tcg/mipsel/test_dsp_r1_shrav_r_ph.c | 1 - tests/tcg/mipsel/test_dsp_r1_shrav_r_w.c | 1 - tests/tcg/mipsel/test_dsp_r1_shrl_qb.c | 1 - tests/tcg/mipsel/test_dsp_r1_shrlv_qb.c | 1 - tests/tcg/mipsel/test_dsp_r2_shra_qb.c | 1 - tests/tcg/mipsel/test_dsp_r2_shra_r_qb.c | 1 - tests/tcg/mipsel/test_dsp_r2_shrav_qb.c | 1 - tests/tcg/mipsel/test_dsp_r2_shrav_r_qb.c | 1 - tests/tcg/mipsel/test_dsp_r2_shrl_ph.c | 1 - tests/tcg/mipsel/test_dsp_r2_shrlv_ph.c | 1 - tests/tcg/mipsel/test_dsp_shift.c | 127 ++++++++++++++++++++++ tests/tcg/mipsel/meson.build | 24 +--- 24 files changed, 129 insertions(+), 44 deletions(-) create mode 100644 tests/tcg/mipsel/test_dsp_shift.c diff --git a/tests/tcg/mipsel/test_dsp_r1_shll_ph.c b/tests/tcg/mipsel/test_dsp_r1_shll_ph.c index 5fa58ccf6374..336ef50ca8a6 100644 --- a/tests/tcg/mipsel/test_dsp_r1_shll_ph.c +++ b/tests/tcg/mipsel/test_dsp_r1_shll_ph.c @@ -1,5 +1,4 @@ #include<stdio.h> -#include<assert.h> int main() { diff --git a/tests/tcg/mipsel/test_dsp_r1_shll_qb.c b/tests/tcg/mipsel/test_dsp_r1_shll_qb.c index 729716d62618..60cd916766ed 100644 --- a/tests/tcg/mipsel/test_dsp_r1_shll_qb.c +++ b/tests/tcg/mipsel/test_dsp_r1_shll_qb.c @@ -1,5 +1,4 @@ #include<stdio.h> -#include<assert.h> int main() { diff --git a/tests/tcg/mipsel/test_dsp_r1_shll_s_ph.c b/tests/tcg/mipsel/test_dsp_r1_shll_s_ph.c index 910fea3b317e..833b1d5673c8 100644 --- a/tests/tcg/mipsel/test_dsp_r1_shll_s_ph.c +++ b/tests/tcg/mipsel/test_dsp_r1_shll_s_ph.c @@ -1,5 +1,4 @@ #include<stdio.h> -#include<assert.h> int main() { diff --git a/tests/tcg/mipsel/test_dsp_r1_shll_s_w.c b/tests/tcg/mipsel/test_dsp_r1_shll_s_w.c index 628c7521027b..1848afb21323 100644 --- a/tests/tcg/mipsel/test_dsp_r1_shll_s_w.c +++ b/tests/tcg/mipsel/test_dsp_r1_shll_s_w.c @@ -1,5 +1,4 @@ #include<stdio.h> -#include<assert.h> int main() { diff --git a/tests/tcg/mipsel/test_dsp_r1_shllv_ph.c b/tests/tcg/mipsel/test_dsp_r1_shllv_ph.c index f98a6322dc1d..bc1664d70d12 100644 --- a/tests/tcg/mipsel/test_dsp_r1_shllv_ph.c +++ b/tests/tcg/mipsel/test_dsp_r1_shllv_ph.c @@ -1,5 +1,4 @@ #include<stdio.h> -#include<assert.h> int main() { diff --git a/tests/tcg/mipsel/test_dsp_r1_shllv_qb.c b/tests/tcg/mipsel/test_dsp_r1_shllv_qb.c index 6d8ff4a259ba..84600fc7fb36 100644 --- a/tests/tcg/mipsel/test_dsp_r1_shllv_qb.c +++ b/tests/tcg/mipsel/test_dsp_r1_shllv_qb.c @@ -1,5 +1,4 @@ #include<stdio.h> -#include<assert.h> int main() { diff --git a/tests/tcg/mipsel/test_dsp_r1_shllv_s_ph.c b/tests/tcg/mipsel/test_dsp_r1_shllv_s_ph.c index fc9bd32765b8..4c84f3b94164 100644 --- a/tests/tcg/mipsel/test_dsp_r1_shllv_s_ph.c +++ b/tests/tcg/mipsel/test_dsp_r1_shllv_s_ph.c @@ -1,5 +1,4 @@ #include<stdio.h> -#include<assert.h> int main() { diff --git a/tests/tcg/mipsel/test_dsp_r1_shllv_s_w.c b/tests/tcg/mipsel/test_dsp_r1_shllv_s_w.c index 350c25617adc..5c06b4411a0e 100644 --- a/tests/tcg/mipsel/test_dsp_r1_shllv_s_w.c +++ b/tests/tcg/mipsel/test_dsp_r1_shllv_s_w.c @@ -1,5 +1,4 @@ #include<stdio.h> -#include<assert.h> int main() { diff --git a/tests/tcg/mipsel/test_dsp_r1_shra_ph.c b/tests/tcg/mipsel/test_dsp_r1_shra_ph.c index 5b2d840a6bc5..38fdc66e5b66 100644 --- a/tests/tcg/mipsel/test_dsp_r1_shra_ph.c +++ b/tests/tcg/mipsel/test_dsp_r1_shra_ph.c @@ -1,5 +1,4 @@ #include<stdio.h> -#include<assert.h> int main() { diff --git a/tests/tcg/mipsel/test_dsp_r1_shra_r_ph.c b/tests/tcg/mipsel/test_dsp_r1_shra_r_ph.c index adc4ae68bdc3..c838f8a32fe2 100644 --- a/tests/tcg/mipsel/test_dsp_r1_shra_r_ph.c +++ b/tests/tcg/mipsel/test_dsp_r1_shra_r_ph.c @@ -1,5 +1,4 @@ #include<stdio.h> -#include<assert.h> int main() { diff --git a/tests/tcg/mipsel/test_dsp_r1_shra_r_w.c b/tests/tcg/mipsel/test_dsp_r1_shra_r_w.c index ec0cf2c72ccb..d722cdecd166 100644 --- a/tests/tcg/mipsel/test_dsp_r1_shra_r_w.c +++ b/tests/tcg/mipsel/test_dsp_r1_shra_r_w.c @@ -1,5 +1,4 @@ #include<stdio.h> -#include<assert.h> int main() { diff --git a/tests/tcg/mipsel/test_dsp_r1_shrav_ph.c b/tests/tcg/mipsel/test_dsp_r1_shrav_ph.c index 6e42aaf8e1a7..c2cad6e67309 100644 --- a/tests/tcg/mipsel/test_dsp_r1_shrav_ph.c +++ b/tests/tcg/mipsel/test_dsp_r1_shrav_ph.c @@ -1,5 +1,4 @@ #include<stdio.h> -#include<assert.h> int main() { diff --git a/tests/tcg/mipsel/test_dsp_r1_shrav_r_ph.c b/tests/tcg/mipsel/test_dsp_r1_shrav_r_ph.c index f03b978d0544..ec2eea36b947 100644 --- a/tests/tcg/mipsel/test_dsp_r1_shrav_r_ph.c +++ b/tests/tcg/mipsel/test_dsp_r1_shrav_r_ph.c @@ -1,5 +1,4 @@ #include<stdio.h> -#include<assert.h> int main() { diff --git a/tests/tcg/mipsel/test_dsp_r1_shrav_r_w.c b/tests/tcg/mipsel/test_dsp_r1_shrav_r_w.c index 2ab03bb5daae..af50a92af2a9 100644 --- a/tests/tcg/mipsel/test_dsp_r1_shrav_r_w.c +++ b/tests/tcg/mipsel/test_dsp_r1_shrav_r_w.c @@ -1,5 +1,4 @@ #include<stdio.h> -#include<assert.h> int main() { diff --git a/tests/tcg/mipsel/test_dsp_r1_shrl_qb.c b/tests/tcg/mipsel/test_dsp_r1_shrl_qb.c index a7e4e6a5e4f5..bf6fab4ceb81 100644 --- a/tests/tcg/mipsel/test_dsp_r1_shrl_qb.c +++ b/tests/tcg/mipsel/test_dsp_r1_shrl_qb.c @@ -1,5 +1,4 @@ #include<stdio.h> -#include<assert.h> int main() { diff --git a/tests/tcg/mipsel/test_dsp_r1_shrlv_qb.c b/tests/tcg/mipsel/test_dsp_r1_shrlv_qb.c index db77f6d0e117..99d7aba6dde9 100644 --- a/tests/tcg/mipsel/test_dsp_r1_shrlv_qb.c +++ b/tests/tcg/mipsel/test_dsp_r1_shrlv_qb.c @@ -1,5 +1,4 @@ #include<stdio.h> -#include<assert.h> int main() { diff --git a/tests/tcg/mipsel/test_dsp_r2_shra_qb.c b/tests/tcg/mipsel/test_dsp_r2_shra_qb.c index 48193de87ad0..d4ca7430fdba 100644 --- a/tests/tcg/mipsel/test_dsp_r2_shra_qb.c +++ b/tests/tcg/mipsel/test_dsp_r2_shra_qb.c @@ -1,5 +1,4 @@ #include<stdio.h> -#include<assert.h> int main() { diff --git a/tests/tcg/mipsel/test_dsp_r2_shra_r_qb.c b/tests/tcg/mipsel/test_dsp_r2_shra_r_qb.c index 29afa0e4b07b..08d22fd4cd6f 100644 --- a/tests/tcg/mipsel/test_dsp_r2_shra_r_qb.c +++ b/tests/tcg/mipsel/test_dsp_r2_shra_r_qb.c @@ -1,5 +1,4 @@ #include<stdio.h> -#include<assert.h> int main() { diff --git a/tests/tcg/mipsel/test_dsp_r2_shrav_qb.c b/tests/tcg/mipsel/test_dsp_r2_shrav_qb.c index b21e1b7ca64a..5015a124b89d 100644 --- a/tests/tcg/mipsel/test_dsp_r2_shrav_qb.c +++ b/tests/tcg/mipsel/test_dsp_r2_shrav_qb.c @@ -1,5 +1,4 @@ #include<stdio.h> -#include<assert.h> int main() { diff --git a/tests/tcg/mipsel/test_dsp_r2_shrav_r_qb.c b/tests/tcg/mipsel/test_dsp_r2_shrav_r_qb.c index 9ea8aa0cbb90..1bfc66ec3676 100644 --- a/tests/tcg/mipsel/test_dsp_r2_shrav_r_qb.c +++ b/tests/tcg/mipsel/test_dsp_r2_shrav_r_qb.c @@ -1,5 +1,4 @@ #include<stdio.h> -#include<assert.h> int main() { diff --git a/tests/tcg/mipsel/test_dsp_r2_shrl_ph.c b/tests/tcg/mipsel/test_dsp_r2_shrl_ph.c index 724b9a7a4691..ea53113568e0 100644 --- a/tests/tcg/mipsel/test_dsp_r2_shrl_ph.c +++ b/tests/tcg/mipsel/test_dsp_r2_shrl_ph.c @@ -1,5 +1,4 @@ #include<stdio.h> -#include<assert.h> int main() { diff --git a/tests/tcg/mipsel/test_dsp_r2_shrlv_ph.c b/tests/tcg/mipsel/test_dsp_r2_shrlv_ph.c index ac79aa69acf0..40edd7cab67f 100644 --- a/tests/tcg/mipsel/test_dsp_r2_shrlv_ph.c +++ b/tests/tcg/mipsel/test_dsp_r2_shrlv_ph.c @@ -1,5 +1,4 @@ #include<stdio.h> -#include<assert.h> int main() { diff --git a/tests/tcg/mipsel/test_dsp_shift.c b/tests/tcg/mipsel/test_dsp_shift.c new file mode 100644 index 000000000000..8854ca255747 --- /dev/null +++ b/tests/tcg/mipsel/test_dsp_shift.c @@ -0,0 +1,127 @@ +/* + * MIPS DSP ASE tests: Shift instructions + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +#include "test_dsp_runner.h" + +#define main test_dsp_r1_shll_ph +#include "test_dsp_r1_shll_ph.c" +#undef main + +#define main test_dsp_r1_shll_qb +#include "test_dsp_r1_shll_qb.c" +#undef main + +#define main test_dsp_r1_shll_s_ph +#include "test_dsp_r1_shll_s_ph.c" +#undef main + +#define main test_dsp_r1_shll_s_w +#include "test_dsp_r1_shll_s_w.c" +#undef main + +#define main test_dsp_r1_shllv_ph +#include "test_dsp_r1_shllv_ph.c" +#undef main + +#define main test_dsp_r1_shllv_qb +#include "test_dsp_r1_shllv_qb.c" +#undef main + +#define main test_dsp_r1_shllv_s_ph +#include "test_dsp_r1_shllv_s_ph.c" +#undef main + +#define main test_dsp_r1_shllv_s_w +#include "test_dsp_r1_shllv_s_w.c" +#undef main + +#define main test_dsp_r1_shra_ph +#include "test_dsp_r1_shra_ph.c" +#undef main + +#define main test_dsp_r1_shra_r_ph +#include "test_dsp_r1_shra_r_ph.c" +#undef main + +#define main test_dsp_r1_shra_r_w +#include "test_dsp_r1_shra_r_w.c" +#undef main + +#define main test_dsp_r1_shrav_ph +#include "test_dsp_r1_shrav_ph.c" +#undef main + +#define main test_dsp_r1_shrav_r_ph +#include "test_dsp_r1_shrav_r_ph.c" +#undef main + +#define main test_dsp_r1_shrav_r_w +#include "test_dsp_r1_shrav_r_w.c" +#undef main + +#define main test_dsp_r1_shrl_qb +#include "test_dsp_r1_shrl_qb.c" +#undef main + +#define main test_dsp_r1_shrlv_qb +#include "test_dsp_r1_shrlv_qb.c" +#undef main + +#define main test_dsp_r2_shra_qb +#include "test_dsp_r2_shra_qb.c" +#undef main + +#define main test_dsp_r2_shra_r_qb +#include "test_dsp_r2_shra_r_qb.c" +#undef main + +#define main test_dsp_r2_shrav_qb +#include "test_dsp_r2_shrav_qb.c" +#undef main + +#define main test_dsp_r2_shrav_r_qb +#include "test_dsp_r2_shrav_r_qb.c" +#undef main + +#define main test_dsp_r2_shrl_ph +#include "test_dsp_r2_shrl_ph.c" +#undef main + +#define main test_dsp_r2_shrlv_ph +#include "test_dsp_r2_shrlv_ph.c" +#undef main + +int main(void) +{ + int ret = 0; + + RUN_TEST(test_dsp_r1_shll_ph); + RUN_TEST(test_dsp_r1_shll_qb); + RUN_TEST(test_dsp_r1_shll_s_ph); + RUN_TEST(test_dsp_r1_shll_s_w); + RUN_TEST(test_dsp_r1_shllv_ph); + RUN_TEST(test_dsp_r1_shllv_qb); + RUN_TEST(test_dsp_r1_shllv_s_ph); + RUN_TEST(test_dsp_r1_shllv_s_w); + RUN_TEST(test_dsp_r1_shra_ph); + RUN_TEST(test_dsp_r1_shra_r_ph); + RUN_TEST(test_dsp_r1_shra_r_w); + RUN_TEST(test_dsp_r1_shrav_ph); + RUN_TEST(test_dsp_r1_shrav_r_ph); + RUN_TEST(test_dsp_r1_shrav_r_w); + RUN_TEST(test_dsp_r1_shrl_qb); + RUN_TEST(test_dsp_r1_shrlv_qb); + RUN_TEST(test_dsp_r2_shra_qb); + RUN_TEST(test_dsp_r2_shra_r_qb); + RUN_TEST(test_dsp_r2_shrav_qb); + RUN_TEST(test_dsp_r2_shrav_r_qb); + RUN_TEST(test_dsp_r2_shrl_ph); + RUN_TEST(test_dsp_r2_shrlv_ph); + + DSP_TAP_PLAN(); + + return ret; +} diff --git a/tests/tcg/mipsel/meson.build b/tests/tcg/mipsel/meson.build index 247db7d10d79..9e446eed0f6e 100644 --- a/tests/tcg/mipsel/meson.build +++ b/tests/tcg/mipsel/meson.build @@ -11,28 +11,7 @@ tests_dsp = [ 'test_dsp_dot.c', 'test_dsp_mul.c', 'test_dsp_pack.c', - 'test_dsp_r1_shll_ph.c', - 'test_dsp_r1_shll_qb.c', - 'test_dsp_r1_shll_s_ph.c', - 'test_dsp_r1_shll_s_w.c', - 'test_dsp_r1_shllv_ph.c', - 'test_dsp_r1_shllv_qb.c', - 'test_dsp_r1_shllv_s_ph.c', - 'test_dsp_r1_shllv_s_w.c', - 'test_dsp_r1_shra_ph.c', - 'test_dsp_r1_shra_r_ph.c', - 'test_dsp_r1_shra_r_w.c', - 'test_dsp_r1_shrav_ph.c', - 'test_dsp_r1_shrav_r_ph.c', - 'test_dsp_r1_shrav_r_w.c', - 'test_dsp_r1_shrl_qb.c', - 'test_dsp_r1_shrlv_qb.c', - 'test_dsp_r2_shra_qb.c', - 'test_dsp_r2_shra_r_qb.c', - 'test_dsp_r2_shrav_qb.c', - 'test_dsp_r2_shrav_r_qb.c', - 'test_dsp_r2_shrl_ph.c', - 'test_dsp_r2_shrlv_ph.c', + 'test_dsp_shift.c', ] foreach src: tests_dsp @@ -41,6 +20,7 @@ foreach src: tests_dsp 'cflags': ['-EL', '-mabi=32', '-march=mips32r2', '-mgp32', '-mdsp', '-mdspr2', '-Wno-unused-but-set-variable', '-Wno-unused-variable'], 'qemu_args': ['-cpu', '74Kf'], + 'protocol': 'tap', } } endforeach -- 2.55.0
