This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: Darwin specific 1-liners (1)


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
jane moves.

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.


r~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]