[AArch64] Tighten direct call pattern for sibcall to repair -fno-plt
2015-08-06 Jiong Wang <jiong.wang@arm.com> gcc/ * config/aarch64/constraints.md (Usf): Add the test of aarch64_is_noplt_call_p. gcc/testsuite/ * gcc.target/aarch64/noplt_3.c: New testcase. From-SVN: r226682
This commit is contained in:
parent
b60d63cbae
commit
201fa0b3a0
4 changed files with 32 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
|||
2015-08-06 Jiong Wang <jiong.wang@arm.com>
|
||||
|
||||
* config/aarch64/constraints.md (Usf): Add the test of
|
||||
aarch64_is_noplt_call_p.
|
||||
|
||||
2015-08-06 Jiong Wang <jiong.wang@arm.com>
|
||||
|
||||
* config/aarch64/aarch64-protos.h (aarch64_is_noplt_call_p): New declaration.
|
||||
|
|
|
@ -101,8 +101,9 @@
|
|||
(match_test "(unsigned HOST_WIDE_INT) ival < 64")))
|
||||
|
||||
(define_constraint "Usf"
|
||||
"@internal Usf is a symbol reference."
|
||||
(match_code "symbol_ref"))
|
||||
"@internal Usf is a symbol reference under the context where plt stub allowed."
|
||||
(and (match_code "symbol_ref")
|
||||
(match_test "!aarch64_is_noplt_call_p (op)")))
|
||||
|
||||
(define_constraint "UsM"
|
||||
"@internal
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
2015-08-06 Jiong Wang <jiong.wang@arm.com>
|
||||
|
||||
* gcc.target/aarch64/noplt_3.c: New testcase.
|
||||
|
||||
2015-08-06 Jiong Wang <jiong.wang@arm.com>
|
||||
|
||||
* gcc.target/aarch64/noplt_1.c: New testcase.
|
||||
|
|
20
gcc/testsuite/gcc.target/aarch64/noplt_3.c
Normal file
20
gcc/testsuite/gcc.target/aarch64/noplt_3.c
Normal file
|
@ -0,0 +1,20 @@
|
|||
/* { dg-do compile } */
|
||||
/* { dg-options "-O2 -fpic -fno-plt" } */
|
||||
/* { dg-skip-if "-mcmodel=large, no support for -fpic" { aarch64-*-* } { "-mcmodel=large" } { "" } } */
|
||||
|
||||
int dec (int);
|
||||
|
||||
int
|
||||
cal (int a)
|
||||
{
|
||||
return dec (a);
|
||||
}
|
||||
|
||||
void
|
||||
cal_novalue (int a)
|
||||
{
|
||||
dec (a);
|
||||
}
|
||||
|
||||
/* { dg-final { scan-assembler-times "#:got:" 2 { target { aarch64_tiny || aarch64_small } } } } */
|
||||
/* { dg-final { scan-assembler-times "#:got_lo12:" 2 { target aarch64_small } } } */
|
Loading…
Add table
Reference in a new issue