aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2023-04-27 09:36:55 +0200
committerJan Beulich <jbeulich@suse.com>2023-04-27 09:36:55 +0200
commitd94ca762f6e0e4f117c1a61aa6d6613b2abc1216 (patch)
tree30646307c4f11d4f9f9d698a6fd5a69fbbd8bdbf
parent95d4c0d2e6318aef88ba0bc607dfc1ec6b7a612f (diff)
downloadgcc-d94ca762f6e0e4f117c1a61aa6d6613b2abc1216.zip
gcc-d94ca762f6e0e4f117c1a61aa6d6613b2abc1216.tar.gz
gcc-d94ca762f6e0e4f117c1a61aa6d6613b2abc1216.tar.bz2
testsuite: adjust NOP expectations for RISC-V
RISC-V will emit ".option nopic" when -fno-pie is in effect, which matches the generic pattern. Just like done for Alpha, special-case RISC-V. gcc/testsuite/ * c-c++-common/patchable_function_entry-decl.c: Special-case RISC-V. * c-c++-common/patchable_function_entry-default.c: Likewise. * c-c++-common/patchable_function_entry-definition.c: Likewise.
-rw-r--r--gcc/testsuite/c-c++-common/patchable_function_entry-decl.c3
-rw-r--r--gcc/testsuite/c-c++-common/patchable_function_entry-default.c3
-rw-r--r--gcc/testsuite/c-c++-common/patchable_function_entry-definition.c3
3 files changed, 6 insertions, 3 deletions
diff --git a/gcc/testsuite/c-c++-common/patchable_function_entry-decl.c b/gcc/testsuite/c-c++-common/patchable_function_entry-decl.c
index 3ce7a5b..5137028 100644
--- a/gcc/testsuite/c-c++-common/patchable_function_entry-decl.c
+++ b/gcc/testsuite/c-c++-common/patchable_function_entry-decl.c
@@ -1,8 +1,9 @@
/* { dg-do compile { target { ! { nvptx*-*-* visium-*-* } } } } */
/* { dg-options "-O2 -fpatchable-function-entry=3,1" } */
/* { dg-additional-options "-fno-pie" { target sparc*-*-* } } */
-/* { dg-final { scan-assembler-times "nop|NOP|SWYM" 2 { target { ! { alpha*-*-* } } } } } */
+/* { dg-final { scan-assembler-times "nop|NOP|SWYM" 2 { target { ! { alpha*-*-* riscv*-*-* } } } } } */
/* { dg-final { scan-assembler-times "bis" 2 { target alpha*-*-* } } } */
+/* { dg-final { scan-assembler-times "nop\n" 2 { target riscv*-*-* } } } */
extern int a;
diff --git a/gcc/testsuite/c-c++-common/patchable_function_entry-default.c b/gcc/testsuite/c-c++-common/patchable_function_entry-default.c
index a501efc..3ccbafc 100644
--- a/gcc/testsuite/c-c++-common/patchable_function_entry-default.c
+++ b/gcc/testsuite/c-c++-common/patchable_function_entry-default.c
@@ -4,8 +4,9 @@
/* See PR99888, one single preceding nop isn't allowed on powerpc_elfv2,
so overriding with two preceding nops to make it pass there. */
/* { dg-additional-options "-fpatchable-function-entry=3,2" { target powerpc_elfv2 } } */
-/* { dg-final { scan-assembler-times "nop|NOP|SWYM" 3 { target { ! { alpha*-*-* } } } } } */
+/* { dg-final { scan-assembler-times "nop|NOP|SWYM" 3 { target { ! { alpha*-*-* riscv*-*-* } } } } } */
/* { dg-final { scan-assembler-times "bis" 3 { target alpha*-*-* } } } */
+/* { dg-final { scan-assembler-times "nop\n" 3 { target riscv*-*-* } } } */
extern int a;
diff --git a/gcc/testsuite/c-c++-common/patchable_function_entry-definition.c b/gcc/testsuite/c-c++-common/patchable_function_entry-definition.c
index ad7d7a9..5ed356c 100644
--- a/gcc/testsuite/c-c++-common/patchable_function_entry-definition.c
+++ b/gcc/testsuite/c-c++-common/patchable_function_entry-definition.c
@@ -1,8 +1,9 @@
/* { dg-do compile { target { ! { nvptx*-*-* visium-*-* } } } } */
/* { dg-options "-O2 -fpatchable-function-entry=3,1" } */
/* { dg-additional-options "-fno-pie" { target sparc*-*-* } } */
-/* { dg-final { scan-assembler-times "nop|NOP|SWYM" 1 { target { ! { alpha*-*-* } } } } } */
+/* { dg-final { scan-assembler-times "nop|NOP|SWYM" 1 { target { ! { alpha*-*-* riscv*-*-* } } } } } */
/* { dg-final { scan-assembler-times "bis" 1 { target alpha*-*-* } } } */
+/* { dg-final { scan-assembler-times "nop\n" 1 { target riscv*-*-* } } } */
extern int a;