diff options
author | Richard Kenner <kenner@gcc.gnu.org> | 1993-05-06 19:21:03 -0400 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 1993-05-06 19:21:03 -0400 |
commit | 4c05b187a1241d171599fd14ac4337903ea5b40f (patch) | |
tree | 12f6e95a3f149d56b61ecc0163ea5f197761748e /gcc | |
parent | 7518f9cc23c0bddf2e781771ca0cf0dc45bb1115 (diff) | |
download | gcc-4c05b187a1241d171599fd14ac4337903ea5b40f.zip gcc-4c05b187a1241d171599fd14ac4337903ea5b40f.tar.gz gcc-4c05b187a1241d171599fd14ac4337903ea5b40f.tar.bz2 |
(eliminate_regs, case {PRE,POST}_{INC,DEC}): Account for PUSH_ROUNDING.
From-SVN: r4375
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/reload1.c | 13 |
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 < ®_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. */ |