diff options
author | Stephen Long <steplong@quicinc.com> | 2020-06-16 12:17:43 -0700 |
---|---|---|
committer | Richard Henderson <richard.henderson@linaro.org> | 2020-08-28 10:48:07 -0700 |
commit | a03e924cf8a22888060fc0de4d91de053cd5cde4 (patch) | |
tree | 6540fd4531c49e1d1ecd21b1179bb4485d67b0f0 /include | |
parent | 0d93d8ec632154dea2627a9e989972ee09721187 (diff) | |
download | qemu-a03e924cf8a22888060fc0de4d91de053cd5cde4.zip qemu-a03e924cf8a22888060fc0de4d91de053cd5cde4.tar.gz qemu-a03e924cf8a22888060fc0de4d91de053cd5cde4.tar.bz2 |
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>
Diffstat (limited to 'include')
-rw-r--r-- | include/fpu/softfloat.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/fpu/softfloat.h b/include/fpu/softfloat.h index 0a5a5e5..863dfc6 100644 --- a/include/fpu/softfloat.h +++ b/include/fpu/softfloat.h @@ -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 |