https://gcc.gnu.org/g:b5404c42dde7dba8c72b9246cca288c256b55d8c
commit r17-1978-gb5404c42dde7dba8c72b9246cca288c256b55d8c Author: Matthew Fortune <[email protected]> Date: Mon Jun 29 09:16:09 2026 -0600 MIPS: Add -mmxu and -mno-mxu driver pass through From: Matthew Fortune <[email protected]> Cherry-picked 9acbf0b0efdfcc27e30b1db7a707dbe9cc6b64eb from https://github.com/MIPS/gcc gcc/ * config/mips/mips.h (ASM_SPEC): Add placeholders for -mmxu and -mno-mxu. * config/mips/mips.opt: New undocumented target option. gcc/testsuite/ * gcc.target/mips/mxu-compile-no.c: New test. * gcc.target/mips/mxu-compile.c: New test. * gcc.target/mips/mxu-driver-no.c: New test. * gcc.target/mips/mxu-driver.c: New test. Signed-off-by: Matthew Fortune <[email protected]> Signed-off-by: Faraz Shahbazker <[email protected]> Signed-off-by: Aleksandar Rakic <[email protected]> Signed-off-by: Eldar Osmanovic <[email protected]> Diff: --- gcc/config/mips/mips.h | 1 + gcc/config/mips/mips.opt | 3 +++ gcc/testsuite/gcc.target/mips/mxu-compile-no.c | 8 ++++++++ gcc/testsuite/gcc.target/mips/mxu-compile.c | 8 ++++++++ gcc/testsuite/gcc.target/mips/mxu-driver-no.c | 11 +++++++++++ gcc/testsuite/gcc.target/mips/mxu-driver.c | 11 +++++++++++ 6 files changed, 42 insertions(+) diff --git a/gcc/config/mips/mips.h b/gcc/config/mips/mips.h index 48a562f2d39d..36115e1c9e30 100644 --- a/gcc/config/mips/mips.h +++ b/gcc/config/mips/mips.h @@ -1490,6 +1490,7 @@ struct mips_cpu_info { %{mloongson-ext2} %{mno-loongson-ext2} \ %{msmartmips} %{mno-smartmips} \ %{mmt} %{mno-mt} \ +%{mmxu} %{mno-mxu} \ %{mfix-r5900} %{mno-fix-r5900} \ %{mfix-rm7000} %{mno-fix-rm7000} \ %{mfix-vr4120} %{mfix-vr4130} \ diff --git a/gcc/config/mips/mips.opt b/gcc/config/mips/mips.opt index eb14761ea273..fda0f78b8bac 100644 --- a/gcc/config/mips/mips.opt +++ b/gcc/config/mips/mips.opt @@ -332,6 +332,9 @@ mmt Target Var(TARGET_MT) Allow the use of MT instructions. +mmxu +Driver Target Undocumented + mno-float Target RejectNegative Var(TARGET_NO_FLOAT) Condition(TARGET_SUPPORTS_NO_FLOAT) Prevent the use of all floating-point operations. diff --git a/gcc/testsuite/gcc.target/mips/mxu-compile-no.c b/gcc/testsuite/gcc.target/mips/mxu-compile-no.c new file mode 100644 index 000000000000..03b002c1971e --- /dev/null +++ b/gcc/testsuite/gcc.target/mips/mxu-compile-no.c @@ -0,0 +1,8 @@ +/* { dg-do compile } */ +/* { dg-additional-options "-mno-mxu" } */ + +int +main (void) +{ + return 0; +} diff --git a/gcc/testsuite/gcc.target/mips/mxu-compile.c b/gcc/testsuite/gcc.target/mips/mxu-compile.c new file mode 100644 index 000000000000..a4c46b48d905 --- /dev/null +++ b/gcc/testsuite/gcc.target/mips/mxu-compile.c @@ -0,0 +1,8 @@ +/* { dg-do compile } */ +/* { dg-additional-options "-mmxu" } */ + +int +main (void) +{ + return 0; +} diff --git a/gcc/testsuite/gcc.target/mips/mxu-driver-no.c b/gcc/testsuite/gcc.target/mips/mxu-driver-no.c new file mode 100644 index 000000000000..a4f46aa0239f --- /dev/null +++ b/gcc/testsuite/gcc.target/mips/mxu-driver-no.c @@ -0,0 +1,11 @@ +/* { dg-do assemble } */ +/* { dg-additional-options "-mno-mxu -###" } */ + +int +main (void) +{ + return 0; +} + +/* { dg-message ".*/.*as .* -mno-mxu" "assembler options" { target *-*-* } 0 } */ +/* { dg-purne-output ".*" } */ diff --git a/gcc/testsuite/gcc.target/mips/mxu-driver.c b/gcc/testsuite/gcc.target/mips/mxu-driver.c new file mode 100644 index 000000000000..21287d5bdb26 --- /dev/null +++ b/gcc/testsuite/gcc.target/mips/mxu-driver.c @@ -0,0 +1,11 @@ +/* { dg-do assemble } */ +/* { dg-additional-options "-mmxu -###" } */ + +int +main (void) +{ + return 0; +} + +/* { dg-message ".*/.*as .* -mmxu" "assembler options" { target *-*-* } 0 } */ +/* { dg-purne-output ".*" } */
