summaryrefslogtreecommitdiff
path: root/gcc/reload1.c
diff options
context:
space:
mode:
authorkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>2001-11-03 15:50:04 +0000
committerkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>2001-11-03 15:50:04 +0000
commit278fe152d9ce422bd94882c2368c79261a49d7e7 (patch)
tree72debaad8ba738e2cb6c88c8463e497466353307 /gcc/reload1.c
parenteec8e9410d5deceb80ce46b3b08d60801679122a (diff)
downloadgcc-278fe152d9ce422bd94882c2368c79261a49d7e7.tar.gz
* emit-rtl.c (set_mem_attributes): Set RTX_UNCHANGINGP_P if T is a
constant expression. (set_mem_decl): New function. * expr.h (set_mem_decl): New declaration. * final.c (get_decl_from_op): Don't use ORIGINAL_REGNO if not pseudo. (output_asm_operand_names): Add tab. * reload1.c (alter_reg): Set decl of MEM from REG_DECL. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@46733 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/reload1.c')
-rw-r--r--gcc/reload1.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/gcc/reload1.c b/gcc/reload1.c
index c5158c7d81b..165573bdf8d 100644
--- a/gcc/reload1.c
+++ b/gcc/reload1.c
@@ -2043,8 +2043,17 @@ alter_reg (i, from_reg)
/* If we have any adjustment to make, or if the stack slot is the
wrong mode, make a new stack slot. */
- if (adjust != 0 || GET_MODE (x) != GET_MODE (regno_reg_rtx[i]))
- x = adjust_address_nv (x, GET_MODE (regno_reg_rtx[i]), adjust);
+ x = adjust_address_nv (x, GET_MODE (regno_reg_rtx[i]), adjust);
+
+ /* If we have a decl for the original register, set it for the
+ memory. If this is a shared MEM, make a copy. */
+ if (REGNO_DECL (i))
+ {
+ if (from_reg != -1 && spill_stack_slot[from_reg] == x)
+ x = copy_rtx (x);
+
+ set_mem_decl (x, REGNO_DECL (i));
+ }
/* Save the stack slot for later. */
reg_equiv_memory_loc[i] = x;