softfloat: Add float16_is_normal

This float16 predicate was missing from the normal set.

Signed-off-by: Stephen Long <steplong@quicinc.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
Stephen Long 2020-06-16 12:17:43 -07:00 committed by Richard Henderson
parent 0d93d8ec63
commit a03e924cf8

View File

@ -272,6 +272,11 @@ static inline bool float16_is_zero_or_denormal(float16 a)
return (float16_val(a) & 0x7c00) == 0;
}
static inline bool float16_is_normal(float16 a)
{
return (((float16_val(a) >> 10) + 1) & 0x1f) >= 2;
}
static inline float16 float16_abs(float16 a)
{
/* Note that abs does *not* handle NaN specially, nor does