This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
A couple of MIPS testsuite fixes
- From: Richard Sandiford <richard at codesourcery dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Fri, 20 Jul 2007 17:03:07 +0100
- Subject: A couple of MIPS testsuite fixes
SmartMIPS is (currently) a 32-bit-only ASE, so we should only run the
SmartMIPS tests for 32-bit targets. The patch below does this by treating
-msmartmips as a 32-bit-only option.
Also, I'd fluffed the ordering of the directives in save-restore-5.c,
which led to failures for some mipsisa64-elf multilibs.
Regression-tested on mipsisa64-elf. Applied to trunk.
Richard
gcc/testsuite/
* gcc.target/mips/mips.exp (is_gp32_flag): Return true for -msmartmips.
* gcc.target/mips/save-restore-5.c: Fix positioning of dg-do directive.
Index: gcc/testsuite/gcc.target/mips/mips.exp
===================================================================
--- gcc/testsuite/gcc.target/mips/mips.exp 2007-07-20 16:55:21.000000000 +0100
+++ gcc/testsuite/gcc.target/mips/mips.exp 2007-07-20 16:55:30.000000000 +0100
@@ -86,6 +86,7 @@ proc setup_mips_tests {} {
# Return true if command-line option FLAG forces 32-bit code.
proc is_gp32_flag {flag} {
switch -glob -- $flag {
+ -msmartmips -
-march=mips32* -
-mgp32 { return 1 }
default { return 0 }
Index: gcc/testsuite/gcc.target/mips/save-restore-5.c
===================================================================
--- gcc/testsuite/gcc.target/mips/save-restore-5.c 2007-07-20 15:01:53.000000000 +0100
+++ gcc/testsuite/gcc.target/mips/save-restore-5.c 2007-07-20 16:54:56.000000000 +0100
@@ -1,6 +1,6 @@
/* Check that we don't try to save the same register twice. */
-/* { dg-mips-options "-mips32r2 -mgp32 -mips16 -mno-abicalls -O2" } */
/* { dg-do assemble } */
+/* { dg-mips-options "-mips32r2 -mgp32 -mips16 -mno-abicalls -O2" } */
int bar (int, int, int, int);
void frob (void);