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: GCC floating point usage


Hi,

On Wed, 16 Oct 2002, Zack Weinberg wrote:

> > No, what I mean is that I'm with Geoff: you won't be able to
> > guarantee that the compiler does the right thing without a
> > completely different approach.
> >
> > You're going to need the front/middle-end to indicate whether
> > "floating point has been used", and if not, hide *all* existance
> > of the fp registers from the register allocators.  Nothing less
> > gives you assurance they won't be used.
>
> Okay.  Care to suggest how this should be accomplished?

Multiple possibilities: either change fixed_regs[] per function to either
include or exclude those special regs, based on information from the
frontend or middleend.

Or create a regclass for all regs you intend to hide (FLOAT_REGS for
instance).  Subtract that class from the possible hardreg candidates for
pseudos in regclass.c (or probably better directly in global.c, or even
right in reload*.c).  Look e.g. for STACK_REGS in global.c how a similar
case is handled.  Do this also conditionalized on information on the
front/middleend.  If that information is incorrect you might end up with
reload aborting (e.g. when you indeed have insn which only accept floats,
while disallowing them).


Ciao,
Michael.


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