Port-powerpc archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: MKSOFTFLOAT for evbppc



On Sep 27, 2012, at 8:23 AM, Eduardo Horvath wrote:

> On Wed, 26 Sep 2012, David Brownlee wrote:
> 
>> Thats disappointing, but understandable :)
>> Is there some variant that will get gcc to use the fp registers but
>> not the instructions (assuming it doesn't trap on fp register
>> usage..): -mno-fused-madd -mno-mulhw -msimple-fpu looks to turn off
>> some instructions but not all.
> 
> Well, if you have no FPU you have no FPU registers.  If you have no FPU 
> registers, any instructions to access them will fault.  If you're going to 
> fault anyway, you may as well do the whole FP operation in the kernel 
> thaty way you only take one fault for the FPOP instead of one fault to 
> read the register contents and another fault to write the results back.

An alternative is to always use the soft-float ABI and just have a 
implementation of it that uses hard-float instructions.  You may have a few 
extra instructions to move arguments/results between register sets (as well as 
the call itself) but it shouldn't affect performance that much.

I actually implemented one of those for the 85xx using the SPE FP instructions 
and it gets loaded using LD_PRELOAD.  Maybe I should do a build using that and 
see how much time it saves over the normal softfloat implementation.



Home | Main Index | Thread Index | Old Index