This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: egcs-2.92.02 19980905 (m68k-next-nextstep3): Address of hoisted load clobbered
- To: Toon Moene <toon at moene dot indiv dot nluug dot nl>, egcs at cygnus dot com, egcs-patches at cygnus dot com
- Subject: Re: egcs-2.92.02 19980905 (m68k-next-nextstep3): Address of hoisted load clobbered
- From: Richard Henderson <rth at cygnus dot com>
- Date: Wed, 9 Sep 1998 00:51:26 -0700
- References: <9809081720.AA20695@moene.indiv.nluug.nl>
- Reply-To: Richard Henderson <rth at cygnus dot com>
On Tue, Sep 08, 1998 at 07:20:25PM +0200, Toon Moene wrote:
> An excerpt from the assmebly output, around the unrolled inner loop:
>
> fmoved a4@,fp1 <-- Load hoisted
> movel d4,d0
> movel sp@(60),a4 <-- Bleeeccchhhh
> mulsl a4@,d0
> ...
> fmoved fp1,a4@ <-- Store sunk
>
> which, of course, results in a Segmentation Violation.
I'm not sure who is at fault here, and request guidance from the
gods of reload. The problem is shared rtl. It may be solved with
the following patch
* loop.c (load_mems): Copy rtx for output mem.
Index: loop.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/loop.c,v
retrieving revision 1.74
diff -c -p -d -u -r1.74 loop.c
--- loop.c 1998/09/04 10:37:49 1.74
+++ loop.c 1998/09/09 07:46:32
@@ -8802,7 +8802,7 @@ load_mems (scan_start, end, loop_top, st
/* Store the memory immediately after END, which is
the NOTE_LOOP_END. */
- set = gen_rtx_SET (GET_MODE (reg), mem, reg);
+ set = gen_rtx_SET (GET_MODE (reg), copy_rtx (mem), reg);
emit_insn_after (set, label);
}
But I'm unclear on the rules of shared rtl. I would have thought
that would have had to handle something like this already.
r~