[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 020/101] softfloat: Extend float_exception_flags to 16 bits
From: |
Cédric Le Goater |
Subject: |
[PULL 020/101] softfloat: Extend float_exception_flags to 16 bits |
Date: |
Thu, 16 Dec 2021 21:24:53 +0100 |
From: Richard Henderson <richard.henderson@linaro.org>
We will shortly have more than 8 bits of exceptions.
Repack the existing flags into low bits and reformat to hex.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20211119160502.17432-2-richard.henderson@linaro.org>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
---
include/fpu/softfloat-types.h | 16 ++++++++--------
include/fpu/softfloat.h | 2 +-
2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/include/fpu/softfloat-types.h b/include/fpu/softfloat-types.h
index 5bcbd041f74f..65a43aff5970 100644
--- a/include/fpu/softfloat-types.h
+++ b/include/fpu/softfloat-types.h
@@ -145,13 +145,13 @@ typedef enum __attribute__((__packed__)) {
*/
enum {
- float_flag_invalid = 1,
- float_flag_divbyzero = 4,
- float_flag_overflow = 8,
- float_flag_underflow = 16,
- float_flag_inexact = 32,
- float_flag_input_denormal = 64,
- float_flag_output_denormal = 128
+ float_flag_invalid = 0x0001,
+ float_flag_divbyzero = 0x0002,
+ float_flag_overflow = 0x0004,
+ float_flag_underflow = 0x0008,
+ float_flag_inexact = 0x0010,
+ float_flag_input_denormal = 0x0020,
+ float_flag_output_denormal = 0x0040,
};
/*
@@ -171,8 +171,8 @@ typedef enum __attribute__((__packed__)) {
*/
typedef struct float_status {
+ uint16_t float_exception_flags;
FloatRoundMode float_rounding_mode;
- uint8_t float_exception_flags;
FloatX80RoundPrec floatx80_rounding_precision;
bool tininess_before_rounding;
/* should denormalised results go to zero and set the inexact flag? */
diff --git a/include/fpu/softfloat.h b/include/fpu/softfloat.h
index a249991e6127..0d3b40780762 100644
--- a/include/fpu/softfloat.h
+++ b/include/fpu/softfloat.h
@@ -100,7 +100,7 @@ typedef enum {
| Routine to raise any or all of the software IEC/IEEE floating-point
| exception flags.
*----------------------------------------------------------------------------*/
-static inline void float_raise(uint8_t flags, float_status *status)
+static inline void float_raise(uint16_t flags, float_status *status)
{
status->float_exception_flags |= flags;
}
--
2.31.1
- [PULL 011/101] pci-host: Allow extended config space access for PowerNV PHB4 model, (continued)
- [PULL 011/101] pci-host: Allow extended config space access for PowerNV PHB4 model, Cédric Le Goater, 2021/12/16
- [PULL 028/101] target/ppc: Update float_invalid_op_mul for new flags, Cédric Le Goater, 2021/12/16
- [PULL 025/101] softfloat: Add flag specific to convert non-nan to int, Cédric Le Goater, 2021/12/16
- [PULL 023/101] softfloat: Add flags specific to Inf / Inf and 0 / 0, Cédric Le Goater, 2021/12/16
- [PULL 014/101] docs/system/ppc/powernv.rst: document KVM support status, Cédric Le Goater, 2021/12/16
- [PULL 006/101] target/ppc: Implement Vector Expand Mask, Cédric Le Goater, 2021/12/16
- [PULL 026/101] softfloat: Add flag specific to signaling nans, Cédric Le Goater, 2021/12/16
- [PULL 008/101] target/ppc: Implement Vector Mask Move insns, Cédric Le Goater, 2021/12/16
- [PULL 018/101] docs: Rename ppc-spapr-hcalls.txt to ppc-spapr-hcalls.rst., Cédric Le Goater, 2021/12/16
- [PULL 015/101] ppc/pnv.c: fix "system-id" FDT when -uuid is set, Cédric Le Goater, 2021/12/16
- [PULL 020/101] softfloat: Extend float_exception_flags to 16 bits,
Cédric Le Goater <=
- [PULL 031/101] target/ppc: Update float_invalid_cvt for new flags, Cédric Le Goater, 2021/12/16
- [PULL 013/101] ppc/pnv.c: add a friendly warning when accel=kvm is used, Cédric Le Goater, 2021/12/16
- [PULL 017/101] docs: rSTify ppc-spapr-hcalls.txt, Cédric Le Goater, 2021/12/16
- [PULL 039/101] target/ppc: Do not call do_float_check_status from do_fmadd, Cédric Le Goater, 2021/12/16
- [PULL 016/101] docs: Introducing pseries documentation., Cédric Le Goater, 2021/12/16
- [PULL 021/101] softfloat: Add flag specific to Inf - Inf, Cédric Le Goater, 2021/12/16
- [PULL 035/101] target/ppc: Tidy inexact handling in do_fri, Cédric Le Goater, 2021/12/16
- [PULL 024/101] softfloat: Add flag specific to sqrt(-x), Cédric Le Goater, 2021/12/16
- [PULL 030/101] target/ppc: Move float_check_status from FPU_FCTI to translate, Cédric Le Goater, 2021/12/16
- [PULL 034/101] target/ppc: Use FloatRoundMode in do_fri, Cédric Le Goater, 2021/12/16