This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: REG_UNUSED notes problem
- To: Joern Rennecke <amylaar at cygnus dot co dot uk>
- Subject: Re: REG_UNUSED notes problem
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Wed, 09 Dec 1998 10:07:01 -0700
- cc: schwab at issan dot informatik dot uni-dortmund dot de, egcs-patches at cygnus dot com
- Reply-To: law at cygnus dot com
In message <199812091142.LAA24541@phal.cygnus.co.uk>you write:
> > Since there is no REG_UNUSED note attached to insn 47, the m68k backend
> > will generate code which sets %d0. And we lose since (reg 0) is actually
> > expected to hold part of an address (remember, we had a REG_UNUSED note f
> or
> > the original pseudo in the divmod insn, so the compiler can and does assu
> me
> > that nothing is written to that unused value).
>
> Huh? That is wrong. The compiler has to assume that the register is
> clobbered.
> So it is a reload bug that reg 0 was used for the reload.
> I guess that the problem stems from single_set returning the set of reg
> 42, and the caller then checking only for clobbers, but not for unused
> sets.
It seems to me with the REG_UNUSED note on that insn reload should be free to
use (reg 0) in any way it wants.
jeff