diff options
author | Jim Wilson <wilson@gcc.gnu.org> | 1995-02-06 16:22:22 -0800 |
---|---|---|
committer | Jim Wilson <wilson@gcc.gnu.org> | 1995-02-06 16:22:22 -0800 |
commit | 4f2d36749024d35dd0119be7af2123b935f92241 (patch) | |
tree | f91c0bccc04292aeff8f5dd8e5435be7a0505006 /gcc | |
parent | 70ef1c9e6da84a04ec534afef4a1b1cd19ad5faa (diff) | |
download | gcc-4f2d36749024d35dd0119be7af2123b935f92241.zip gcc-4f2d36749024d35dd0119be7af2123b935f92241.tar.gz gcc-4f2d36749024d35dd0119be7af2123b935f92241.tar.bz2 |
(alter_reg): New variable stack_slot.
(alter_reg): New variable stack_slot. Apply anti
BYTES_BIG_ENDIAN correction to stack slot address stored in
spill_stack_slot.
From-SVN: r8884
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/reload1.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/gcc/reload1.c b/gcc/reload1.c index 13dd43b..1db7cd3 100644 --- a/gcc/reload1.c +++ b/gcc/reload1.c @@ -2361,6 +2361,7 @@ alter_reg (i, from_reg) /* Compute maximum size needed, both for inherent size and for total size. */ enum machine_mode mode = GET_MODE (regno_reg_rtx[i]); + rtx stack_slot; if (spill_stack_slot[from_reg]) { if (GET_MODE_SIZE (GET_MODE (spill_stack_slot[from_reg])) @@ -2371,6 +2372,7 @@ alter_reg (i, from_reg) } /* Make a slot with that size. */ x = assign_stack_local (mode, total_size, -1); + stack_slot = x; if (BYTES_BIG_ENDIAN) { /* Cancel the big-endian correction done in assign_stack_local. @@ -2378,8 +2380,17 @@ alter_reg (i, from_reg) This is so we can do a big-endian correction unconditionally below. */ adjust = GET_MODE_SIZE (mode) - total_size; + if (adjust) + { + stack_slot = gen_rtx (MEM, mode_for_size (total_size + * BITS_PER_UNIT, + MODE_INT, 1), + plus_constant (XEXP (x, 0), adjust)); + RTX_UNCHANGING_P (stack_slot) + = RTX_UNCHANGING_P (regno_reg_rtx[i]); + } } - spill_stack_slot[from_reg] = x; + spill_stack_slot[from_reg] = stack_slot; spill_stack_slot_width[from_reg] = total_size; } |