[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 4/6] softfloat: do not set denominator high bit for floatx80 r
From: |
Joseph Myers |
Subject: |
[PATCH v2 4/6] softfloat: do not set denominator high bit for floatx80 remainder |
Date: |
Mon, 8 Jun 2020 16:56:47 +0000 |
User-agent: |
Alpine 2.21 (DEB 202 2017-01-01) |
The floatx80 remainder implementation unnecessarily sets the high bit
of bSig explicitly. By that point in the function, arguments that are
invalid, zero, infinity or NaN have already been handled and
subnormals have been through normalizeFloatx80Subnormal, so the high
bit will already be set. Remove the unnecessary code.
Signed-off-by: Joseph Myers <joseph@codesourcery.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
---
fpu/softfloat.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/fpu/softfloat.c b/fpu/softfloat.c
index 9d43868e4c..1552241b5e 100644
--- a/fpu/softfloat.c
+++ b/fpu/softfloat.c
@@ -5736,7 +5736,6 @@ floatx80 floatx80_modrem(floatx80 a, floatx80 b, bool mod,
if ( aSig0 == 0 ) return a;
normalizeFloatx80Subnormal( aSig0, &aExp, &aSig0 );
}
- bSig |= UINT64_C(0x8000000000000000);
zSign = aSign;
expDiff = aExp - bExp;
aSig1 = 0;
--
2.17.1
--
Joseph S. Myers
joseph@codesourcery.com
- [PATCH v2 0/6] softfloat, target/i386: fprem, fprem1 fixes, Joseph Myers, 2020/06/08
- [PATCH v2 1/6] softfloat: merge floatx80_mod and floatx80_rem, Joseph Myers, 2020/06/08
- [PATCH v2 2/6] softfloat: fix floatx80 remainder pseudo-denormal check for zero, Joseph Myers, 2020/06/08
- [PATCH v2 3/6] softfloat: do not return pseudo-denormal from floatx80 remainder, Joseph Myers, 2020/06/08
- [PATCH v2 4/6] softfloat: do not set denominator high bit for floatx80 remainder,
Joseph Myers <=
- [PATCH v2 5/6] softfloat: return low bits of quotient from floatx80_modrem, Joseph Myers, 2020/06/08
- [PATCH v2 6/6] target/i386: reimplement fprem, fprem1 using floatx80 operations, Joseph Myers, 2020/06/08
- Re: [PATCH v2 0/6] softfloat, target/i386: fprem, fprem1 fixes, Paolo Bonzini, 2020/06/12