[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 03/10] softfloat: Tidy a * b + inf return
From: |
Richard Henderson |
Subject: |
[PATCH v2 03/10] softfloat: Tidy a * b + inf return |
Date: |
Fri, 25 Sep 2020 08:20:40 -0700 |
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>
---
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
- [PATCH v2 00/10] softfloat: Implement float128_muladd, Richard Henderson, 2020/09/25
- [PATCH v2 01/10] softfloat: Use mulu64 for mul64To128, Richard Henderson, 2020/09/25
- [PATCH v2 02/10] softfloat: Use int128.h for some operations, Richard Henderson, 2020/09/25
- [PATCH v2 03/10] softfloat: Tidy a * b + inf return,
Richard Henderson <=
- [PATCH v2 04/10] softfloat: Add float_cmask and constants, Richard Henderson, 2020/09/25
- [PATCH v2 05/10] softfloat: Inline pick_nan_muladd into its caller, Richard Henderson, 2020/09/25
- [PATCH v2 07/10] softfloat: Use x86_64 assembly for {add, sub}{192, 256}, Richard Henderson, 2020/09/25
- [PATCH v2 06/10] softfloat: Implement float128_muladd, Richard Henderson, 2020/09/25
- [PATCH v2 09/10] softfloat: Use aarch64 assembly for {add, sub}{192, 256}, Richard Henderson, 2020/09/25
- [PATCH v2 08/10] softfloat: Use x86_64 assembly for sh[rl]_double, Richard Henderson, 2020/09/25
- [PATCH v2 10/10] softfloat: Use ppc64 assembly for {add, sub}{192, 256}, Richard Henderson, 2020/09/25