aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorIain Sandoe <iains@gcc.gnu.org>2019-05-24 07:24:26 +0000
committerIain Sandoe <iains@gcc.gnu.org>2019-05-24 07:24:26 +0000
commit66885312cbbdbcd923eb06501756747cb4349441 (patch)
tree2418bf28f05c5ca2f6e7d72011d02c58deb3e471 /gcc
parent4ef1d2e235e7990e499c91fcc7760e681c242983 (diff)
downloadgcc-66885312cbbdbcd923eb06501756747cb4349441.zip
gcc-66885312cbbdbcd923eb06501756747cb4349441.tar.gz
gcc-66885312cbbdbcd923eb06501756747cb4349441.tar.bz2
Darwin, x86, testsuite - Make match strings more specific.
Some of the i386.exp tests fail on Darwin (and at least one passes incorrectly on Linux) because their scan-asm match strings are too general. In some cases the strings also match instances in the .file and size directives or in comment output. This patch makes the match strings more specific. 2019-05-24 Iain Sandoe <iain@sandoe.co.uk> * gcc.target/i386/pconfig-1.c: Scan for the string in the generated code, not in comments or miscellaneous directives. Adjust expected count. * gcc.target/i386/pr18041-1.c: Likewise. * gcc.target/i386/pr18041-2.c: Likewise. * gcc.target/i386/wbinvd-1.c: Likewise. * gcc.target/i386/wbnoinvd-1.c: Likewise. * gcc.target/i386/pr66819-3.c: Specifically, check that there is no call to "bar". * gcc.target/i386/pr66819-4.c: Likewise. * gcc.target/i386/pr82662.c * gcc.target/i386/ptwrite2.c: Make the checks look for the specific destination register, don't try the m32 test on m64 targets. From-SVN: r271591
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/gcc.target/i386/pconfig-1.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/pr18041-1.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/pr18041-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/pr66819-3.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/pr66819-4.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/pr82662.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/ptwrite2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/wbinvd-1.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/wbnoinvd-1.c2
9 files changed, 12 insertions, 12 deletions
diff --git a/gcc/testsuite/gcc.target/i386/pconfig-1.c b/gcc/testsuite/gcc.target/i386/pconfig-1.c
index a3fc4f4..40b4c0c 100644
--- a/gcc/testsuite/gcc.target/i386/pconfig-1.c
+++ b/gcc/testsuite/gcc.target/i386/pconfig-1.c
@@ -1,6 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-O2 -mpconfig" } */
-/* { dg-final { scan-assembler-times "pconfig" 5 } } */
+/* { dg-final { scan-assembler-times {\tpconfig} 2 } } */
#include <x86intrin.h>
diff --git a/gcc/testsuite/gcc.target/i386/pr18041-1.c b/gcc/testsuite/gcc.target/i386/pr18041-1.c
index 24da41a..dafe5a8 100644
--- a/gcc/testsuite/gcc.target/i386/pr18041-1.c
+++ b/gcc/testsuite/gcc.target/i386/pr18041-1.c
@@ -9,5 +9,5 @@ foo (struct B *b)
b->bit0 = b->bit0 | b->bit1;
}
-/* { dg-final { scan-assembler-times "and" 1 } } */
-/* { dg-final { scan-assembler-times "or" 1 } } */
+/* { dg-final { scan-assembler-times {\tand[l|q]} 1 } } */
+/* { dg-final { scan-assembler-times {\tor[l|q]} 1 } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr18041-2.c b/gcc/testsuite/gcc.target/i386/pr18041-2.c
index 00ebd2a..1d7748b 100644
--- a/gcc/testsuite/gcc.target/i386/pr18041-2.c
+++ b/gcc/testsuite/gcc.target/i386/pr18041-2.c
@@ -10,5 +10,5 @@ bar (struct B *b, int x)
}
/* This fails to combine in 32bit mode but not for x32. */
-/* { dg-final { scan-assembler-times "and" 1 { xfail { { ! x32 } && ilp32 } } } } */
-/* { dg-final { scan-assembler-times "or" 1 { xfail { { ! x32 } && ilp32 } } } } */
+/* { dg-final { scan-assembler-times {\tand[lq]} 1 { xfail { { ! x32 } && ilp32 } } } } */
+/* { dg-final { scan-assembler-times {\tor} 1 { xfail { { ! x32 } && ilp32 } } } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr66819-3.c b/gcc/testsuite/gcc.target/i386/pr66819-3.c
index 3bc5a34..76e3726 100644
--- a/gcc/testsuite/gcc.target/i386/pr66819-3.c
+++ b/gcc/testsuite/gcc.target/i386/pr66819-3.c
@@ -1,6 +1,6 @@
/* { dg-do compile { target ia32 } } */
/* { dg-options "-O2 -mregparm=3" } */
-/* { dg-final { scan-assembler-not "call" } } */
+/* { dg-final { scan-assembler-not {call[ \t]+_?bar} } } */
void (*bar)(int, int);
diff --git a/gcc/testsuite/gcc.target/i386/pr66819-4.c b/gcc/testsuite/gcc.target/i386/pr66819-4.c
index 18b2ccf..143360d0 100644
--- a/gcc/testsuite/gcc.target/i386/pr66819-4.c
+++ b/gcc/testsuite/gcc.target/i386/pr66819-4.c
@@ -1,6 +1,6 @@
/* { dg-do compile { target ia32 } } */
/* { dg-options "-O2 -mregparm=3" } */
-/* { dg-final { scan-assembler-not "call" } } */
+/* { dg-final { scan-assembler-not {call[ \t]+_?bar} } } */
#include <stdarg.h>
diff --git a/gcc/testsuite/gcc.target/i386/pr82662.c b/gcc/testsuite/gcc.target/i386/pr82662.c
index 8a9332b..ec08edc 100644
--- a/gcc/testsuite/gcc.target/i386/pr82662.c
+++ b/gcc/testsuite/gcc.target/i386/pr82662.c
@@ -23,4 +23,4 @@ int f9 (S x, S y) { return x >= y; }
int f10 (S x, S y) { return x < y; }
int f11 (S x, S y) { return x <= y; }
-/* { dg-final { scan-assembler-times {\mset} 12 } } */
+/* { dg-final { scan-assembler-times {\tset} 12 } } */
diff --git a/gcc/testsuite/gcc.target/i386/ptwrite2.c b/gcc/testsuite/gcc.target/i386/ptwrite2.c
index bd144fc..be6b23e 100644
--- a/gcc/testsuite/gcc.target/i386/ptwrite2.c
+++ b/gcc/testsuite/gcc.target/i386/ptwrite2.c
@@ -1,7 +1,7 @@
/* { dg-do compile } */
/* { dg-options "-O2 -mptwrite " } */
-/* { dg-final { scan-assembler "ptwrite\[^\n\r\]+r" } } */
-/* { dg-final { scan-assembler "ptwrite\[^\n\r\]+e" } } */
+/* { dg-final { scan-assembler {ptwrite[^\n\r]+%eax} } } */
+/* { dg-final { scan-assembler {ptwrite[^\n\r]+%rax} { target lp64 } } } */
#include <x86intrin.h>
diff --git a/gcc/testsuite/gcc.target/i386/wbinvd-1.c b/gcc/testsuite/gcc.target/i386/wbinvd-1.c
index 7854cc2..9290d9b 100644
--- a/gcc/testsuite/gcc.target/i386/wbinvd-1.c
+++ b/gcc/testsuite/gcc.target/i386/wbinvd-1.c
@@ -1,6 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-O2" } */
-/* { dg-final { scan-assembler-times "wbinvd" 2 } } */
+/* { dg-final { scan-assembler-times {\twbinvd} 1 } } */
#include "immintrin.h"
diff --git a/gcc/testsuite/gcc.target/i386/wbnoinvd-1.c b/gcc/testsuite/gcc.target/i386/wbnoinvd-1.c
index bda84cd..697f148 100644
--- a/gcc/testsuite/gcc.target/i386/wbnoinvd-1.c
+++ b/gcc/testsuite/gcc.target/i386/wbnoinvd-1.c
@@ -1,6 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-O2 -mwbnoinvd" } */
-/* { dg-final { scan-assembler-times "wbnoinvd" 2 } } */
+/* { dg-final { scan-assembler-times {\twbnoinvd} 1 } } */
#include "x86intrin.h"