diff mbox

Fix two guality testcases for ia64/s390/mmix

Message ID 20101116224712.GO29412@tyan-ft48-01.lab.bos.redhat.com
State New
Headers show

Commit Message

Jakub Jelinek Nov. 16, 2010, 10:47 p.m. UTC
Hi!

I've noticed today in gcc-testresults posts that asm-1.c and pr43329-1.c
tests fail to assemble on ia64.
That's because ia64 doesn't have a nop insn like most other targets do.
nop 0 (and swym 0 for mmix) is the alternate nop insn used by configure.ac,
this patch uses those in the guality tests.

Regtested on x86_64-linux and i686-linux, ok for trunk?

2010-11-16  Jakub Jelinek  <jakub@redhat.com>

	* gcc.dg/guality/nop.h: New file.
	* gcc.dg/guality/asm-1.c: Include it and use NOP macro instead of
	"nop".  Adjust line numbers in gdb-test.
	* gcc.dg/guality/pr43329-1.c: Likewise.


	Jakub

Comments

Richard Henderson Nov. 16, 2010, 11:31 p.m. UTC | #1
On 11/16/2010 02:47 PM, Jakub Jelinek wrote:
> 	* gcc.dg/guality/nop.h: New file.
> 	* gcc.dg/guality/asm-1.c: Include it and use NOP macro instead of
> 	"nop".  Adjust line numbers in gdb-test.
> 	* gcc.dg/guality/pr43329-1.c: Likewise.

Ok.


r~
diff mbox

Patch

--- gcc/testsuite/gcc.dg/guality/nop.h.jj	2010-11-16 12:27:15.000000000 +0100
+++ gcc/testsuite/gcc.dg/guality/nop.h	2010-11-16 12:25:54.000000000 +0100
@@ -0,0 +1,7 @@ 
+#if defined (__ia64__) || defined (__s390__) || defined (__s390x__)
+#define NOP "nop 0"
+#elif defined (__MMIX__)
+#define NOP "swym 0"
+#else
+#define NOP "nop"
+#endif
--- gcc/testsuite/gcc.dg/guality/asm-1.c.jj	2010-07-22 11:35:34.000000000 +0200
+++ gcc/testsuite/gcc.dg/guality/asm-1.c	2010-11-16 12:27:56.000000000 +0100
@@ -1,14 +1,16 @@ 
 /* { dg-do run } */
 /* { dg-options "-g" } */
 
+#include "nop.h"
+
 struct A { int x; unsigned short y; char z[64]; };
 
 void __attribute__((noinline))
 foo (struct A *p, char *q)
 {
   int f = &p->z[p->y] - q;
-  asm volatile ("nop");
-  asm volatile ("nop" : : "g" (f));		/* { dg-final { gdb-test 12 "f" "14" } } */
+  asm volatile (NOP);
+  asm volatile (NOP : : "g" (f));		/* { dg-final { gdb-test 14 "f" "14" } } */
   asm volatile ("" : : "g" (p), "g" (q));
 }
 
--- gcc/testsuite/gcc.dg/guality/pr43329-1.c.jj	2010-03-16 09:06:56.000000000 +0100
+++ gcc/testsuite/gcc.dg/guality/pr43329-1.c	2010-11-16 12:28:54.000000000 +0100
@@ -2,12 +2,14 @@ 
 /* { dg-do run } */
 /* { dg-options "-g" } */
 
+#include "nop.h"
+
 static inline void
 foo (int argx)
 {
   int varx = argx;
-  __asm__ volatile ("nop");			/* { dg-final { gdb-test 10 "argx" "25" } } */
-  __asm__ volatile ("nop" : : "g" (varx));	/* { dg-final { gdb-test 10 "varx" "25" } } */
+  __asm__ volatile (NOP);			/* { dg-final { gdb-test 12 "argx" "25" } } */
+  __asm__ volatile (NOP : : "g" (varx));	/* { dg-final { gdb-test 12 "varx" "25" } } */
 }
 
 int i;