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
+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.
(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
+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.
--- /dev/null
+/* { 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 } } } */