Commit ce7b36a4 by James E Wilson Committed by Jim Wilson

Fix rtl sharing problem reported by Daniel Bayer on gcc list.

	* caller-save.c (insert_restore): Pass mem through copy_rtx.
	(insert_save): Likewise.

From-SVN: r78010
parent 4d0bdcd6
2004-02-17 James E Wilson <wilson@specifixinc.com>
* caller-save.c (insert_restore): Pass mem through copy_rtx.
(insert_save): Likewise.
2004-02-17 Kazu Hirata <kazu@cs.umass.edu>
* config/h8300/h8300.c (h8300_emit_stack_adjustment): Fix a
......
......@@ -685,6 +685,8 @@ insert_restore (struct insn_chain *chain, int before_p, int regno,
&& save_mode [regno] != GET_MODE (mem)
&& numregs == (unsigned int) hard_regno_nregs[regno][save_mode [regno]])
mem = adjust_address (mem, save_mode[regno], 0);
else
mem = copy_rtx (mem);
pat = gen_rtx_SET (VOIDmode,
gen_rtx_REG (GET_MODE (mem),
regno), mem);
......@@ -757,6 +759,8 @@ insert_save (struct insn_chain *chain, int before_p, int regno,
&& save_mode [regno] != GET_MODE (mem)
&& numregs == (unsigned int) hard_regno_nregs[regno][save_mode [regno]])
mem = adjust_address (mem, save_mode[regno], 0);
else
mem = copy_rtx (mem);
pat = gen_rtx_SET (VOIDmode, mem,
gen_rtx_REG (GET_MODE (mem),
regno));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment