On 10/28/2026 11:25 AM, Philippe Mathieu-Daudé wrote: > The Makefile needs a toolchain we do not have and qemu-mipsel, > which no longer provides the R5900 CPU. Move the tests next to > the bare-metal harness, register them in meson.build, and remove > the Makefile and the obsolete README. > > Signed-off-by: Philippe Mathieu-Daudé <[email protected]> > --- > .../system}/test_r5900_div1.c | 0 > .../system}/test_r5900_divu1.c | 0 > .../system}/test_r5900_madd.c | 0 > .../system}/test_r5900_maddu.c | 0 > .../system}/test_r5900_mflohi1.c | 0 > .../system}/test_r5900_mtlohi1.c | 0 > .../system}/test_r5900_mult.c | 0 > .../system}/test_r5900_multu.c | 0 > tests/tcg/mips/user/isa/r5900/Makefile | 32 ------------------- > tests/tcg/mips/user/isa/r5900/README | 6 ---- > tests/tcg/mips64el/system/meson.build | 20 ++++++++++++ > 11 files changed, 20 insertions(+), 38 deletions(-) > rename tests/tcg/{mips/user/isa/r5900 => mips64el/system}/test_r5900_div1.c > (100%) > rename tests/tcg/{mips/user/isa/r5900 => mips64el/system}/test_r5900_divu1.c > (100%) > rename tests/tcg/{mips/user/isa/r5900 => mips64el/system}/test_r5900_madd.c > (100%) > rename tests/tcg/{mips/user/isa/r5900 => mips64el/system}/test_r5900_maddu.c > (100%) > rename tests/tcg/{mips/user/isa/r5900 => > mips64el/system}/test_r5900_mflohi1.c (100%) > rename tests/tcg/{mips/user/isa/r5900 => > mips64el/system}/test_r5900_mtlohi1.c (100%) > rename tests/tcg/{mips/user/isa/r5900 => mips64el/system}/test_r5900_mult.c > (100%) > rename tests/tcg/{mips/user/isa/r5900 => mips64el/system}/test_r5900_multu.c > (100%) > delete mode 100644 tests/tcg/mips/user/isa/r5900/Makefile > delete mode 100644 tests/tcg/mips/user/isa/r5900/README > > diff --git a/tests/tcg/mips/user/isa/r5900/test_r5900_div1.c > b/tests/tcg/mips64el/system/test_r5900_div1.c > similarity index 100% > rename from tests/tcg/mips/user/isa/r5900/test_r5900_div1.c > rename to tests/tcg/mips64el/system/test_r5900_div1.c > diff --git a/tests/tcg/mips/user/isa/r5900/test_r5900_divu1.c > b/tests/tcg/mips64el/system/test_r5900_divu1.c > similarity index 100% > rename from tests/tcg/mips/user/isa/r5900/test_r5900_divu1.c > rename to tests/tcg/mips64el/system/test_r5900_divu1.c > diff --git a/tests/tcg/mips/user/isa/r5900/test_r5900_madd.c > b/tests/tcg/mips64el/system/test_r5900_madd.c > similarity index 100% > rename from tests/tcg/mips/user/isa/r5900/test_r5900_madd.c > rename to tests/tcg/mips64el/system/test_r5900_madd.c > diff --git a/tests/tcg/mips/user/isa/r5900/test_r5900_maddu.c > b/tests/tcg/mips64el/system/test_r5900_maddu.c > similarity index 100% > rename from tests/tcg/mips/user/isa/r5900/test_r5900_maddu.c > rename to tests/tcg/mips64el/system/test_r5900_maddu.c > diff --git a/tests/tcg/mips/user/isa/r5900/test_r5900_mflohi1.c > b/tests/tcg/mips64el/system/test_r5900_mflohi1.c > similarity index 100% > rename from tests/tcg/mips/user/isa/r5900/test_r5900_mflohi1.c > rename to tests/tcg/mips64el/system/test_r5900_mflohi1.c > diff --git a/tests/tcg/mips/user/isa/r5900/test_r5900_mtlohi1.c > b/tests/tcg/mips64el/system/test_r5900_mtlohi1.c > similarity index 100% > rename from tests/tcg/mips/user/isa/r5900/test_r5900_mtlohi1.c > rename to tests/tcg/mips64el/system/test_r5900_mtlohi1.c > diff --git a/tests/tcg/mips/user/isa/r5900/test_r5900_mult.c > b/tests/tcg/mips64el/system/test_r5900_mult.c > similarity index 100% > rename from tests/tcg/mips/user/isa/r5900/test_r5900_mult.c > rename to tests/tcg/mips64el/system/test_r5900_mult.c > diff --git a/tests/tcg/mips/user/isa/r5900/test_r5900_multu.c > b/tests/tcg/mips64el/system/test_r5900_multu.c > similarity index 100% > rename from tests/tcg/mips/user/isa/r5900/test_r5900_multu.c > rename to tests/tcg/mips64el/system/test_r5900_multu.c > diff --git a/tests/tcg/mips/user/isa/r5900/Makefile > b/tests/tcg/mips/user/isa/r5900/Makefile > deleted file mode 100644 > index bff360df6c97..000000000000 > --- a/tests/tcg/mips/user/isa/r5900/Makefile > +++ /dev/null > @@ -1,32 +0,0 @@ > --include ../../../../config-host.mak > - > -CROSS=mipsr5900el-unknown-linux-gnu- > - > -SIM=qemu-mipsel > -SIM_FLAGS=-cpu R5900 > - > -CC = $(CROSS)gcc > -CFLAGS = -Wall -mabi=32 -march=r5900 -static > - > -TESTCASES = test_r5900_div1.tst > -TESTCASES += test_r5900_divu1.tst > -TESTCASES += test_r5900_madd.tst > -TESTCASES += test_r5900_maddu.tst > -TESTCASES += test_r5900_mflohi1.tst > -TESTCASES += test_r5900_mtlohi1.tst > -TESTCASES += test_r5900_mult.tst > -TESTCASES += test_r5900_multu.tst > - > -all: $(TESTCASES) > - > -%.tst: %.c > - $(CC) $(CFLAGS) $< -o $@ > - > -check: $(TESTCASES) > - @for case in $(TESTCASES); do \ > - echo $(SIM) $(SIM_FLAGS) ./$$case;\ > - $(SIM) $(SIM_FLAGS) ./$$case; \ > - done > - > -clean: > - $(RM) -rf $(TESTCASES) > diff --git a/tests/tcg/mips/user/isa/r5900/README > b/tests/tcg/mips/user/isa/r5900/README > deleted file mode 100644 > index 18ecfc3bd0a5..000000000000 > --- a/tests/tcg/mips/user/isa/r5900/README > +++ /dev/null > @@ -1,6 +0,0 @@ > -This test suite can't be run at the moment. We don't have a qemu target for > this > -architecture, which has single-float arithmetic, and custom 128-bit > registers. > -Also, a specific toolchain has to be compiled for it. > - > -We keep the tests here in case someone is interested one day to resurrect > this > -architecture. > diff --git a/tests/tcg/mips64el/system/meson.build > b/tests/tcg/mips64el/system/meson.build > index 265a2eca4ff1..fd5a759c20fa 100644 > --- a/tests/tcg/mips64el/system/meson.build > +++ b/tests/tcg/mips64el/system/meson.build > @@ -19,6 +19,26 @@ qemu_args = ['-M', 'none', '-cpu', 'R5900', '-m', '16M', > gdb_test = ['--gdb-args=-ex "set remoteaddresssize 64"', > '--test', files('test-r5900.py')] > > +# o32: 32-bit pointers, 32-bit GPRs are enough > +foreach t: [ > + 'div1', > + 'divu1', > + 'madd', > + 'maddu', > + 'mflohi1', > + 'mtlohi1', > + 'mult', > + 'multu', > +] > + tests += { > + 'test_r5900_' + t + '.c': { > + 'cflags': cflags + ['-mabi=32'], > + 'qemu_args': qemu_args, > + 'gdb_test': gdb_test, > + } > + }
Just a small nit, please keep full file name in the original array (s/div1/div1.c), All other meson.build for tcg/tests do this also. Reviewed-by: Pierrick Bouvier <[email protected]> Regards, Pierrick
