@samitouri / QOSamiQemu / commits / c5dcf59006

tests/tcg/mips: add Octeon instruction smoke test

Add a mips64/mips64el linux-user TCG smoke test for representative Octeon instruction paths. Run the test with -cpu Octeon68XX and share the source between the mips64 and mips64el target directories. Signed-off-by: James Hilliard <james.hilliard1@gmail.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20260520172313.23777-6-philmd@linaro.org>

James Hilliard committed May 8, 2026 at 09:12 UTC c5dcf59006b7beec59c0d38f109e6ce45b4c0f9d
4 files changed +42 -1
MAINTAINERS
+1 -1
@@ -310,7 +310,7 @@ S: Odd Fixes
310 F: target/mips/
311 F: disas/*mips.c
312 F: docs/system/cpu-models-mips.rst.inc
313 -F: tests/tcg/mips/
313 +F: tests/tcg/mips*/
314
315 OpenRISC TCG CPUs
316 M: Stafford Horne <shorne@gmail.com>
tests/tcg/mips/user/isa/octeon/octeon-insns.c new
+13
@@ -0,0 +1,13 @@
1 +/*
2 + * Test Octeon-specific user-mode instructions.
3 + *
4 + * SPDX-License-Identifier: GPL-2.0-or-later
5 + */
6 +
7 +#include <assert.h>
8 +#include <stdint.h>
9 +
10 +int main(void)
11 +{
12 + return 0;
13 +}
tests/tcg/mips64/Makefile.target new
+20
@@ -0,0 +1,20 @@
1 +# -*- Mode: makefile -*-
2 +#
3 +# SPDX-License-Identifier: GPL-2.0-or-later
4 +#
5 +# MIPS64 - included from tests/tcg/Makefile.target
6 +#
7 +
8 +MIPS64_SRC=$(SRC_PATH)/tests/tcg/mips64
9 +MIPS_OCTEON_SRC=$(SRC_PATH)/tests/tcg/mips/user/isa/octeon
10 +
11 +# Set search path for all sources
12 +VPATH += $(MIPS64_SRC) $(MIPS_OCTEON_SRC)
13 +
14 +MIPS64_TESTS=octeon-insns
15 +
16 +TESTS += $(MIPS64_TESTS)
17 +
18 +$(MIPS64_TESTS): CFLAGS+=-mabi=64
19 +
20 +run-octeon-insns: QEMU_OPTS+=-cpu Octeon68XX
tests/tcg/mips64el/Makefile.target new
+8
@@ -0,0 +1,8 @@
1 +# -*- Mode: makefile -*-
2 +#
3 +# SPDX-License-Identifier: GPL-2.0-or-later
4 +#
5 +# MIPS64 little-endian - included from tests/tcg/Makefile.target
6 +#
7 +
8 +include $(SRC_PATH)/tests/tcg/mips64/Makefile.target