tested on x86_64-darwin and x86_64-linux, pushed to trunk,
thanks
Iain

--- 8< ---

Making good portable function-body scan tests can be challenging.

In addition to assembler syntax and ABI differences, one also needs to
account for platform constraints.  In some cases, we hope to automate
common comparisons - but there are limits to what is feasible.

64Bit Darwin does not support non-PIC code on any platform and so some
of the x86 function b0dy scan tests which are expecting the ELF default
produce code which is too different to be realistically handled with
conditional matches.

We are just going to skip tests in this category.

gcc/testsuite/ChangeLog:

        * gcc.target/i386/builtin-memmove-12.c: Skip for Darwin.
        * gcc.target/i386/memcpy-pr120683-2.c: Likewise.
        * gcc.target/i386/memcpy-pr120683-3.c: Likewise.
        * gcc.target/i386/memcpy-pr120683-4.c: Likewise.
        * gcc.target/i386/memcpy-pr120683-5.c: Likewise.
        * gcc.target/i386/memcpy-pr120683-6.c: Likewise.
        * gcc.target/i386/memcpy-pr120683-7.c: Likewise.
        * gcc.target/i386/memset-pr120683-13.c: Likewise.
        * gcc.target/i386/memset-pr120683-17.c: Likewise.
        * gcc.target/i386/memset-pr120683-18.c: Likewise.
        * gcc.target/i386/memset-pr120683-19.c: Likewise.
        * gcc.target/i386/memset-pr120683-22.c: Likewise.
        * gcc.target/i386/memset-pr120683-23.c: Likewise.
        * gcc.target/i386/memset-pr70308-1b.c: Likewise.

Signed-off-by: Iain Sandoe <[email protected]>
---
 gcc/testsuite/gcc.target/i386/builtin-memmove-12.c | 1 +
 gcc/testsuite/gcc.target/i386/memcpy-pr120683-2.c  | 1 +
 gcc/testsuite/gcc.target/i386/memcpy-pr120683-3.c  | 1 +
 gcc/testsuite/gcc.target/i386/memcpy-pr120683-4.c  | 1 +
 gcc/testsuite/gcc.target/i386/memcpy-pr120683-5.c  | 1 +
 gcc/testsuite/gcc.target/i386/memcpy-pr120683-6.c  | 1 +
 gcc/testsuite/gcc.target/i386/memcpy-pr120683-7.c  | 1 +
 gcc/testsuite/gcc.target/i386/memset-pr120683-13.c | 1 +
 gcc/testsuite/gcc.target/i386/memset-pr120683-17.c | 1 +
 gcc/testsuite/gcc.target/i386/memset-pr120683-18.c | 1 +
 gcc/testsuite/gcc.target/i386/memset-pr120683-19.c | 1 +
 gcc/testsuite/gcc.target/i386/memset-pr120683-22.c | 1 +
 gcc/testsuite/gcc.target/i386/memset-pr120683-23.c | 1 +
 gcc/testsuite/gcc.target/i386/memset-pr70308-1b.c  | 1 +
 14 files changed, 14 insertions(+)

diff --git a/gcc/testsuite/gcc.target/i386/builtin-memmove-12.c 
b/gcc/testsuite/gcc.target/i386/builtin-memmove-12.c
index 3180a7ecc67..661f23e189c 100644
--- a/gcc/testsuite/gcc.target/i386/builtin-memmove-12.c
+++ b/gcc/testsuite/gcc.target/i386/builtin-memmove-12.c
@@ -1,4 +1,5 @@
 /* { dg-do compile } */
+/* { dg-skip-if "64b Darwin does not support non-PIC" *-*-darwin* } */
 /* { dg-options "-O2 -mno-avx -msse2 -mtune=generic" } */
 /* { dg-add-options check_function_bodies } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
diff --git a/gcc/testsuite/gcc.target/i386/memcpy-pr120683-2.c 
b/gcc/testsuite/gcc.target/i386/memcpy-pr120683-2.c
index 3b48f45e579..15f0e4b9e62 100644
--- a/gcc/testsuite/gcc.target/i386/memcpy-pr120683-2.c
+++ b/gcc/testsuite/gcc.target/i386/memcpy-pr120683-2.c
@@ -1,4 +1,5 @@
 /* { dg-do compile } */
+/* { dg-skip-if "64b Darwin does not support non-PIC" *-*-darwin* } */
 /* { dg-options "-O2 -march=x86-64 
-mmemcpy-strategy=vector_loop:2048:noalign,libcall:-1:noalign -fno-pie" } */
 /* { dg-add-options check_function_bodies } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
diff --git a/gcc/testsuite/gcc.target/i386/memcpy-pr120683-3.c 
b/gcc/testsuite/gcc.target/i386/memcpy-pr120683-3.c
index f30899a86f6..0f6c8f5afb7 100644
--- a/gcc/testsuite/gcc.target/i386/memcpy-pr120683-3.c
+++ b/gcc/testsuite/gcc.target/i386/memcpy-pr120683-3.c
@@ -1,4 +1,5 @@
 /* { dg-do compile } */
