diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 76540df89d5a7e1b061aa822e33638cae4f1c023..c664f95af5597c9e66a61848dc3f17ee7ba977a6 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2010-11-17 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. + 2010-11-16 Jason Merrill <jason@redhat.com> * g++.dg/cpp0x/defaulted20.C: New. diff --git a/gcc/testsuite/gcc.dg/guality/asm-1.c b/gcc/testsuite/gcc.dg/guality/asm-1.c index 5279722c094293266e1b796a3dc2bb8a228f1712..1112bf7a7c9429bfae30e60c1ba36a123a20e293 100644 --- a/gcc/testsuite/gcc.dg/guality/asm-1.c +++ b/gcc/testsuite/gcc.dg/guality/asm-1.c @@ -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)); } diff --git a/gcc/testsuite/gcc.dg/guality/nop.h b/gcc/testsuite/gcc.dg/guality/nop.h new file mode 100644 index 0000000000000000000000000000000000000000..a0c19a344141c26a0a297fe1e8642614c3254adc --- /dev/null +++ b/gcc/testsuite/gcc.dg/guality/nop.h @@ -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 diff --git a/gcc/testsuite/gcc.dg/guality/pr43329-1.c b/gcc/testsuite/gcc.dg/guality/pr43329-1.c index e80888e40e57379cd7cd2a5182df45b5bae10c0b..7820727e97844a5a670d244f95b9c2899d62a9ee 100644 --- a/gcc/testsuite/gcc.dg/guality/pr43329-1.c +++ b/gcc/testsuite/gcc.dg/guality/pr43329-1.c @@ -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;