From: Alan Modra Date: Thu, 22 Oct 2020 01:57:31 +0000 (+1030) Subject: [RS6000] Non-pcrel tests when power10 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=32c89b1633f5b2b4db9a64a7387eb4af2086ba41;p=gcc.git [RS6000] Non-pcrel tests when power10 These tests require -mno-pcrel because they are testing features of the non-pcrel ABI. * gcc.target/powerpc/cprophard.c: Add -mno-pcrel to options. * gcc.target/powerpc/float128-hw3.c: Likewise. * gcc.target/powerpc/pr79439-1.c: Likewise. * gcc.target/powerpc/pr79439-2.c: Likewise. * gcc.target/powerpc/r2_shrink-wrap.c: Likewise. --- diff --git a/gcc/testsuite/gcc.target/powerpc/cprophard.c b/gcc/testsuite/gcc.target/powerpc/cprophard.c index f93081f0cb5..0aac9a509d4 100644 --- a/gcc/testsuite/gcc.target/powerpc/cprophard.c +++ b/gcc/testsuite/gcc.target/powerpc/cprophard.c @@ -1,6 +1,6 @@ -/* { dg-do compile { target { powerpc*-*-* && lp64 } } } */ +/* { dg-do compile { target lp64 } } */ /* { dg-skip-if "" { powerpc*-*-darwin* } } */ -/* { dg-options "-O2" } */ +/* { dg-options "-O2 -mno-pcrel" } */ /* { dg-final { scan-assembler {ld 2,(24|40)\(1\)} } } */ /* From a linux kernel mis-compile of net/core/skbuff.c. */ diff --git a/gcc/testsuite/gcc.target/powerpc/float128-hw3.c b/gcc/testsuite/gcc.target/powerpc/float128-hw3.c index b3bbeb25678..630c93dfcb7 100644 --- a/gcc/testsuite/gcc.target/powerpc/float128-hw3.c +++ b/gcc/testsuite/gcc.target/powerpc/float128-hw3.c @@ -1,7 +1,7 @@ /* { dg-do compile { target lp64 } } */ /* { dg-require-effective-target powerpc_p9vector_ok } */ /* { dg-require-effective-target float128 } */ -/* { dg-options "-mpower9-vector -O2 -ffast-math -std=c11" } */ +/* { dg-options "-mpower9-vector -O2 -ffast-math -std=c11 -mno-pcrel" } */ /* Test to make sure the compiler calls the external function instead of doing the built-in processing for _Float128 functions that have hardware support diff --git a/gcc/testsuite/gcc.target/powerpc/pr79439-1.c b/gcc/testsuite/gcc.target/powerpc/pr79439-1.c index 539c96f571e..8eb08a4e762 100644 --- a/gcc/testsuite/gcc.target/powerpc/pr79439-1.c +++ b/gcc/testsuite/gcc.target/powerpc/pr79439-1.c @@ -1,5 +1,5 @@ /* { dg-do compile { target { powerpc*-*-linux* && lp64 } } } */ -/* { dg-options "-O2 -fpic -fno-reorder-blocks -fno-inline-functions" } */ +/* { dg-options "-O2 -fpic -fno-reorder-blocks -fno-inline-functions -mno-pcrel" } */ /* On the Linux 64-bit ABIs, we eliminate NOP in the 'rec' call even if -fpic is used. The recursive call should call the local alias. The diff --git a/gcc/testsuite/gcc.target/powerpc/pr79439-2.c b/gcc/testsuite/gcc.target/powerpc/pr79439-2.c index b53af445265..9ebcf2579ab 100644 --- a/gcc/testsuite/gcc.target/powerpc/pr79439-2.c +++ b/gcc/testsuite/gcc.target/powerpc/pr79439-2.c @@ -1,5 +1,5 @@ /* { dg-do compile { target { powerpc*-*-linux* && lp64 } } } */ -/* { dg-options "-O2 -fpic -fno-reorder-blocks" } */ +/* { dg-options "-O2 -fpic -fno-reorder-blocks -mno-pcrel" } */ /* On the Linux 64-bit ABIs, we should not eliminate NOP in the 'rec' call if -fpic is used because rec can be interposed at link time (since it has an diff --git a/gcc/testsuite/gcc.target/powerpc/r2_shrink-wrap.c b/gcc/testsuite/gcc.target/powerpc/r2_shrink-wrap.c index b81b9b1c2ee..a74da38740b 100644 --- a/gcc/testsuite/gcc.target/powerpc/r2_shrink-wrap.c +++ b/gcc/testsuite/gcc.target/powerpc/r2_shrink-wrap.c @@ -1,5 +1,5 @@ /* { dg-do compile { target lp64 } } */ -/* { dg-options "-O2 -fdump-rtl-pro_and_epilogue" } */ +/* { dg-options "-O2 -fdump-rtl-pro_and_epilogue -mno-pcrel" } */ /* Verify we move the prologue past the TOC reference of 'j' and shrink-wrap the function. */