[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 14/24] fpu/soft-fp: Adjust _FP_CMP_CHECK_NAN
From: |
Richard Henderson |
Subject: |
[Qemu-devel] [PATCH 14/24] fpu/soft-fp: Adjust _FP_CMP_CHECK_NAN |
Date: |
Sat, 3 Feb 2018 20:11:26 -0800 |
The fourth argument to _FP_CMP is a 4-state integer operand that
controls the operation wrt raising exceptions. However, the usage
that we need within QEMU produces a -Werror=int-in-bool-context:
error: ?: using integer constants in boolean context, \
the expression will always evaluate to ‘true’
glue(FP_CMP_, FS)(r, A, B, float_relation_unordered, (quiet ? 1 : 2));
note: in definition of macro ‘_FP_CMP_CHECK_NAN’
if (ex) \
^~
Adding an explicit comparison avoids this.
Signed-off-by: Richard Henderson <address@hidden>
---
fpu/op-common.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fpu/op-common.h b/fpu/op-common.h
index c5f33c0148..c4d8b58a03 100644
--- a/fpu/op-common.h
+++ b/fpu/op-common.h
@@ -1242,7 +1242,7 @@
{ \
/* The arguments are unordered, which may or may not result in \
an exception. */ \
- if (ex) \
+ if ((ex) != 0) \
{ \
/* At least some cases of unordered arguments result in \
exceptions; check whether this is one. */ \
--
2.14.3
- [Qemu-devel] [PATCH 03/24] fpu/softfloat-types: new header to prevent excessive re-builds, (continued)
- [Qemu-devel] [PATCH 03/24] fpu/softfloat-types: new header to prevent excessive re-builds, Richard Henderson, 2018/02/03
- [Qemu-devel] [PATCH 05/24] include/fpu/softfloat: implement float16_abs helper, Richard Henderson, 2018/02/03
- [Qemu-devel] [PATCH 06/24] include/fpu/softfloat: implement float16_chs helper, Richard Henderson, 2018/02/03
- [Qemu-devel] [PATCH 04/24] target/*/cpu.h: remove softfloat.h, Richard Henderson, 2018/02/03
- [Qemu-devel] [PATCH 07/24] include/fpu/softfloat: implement float16_set_sign helper, Richard Henderson, 2018/02/03
- [Qemu-devel] [PATCH 08/24] include/fpu/softfloat: add some float16 constants, Richard Henderson, 2018/02/03
- [Qemu-devel] [PATCH 11/24] fpu/soft-fp: Adjust soft-fp types, Richard Henderson, 2018/02/03
- [Qemu-devel] [PATCH 09/24] fpu/softfloat: improve comments on ARM NaN propagation, Richard Henderson, 2018/02/03
- [Qemu-devel] [PATCH 12/24] fpu/soft-fp: Add ties_away and to_odd rounding modes, Richard Henderson, 2018/02/03
- [Qemu-devel] [PATCH 13/24] fpu/soft-fp: Add arithmetic macros to half.h, Richard Henderson, 2018/02/03
- [Qemu-devel] [PATCH 14/24] fpu/soft-fp: Adjust _FP_CMP_CHECK_NAN,
Richard Henderson <=
- [Qemu-devel] [PATCH 19/24] fpu: Implement min/max with soft-fp.h, Richard Henderson, 2018/02/03
- [Qemu-devel] [PATCH 17/24] fpu: Implement int/uint_to_float with soft-fp.h, Richard Henderson, 2018/02/03
- [Qemu-devel] [PATCH 21/24] fpu: Implement scalbn with soft-fp.h, Richard Henderson, 2018/02/03
- [Qemu-devel] [PATCH 20/24] fpu: Implement sqrt with soft-fp.h, Richard Henderson, 2018/02/03
- [Qemu-devel] [PATCH 16/24] fpu: Implement float_to_int/uint with soft-fp.h, Richard Henderson, 2018/02/03
- [Qemu-devel] [PATCH 15/24] fpu: Implement add/sub/mul/div with soft-fp.h, Richard Henderson, 2018/02/03
- [Qemu-devel] [PATCH 18/24] fpu: Implement compares with soft-fp.h, Richard Henderson, 2018/02/03
- [Qemu-devel] [PATCH 22/24] fpu: Implement float_to_float with soft-fp.h, Richard Henderson, 2018/02/03
- [Qemu-devel] [PATCH 24/24] fpu: Implement round_to_int with soft-fp.h, Richard Henderson, 2018/02/03
- [Qemu-devel] [PATCH 23/24] fpu: Implement muladd with soft-fp.h, Richard Henderson, 2018/02/03