This is the mail archive of the
mailing list for the GCC project.
Re: dangerous cleverness? ppc int<->float conversions, subreg
- To: zack at codesourcery dot com (Zack Weinberg)
- Subject: Re: dangerous cleverness? ppc int<->float conversions, subreg
- From: Joern Rennecke <amylaar at onetel dot net dot uk>
- Date: Sat, 27 Oct 2001 02:01:48 +0100 (BST)
- Cc: aoliva at redhat dot com (Alexandre Oliva), rth at redhat dot com (Richard Henderson), gcc at gcc dot gnu dot org
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
email@example.com | send enquiries to: firstname.lastname@example.org