[PATCH][PPC] Remove unnecessary local variable mptwo

Richard Henderson rth@twiddle.net
Thu Jan 10 19:39:00 GMT 2013


On 01/10/2013 10:17 AM, Siddhesh Poyarekar wrote:
> This is actually a bit tricky on powerpc.  My approach so far had been
> to try as much as possible to avoid floating point operations (with my
> x86 hat on), but a complete fixed-point based function does not do as
> well as a complete fp function on POWER regardless of how the code is
> partitioned - I'm guessing this has to do with the fact that there are
> 4 fp units to play with but just 2 fixed point units.  Steven pointed
> this out to me last week but I had to see it first hand to really
> understand it (and the fact that I had my x86 hat still firmly on).
>
> There is scope to improve the multiplication algorithm, but my current
> opinion (might change as I learn more about ppc) is that it might be
> best to have the ppc code continue storing the mantissa as double,
> while x86 is best served with an integer mantissa and all-int
> operations.  I don't know about other architectures, but AFAICT, most
> of them have assembler overrides for most transcendentals.

To my knowledge, POWER is the only architecture with more FP units than 
integer units.

The only other edge case that I can think of might be itanium1 (and 
maybe some sparc variants), with 2 int and 2 fp and where ldst insns use 
the int pipes -- and so doing computation in fp means that the 
computation can overlap better with the data movement.


r~



More information about the Libc-alpha mailing list