+/* { dg-skip-if "64b Darwin does not support non-PIC" *-*-darwin* } */
 /* { dg-options "-O2 -march=x86-64 
-mmemcpy-strategy=vector_loop:2048:noalign,libcall:-1:noalign -fno-pie" } */
 /* { dg-add-options check_function_bodies } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
diff --git a/gcc/testsuite/gcc.target/i386/memcpy-pr120683-4.c 
b/gcc/testsuite/gcc.target/i386/memcpy-pr120683-4.c
index 1d53e12dc26..963e966d771 100644
--- a/gcc/testsuite/gcc.target/i386/memcpy-pr120683-4.c
+++ b/gcc/testsuite/gcc.target/i386/memcpy-pr120683-4.c
@@ -1,4 +1,5 @@
 /* { dg-do compile } */
+/* { dg-skip-if "64b Darwin does not support non-PIC" *-*-darwin* } */
 /* { dg-options "-O2 -march=x86-64-v3 
-mmemcpy-strategy=vector_loop:2048:noalign,libcall:-1:noalign -fno-pie" } */
 /* { dg-add-options check_function_bodies } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
diff --git a/gcc/testsuite/gcc.target/i386/memcpy-pr120683-5.c 
b/gcc/testsuite/gcc.target/i386/memcpy-pr120683-5.c
index b445e3b8ea4..cd24d6bd00b 100644
--- a/gcc/testsuite/gcc.target/i386/memcpy-pr120683-5.c
+++ b/gcc/testsuite/gcc.target/i386/memcpy-pr120683-5.c
@@ -1,4 +1,5 @@
 /* { dg-do compile } */
+/* { dg-skip-if "64b Darwin does not support non-PIC" *-*-darwin* } */
 /* { dg-options "-O2 -march=x86-64-v3 
-mmemcpy-strategy=vector_loop:2048:noalign,libcall:-1:noalign -fno-pie" } */
 /* { dg-add-options check_function_bodies } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
diff --git a/gcc/testsuite/gcc.target/i386/memcpy-pr120683-6.c 
b/gcc/testsuite/gcc.target/i386/memcpy-pr120683-6.c
index b9bf05c2908..a2bf5cc8d95 100644
--- a/gcc/testsuite/gcc.target/i386/memcpy-pr120683-6.c
+++ b/gcc/testsuite/gcc.target/i386/memcpy-pr120683-6.c
@@ -1,4 +1,5 @@
 /* { dg-do compile } */
+/* { dg-skip-if "64b Darwin does not support non-PIC" *-*-darwin* } */
 /* { dg-options "-O2 -march=x86-64-v4 
-mmemcpy-strategy=vector_loop:2048:noalign,libcall:-1:noalign -fno-pie" } */
 /* { dg-add-options check_function_bodies } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
diff --git a/gcc/testsuite/gcc.target/i386/memcpy-pr120683-7.c 
b/gcc/testsuite/gcc.target/i386/memcpy-pr120683-7.c
index ce023619a07..b67166b42c5 100644
--- a/gcc/testsuite/gcc.target/i386/memcpy-pr120683-7.c
+++ b/gcc/testsuite/gcc.target/i386/memcpy-pr120683-7.c
@@ -1,4 +1,5 @@
 /* { dg-do compile } */
+/* { dg-skip-if "64b Darwin does not support non-PIC" *-*-darwin* } */
 /* { dg-options "-O2 -march=x86-64-v4 
-mmemcpy-strategy=vector_loop:2048:noalign,libcall:-1:noalign -fno-pie" } */
 /* { dg-add-options check_function_bodies } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
diff --git a/gcc/testsuite/gcc.target/i386/memset-pr120683-13.c 
b/gcc/testsuite/gcc.target/i386/memset-pr120683-13.c
index 0b98be8217a..8663a78a92c 100644
--- a/gcc/testsuite/gcc.target/i386/memset-pr120683-13.c
+++ b/gcc/testsuite/gcc.target/i386/memset-pr120683-13.c
@@ -1,4 +1,5 @@
 /* { dg-do compile } */
