diff options
author | wilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-02-18 06:49:58 +0000 |
---|---|---|
committer | wilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-02-18 06:49:58 +0000 |
commit | 6f5b55f8df605d1bc15f2f0266ecb3e5957297de (patch) | |
tree | 5889b804107ce1b2e15ee91100dee56d0c492b8e /gcc/caller-save.c | |
parent | a99f9f2127cead5fed1b5d076b240e0cf0b42ad5 (diff) | |
download | gcc-6f5b55f8df605d1bc15f2f0266ecb3e5957297de.tar.gz |
Fix rtl sharing problem reported by Daniel Bayer on gcc list.
* caller-save.c (insert_restore): Pass mem through copy_rtx.
(insert_save): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@78010 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/caller-save.c')
-rw-r--r-- | gcc/caller-save.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/caller-save.c b/gcc/caller-save.c index c5ba0c55bc5..028705b4389 100644 --- a/gcc/caller-save.c +++ b/gcc/caller-save.c @@ -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)); |