This is the mail archive of the gcc@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: A Question Regarding Register classes


On Wednesday 28 July 2004 09:31, Tal Agmon wrote:
> Hi,
>
> I'm working on the CRX pot of gcc which is intended to be contributed.
> I have a general question:
>
> I need to define a register class MAD_REGS for results of multiply
> accumulate instructions.
> When I define MAD_REGS registers NOT to be a in GENERAL_REGS everything
> works fine.
> Yet, I wouldn't like that because it reduces GENERAL_REGS.  When I tried
> to use them also as
> general registers on complicated functions, I got the error:
>
>  error: unable to find a register to spill in class 'MAD_REGS'
>
> I assume that this is because these registers were already used in other
> instruction and by the time
> a mad instruction matches they are already "taken".
> Is there's a way to declare 2 registers as a destination for some specific
> instructions but still
> get them available for reload of any other instruction (at least in
> function without  multiply accumulate
> instructions?)

Have you looked at/set CLASS_LIKELY_SPILLED_P?
This fixed similar problems on arm/thumb.

Paul


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