diff options
author | Joel Brobecker <brobecker@adacore.com> | 2020-12-31 21:38:05 -0300 |
---|---|---|
committer | Alexandre Oliva <oliva@gnu.org> | 2021-01-01 02:07:16 -0300 |
commit | ba34b26564c8c2f30481a8598908ffe71af371de (patch) | |
tree | a8cae75b42a68899e3c2995201e5166131babc12 | |
parent | 7ba5ce389c9b8daeecbcb145a9b77bbc98577d10 (diff) | |
download | gcc-ba34b26564c8c2f30481a8598908ffe71af371de.zip gcc-ba34b26564c8c2f30481a8598908ffe71af371de.tar.gz gcc-ba34b26564c8c2f30481a8598908ffe71af371de.tar.bz2 |
compile gcc.target/arm/{pr78255-2.c,memset-inline-2.c} with -mno-long-calls
If the target is configured such that -mlong-call is passed
by default, the function calls these tests are trying to detect
by scanning the assembly file are performed using long calls,
like so:
| foo:
| @ memset-inline-2.c:12: memset (a, -1, 14);
| mov r2, #14 @,
| mvn r1, #0 @,
| ldr r0, .L2 @,
| ldr r3, .L2+4 @ tmp112,
| bx r3 @ tmp112
Looking at .L2 (and in particular at .L2+4):
| .L2:
| .word a
| .word memset <<<---
This change adds -mno-long-calls to the list of compiler options
to make sure we generate short call code, allowing the assembly
matching to pass.
This is added unconditionally to the dg-options (as opposed to using
dg-additional-options) because this test is already specific to ARM
targets, and -mno-long-calls is available on all ARM targets.
for gcc/testsuite/ChangeLog
* gcc.target/arm/memset-inline-2.c: Add -mno-long-calls to
the test's dg-options.
* gcc.target/arm/pr78255-2.c: Likewise.
-rw-r--r-- | gcc/testsuite/gcc.target/arm/memset-inline-2.c | 2 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/arm/pr78255-2.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/gcc/testsuite/gcc.target/arm/memset-inline-2.c b/gcc/testsuite/gcc.target/arm/memset-inline-2.c index b8195ca..ba1f7ed 100644 --- a/gcc/testsuite/gcc.target/arm/memset-inline-2.c +++ b/gcc/testsuite/gcc.target/arm/memset-inline-2.c @@ -1,5 +1,5 @@ /* { dg-do run } */ -/* { dg-options "-save-temps -Os -fno-inline" } */ +/* { dg-options "-save-temps -Os -fno-inline -mno-long-calls" } */ #include <string.h> #include <stdlib.h> diff --git a/gcc/testsuite/gcc.target/arm/pr78255-2.c b/gcc/testsuite/gcc.target/arm/pr78255-2.c index cc1c180..fd379ae 100644 --- a/gcc/testsuite/gcc.target/arm/pr78255-2.c +++ b/gcc/testsuite/gcc.target/arm/pr78255-2.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2" } */ +/* { dg-options "-O2 -mno-long-calls" } */ extern int bar (void *); |