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]

Re: dangerous cleverness? ppc int<->float conversions, subreg


Zack Weinberg wrote:
> I'm confused - do you mean that I should add such set_attr annotations
> and disable switches to every floating point insn pattern?
> 
> If so, it seems to me that I ought to be able to achieve the same
> effect by just scanning all the RTL for ?Fmode operations, and then
> adjusting register preferences somehow.  (Hmm, -msoft-float sets all

Actually, no.  If fp is only copied, you can usually do that with integer
registers too.  Some targets are also good at doing negation / abs in
integer regs.  So it is good to have a special attribute that tells the
machine-independent code which insns actually need fp regs.

> the floating-point registers fixed and call-used.  Is there a way to
> do that per-function?)  This would avoid having to make pervasive
> changes to the machine description, although it might be slower.

You could implement that.  E.g. have a target macro for a HARD_REG_SET -
the fp registers - that is removed from all register classes where needed.
Restore at end of function.
I'm not sure if we should treat nested functions as separate functions or
as part of the enclosing function for these purposes.

-- 
Joern Rennecke                  |            gcc expert for hire
amylaar@onetel.net.uk           |  send enquiries to: jwr_jobs@onetel.net.uk


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