mirror of git://gcc.gnu.org/git/gcc.git
[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
|
|
@ -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>
|
2015-08-06 Jiong Wang <jiong.wang@arm.com>
|
||||||
|
|
||||||
* config/aarch64/aarch64-protos.h (aarch64_is_noplt_call_p): New declaration.
|
* config/aarch64/aarch64-protos.h (aarch64_is_noplt_call_p): New declaration.
|
||||||
|
|
|
||||||
|
|
@ -101,8 +101,9 @@
|
||||||
(match_test "(unsigned HOST_WIDE_INT) ival < 64")))
|
(match_test "(unsigned HOST_WIDE_INT) ival < 64")))
|
||||||
|
|
||||||
(define_constraint "Usf"
|
(define_constraint "Usf"
|
||||||
"@internal Usf is a symbol reference."
|
"@internal Usf is a symbol reference under the context where plt stub allowed."
|
||||||
(match_code "symbol_ref"))
|
(and (match_code "symbol_ref")
|
||||||
|
(match_test "!aarch64_is_noplt_call_p (op)")))
|
||||||
|
|
||||||
(define_constraint "UsM"
|
(define_constraint "UsM"
|
||||||
"@internal
|
"@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>
|
2015-08-06 Jiong Wang <jiong.wang@arm.com>
|
||||||
|
|
||||||
* gcc.target/aarch64/noplt_1.c: New testcase.
|
* gcc.target/aarch64/noplt_1.c: New testcase.
|
||||||
|
|
|
||||||
|
|
@ -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…
Reference in New Issue