aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1993-05-06 19:21:03 -0400
committerRichard Kenner <kenner@gcc.gnu.org>1993-05-06 19:21:03 -0400
commit4c05b187a1241d171599fd14ac4337903ea5b40f (patch)
tree12f6e95a3f149d56b61ecc0163ea5f197761748e
parent7518f9cc23c0bddf2e781771ca0cf0dc45bb1115 (diff)
downloadgcc-4c05b187a1241d171599fd14ac4337903ea5b40f.zip
gcc-4c05b187a1241d171599fd14ac4337903ea5b40f.tar.gz
gcc-4c05b187a1241d171599fd14ac4337903ea5b40f.tar.bz2
(eliminate_regs, case {PRE,POST}_{INC,DEC}): Account for PUSH_ROUNDING.
From-SVN: r4375
-rw-r--r--gcc/reload1.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/gcc/reload1.c b/gcc/reload1.c
index 1aa9d17..f7d5458 100644
--- a/gcc/reload1.c
+++ b/gcc/reload1.c
@@ -1,5 +1,5 @@
/* Reload pseudo regs into hard regs for insns that require hard regs.
- Copyright (C) 1987, 1988, 1989, 1992 Free Software Foundation, Inc.
+ Copyright (C) 1987, 1988, 1989, 1992, 1993 Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -2734,10 +2734,17 @@ eliminate_regs (x, mem_mode, insn)
for (ep = reg_eliminate; ep < &reg_eliminate[NUM_ELIMINABLE_REGS]; ep++)
if (ep->to_rtx == XEXP (x, 0))
{
+ int size = GET_MODE_SIZE (mem_mode);
+
+ /* If more bytes than MEM_MODE are pushed, account for them. */
+#ifdef PUSH_ROUNDING
+ if (ep->to_rtx == stack_pointer_rtx)
+ size = PUSH_ROUNDING (size);
+#endif
if (code == PRE_DEC || code == POST_DEC)
- ep->offset += GET_MODE_SIZE (mem_mode);
+ ep->offset += size;
else
- ep->offset -= GET_MODE_SIZE (mem_mode);
+ ep->offset -= size;
}
/* Fall through to generic unary operation case. */