softfloat: add NO_SIGNALING_NANS
Architectures that don't have signaling NaNs can define NO_SIGNALING_NANS, it will make float*_is_quiet_nan return 1 for any NaN and float*_is_signaling_nan always return 0. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
This commit is contained in:
parent
6617680296
commit
213ff4e6df
2 changed files with 72 additions and 0 deletions
|
|
@ -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.
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue