mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-24 23:28:41 +00:00
Fix APFloat::getLargest so that it actually returns the correct value. Found by accident while reviewing a patch to nearby code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141816 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -3243,8 +3243,9 @@ APFloat APFloat::getLargest(const fltSemantics &Sem, bool Negative) {
|
||||
significand[i] = ~((integerPart) 0);
|
||||
|
||||
// ...and then clear the top bits for internal consistency.
|
||||
significand[N-1] &=
|
||||
(((integerPart) 1) << ((Sem.precision % integerPartWidth) - 1)) - 1;
|
||||
if (Sem.precision % integerPartWidth != 0)
|
||||
significand[N-1] &=
|
||||
(((integerPart) 1) << (Sem.precision % integerPartWidth)) - 1;
|
||||
|
||||
return Val;
|
||||
}
|
||||
|
Reference in New Issue
Block a user