mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-13 04:38:24 +00:00
combineLostFractions does not need to be a member function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42729 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -222,6 +222,20 @@ namespace {
|
||||
return lost_fraction;
|
||||
}
|
||||
|
||||
/* Combine the effect of two lost fractions. */
|
||||
lostFraction
|
||||
combineLostFractions(lostFraction moreSignificant,
|
||||
lostFraction lessSignificant)
|
||||
{
|
||||
if(lessSignificant != lfExactlyZero) {
|
||||
if(moreSignificant == lfExactlyZero)
|
||||
moreSignificant = lfLessThanHalf;
|
||||
else if(moreSignificant == lfExactlyHalf)
|
||||
moreSignificant = lfMoreThanHalf;
|
||||
}
|
||||
|
||||
return moreSignificant;
|
||||
}
|
||||
|
||||
/* Zero at the end to avoid modular arithmetic when adding one; used
|
||||
when rounding up during hexadecimal output. */
|
||||
@ -429,21 +443,6 @@ APFloat::significandParts()
|
||||
return &significand.part;
|
||||
}
|
||||
|
||||
/* Combine the effect of two lost fractions. */
|
||||
lostFraction
|
||||
APFloat::combineLostFractions(lostFraction moreSignificant,
|
||||
lostFraction lessSignificant)
|
||||
{
|
||||
if(lessSignificant != lfExactlyZero) {
|
||||
if(moreSignificant == lfExactlyZero)
|
||||
moreSignificant = lfLessThanHalf;
|
||||
else if(moreSignificant == lfExactlyHalf)
|
||||
moreSignificant = lfMoreThanHalf;
|
||||
}
|
||||
|
||||
return moreSignificant;
|
||||
}
|
||||
|
||||
void
|
||||
APFloat::zeroSignificand()
|
||||
{
|
||||
@ -1614,7 +1613,7 @@ APFloat::convertFromHexadecimalString(const char *p,
|
||||
partsCount = partCount();
|
||||
bitPos = partsCount * integerPartWidth;
|
||||
|
||||
/* Skip leading zeroes and any(hexa)decimal point. */
|
||||
/* Skip leading zeroes and any (hexa)decimal point. */
|
||||
p = skipLeadingZeroesAndAnyDot(p, &dot);
|
||||
firstSignificantDigit = p;
|
||||
|
||||
|
Reference in New Issue
Block a user