On 21 February 2011 10:59, Christophe Lyon <[email protected]> wrote:
> + if (float32_is_any_nan(a)) {
> + if (float32_is_signaling_nan(a)) {
> + float_raise(float_flag_invalid, s);
> + }
> + return float32_maybe_silence_nan(a);
This returns the wrong answer for NaNs: this is a
Neon instruction so you want to return the default NaN.
Just 'return float32_default_nan;' instead of
calling float32_maybe_silence_nan().
(What's actually missing in softfloat is a single-value
equivalent of propagateFloat*NaN() but since we don't
need to vary based on default_nan_mode we can just
ignore that for now.)
Otherwise OK, I think.
PS: if you have a suitable board available for
use as a reference you could run risu on your
patches and avoid them being bounced back for
corner case failures :-)
-- PMM