PR gcc/77734
* config/pa/pa.c (pa_function_ok_for_sibcall): Use
targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
From-SVN: r256934
+2018-01-21 John David Anglin <danglin@gcc.gnu.org>
+
+ PR gcc/77734
+ * config/pa/pa.c (pa_function_ok_for_sibcall): Use
+ targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
+ Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
+
2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
David Edelsohn <dje.gcc@gmail.com>
static bool
pa_function_ok_for_sibcall (tree decl, tree exp ATTRIBUTE_UNUSED)
{
- if (TARGET_PORTABLE_RUNTIME)
- return false;
-
/* Sibcalls are not ok because the arg pointer register is not a fixed
register. This prevents the sibcall optimization from occurring. In
addition, there are problems with stub placement using GNU ld. This
if (TARGET_64BIT)
return false;
+ if (TARGET_PORTABLE_RUNTIME)
+ return false;
+
/* Sibcalls are only ok within a translation unit. */
- return (decl && !TREE_PUBLIC (decl));
+ return decl && targetm.binds_local_p (decl);
}
/* ??? Addition is not commutative on the PA due to the weird implicit