[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC PATCH 12/15] softfloat: Streamline FloatFmt
From: |
Richard Henderson |
Subject: |
[RFC PATCH 12/15] softfloat: Streamline FloatFmt |
Date: |
Tue, 20 Oct 2020 21:51:46 -0700 |
The fields being removed are now computed in round_canonical.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
fpu/softfloat.c | 14 +-------------
1 file changed, 1 insertion(+), 13 deletions(-)
diff --git a/fpu/softfloat.c b/fpu/softfloat.c
index 3651f4525d..1bd21435e7 100644
--- a/fpu/softfloat.c
+++ b/fpu/softfloat.c
@@ -527,10 +527,6 @@ typedef struct {
* exp_max: the maximum normalised exponent
* frac_size: the size of the fraction field
* frac_shift: shift to normalise the fraction with DECOMPOSED_BINARY_POINT
- * The following are computed based the size of fraction
- * frac_lsb: least significant bit of fraction
- * frac_lsbm1: the bit below the least significant bit (for rounding)
- * round_mask/roundeven_mask: masks used for rounding
* The following optional modifiers are available:
* arm_althp: handle ARM Alternative Half Precision
*/
@@ -540,10 +536,6 @@ typedef struct {
int exp_max;
int frac_size;
int frac_shift;
- uint64_t frac_lsb;
- uint64_t frac_lsbm1;
- uint64_t round_mask;
- uint64_t roundeven_mask;
bool arm_althp;
} FloatFmt;
@@ -553,11 +545,7 @@ typedef struct {
.exp_bias = ((1 << E) - 1) >> 1, \
.exp_max = (1 << E) - 1, \
.frac_size = F, \
- .frac_shift = DECOMPOSED_BINARY_POINT - F, \
- .frac_lsb = 1ull << (DECOMPOSED_BINARY_POINT - F), \
- .frac_lsbm1 = 1ull << ((DECOMPOSED_BINARY_POINT - F) - 1), \
- .round_mask = (1ull << (DECOMPOSED_BINARY_POINT - F)) - 1, \
- .roundeven_mask = (2ull << (DECOMPOSED_BINARY_POINT - F)) - 1
+ .frac_shift = DECOMPOSED_BINARY_POINT - F
static const FloatFmt float16_params = {
FLOAT_PARAMS(5, 10)
--
2.25.1
- [RFC PATCH 03/15] qemu/int128: Rename int128_rshift, int128_lshift, (continued)
- [RFC PATCH 03/15] qemu/int128: Rename int128_rshift, int128_lshift, Richard Henderson, 2020/10/21
- [RFC PATCH 05/15] qemu/int128: Add int128_geu, Richard Henderson, 2020/10/21
- [RFC PATCH 04/15] qemu/int128: Add int128_shr, Richard Henderson, 2020/10/21
- [RFC PATCH 06/15] softfloat: Use mulu64 for mul64To128, Richard Henderson, 2020/10/21
- [RFC PATCH 07/15] softfloat: Use int128.h for some operations, Richard Henderson, 2020/10/21
- [RFC PATCH 08/15] softfloat: Tidy a * b + inf return, Richard Henderson, 2020/10/21
- [RFC PATCH 10/15] softfloat: Inline float_raise, Richard Henderson, 2020/10/21
- [RFC PATCH 09/15] softfloat: Add float_cmask and constants, Richard Henderson, 2020/10/21
- [RFC PATCH 12/15] softfloat: Streamline FloatFmt,
Richard Henderson <=
- [RFC PATCH 11/15] Test split to softfloat-parts.c.inc, Richard Henderson, 2020/10/21
- [RFC PATCH 13/15] Test float128_addsub, Richard Henderson, 2020/10/21
- [RFC PATCH 15/15] softfloat: Improve subtraction of equal exponent, Richard Henderson, 2020/10/21
- [RFC PATCH 14/15] softfloat: Use float_cmask for addsub_floats, Richard Henderson, 2020/10/21
- Re: [RFC PATCH 00/15] softfloat: alternate conversion of float128_addsub, no-reply, 2020/10/21
- Re: [RFC PATCH 00/15] softfloat: alternate conversion of float128_addsub, Alex Bennée, 2020/10/21