[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC PATCH 08/15] softfloat: Tidy a * b + inf return
From: |
Richard Henderson |
Subject: |
[RFC PATCH 08/15] softfloat: Tidy a * b + inf return |
Date: |
Tue, 20 Oct 2020 21:51:42 -0700 |
No reason to set values in 'a', when we already
have float_class_inf in 'c', and can flip that sign.
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Richard Henderson <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.25.1
- [RFC PATCH 01/15] qemu/int128: Add int128_or, (continued)
- [RFC PATCH 01/15] qemu/int128: Add int128_or, Richard Henderson, 2020/10/21
- [RFC PATCH 02/15] qemu/int128: Add int128_clz, int128_ctz, Richard Henderson, 2020/10/21
- [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 <=
- [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, 2020/10/21
- [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