This is the mail archive of the 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: [m68k ICE] Fix HARD_REGNO_MODE_OK for FPU register usage

On Thu, Oct 23, 2003 at 03:35:21PM +0200, Gunther Nikl wrote:
>   The patch was intended to fix the ICE in an obvious way. Do you think
>   (know?) that other backends have the same bug?

Yes.  E.g. x86 when mmx is not enabled.

>   Sounds reasonable and looks like a nice project yet I fear I don't
>   qualify for that project.

Sure you do.  This is quite simple.

> > I suggest a new target hook 
> > 
> > 	bool (* register_extant) (unsigned int regno)
> > 
> > The default definition would return true.
>   The hook would then be used in addition to HARD_REGNO_MODE_OK?

Yes.  HARD_REGNO_MODE_OK would assume that it's being fed valid
register numbers all of the time.  The new hook would define when
register numbers are valid.  We already take care not use use
disabled registers when stuff comes from within the compiler; we
just need to fix the case when the user does something silly.

>   Maybe HARD_REGNO_MODE_OK should be turned into a hook? But that could
>   be a speed penalty.

Rarely, I'd guess.  Most HARD_REGNO_MODE_OK are complex enough
that inlining it is more likely a loss.  Indeed, it's already
out of line in a number of ports because the macro was too bulky.


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