aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2011-01-31 11:38:43 +0000
committerNick Clifton <nickc@gcc.gnu.org>2011-01-31 11:38:43 +0000
commitd7862be3faeac281495f58baab92408362275514 (patch)
treee3d8f6bddf71a7a8f01a7ca3c52e63d46bc63563 /gcc
parent171bbfd2ef5e0bc622476cb1e993a6106670dd83 (diff)
downloadgcc-d7862be3faeac281495f58baab92408362275514.zip
gcc-d7862be3faeac281495f58baab92408362275514.tar.gz
gcc-d7862be3faeac281495f58baab92408362275514.tar.bz2
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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/config/rx/rx.c10
2 files changed, 12 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index d887424..b054ad2 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,11 @@
2011-01-31 Nick Clifton <nickc@redhat.com>
+ * 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 <nickc@redhat.com>
+
* config/mn10300/mn10300.c (mn10300_regno_in_class_p): Check for
reg_renumber returning an INVALID_REGNUM.
diff --git a/gcc/config/rx/rx.c b/gcc/config/rx/rx.c
index 8fa48a3..8199106 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. */