From 95a0837f2df82c4f6b46649745291b6cd90f3925 Mon Sep 17 00:00:00 2001 From: Stephen Long Date: Fri, 26 Feb 2021 15:12:24 -0500 Subject: [PATCH] softfloat: Add float16_is_normal This float16 predicate was missing from the normal set. Backports a03e924cf8a22888060fc0de4d91de053cd5cde4 --- qemu/include/fpu/softfloat.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/qemu/include/fpu/softfloat.h b/qemu/include/fpu/softfloat.h index b543f1e4..0b27ad93 100644 --- a/qemu/include/fpu/softfloat.h +++ b/qemu/include/fpu/softfloat.h @@ -275,6 +275,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