From ff7f012ac0aa90d0b8f540a01844ecc158b2d740 Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Mon, 2 May 2005 18:18:37 +0000 Subject: [PATCH] calls.c (expand_call): Handle current_function_pretend_args_size when checking for sibcalls. * calls.c (expand_call): Handle current_function_pretend_args_size when checking for sibcalls. From-SVN: r99113 --- gcc/ChangeLog | 5 +++++ gcc/calls.c | 7 +++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 20bf784..5090358 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2005-05-02 Daniel Jacobowitz + + * calls.c (expand_call): Handle current_function_pretend_args_size + when checking for sibcalls. + 2005-05-02 Kazu Hirata PR tree-optimization/21294 diff --git a/gcc/calls.c b/gcc/calls.c index df9c734..2739832 100644 --- a/gcc/calls.c +++ b/gcc/calls.c @@ -2197,8 +2197,11 @@ expand_call (tree exp, rtx target, int ignore) the argument areas are shared. */ || (fndecl && decl_function_context (fndecl) == current_function_decl) /* If this function requires more stack slots than the current - function, we cannot change it into a sibling call. */ - || args_size.constant > current_function_args_size + function, we cannot change it into a sibling call. + current_function_pretend_args_size is not part of the + stack allocated by our caller. */ + || args_size.constant > (current_function_args_size + - current_function_pretend_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) -- 2.7.4