On 9 September 2012 16:14, Max Filippov <jcmvb...@gmail.com> wrote: > On Sun, Sep 9, 2012 at 4:13 PM, Max Filippov <jcmvb...@gmail.com> wrote: >> On Sun, Sep 9, 2012 at 1:31 PM, Peter Maydell <peter.mayd...@linaro.org> >> wrote: >>> the Xtensa ISA it says it doesn't have signaling NaNs. Maybe >>> it would be better to have a define for NO_SIGNALING_NANS >>> which made float*_is_signaling_nan() always return false and >>> float*_is_quiet_nan() always return true? > > float*_is_quiet_nan should return float*_is_any_nan, but there's no > float16_is_any_nan. I guess it should look like this (any sign, all-ones > exponent part and non-zero mantissa part): > > INLINE int float16_is_any_nan(float16 a) > { > return ((float16_val(a) & ~0x8000) > 0x7c00); > } > > Is it correct?
Yes, that looks right to me. -- PMM