Commit 4c05b187 by Richard Kenner

(eliminate_regs, case {PRE,POST}_{INC,DEC}): Account for PUSH_ROUNDING.

From-SVN: r4375
parent 7518f9cc
/* 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. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment