aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorDoug Evans <dje@gnu.org>1997-04-13 21:24:37 +0000
committerDoug Evans <dje@gnu.org>1997-04-13 21:24:37 +0000
commit3e42d56b4b6fa2d03a6bd52e7135df62e12a3385 (patch)
treee33f6ef51c6019d4ed8612e4f38439d3bc2cf6ea /gcc
parent53c87bfd9cb9ee6dd7c44daaabdea298913f033f (diff)
downloadgcc-3e42d56b4b6fa2d03a6bd52e7135df62e12a3385.zip
gcc-3e42d56b4b6fa2d03a6bd52e7135df62e12a3385.tar.gz
gcc-3e42d56b4b6fa2d03a6bd52e7135df62e12a3385.tar.bz2
integrate.c (copy_rtx_and_substitute): If FRAME_GROWS_DOWNWARD and regno == VIRTUAL_STACK_VARS_REGNUM...
* integrate.c (copy_rtx_and_substitute): If FRAME_GROWS_DOWNWARD and regno == VIRTUAL_STACK_VARS_REGNUM, round size of stack slot up before calling assign_stack_temp. From-SVN: r13895
Diffstat (limited to 'gcc')
-rw-r--r--gcc/integrate.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/gcc/integrate.c b/gcc/integrate.c
index 831a695..693304a 100644
--- a/gcc/integrate.c
+++ b/gcc/integrate.c
@@ -2196,18 +2196,22 @@ copy_rtx_and_substitute (orig, map)
{
rtx loc, seq;
int size = DECL_FRAME_SIZE (map->fndecl);
- int rounded;
+#ifdef FRAME_GROWS_DOWNWARD
+ /* In this case, virtual_stack_vars_rtx points to one byte
+ higher than the top of the frame area. So make sure we
+ allocate a big enough chunk to keep the frame pointer
+ aligned like a real one. */
+ size = CEIL_ROUND (size, BIGGEST_ALIGNMENT / BITS_PER_UNIT);
+#endif
start_sequence ();
loc = assign_stack_temp (BLKmode, size, 1);
loc = XEXP (loc, 0);
#ifdef FRAME_GROWS_DOWNWARD
/* In this case, virtual_stack_vars_rtx points to one byte
higher than the top of the frame area. So compute the offset
- to one byte higher than our substitute frame.
- Keep the fake frame pointer aligned like a real one. */
- rounded = CEIL_ROUND (size, BIGGEST_ALIGNMENT / BITS_PER_UNIT);
- loc = plus_constant (loc, rounded);
+ to one byte higher than our substitute frame. */
+ loc = plus_constant (loc, size);
#endif
map->reg_map[regno] = temp
= force_reg (Pmode, force_operand (loc, NULL_RTX));