Commit e55b72cf by John David Anglin

re PR testsuite/77734 (FAIL: gcc.dg/plugin/must-tail-call-1.c…

re PR testsuite/77734 (FAIL: gcc.dg/plugin/must-tail-call-1.c -fplugin=./must_tail_call_plugin.so (test  for excess errors))

	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
parent 07baf4a5
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> 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
David Edelsohn <dje.gcc@gmail.com> David Edelsohn <dje.gcc@gmail.com>
......
...@@ -8655,9 +8655,6 @@ pa_asm_output_mi_thunk (FILE *file, tree thunk_fndecl, HOST_WIDE_INT delta, ...@@ -8655,9 +8655,6 @@ pa_asm_output_mi_thunk (FILE *file, tree thunk_fndecl, HOST_WIDE_INT delta,
static bool static bool
pa_function_ok_for_sibcall (tree decl, tree exp ATTRIBUTE_UNUSED) 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 /* Sibcalls are not ok because the arg pointer register is not a fixed
register. This prevents the sibcall optimization from occurring. In register. This prevents the sibcall optimization from occurring. In
addition, there are problems with stub placement using GNU ld. This addition, there are problems with stub placement using GNU ld. This
...@@ -8667,8 +8664,11 @@ pa_function_ok_for_sibcall (tree decl, tree exp ATTRIBUTE_UNUSED) ...@@ -8667,8 +8664,11 @@ pa_function_ok_for_sibcall (tree decl, tree exp ATTRIBUTE_UNUSED)
if (TARGET_64BIT) if (TARGET_64BIT)
return false; return false;
if (TARGET_PORTABLE_RUNTIME)
return false;
/* Sibcalls are only ok within a translation unit. */ /* 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 /* ??? Addition is not commutative on the PA due to the weird implicit
......
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