This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: scratch registers for peephole2
- To: Richard Earnshaw <rearnsha at arm dot com>
- Subject: Re: scratch registers for peephole2
- From: Richard Henderson <rth at redhat dot com>
- Date: Fri, 5 Jan 2001 14:28:22 -0800
- Cc: gcc at gcc dot gnu dot org
- References: <200101051956.TAA10943@cam-mail2.cambridge.arm.com>
On Fri, Jan 05, 2001 at 07:56:52PM +0000, Richard Earnshaw wrote:
> I've deleted the original mail, but I seem to recall that the AVR port was
> having problems with scratch registers being used in peephole2 that were
> not unsafe. Looking at the code in recog.c, it would appear that there is
> potentially a similar problem on the ARM with the return register (which
> is treated as a call-clobbered reg, but can contain real data).
>
> Shouldn't there be a MD macro in that code that specifies that the
> register is safe to use, something like
Maybe, but your problem on arm with the return register is not,
repeat NOT here. It is that you havn't represented that the
register is live either through rtl or through EPILOGUE_USES.
Correct this representation mistake and you fix peep2 and the
register renamer simultaneously.
When I get some more free time I'll continue working on my
patch to replace (return) with (return <addr>), which will
force each port to properly address this issue.
r~