diff options
author | Andrew Haley <aph@redhat.com> | 2003-06-10 16:43:39 +0000 |
---|---|---|
committer | Andrew Haley <aph@gcc.gnu.org> | 2003-06-10 16:43:39 +0000 |
commit | e076f71a38f9945415a6dd2b037b20c1de9b6d3b (patch) | |
tree | 7ccc0967b6f9a3aa999e7661ed16ff9f1bebe3cc /gcc/calls.c | |
parent | e7e09ad8f27d4a239b2109f719e69753e4f3abc7 (diff) | |
download | gcc-e076f71a38f9945415a6dd2b037b20c1de9b6d3b.zip gcc-e076f71a38f9945415a6dd2b037b20c1de9b6d3b.tar.gz gcc-e076f71a38f9945415a6dd2b037b20c1de9b6d3b.tar.bz2 |
langhooks-def.h (LANG_HOOKS_DECL_OK_FOR_SIBCALL): New.
2003-05-21 Andrew Haley <aph@redhat.com>
* langhooks-def.h (LANG_HOOKS_DECL_OK_FOR_SIBCALL): New.
(LANG_HOOKS_DECLS): Add LANG_HOOKS_DECL_OK_FOR_SIBCALL.
(lhd_decl_ok_for_sibcall): New.
* langhooks.c (lhd_decl_ok_for_sibcall): New.
* langhooks.h (lang_hooks_for_decls.ok_for_sibcall): New field.
* calls.c (expand_call): Check lang_hook before generating a
sibcall.
2003-05-21 Andrew Haley <aph@redhat.com>
* lang.c (LANG_HOOKS_DECL_OK_FOR_SIBCALL): New.
(java_decl_ok_for_sibcall): New.
From-SVN: r67713
Diffstat (limited to 'gcc/calls.c')
-rw-r--r-- | gcc/calls.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/gcc/calls.c b/gcc/calls.c index db6b884..a72bba6 100644 --- a/gcc/calls.c +++ b/gcc/calls.c @@ -2508,10 +2508,11 @@ expand_call (exp, target, ignore) || args_size.constant > current_function_args_size /* If the callee pops its own arguments, then it must pop exactly the same number of arguments as the current function. */ - || RETURN_POPS_ARGS (fndecl, funtype, args_size.constant) - != RETURN_POPS_ARGS (current_function_decl, - TREE_TYPE (current_function_decl), - current_function_args_size)) + || (RETURN_POPS_ARGS (fndecl, funtype, args_size.constant) + != RETURN_POPS_ARGS (current_function_decl, + TREE_TYPE (current_function_decl), + current_function_args_size)) + || !(*lang_hooks.decls.ok_for_sibcall) (fndecl)) try_tail_call = 0; if (try_tail_call || try_tail_recursion) |