mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-03-18 12:31:26 +00:00
Fix APFloat::getSmallestNormalized so the shift doesn't depend on undefined behavior. Patch from Ahmed Charles.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141818 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
7247a5f20e
commit
90196fced2
@ -3275,7 +3275,7 @@ APFloat APFloat::getSmallestNormalized(const fltSemantics &Sem, bool Negative) {
|
||||
Val.exponent = Sem.minExponent;
|
||||
Val.zeroSignificand();
|
||||
Val.significandParts()[partCountForBits(Sem.precision)-1] |=
|
||||
(((integerPart) 1) << ((Sem.precision % integerPartWidth) - 1));
|
||||
(((integerPart) 1) << ((Sem.precision - 1) % integerPartWidth));
|
||||
|
||||
return Val;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user