ppc64 floating point usage [was Re: PPC64 Compiler bug !!]

Alan Modra amodra@bigpond.net.au
Fri Jun 13 02:07:00 GMT 2003


[trimming cc list]
On Thu, Jun 12, 2003 at 06:48:51PM -0500, linas@austin.ibm.com wrote:
> 1) The use of fp for DImode move is an interesting optimization if
>    either:
>    a) one has run out of regular DImode GPR's. But this was not
>       the case for the simple test case I sent in: I was compiling for
>       a 64-bit target, there were plenty of unused GPR's.

Yes, gcc's first choice for a DImode move is a fp reg.  You'll always
get a fp reg if the source and destination of the move are not otherwise
used in a function (and assuming one fp reg is available).

> 5) There are some user-land issues having to do with Linux
>    context-switching when an app uses fpr's.  With the gcc-3.2.0

To expand on this:  Under linux lazy fp save/restore we take an   
exception the first time (after a context switch) we use a fp
temporary in user code.  This could significantly increase the cost of
using a fp reg for moves.  IMO this is reason enough to change
REG_ALLOC_ORDER for powerpc64.
 
-- 
Alan Modra
IBM OzLabs - Linux Technology Centre



More information about the Gcc mailing list