[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v6 23/28] fpu/softfloat: Make is_nan et al available
From: |
Richard Henderson |
Subject: |
[Qemu-devel] [PATCH v6 23/28] fpu/softfloat: Make is_nan et al available to softfloat-specialize.h |
Date: |
Tue, 15 May 2018 15:25:35 -0700 |
We will need these helpers within softfloat-specialize.h, so move
the definitions above the include. After specialization, they will
not always be used so mark them to avoid the Werror.
Tested-by: Alex Bennée <address@hidden>
Reviewed-by: Alex Bennée <address@hidden>
Reviewed-by: Peter Maydell <address@hidden>
Signed-off-by: Richard Henderson <address@hidden>
---
fpu/softfloat.c | 30 ++++++++++++++++--------------
1 file changed, 16 insertions(+), 14 deletions(-)
diff --git a/fpu/softfloat.c b/fpu/softfloat.c
index 55e6701f26..ea252e0c84 100644
--- a/fpu/softfloat.c
+++ b/fpu/softfloat.c
@@ -181,6 +181,22 @@ typedef enum __attribute__ ((__packed__)) {
float_class_snan,
} FloatClass;
+/* Simple helpers for checking if, or what kind of, NaN we have */
+static inline __attribute__((unused)) bool is_nan(FloatClass c)
+{
+ return unlikely(c >= float_class_qnan);
+}
+
+static inline __attribute__((unused)) bool is_snan(FloatClass c)
+{
+ return c == float_class_snan;
+}
+
+static inline __attribute__((unused)) bool is_qnan(FloatClass c)
+{
+ return c == float_class_qnan;
+}
+
/*
* Structure holding all of the decomposed parts of a float. The
* exponent is unbiased and the fraction is normalized. All
@@ -536,20 +552,6 @@ static float64 float64_round_pack_canonical(FloatParts p,
float_status *s)
return float64_pack_raw(round_canonical(p, s, &float64_params));
}
-/* Simple helpers for checking if what NaN we have */
-static bool is_nan(FloatClass c)
-{
- return unlikely(c >= float_class_qnan);
-}
-static bool is_snan(FloatClass c)
-{
- return c == float_class_snan;
-}
-static bool is_qnan(FloatClass c)
-{
- return c == float_class_qnan;
-}
-
static FloatParts return_nan(FloatParts a, float_status *s)
{
switch (a.cls) {
--
2.17.0
- [Qemu-devel] [PATCH v6 14/28] target/arm: Remove floatX_maybe_silence_nan from conversions, (continued)
- [Qemu-devel] [PATCH v6 14/28] target/arm: Remove floatX_maybe_silence_nan from conversions, Richard Henderson, 2018/05/15
- [Qemu-devel] [PATCH v6 13/28] target/arm: Use floatX_silence_nan when we have already checked for SNaN, Richard Henderson, 2018/05/15
- [Qemu-devel] [PATCH v6 16/28] target/m68k: Use floatX_silence_nan when we have already checked for SNaN, Richard Henderson, 2018/05/15
- [Qemu-devel] [PATCH v6 12/28] fpu/softfloat: re-factor float to float conversions, Richard Henderson, 2018/05/15
- [Qemu-devel] [PATCH v6 15/28] target/hppa: Remove floatX_maybe_silence_nan from conversions, Richard Henderson, 2018/05/15
- [Qemu-devel] [PATCH v6 17/28] target/mips: Remove floatX_maybe_silence_nan from conversions, Richard Henderson, 2018/05/15
- [Qemu-devel] [PATCH v6 19/28] target/s390x: Remove floatX_maybe_silence_nan from conversions, Richard Henderson, 2018/05/15
- [Qemu-devel] [PATCH v6 20/28] fpu/softfloat: Use float*_silence_nan in propagateFloat*NaN, Richard Henderson, 2018/05/15
- [Qemu-devel] [PATCH v6 18/28] target/riscv: Remove floatX_maybe_silence_nan from conversions, Richard Henderson, 2018/05/15
- [Qemu-devel] [PATCH v6 21/28] fpu/softfloat: Remove floatX_maybe_silence_nan, Richard Henderson, 2018/05/15
- [Qemu-devel] [PATCH v6 23/28] fpu/softfloat: Make is_nan et al available to softfloat-specialize.h,
Richard Henderson <=
- [Qemu-devel] [PATCH v6 22/28] fpu/softfloat: Specialize on snan_bit_is_one, Richard Henderson, 2018/05/15
- [Qemu-devel] [PATCH v6 25/28] fpu/softfloat: Pass FloatClass to pickNaNMulAdd, Richard Henderson, 2018/05/15
- [Qemu-devel] [PATCH v6 24/28] fpu/softfloat: Pass FloatClass to pickNaN, Richard Henderson, 2018/05/15
- [Qemu-devel] [PATCH v6 27/28] fpu/softfloat: Clean up parts_default_nan, Richard Henderson, 2018/05/15
- [Qemu-devel] [PATCH v6 26/28] fpu/softfloat: Define floatN_default_nan in terms of parts_default_nan, Richard Henderson, 2018/05/15
- [Qemu-devel] [PATCH v6 28/28] fpu/softfloat: Define floatN_silence_nan in terms of parts_silence_nan, Richard Henderson, 2018/05/15
- Re: [Qemu-devel] [PATCH v6 00/28] softfloat patch roundup, Alex Bennée, 2018/05/16