aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2008-12-17 13:03:04 +0100
committerJan Hubicka <hubicka@gcc.gnu.org>2008-12-17 12:03:04 +0000
commit0e456625276c293c62302c6c4d38d995e2b59880 (patch)
tree49f6bddf80954a1c4e78d3fb239c6a52162fa590 /gcc
parent8c13133cc31f50875459e4bd2244f75580c5b1e8 (diff)
downloadgcc-0e456625276c293c62302c6c4d38d995e2b59880.zip
gcc-0e456625276c293c62302c6c4d38d995e2b59880.tar.gz
gcc-0e456625276c293c62302c6c4d38d995e2b59880.tar.bz2
calls.c (expand_call): Do not sibcall if outgoing_reg_parm_stack_space does not match.
* calls.c (expand_call): Do not sibcall if outgoing_reg_parm_stack_space does not match. Co-Authored-By: Kai Tietz <kai.tietz@onevision.com> From-SVN: r142792
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/calls.c4
2 files changed, 10 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 27fd45a..3b263c7 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2008-12-12 Jan Hubicka <jh@suse.cz>
+ Kai Tietz <kai.tietz@onevision.com>
+
+ * calls.c (expand_call): Do not sibcall if
+ outgoing_reg_parm_stack_space does not match.
+
2008-12-12 Anatoly Sokolov <aesok@post.ru>
* config/avr/avr.c (avr_mcu_t): Add attiny87, attiny327, at90pwm81,
diff --git a/gcc/calls.c b/gcc/calls.c
index 03994d4..b94d298 100644
--- a/gcc/calls.c
+++ b/gcc/calls.c
@@ -2298,6 +2298,10 @@ expand_call (tree exp, rtx target, int ignore)
It does not seem worth the effort since few optimizable
sibling calls will return a structure. */
|| structure_value_addr != NULL_RTX
+ /* If outgoing reg parm stack space changes, we can not do sibcall. */
+ || (OUTGOING_REG_PARM_STACK_SPACE (funtype)
+ != OUTGOING_REG_PARM_STACK_SPACE (TREE_TYPE (current_function_decl)))
+ || (reg_parm_stack_space != REG_PARM_STACK_SPACE (fndecl))
/* Check whether the target is able to optimize the call
into a sibcall. */
|| !targetm.function_ok_for_sibcall (fndecl, exp)