From: Nick Clifton Date: Mon, 31 Jan 2011 11:38:43 +0000 (+0000) Subject: rx.c (rx_get_stack_layout): Only save call clobbered registers inside interrupt handl... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d7862be3faeac281495f58baab92408362275514;p=gcc.git rx.c (rx_get_stack_layout): Only save call clobbered registers inside interrupt handlers if... * config/rx/rx.c (rx_get_stack_layout): Only save call clobbered registers inside interrupt handlers if the handler is not a leaf function. From-SVN: r169434 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d887424cd44..b054ad27568 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2011-01-31 Nick Clifton + + * config/rx/rx.c (rx_get_stack_layout): Only save call clobbered + registers inside interrupt handlers if the handler is not a leaf + function. + 2011-01-31 Nick Clifton * config/mn10300/mn10300.c (mn10300_regno_in_class_p): Check for diff --git a/gcc/config/rx/rx.c b/gcc/config/rx/rx.c index 8fa48a35827..81991067b83 100644 --- a/gcc/config/rx/rx.c +++ b/gcc/config/rx/rx.c @@ -1137,10 +1137,12 @@ rx_get_stack_layout (unsigned int * lowest, for (save_mask = high = low = 0, reg = 1; reg < CC_REGNUM; reg++) { if ((df_regs_ever_live_p (reg) - /* Always save all call clobbered registers inside interrupt - handlers, even if they are not live - they may be used in - routines called from this one. */ - || (call_used_regs[reg] && is_interrupt_func (NULL_TREE))) + /* Always save all call clobbered registers inside non-leaf + interrupt handlers, even if they are not live - they may + be used in (non-interrupt aware) routines called from this one. */ + || (call_used_regs[reg] + && is_interrupt_func (NULL_TREE) + && ! current_function_is_leaf)) && (! call_used_regs[reg] /* Even call clobbered registered must be pushed inside interrupt handlers. */