[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 093/100] softfloat: Add float16_is_normal
From: |
Richard Henderson |
Subject: |
[PATCH v2 093/100] softfloat: Add float16_is_normal |
Date: |
Wed, 17 Jun 2020 21:26:37 -0700 |
From: Stephen Long <steplong@quicinc.com>
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>
---
include/fpu/softfloat.h | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/include/fpu/softfloat.h b/include/fpu/softfloat.h
index 16ca697a73..cd1fcfbf0c 100644
--- a/include/fpu/softfloat.h
+++ b/include/fpu/softfloat.h
@@ -264,6 +264,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
--
2.25.1
- [PATCH v2 083/100] target/arm: Implement SVE2 complex integer multiply-add (indexed), (continued)
- [PATCH v2 083/100] target/arm: Implement SVE2 complex integer multiply-add (indexed), Richard Henderson, 2020/06/18
- [PATCH v2 084/100] target/arm: Implement SVE mixed sign dot product (indexed), Richard Henderson, 2020/06/18
- [PATCH v2 087/100] target/arm: Implement SVE2 crypto destructive binary operations, Richard Henderson, 2020/06/18
- [PATCH v2 086/100] target/arm: Implement SVE2 crypto unary operations, Richard Henderson, 2020/06/18
- [PATCH v2 088/100] target/arm: Implement SVE2 crypto constructive binary operations, Richard Henderson, 2020/06/18
- [PATCH v2 085/100] target/arm: Implement SVE mixed sign dot product, Richard Henderson, 2020/06/18
- [PATCH v2 089/100] target/arm: Implement SVE2 TBL, TBX, Richard Henderson, 2020/06/18
- [PATCH v2 090/100] target/arm: Implement SVE2 FCVTNT, Richard Henderson, 2020/06/18
- [PATCH v2 091/100] target/arm: Implement SVE2 FCVTLT, Richard Henderson, 2020/06/18
- [PATCH v2 092/100] target/arm: Implement SVE2 FCVTXNT, FCVTX, Richard Henderson, 2020/06/18
- [PATCH v2 093/100] softfloat: Add float16_is_normal,
Richard Henderson <=
- [PATCH v2 095/100] tcg: Implement 256-bit dup for tcg_gen_gvec_dup_mem, Richard Henderson, 2020/06/18
- [PATCH v2 094/100] target/arm: Implement SVE2 FLOGB, Richard Henderson, 2020/06/18
- [PATCH v2 096/100] target/arm: Share table of sve load functions, Richard Henderson, 2020/06/18
- [PATCH v2 099/100] target/arm: Implement SVE2 bitwise shift immediate, Richard Henderson, 2020/06/18
- [PATCH v2 097/100] target/arm: Implement SVE2 LD1RO, Richard Henderson, 2020/06/18
- [PATCH v2 098/100] target/arm: Implement 128-bit ZIP, UZP, TRN, Richard Henderson, 2020/06/18
- [PATCH v2 100/100] target/arm: Implement SVE2 fp multiply-add long, Richard Henderson, 2020/06/18
- Re: [PATCH v2 000/100] target/arm: Implement SVE2, no-reply, 2020/06/18
- Re: [PATCH v2 000/100] target/arm: Implement SVE2, no-reply, 2020/06/18