OSDN Git Service

* config/rx/rx.c (rx_get_stack_layout): Fix allocation of second
authornickc <nickc@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 5 Jan 2010 15:43:43 +0000 (15:43 +0000)
committernickc <nickc@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 5 Jan 2010 15:43:43 +0000 (15:43 +0000)
        register to push into the stack frame when the accumulator has to
        be saved during interrupts.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@155652 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/rx/rx.c

index db624b9..b62bd1a 100644 (file)
@@ -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
index 3fb8b32..ce13217 100644 (file)
@@ -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