+/* { dg-skip-if "64b Darwin does not support non-PIC" *-*-darwin* } */
 /* { dg-options "-O2 -march=x86-64 
-mmemset-strategy=vector_loop:256:noalign,libcall:-1:noalign -fno-pie" } */
 /* { dg-add-options check_function_bodies } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
diff --git a/gcc/testsuite/gcc.target/i386/memset-pr120683-17.c 
b/gcc/testsuite/gcc.target/i386/memset-pr120683-17.c
index 535bf570033..9657378e6a6 100644
--- a/gcc/testsuite/gcc.target/i386/memset-pr120683-17.c
+++ b/gcc/testsuite/gcc.target/i386/memset-pr120683-17.c
@@ -1,4 +1,5 @@
 /* { dg-do compile } */
+/* { dg-skip-if "64b Darwin does not support non-PIC" *-*-darwin* } */
 /* { dg-options "-O2 -march=x86-64 
-mmemset-strategy=vector_loop:256:noalign,libcall:-1:noalign -fno-pie" } */
 /* { dg-add-options check_function_bodies } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
diff --git a/gcc/testsuite/gcc.target/i386/memset-pr120683-18.c 
b/gcc/testsuite/gcc.target/i386/memset-pr120683-18.c
index f05e6fb06bb..dbead6ef585 100644
--- a/gcc/testsuite/gcc.target/i386/memset-pr120683-18.c
+++ b/gcc/testsuite/gcc.target/i386/memset-pr120683-18.c
@@ -1,4 +1,5 @@
 /* { dg-do compile } */
+/* { dg-skip-if "64b Darwin does not support non-PIC" *-*-darwin* } */
 /* { dg-options "-O2 -march=x86-64 
-mmemset-strategy=vector_loop:256:noalign,libcall:-1:noalign -fno-pie" } */
 /* { dg-add-options check_function_bodies } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
diff --git a/gcc/testsuite/gcc.target/i386/memset-pr120683-19.c 
b/gcc/testsuite/gcc.target/i386/memset-pr120683-19.c
index 4d8dd5214d8..f9777e57c54 100644
--- a/gcc/testsuite/gcc.target/i386/memset-pr120683-19.c
+++ b/gcc/testsuite/gcc.target/i386/memset-pr120683-19.c
@@ -1,4 +1,5 @@
 /* { dg-do compile } */
+/* { dg-skip-if "64b Darwin does not support non-PIC" *-*-darwin* } */
 /* { dg-options "-O2 -march=x86-64 
-mmemset-strategy=vector_loop:256:noalign,libcall:-1:noalign -fno-pie" } */
 /* { dg-add-options check_function_bodies } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
diff --git a/gcc/testsuite/gcc.target/i386/memset-pr120683-22.c 
b/gcc/testsuite/gcc.target/i386/memset-pr120683-22.c
index a79bbe11f40..475c1e2dd6f 100644
--- a/gcc/testsuite/gcc.target/i386/memset-pr120683-22.c
+++ b/gcc/testsuite/gcc.target/i386/memset-pr120683-22.c
@@ -1,4 +1,5 @@
 /* { dg-do compile { target { ! ia32 } } } */
+/* { dg-skip-if "64b Darwin does not support non-PIC" *-*-darwin* } */
 /* { dg-options "-O2 -march=x86-64 
-mmemset-strategy=rep_8byte:8192:align,libcall:-1:noalign -fno-pie" } */
 /* { dg-add-options check_function_bodies } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
diff --git a/gcc/testsuite/gcc.target/i386/memset-pr120683-23.c 
b/gcc/testsuite/gcc.target/i386/memset-pr120683-23.c
index 7e0d8441dae..113ddd3c39d 100644
--- a/gcc/testsuite/gcc.target/i386/memset-pr120683-23.c
+++ b/gcc/testsuite/gcc.target/i386/memset-pr120683-23.c
@@ -1,4 +1,5 @@
 /* { dg-do compile } */
+/* { dg-skip-if "64b Darwin does not support non-PIC" *-*-darwin* } */
 /* { dg-options "-O2 -march=x86-64 -minline-all-stringops 
-mmemset-strategy=vector_loop:256:noalign,libcall:-1:noalign -fno-pie" } */
 /* { dg-add-options check_function_bodies } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
diff --git a/gcc/testsuite/gcc.target/i386/memset-pr70308-1b.c 
b/gcc/testsuite/gcc.target/i386/memset-pr70308-1b.c
index bd53f246069..b951f6fe7a0 100644
--- a/gcc/testsuite/gcc.target/i386/memset-pr70308-1b.c
+++ b/gcc/testsuite/gcc.target/i386/memset-pr70308-1b.c
@@ -1,4 +1,5 @@
 /* { dg-do compile } */
+/* { dg-skip-if "64b Darwin does not support non-PIC" *-*-darwin* } */
 /* { dg-options "-O2 -march=x86-64 -fomit-frame-pointer -DUSE_SCANF 
-fno-stack-protector" } */
 /* { dg-add-options check_function_bodies } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
-- 
2.50.1 (Apple Git-155)

Reply via email to