This is the mail archive of the
mailing list for the GCC project.
Re: PATCH: Darwin specific 1-liners (1)
- From: Richard Henderson <rth at redhat dot com>
- To: David Edelsohn <dje at watson dot ibm dot com>
- Cc: Daniel Berlin <dan at cgsoftware dot com>, Stan Shebs <shebs at apple dot com>, dalej at apple dot com, gcc-patches at gcc dot gnu dot org
- Date: Wed, 5 Dec 2001 23:02:36 -0800
- Subject: Re: PATCH: Darwin specific 1-liners (1)
- References: <firstname.lastname@example.org> <200112060320.WAA24926@makai.watson.ibm.com>
On Wed, Dec 05, 2001 at 10:20:41PM -0500, David Edelsohn wrote:
> Is this macro the right way to deal with GCC using LR or should
> the register preferences be modified? Whichever method we choose, I think
> this would be useful for all PowerPC systems.
I think that this
- [(set (pc) (match_operand:SI 0 "register_operand" "cl"))]
+ [(set (pc) (match_operand:SI 0 "register_operand" "c,l"))]
is the minimal fix for the register renaming problem. The renamer
will _not_ change the alternative used, except in the case of plain
However, if you really want to deprecate indirect jumps from LR,
then you don't want to use LINK_OR_CTR_REGS. You should use
+ [(set (pc) (match_operand:SI 0 "register_operand" "c,*l"))]
so that register preferencing doesn't see the LR either.
Looks like just about everything that currently uses "cl" could
use the same treatment.