On Mon, Nov 29, 2010 at 04:49:24PM +0000, Peter Maydell wrote: > On 29 November 2010 16:38, Nathan Froyd <[email protected]> wrote: > > Why not just use: > > > > static int float32_is_any_nan(float32 x) > > { > > return float32_is_nan(x) || float32_is_signaling_nan(x); > > } > > > > and likewise for the 64-bit case? > > That was what my first-pass patches did, but I > rewrote them this way because it seemed more > straightforward to just test for "is this a NaN" rather > than calling two other functions which each test for > "is this some subset of NaN space". > > I suppose you could argue that softfloat ought to > have _is_nan() [with the semantics you'd expect > from the function name, not the ones it currently has!], > _is_signalling_nan() and _is_quiet_nan() functions > built in, but it doesn't...
I agree that the functions are poorly named. I think it'd be better to leave the bit-twiddling to the softfloat bits, though. There's precedent for the more verbose approach in other backends, too. -Nathan
