From 4c05b187a1241d171599fd14ac4337903ea5b40f Mon Sep 17 00:00:00 2001 From: Richard Kenner Date: Thu, 6 May 1993 19:21:03 -0400 Subject: (eliminate_regs, case {PRE,POST}_{INC,DEC}): Account for PUSH_ROUNDING. From-SVN: r4375 --- gcc/reload1.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'gcc') 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 < ®_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. */ -- cgit v1.1