On 10/24/2013 3:45 PM, Richard Henderson wrote:
On 10/24/2013 09:26 AM, Tom Musta wrote:
Because of the Power ISA definitions of maximum and minimum
on various boundary cases, the standard softfloat comparison
routines (e.g. float64_lt) do not work as well as one might
think. Therefore specific routines for comparing 64 and 32
bit floating point numbers are implemented in the PowerPC
helper code.
Really? All I see in the document is ">fp", used both here
in the minmax insn and in the cmp insn.
If the softfloat compare isn't good enough for minmax, how
can it be good enough for cmp?
Example:
The ISA is very explicit that max(-0.0, +0.0) = +0.0.
But the comparison operations (and instructions) both consider
-0.0 == +0.0. Because of this, I do not see how it is possible
to implement max using float*_eq, float*_lt and float*_le.
See, for example, table 58 (Actions for xsmaxdp) on p. 369 of the
V2.06 ISA.