From 4f2d36749024d35dd0119be7af2123b935f92241 Mon Sep 17 00:00:00 2001 From: Jim Wilson Date: Mon, 6 Feb 1995 16:22:22 -0800 Subject: (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 --- gcc/reload1.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'gcc') 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; } -- cgit v1.1