[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 04/17] softfloat: Remove float_muladd_halve_result
From: |
Richard Henderson |
Subject: |
[PATCH 04/17] softfloat: Remove float_muladd_halve_result |
Date: |
Sun, 8 Dec 2024 16:48:31 -0600 |
All uses have been convered to float*_muladd_scalbn.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
include/fpu/softfloat.h | 3 ---
fpu/softfloat.c | 6 ------
fpu/softfloat-parts.c.inc | 4 ----
3 files changed, 13 deletions(-)
diff --git a/include/fpu/softfloat.h b/include/fpu/softfloat.h
index c34ce0477d..aa69aecfb0 100644
--- a/include/fpu/softfloat.h
+++ b/include/fpu/softfloat.h
@@ -120,14 +120,11 @@ bfloat16 bfloat16_squash_input_denormal(bfloat16 a,
float_status *status);
| Using these differs from negating an input or output before calling
| the muladd function in that this means that a NaN doesn't have its
| sign bit inverted before it is propagated.
-| We also support halving the result before rounding, as a special
-| case to support the ARM fused-sqrt-step instruction FRSQRTS.
*----------------------------------------------------------------------------*/
enum {
float_muladd_negate_c = 1,
float_muladd_negate_product = 2,
float_muladd_negate_result = 4,
- float_muladd_halve_result = 8,
};
/*----------------------------------------------------------------------------
diff --git a/fpu/softfloat.c b/fpu/softfloat.c
index a4174de692..81e7a7524b 100644
--- a/fpu/softfloat.c
+++ b/fpu/softfloat.c
@@ -2274,9 +2274,6 @@ float32_muladd(float32 xa, float32 xb, float32 xc, int
flags, float_status *s)
if (unlikely(!can_use_fpu(s))) {
goto soft;
}
- if (unlikely(flags & float_muladd_halve_result)) {
- goto soft;
- }
float32_input_flush3(&ua.s, &ub.s, &uc.s, s);
if (unlikely(!f32_is_zon3(ua, ub, uc))) {
@@ -2345,9 +2342,6 @@ float64_muladd(float64 xa, float64 xb, float64 xc, int
flags, float_status *s)
if (unlikely(!can_use_fpu(s))) {
goto soft;
}
- if (unlikely(flags & float_muladd_halve_result)) {
- goto soft;
- }
float64_input_flush3(&ua.s, &ub.s, &uc.s, s);
if (unlikely(!f64_is_zon3(ua, ub, uc))) {
diff --git a/fpu/softfloat-parts.c.inc b/fpu/softfloat-parts.c.inc
index 5133358878..5b5969725b 100644
--- a/fpu/softfloat-parts.c.inc
+++ b/fpu/softfloat-parts.c.inc
@@ -567,10 +567,6 @@ static FloatPartsN *partsN(muladd_scalbn)(FloatPartsN *a,
FloatPartsN *b,
a->exp = p_widen.exp;
return_normal:
- /* TODO: Replace all use of float_muladd_halve_result with scale. */
- if (flags & float_muladd_halve_result) {
- a->exp -= 1;
- }
a->exp += scale;
finish_sign:
if (flags & float_muladd_negate_result) {
--
2.43.0
- [RFC PATCH 00/17] softfloat, hexagon: Cleanup fmaf, Richard Henderson, 2024/12/08
- [PATCH 01/17] softfloat: Add float{16,32,64}_muladd_scalbn, Richard Henderson, 2024/12/08
- [PATCH 02/17] target/arm: Use float*_muladd_scalbn, Richard Henderson, 2024/12/08
- [PATCH 03/17] target/sparc: Use float*_muladd_scalbn, Richard Henderson, 2024/12/08
- [PATCH 04/17] softfloat: Remove float_muladd_halve_result,
Richard Henderson <=
- [PATCH 07/17] target/hexagon: Use float32_mul in helper_sfmpy, Richard Henderson, 2024/12/08
- [PATCH 05/17] softfloat: Add float_round_nearest_even_max, Richard Henderson, 2024/12/08
- [PATCH 06/17] softfloat: Add float_muladd_suppress_add_product_zero, Richard Henderson, 2024/12/08
- [PATCH 08/17] target/hexagon: Use float32_muladd for helper_sffma, Richard Henderson, 2024/12/08
- [PATCH 09/17] target/hexagon: Use float32_muladd for helper_sffms, Richard Henderson, 2024/12/08
- [PATCH 10/17] target/hexagon: Use float32_muladd_scalbn for helper_sffma_sc, Richard Henderson, 2024/12/08