[patch] Support -mno-smartmips option

Catherine Moore clm@codesourcery.com
Thu Oct 23 00:06:00 GMT 2008


We document the availability of the -mno-smartmips option, but we don't actually support it.  This 
patch adds support and testcases.  Okay to install?
Thanks,
Catherine

gcc testsuite ChangeLog:

2008-10-22  Catherine Moore  <clm@codesourcery.com>

	* gcc.target/mips/no-smartmips-lwxs.c: New test.
	* gcc.target/mips/no-smartmips-ror-1.c: New test.

gcc ChangeLog:

2008-10-22  Catherine Moore  <clm@codesourcery.com>

	* config/mips/mips.opt (msmartmips): Remove RejectNegative.



Index: testsuite/gcc.target/mips/no-smartmips-lwxs.c
===================================================================
--- testsuite/gcc.target/mips/no-smartmips-lwxs.c       (revision 0)
+++ testsuite/gcc.target/mips/no-smartmips-lwxs.c       (revision 0)
@@ -0,0 +1,8 @@
+/* { dg-do compile } */
+/* { dg-mips-options "-O -mno-smartmips" } */
+
+NOMIPS16 int scaled_indexed_word_load (int a[], int b)
+{
+  return a[b];
+}
+/* { dg-final { scan-assembler-not "\tlwxs\t" } } */
Index: testsuite/gcc.target/mips/no-smartmips-ror-1.c
===================================================================
--- testsuite/gcc.target/mips/no-smartmips-ror-1.c      (revision 0)
+++ testsuite/gcc.target/mips/no-smartmips-ror-1.c      (revision 0)
@@ -0,0 +1,8 @@
+/* { dg-do compile } */
+/* { dg-mips-options "-O -mno-smartmips" } */
+
+NOMIPS16 int rotate_left (unsigned a, unsigned s)
+{
+  return (a << s) | (a >> (32 - s));
+}
+/* { dg-final { scan-assembler-not "\tror\t" } } */
Index: config/mips/mips.opt
===================================================================
--- config/mips/mips.opt        (revision 141033)
+++ config/mips/mips.opt        (working copy)
@@ -241,7 +241,7 @@ Target Report RejectNegative Mask(SINGLE
  Restrict the use of hardware floating-point instructions to 32-bit operations

  msmartmips
-Target Report RejectNegative Mask(SMARTMIPS)
+Target Report Mask(SMARTMIPS)
  Use SmartMIPS instructions

  msoft-float



More information about the Gcc-patches mailing list