diff mbox series

Repost: [PATCH] PR 100168: Fix call test on power10.

Message ID 20210707200839.GA29822@ibm-toto.the-meissners.org
State New
Headers show
Series Repost: [PATCH] PR 100168: Fix call test on power10. | expand

Commit Message

Michael Meissner July 7, 2021, 8:08 p.m. UTC
[PATCH] PR 100168: Fix call test on power10.

Fix a test that was checking for 64-bit TOC calls, to also allow for
PC-relative calls.

I have verified that this test passes when run on a power10 system configured
with --with-cpu=power10 and it continues to pass on power9 little endian and
power8 big endian systems.

Can I check this into the master branch?

2021-07-07  Michael Meissner  <meissner@linux.ibm.com>

gcc/testsuite
	PR testsuite/100168
	* gcc.dg/pr56727-2.c: Add support for PC-relative calls.
---
 gcc/testsuite/gcc.dg/pr56727-2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Li, Pan2 via Gcc-patches July 11, 2021, 7:30 p.m. UTC | #1
Hi Mike,

LGTM.  I can't approve, but recommend approval.

Thanks,
Bill

On 7/7/21 3:08 PM, Michael Meissner wrote:
> [PATCH] PR 100168: Fix call test on power10.
>
> Fix a test that was checking for 64-bit TOC calls, to also allow for
> PC-relative calls.
>
> I have verified that this test passes when run on a power10 system configured
> with --with-cpu=power10 and it continues to pass on power9 little endian and
> power8 big endian systems.
>
> Can I check this into the master branch?
>
> 2021-07-07  Michael Meissner  <meissner@linux.ibm.com>
>
> gcc/testsuite
> 	PR testsuite/100168
> 	* gcc.dg/pr56727-2.c: Add support for PC-relative calls.
> ---
>   gcc/testsuite/gcc.dg/pr56727-2.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/gcc/testsuite/gcc.dg/pr56727-2.c b/gcc/testsuite/gcc.dg/pr56727-2.c
> index c54369ed25e..77fdf4bc350 100644
> --- a/gcc/testsuite/gcc.dg/pr56727-2.c
> +++ b/gcc/testsuite/gcc.dg/pr56727-2.c
> @@ -18,4 +18,4 @@ void h ()
>   
>   /* { dg-final { scan-assembler "@(PLT|plt)" { target i?86-*-* x86_64-*-* } } } */
>   /* { dg-final { scan-assembler "@(PLT|plt)" { target { powerpc*-*-linux* && ilp32 } } } } */
> -/* { dg-final { scan-assembler "bl f\n\\s*nop" { target { powerpc*-*-linux* && lp64 } } } } */
> +/* { dg-final { scan-assembler "(bl f\n\\s*nop)|(bl f@notoc)" { target { powerpc*-*-linux* && lp64 } } } } */
Segher Boessenkool July 28, 2021, 11:08 p.m. UTC | #2
On Wed, Jul 07, 2021 at 04:08:39PM -0400, Michael Meissner wrote:
> [PATCH] PR 100168: Fix call test on power10.
> 
> Fix a test that was checking for 64-bit TOC calls, to also allow for
> PC-relative calls.

> --- a/gcc/testsuite/gcc.dg/pr56727-2.c
> +++ b/gcc/testsuite/gcc.dg/pr56727-2.c
> @@ -18,4 +18,4 @@ void h ()
>  
>  /* { dg-final { scan-assembler "@(PLT|plt)" { target i?86-*-* x86_64-*-* } } } */
>  /* { dg-final { scan-assembler "@(PLT|plt)" { target { powerpc*-*-linux* && ilp32 } } } } */
> -/* { dg-final { scan-assembler "bl f\n\\s*nop" { target { powerpc*-*-linux* && lp64 } } } } */
> +/* { dg-final { scan-assembler "(bl f\n\\s*nop)|(bl f@notoc)" { target { powerpc*-*-linux* && lp64 } } } } */

The parentheses are superfluous.  Maybe just write it as
{ dg-final { scan-assembler {bl f(\n\s*nop|@notoc)} { target { powerpc*-*-linux* && lp64 } } } } */
though?


Segher
diff mbox series

Patch

diff --git a/gcc/testsuite/gcc.dg/pr56727-2.c b/gcc/testsuite/gcc.dg/pr56727-2.c
index c54369ed25e..77fdf4bc350 100644
--- a/gcc/testsuite/gcc.dg/pr56727-2.c
+++ b/gcc/testsuite/gcc.dg/pr56727-2.c
@@ -18,4 +18,4 @@  void h ()
 
 /* { dg-final { scan-assembler "@(PLT|plt)" { target i?86-*-* x86_64-*-* } } } */
 /* { dg-final { scan-assembler "@(PLT|plt)" { target { powerpc*-*-linux* && ilp32 } } } } */
-/* { dg-final { scan-assembler "bl f\n\\s*nop" { target { powerpc*-*-linux* && lp64 } } } } */
+/* { dg-final { scan-assembler "(bl f\n\\s*nop)|(bl f@notoc)" { target { powerpc*-*-linux* && lp64 } } } } */