diff mbox series

[Darwin,X86,testsuite] Update tests for common section use.

Message ID CE9EFBFF-22C5-4E5E-8A90-533E3B7E7565@sandoe.co.uk
State New
Headers show
Series [Darwin,X86,testsuite] Update tests for common section use. | expand

Commit Message

Iain Sandoe Nov. 22, 2019, 9:03 p.m. UTC
The tests amended here now have different code-gen with default
options because, previously, the access were indirected per Darwin
ABI for common accesses.  The revised code-gen does not match the
expected scan-asms because Darwin defaults to fPIC.  For these tests,
it seems that the best solution is to use '-mdynamic-no-pic' in the
m32 case which makes the output similar to the ElF platform default.

tested on x86_64-dawin16, x86_64-linux-gnu
applied to mainline
thanks
Iain

gcc/testsuite/ChangeLog:

2019-11-22  Iain Sandoe  <iain@sandoe.co.uk>

	* gcc.target/i386/pr27971.c: Use mdynamic-no-pic for m32 on
	Darwin.
	* gcc.target/i386/sse2-load-multi.c: Likewise.
	* gcc.target/i386/sse2-store-multi.c: Likewise.
diff mbox series

Patch

diff --git a/gcc/testsuite/gcc.target/i386/pr27971.c b/gcc/testsuite/gcc.target/i386/pr27971.c
index 149bf2b..f80cb65 100644
--- a/gcc/testsuite/gcc.target/i386/pr27971.c
+++ b/gcc/testsuite/gcc.target/i386/pr27971.c
@@ -1,5 +1,6 @@ 
 /* { dg-do compile } */
 /* { dg-options "-O2 -mno-tbm" } */
+/* { dg-additional-options "-mdynamic-no-pic" { target { *-*-darwin* && ia32 } } } */
 
 unsigned array[4];
 
@@ -16,3 +17,4 @@  unsigned foo(TYPE x)
 
 /* { dg-final { scan-assembler-not "shr\[^\\n\]*2" } } */
 /* { dg-final { scan-assembler "and\[^\\n\]*12" } } */
+ 
\ No newline at end of file
diff --git a/gcc/testsuite/gcc.target/i386/sse2-load-multi.c b/gcc/testsuite/gcc.target/i386/sse2-load-multi.c
index 9276054..3ee0ef8 100644
--- a/gcc/testsuite/gcc.target/i386/sse2-load-multi.c
+++ b/gcc/testsuite/gcc.target/i386/sse2-load-multi.c
@@ -1,5 +1,6 @@ 
 /* { dg-do compile } */
 /* { dg-options "-march=corei7 -O2" } */
+/* { dg-additional-options "-mdynamic-no-pic" { target { *-*-darwin* && ia32 } } } */
 
 #include <emmintrin.h>
 
diff --git a/gcc/testsuite/gcc.target/i386/sse2-store-multi.c b/gcc/testsuite/gcc.target/i386/sse2-store-multi.c
index 203a00f..ca04934 100644
--- a/gcc/testsuite/gcc.target/i386/sse2-store-multi.c
+++ b/gcc/testsuite/gcc.target/i386/sse2-store-multi.c
@@ -1,5 +1,6 @@ 
 /* { dg-do compile } */
 /* { dg-options "-march=corei7 -O2" } */
+/* { dg-additional-options "-mdynamic-no-pic" { target { *-*-darwin* && ia32 } } } */
 
 #include <emmintrin.h>