This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[committed] A couple of mips16 testsuite fixes


Some of the MIPS-specific tests had asms that won't work on MIPS16.
This patch guards them appropriately.

(An alternative would have been to use dg-skip-if.  In this particular
case, I have a slight preference for the #ifdef approach, not least
because it caters for any future target that defaults to MIPS16.)

Tested on mips64-elf with a -mips16 run.  Applied to mainline.

Richard


	* gcc.dg/torture/pr19683-1.c: Guard with #ifndef __mips16.
	* gcc.target/mips/asm-1.c: Likewise.

Index: testsuite/gcc.dg/torture/pr19683-1.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/torture/pr19683-1.c,v
retrieving revision 1.1
diff -u -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.1 pr19683-1.c
--- testsuite/gcc.dg/torture/pr19683-1.c	7 Mar 2005 17:48:46 -0000	1.1
+++ testsuite/gcc.dg/torture/pr19683-1.c	13 Apr 2005 20:29:24 -0000
@@ -6,6 +6,7 @@
 extern void abort (void);
 extern void exit (int);
 
+#ifndef __mips16
 #define REPEAT10(X, Y)					\
   X(Y##0); X(Y##1); X(Y##2); X(Y##3); X(Y##4);		\
   X(Y##5); X(Y##6); X(Y##7); X(Y##8); X(Y##9)
@@ -40,3 +41,10 @@ main (void)
     abort ();
   exit (0);
 }
+#else
+int
+main (void)
+{
+  exit (0);
+}
+#endif
Index: testsuite/gcc.target/mips/asm-1.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.target/mips/asm-1.c,v
retrieving revision 1.1
diff -u -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.1 asm-1.c
--- testsuite/gcc.target/mips/asm-1.c	20 Sep 2004 06:54:52 -0000	1.1
+++ testsuite/gcc.target/mips/asm-1.c	13 Apr 2005 20:29:24 -0000
@@ -2,6 +2,7 @@
    of the call.  */
 /* { dg-do assemble } */
 /* { dg-options "-O" } */
+#ifndef __mips16
 int foo (int n)
 {
   register int k asm ("$16") = n;
@@ -12,3 +13,4 @@ int foo (int n)
     }
   return k;
 }
+#endif


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]