Commit 201fa0b3 by Jiong Wang Committed by Jiong Wang

[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
parent b60d63cb
2015-08-06 Jiong Wang <jiong.wang@arm.com> 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. * config/aarch64/aarch64-protos.h (aarch64_is_noplt_call_p): New declaration.
* config/aarch64/aarch64.c (aarch64_is_noplt_call_p): New function. * config/aarch64/aarch64.c (aarch64_is_noplt_call_p): New function.
* config/aarch64/aarch64.md (call_value_symbol): Check noplt scenarios. * config/aarch64/aarch64.md (call_value_symbol): Check noplt scenarios.
......
...@@ -101,8 +101,9 @@ ...@@ -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
......
2015-08-06 Jiong Wang <jiong.wang@arm.com> 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. * gcc.target/aarch64/noplt_1.c: New testcase.
* gcc.target/aarch64/noplt_2.c: Likewise. * gcc.target/aarch64/noplt_2.c: Likewise.
......
/* { 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 } } } */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment