aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2010-01-05 15:43:43 +0000
committerNick Clifton <nickc@gcc.gnu.org>2010-01-05 15:43:43 +0000
commit105249d140ea123b0d6932341715366fbe48244b (patch)
tree3b0a9a03e62fc6a728b6931e07215c33bb7e3194
parent653f6dc599d1f0afa1a8be89e948c8aeca875911 (diff)
downloadgcc-105249d140ea123b0d6932341715366fbe48244b.zip
gcc-105249d140ea123b0d6932341715366fbe48244b.tar.gz
gcc-105249d140ea123b0d6932341715366fbe48244b.tar.bz2
rx.c (rx_get_stack_layout): Fix allocation of second register to push into the stack frame when...
* config/rx/rx.c (rx_get_stack_layout): Fix allocation of second register to push into the stack frame when the accumulator has to be saved during interrupts. From-SVN: r155652
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/config/rx/rx.c4
2 files changed, 8 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index db624b9..b62bd1a 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2010-01-05 Nick Clifton <nickc@redhat.com>
+
+ * config/rx/rx.c (rx_get_stack_layout): Fix allocation of second
+ register to push into the stack frame when the accumulator has to
+ be saved during interrupts.
+
2010-01-05 Eric Fisher <joefoxreal@gmail.com>
* doc/invoke.texi: Remove the documentation about option
diff --git a/gcc/config/rx/rx.c b/gcc/config/rx/rx.c
index 3fb8b32..ce13217 100644
--- a/gcc/config/rx/rx.c
+++ b/gcc/config/rx/rx.c
@@ -1072,8 +1072,8 @@ rx_get_stack_layout (unsigned int * lowest,
save_mask |= (1 << 13) | (1 << 14);
if (low == 0)
low = 13;
- if (high == 0)
- high = 14;
+ if (high == 0 || low == high)
+ high = low + 1;
}
/* Decide if it would be faster fill in the call-saved area of the stack