[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC PATCH 3/8] softfloat: Tidy a * b + inf return
From: |
Alex Bennée |
Subject: |
[RFC PATCH 3/8] softfloat: Tidy a * b + inf return |
Date: |
Tue, 20 Oct 2020 17:37:33 +0100 |
From: Richard Henderson <richard.henderson@linaro.org>
No reason to set values in 'a', when we already
have float_class_inf in 'c', and can flip that sign.
Reviewed-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20200925152047.709901-4-richard.henderson@linaro.org>
---
fpu/softfloat.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/fpu/softfloat.c b/fpu/softfloat.c
index 67cfa0fd82..9db55d2b11 100644
--- a/fpu/softfloat.c
+++ b/fpu/softfloat.c
@@ -1380,9 +1380,8 @@ static FloatParts muladd_floats(FloatParts a, FloatParts
b, FloatParts c,
s->float_exception_flags |= float_flag_invalid;
return parts_default_nan(s);
} else {
- a.cls = float_class_inf;
- a.sign = c.sign ^ sign_flip;
- return a;
+ c.sign ^= sign_flip;
+ return c;
}
}
--
2.20.1
- [RFC PATCH 0/8] fpu: experimental conversion of float128_addsub, Alex Bennée, 2020/10/20
- [RFC PATCH 1/8] softfloat: Use mulu64 for mul64To128, Alex Bennée, 2020/10/20
- [RFC PATCH 2/8] softfloat: Use int128.h for some operations, Alex Bennée, 2020/10/20
- [RFC PATCH 3/8] softfloat: Tidy a * b + inf return,
Alex Bennée <=
- [RFC PATCH 4/8] softfloat: Add float_cmask and constants, Alex Bennée, 2020/10/20
- [RFC PATCH 7/8] tests/fp: add quad support to the benchmark utility, Alex Bennée, 2020/10/20
- [RFC PATCH 6/8] int128.h: add bunch of uint128 utility functions (INCOMPLETE), Alex Bennée, 2020/10/20
- [RFC PATCH 8/8] softfloat: implement addsub_floats128 using Uint128 and new style code, Alex Bennée, 2020/10/20
- [RFC PATCH 5/8] softfloat: Inline pick_nan_muladd into its caller, Alex Bennée, 2020/10/20
- Re: [RFC PATCH 0/8] fpu: experimental conversion of float128_addsub, no-reply, 2020/10/20