aboutsummaryrefslogtreecommitdiff
path: root/fpu/softfloat.h
diff options
context:
space:
mode:
Diffstat (limited to 'fpu/softfloat.h')
-rw-r--r--fpu/softfloat.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/fpu/softfloat.h b/fpu/softfloat.h
index 2860ca0175..d8999b311a 100644
--- a/fpu/softfloat.h
+++ b/fpu/softfloat.h
@@ -251,6 +251,11 @@ int float16_is_quiet_nan( float16 );
int float16_is_signaling_nan( float16 );
float16 float16_maybe_silence_nan( float16 );
+INLINE int float16_is_any_nan(float16 a)
+{
+ return ((float16_val(a) & ~0x8000) > 0x7c00);
+}
+
/*----------------------------------------------------------------------------
| The pattern for a default generated half-precision NaN.
*----------------------------------------------------------------------------*/