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]

testsuite tweaks for powerpc64


These are obvious really, but seeing as this is the testsuite,
OK to apply?

	* gcc.dg/darwin-longlong.c: Don't use r0 in asm.
	* gcc.dg/cpp/assert4.c: Handle powerpc64.

Without -mregnames, r0 in assembly is the symbol "r0", not the register
"r0".

Index: gcc/testsuite/gcc.dg/darwin-longlong.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/darwin-longlong.c,v
retrieving revision 1.1
diff -u -p -r1.1 darwin-longlong.c
--- gcc/testsuite/gcc.dg/darwin-longlong.c	26 Jan 2004 17:48:49 -0000	1.1
+++ gcc/testsuite/gcc.dg/darwin-longlong.c	9 Feb 2004 12:16:56 -0000
@@ -25,7 +25,7 @@ int main()
 
   /* Exit on systems without 64bit instructions.  */
   signal (SIGILL, sig_ill_handler);
-  asm volatile ("extsw r0,r0");
+  asm volatile ("extsw 0,0");
   signal (SIGILL, SIG_DFL);
 
   if (msw(1) != 0)
Index: gcc/testsuite/gcc.dg/cpp/assert4.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/cpp/assert4.c,v
retrieving revision 1.4
diff -u -p -r1.4 assert4.c
--- gcc/testsuite/gcc.dg/cpp/assert4.c	4 Feb 2004 05:13:43 -0000	1.4
+++ gcc/testsuite/gcc.dg/cpp/assert4.c	9 Feb 2004 12:16:56 -0000
@@ -344,10 +344,16 @@
 #endif
 
 #if defined __powerpc__
-# if !#cpu(powerpc) || !#machine(powerpc)
+# if ((!defined(__powerpc64__) \
+       && (!#cpu(powerpc) || !#machine(powerpc) \
+	   || #cpu(powerpc64) || #machine(powerpc64))) \
+      || (defined(__powerpc64__) \
+          && (#cpu(powerpc) || #machine(powerpc) \
+	      || !#cpu(powerpc64) || !#machine(powerpc64)))
 #  error
 # endif
-#elif #cpu(powerpc) || #machine(powerpc)
+#elif (#cpu(powerpc) || #machine(powerpc) \
+       || #cpu(powerpc64) || #machine(powerpc64))
 # error
 #endif
 

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre


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