Commit c7b1a7bc9d for qemu.org
commit c7b1a7bc9d3382dbcf3056cc7643e6aee7fe0927
Author: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
Date: Tue Sep 29 21:24:38 2026 +0000
tests/tcg/mipsel/mips32r5el: add msa tests
Due to missing toolchain, we don't add those tests for tests/tcg/mips.
Considering this variant is not widely used, it makes sense.
Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
Link: https://lore.kernel.org/qemu-devel/20260929212439.110454-24-pierrick.bouvier@oss.qualcomm.com
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
diff --git a/meson_options.txt b/meson_options.txt
index 07b016c0fd..c9247e9de1 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -457,6 +457,10 @@ option('tcg_tests_cross_cc_mips64el', type: 'string',
description: 'cc for mips64el tcg tests')
option('tcg_tests_cross_cflags_mips64el', type: 'string',
description: 'cflags for mips64el tcg tests')
+option('tcg_tests_cross_cc_mips32r5el', type: 'string',
+ description: 'cc for mips32r5el tcg tests')
+option('tcg_tests_cross_cflags_mips32r5el', type: 'string',
+ description: 'cflags for mips32r5el tcg tests')
option('tcg_tests_cross_cc_or1k', type: 'string',
description: 'cc for or1k tcg tests')
option('tcg_tests_cross_cflags_or1k', type: 'string',
diff --git a/scripts/meson-buildoptions.sh b/scripts/meson-buildoptions.sh
index 4076a7f6b5..064e1429a4 100644
--- a/scripts/meson-buildoptions.sh
+++ b/scripts/meson-buildoptions.sh
@@ -538,6 +538,7 @@ _meson_option_parse() {
--tcg-tests-cross-cc-loongarch64=*) quote_sh "-Dtcg_tests_cross_cc_loongarch64=$2" ;;
--tcg-tests-cross-cc-m68k=*) quote_sh "-Dtcg_tests_cross_cc_m68k=$2" ;;
--tcg-tests-cross-cc-mips=*) quote_sh "-Dtcg_tests_cross_cc_mips=$2" ;;
+ --tcg-tests-cross-cc-mips32r5el=*) quote_sh "-Dtcg_tests_cross_cc_mips32r5el=$2" ;;
--tcg-tests-cross-cc-mips64=*) quote_sh "-Dtcg_tests_cross_cc_mips64=$2" ;;
--tcg-tests-cross-cc-mips64el=*) quote_sh "-Dtcg_tests_cross_cc_mips64el=$2" ;;
--tcg-tests-cross-cc-mips64r6=*) quote_sh "-Dtcg_tests_cross_cc_mips64r6=$2" ;;
@@ -563,6 +564,7 @@ _meson_option_parse() {
--tcg-tests-cross-cflags-loongarch64=*) quote_sh "-Dtcg_tests_cross_cflags_loongarch64=$2" ;;
--tcg-tests-cross-cflags-m68k=*) quote_sh "-Dtcg_tests_cross_cflags_m68k=$2" ;;
--tcg-tests-cross-cflags-mips=*) quote_sh "-Dtcg_tests_cross_cflags_mips=$2" ;;
+ --tcg-tests-cross-cflags-mips32r5el=*) quote_sh "-Dtcg_tests_cross_cflags_mips32r5el=$2" ;;
--tcg-tests-cross-cflags-mips64=*) quote_sh "-Dtcg_tests_cross_cflags_mips64=$2" ;;
--tcg-tests-cross-cflags-mips64el=*) quote_sh "-Dtcg_tests_cross_cflags_mips64el=$2" ;;
--tcg-tests-cross-cflags-mips64r6=*) quote_sh "-Dtcg_tests_cross_cflags_mips64r6=$2" ;;
diff --git a/tests/tcg/mipsel/meson.build b/tests/tcg/mipsel/meson.build
index a02a4bac28..3ac4711748 100644
--- a/tests/tcg/mipsel/meson.build
+++ b/tests/tcg/mipsel/meson.build
@@ -189,3 +189,29 @@ if 'qemu-mipsel' in emulators
}
}
endif
+
+tests = []
+
+foreach src: tests_mips_msa
+ tests += {
+ src: {
+ 'cflags': ['-mabi=32', '-march=mips32r5', '-mmsa', '-mno-odd-spreg',
+ '-mfp64', '-mnan=2008'],
+ 'qemu_args': ['-cpu', 'P5600'],
+ }
+ }
+endforeach
+
+if 'qemu-mipsel' in emulators
+ tcg_tests += {
+ 'mips32r5el-linux-user': {
+ 'cc': 'mips32r5el-buildroot-linux-gnu-gcc',
+ 'cc_dockerfile': 'debian-all-test-cross',
+ 'cc_feat_cflags': cc_feat_cflags,
+ 'folder': 'mipsel',
+ 'gdb_arch': 'mipsel',
+ 'qemu': emulators['qemu-mipsel'],
+ 'tests': tests,
+ }
+ }
+endif