This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: -mpower4 sched2 bug miscompiles linux kernel
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: David Edelsohn <dje at watson dot ibm dot com>
- Cc: Jeffrey Law <law at redhat dot com>, Geoff Keating <geoffk at geoffk dot org>, gcc-patches at gcc dot gnu dot org
- Date: Wed, 11 Sep 2002 11:17:01 +0930
- Subject: Re: -mpower4 sched2 bug miscompiles linux kernel
- References: <amodra@bigpond.net.au> <200209102009.QAA29332@makai.watson.ibm.com>
On Tue, Sep 10, 2002 at 04:09:11PM -0400, David Edelsohn wrote:
> ! src = adjust_address (orig_src, mode, offset);
> ! dest = adjust_address (orig_dest, mode, offset);
> !
> ! if (mode == BLKmode)
> {
> ! if (!REG_P (XEXP (src, 0)))
> {
> ! src = gen_rtx_MEM (BLKmode,
> ! copy_addr_to_reg (XEXP (src, 0)));
> ! MEM_COPY_ATTRIBUTES (src, orig_src);
I don't think this is ideal. You're effectively saying that "src"
occupies the whole address range of "orig_src" whereas in actual fact
it doesn't. adjust_address will take into account the "offset",
reducing rtmem->size so that "src" is seen to occupy orig_src+offset
to end of orig_src. We can actually do better and set rtmem->size to
move_bytes, but I didn't want to raise this issue with my original
patch. Bug fix first, optimization later. ;) Besides, doing so may
uncover bugs in other areas.
--
Alan Modra
IBM OzLabs - Linux Technology Centre