aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDoug Evans <dje@gnu.org>1995-01-14 06:22:17 +0000
committerDoug Evans <dje@gnu.org>1995-01-14 06:22:17 +0000
commit320cfc3c20d06572ffd935a2199d58b17996fe7c (patch)
tree0c7200b1ccd65571267dbfca134f699cc1e2f93e
parenteb7d5627e12970b3d3f2260d5f4ba90ef3ba42f9 (diff)
downloadgcc-320cfc3c20d06572ffd935a2199d58b17996fe7c.zip
gcc-320cfc3c20d06572ffd935a2199d58b17996fe7c.tar.gz
gcc-320cfc3c20d06572ffd935a2199d58b17996fe7c.tar.bz2
(incoming_reg): Keep regstack aligned to even boundary.
From-SVN: r8759
-rw-r--r--gcc/config/a29k/a29k.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/gcc/config/a29k/a29k.c b/gcc/config/a29k/a29k.c
index 4c97841..90cdeec 100644
--- a/gcc/config/a29k/a29k.c
+++ b/gcc/config/a29k/a29k.c
@@ -806,8 +806,13 @@ incoming_reg (start, count)
CLEAR_HARD_REG_BIT (call_fixed_reg_set, i);
}
- /* Shorten the maximum size of the frame. */
- for (i = R_AR (0) - start - count; i < R_AR (0) - start; i++)
+ /* Shorten the maximum size of the frame.
+ Remember that R_AR(-1,-2) are place holders for the caller's lr0,lr1.
+ Make sure to keep the frame rounded to an even boundary. Rounding up
+ to an 8 byte boundary will use a slot. Otherwise a frame with 121 local
+ regs and 5 arguments will overrun the stack (121+1 + 5 + 2 > 128). */
+ /* ??? An alternative would be to never allocate one reg. */
+ for (i = (R_AR (0) - 2 - start - count) & ~1; i < R_AR (0) - 2 - start; i++)
{
fixed_regs[i] = call_used_regs[i] = call_fixed_regs[i] = 1;
SET_HARD_REG_BIT (fixed_reg_set, i);