This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Committed: fix rtl sharing for CRIS
- From: Hans-Peter Nilsson <hans-peter dot nilsson at axis dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Thu, 6 Sep 2007 01:18:39 +0200
- Subject: Committed: fix rtl sharing for CRIS
Exposed by recent rtl-sharing checks. Luckily this was the only
rtl-sharing issue between broken build for cris-elf and no
regressions compared to r128074.
* config/cris/cris.c (cris_emit_movem_store): Call copy_rtx on
parts re-used for REG_FRAME_RELATED_EXPR.
Index: gcc/config/cris/cris.c
===================================================================
--- gcc/config/cris/cris.c (revision 128156)
+++ gcc/config/cris/cris.c (working copy)
@@ -3147,10 +3147,11 @@ cris_emit_movem_store (rtx dest, rtx nre
if (increment != 0)
{
rtx seq = gen_rtx_SEQUENCE (VOIDmode, rtvec_alloc (nregs + 1));
- XVECEXP (seq, 0, 0) = XVECEXP (PATTERN (insn), 0, 0);
+ XVECEXP (seq, 0, 0) = copy_rtx (XVECEXP (PATTERN (insn), 0, 0));
for (i = 1; i < nregs; i++)
- XVECEXP (seq, 0, i) = XVECEXP (PATTERN (insn), 0, i + 1);
- XVECEXP (seq, 0, nregs) = XVECEXP (PATTERN (insn), 0, 1);
+ XVECEXP (seq, 0, i)
+ = copy_rtx (XVECEXP (PATTERN (insn), 0, i + 1));
+ XVECEXP (seq, 0, nregs) = copy_rtx (XVECEXP (PATTERN (insn), 0, 1));
REG_NOTES (insn)
= gen_rtx_EXPR_LIST (REG_FRAME_RELATED_EXPR, seq,
REG_NOTES (insn));
brgds, H-P