]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[Darwin, PPC, testsuite] Fix pr71785 testcase for Darwin.
authorIain Sandoe <iain@sandoe.co.uk>
Thu, 5 Sep 2019 19:42:59 +0000 (19:42 +0000)
committerIain Sandoe <iains@gcc.gnu.org>
Thu, 5 Sep 2019 19:42:59 +0000 (19:42 +0000)
Firstly, we adjust the test conditions to use non-PIC code for Darwin.
Secondly, we have to account for out-of-line GPR restores which gives
a false positive on one of the scan-assembler-not. Lastly, we make the
test a bit more specific for Darwin - that it looks for absence of
branches to local labels.

2019-09-05  Iain Sandoe  <iain@sandoe.co.uk>

Backport from mainline.
2019-06-23  Iain Sandoe  <iain@sandoe.co.uk>

* gcc.target/powerpc/pr71785.c: For Darwin, make test non-PIC,
expect the out-of-line GPR restore, and test specifically for
absence of branches to local labels.

From-SVN: r275436

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/powerpc/pr71785.c

index 73d38bb6053534466c2cdad0af542a2fab994d54..8c8cbae60a6c7251172d523ee2b0cd201e1b8c4b 100644 (file)
@@ -1,5 +1,14 @@
 2019-09-05  Iain Sandoe  <iain@sandoe.co.uk>
 
+       Backport from mainline.
+       2019-06-23  Iain Sandoe  <iain@sandoe.co.uk>
+
+       * gcc.target/powerpc/pr71785.c: For Darwin, make test non-PIC,
+       expect the out-of-line GPR restore, and test specifically for
+       absence of branches to local labels.
+
+2019-08-05  Iain Sandoe  <iain@sandoe.co.uk>
+
        Backport from mainline.
        2019-06-22  Iain Sandoe  <iain@sandoe.co.uk>
 
index 613dcd1a937f673dcd651a3b8fb1d58f589ed2d4..c667ad81aa295329e440a86106a98d13c3a8a039 100644 (file)
@@ -1,6 +1,11 @@
 /* { dg-do compile { target { powerpc*-*-* } } } */
 /* { dg-options "-O2" } */
-/* { dg-final { scan-assembler-not {\mb\M} } } */
+/* We have to lose the default pic codegen on Darwin.  */
+/* { dg-additional-options "-mdynamic-no-pic" { target powerpc*-*-darwin* } } */
+/* ... and account for the out-of-line GPR restore.  */
+/* { dg-final { scan-assembler-times {\mb[ \t]*restGPR} 1 { target powerpc*-*-darwin* } } } */
+/* { dg-final { scan-assembler-not {\mb[ \t]L} { target powerpc*-*-darwin* } } } */
+/* { dg-final { scan-assembler-not {\mb\M} { target { ! powerpc*-*-darwin* } } } } */
 
 /* Check that all computed gotos in this testcase end up unfactored completely.
    If some is not there will be a unconditional jump left; if all works fine,