mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-07-24 23:29:41 +00:00
Fix minor style issues.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99414 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
34b96f4fb3
commit
16e02097d2
@ -116,8 +116,8 @@ hexDigitValue(unsigned int c)
|
||||
|
||||
static inline void
|
||||
assertArithmeticOK(const llvm::fltSemantics &semantics) {
|
||||
assert(semantics.arithmeticOK
|
||||
&& "Compile-time arithmetic does not support these semantics");
|
||||
assert(semantics.arithmeticOK &&
|
||||
"Compile-time arithmetic does not support these semantics");
|
||||
}
|
||||
|
||||
/* Return the value of a decimal exponent of the form
|
||||
@ -360,8 +360,8 @@ lostFractionThroughTruncation(const integerPart *parts,
|
||||
return lfExactlyZero;
|
||||
if (bits == lsb + 1)
|
||||
return lfExactlyHalf;
|
||||
if(bits <= partCount * integerPartWidth
|
||||
&& APInt::tcExtractBit(parts, bits - 1))
|
||||
if (bits <= partCount * integerPartWidth &&
|
||||
APInt::tcExtractBit(parts, bits - 1))
|
||||
return lfMoreThanHalf;
|
||||
|
||||
return lfLessThanHalf;
|
||||
@ -905,8 +905,7 @@ APFloat::multiplySignificand(const APFloat &rhs, const APFloat *addend)
|
||||
|
||||
/* Normalize our MSB. */
|
||||
extendedPrecision = precision + precision - 1;
|
||||
if(omsb != extendedPrecision)
|
||||
{
|
||||
if (omsb != extendedPrecision) {
|
||||
APInt::tcShiftLeft(fullSignificand, newPartsCount,
|
||||
extendedPrecision - omsb);
|
||||
exponent -= extendedPrecision - omsb;
|
||||
@ -1113,11 +1112,10 @@ APFloat::opStatus
|
||||
APFloat::handleOverflow(roundingMode rounding_mode)
|
||||
{
|
||||
/* Infinity? */
|
||||
if(rounding_mode == rmNearestTiesToEven
|
||||
|| rounding_mode == rmNearestTiesToAway
|
||||
|| (rounding_mode == rmTowardPositive && !sign)
|
||||
|| (rounding_mode == rmTowardNegative && sign))
|
||||
{
|
||||
if (rounding_mode == rmNearestTiesToEven ||
|
||||
rounding_mode == rmNearestTiesToAway ||
|
||||
(rounding_mode == rmTowardPositive && !sign) ||
|
||||
(rounding_mode == rmTowardNegative && sign)) {
|
||||
category = fcInfinity;
|
||||
return (opStatus) (opOverflow | opInexact);
|
||||
}
|
||||
@ -1730,9 +1728,9 @@ APFloat::fusedMultiplyAdd(const APFloat &multiplicand,
|
||||
|
||||
/* If and only if all arguments are normal do we need to do an
|
||||
extended-precision calculation. */
|
||||
if(category == fcNormal
|
||||
&& multiplicand.category == fcNormal
|
||||
&& addend.category == fcNormal) {
|
||||
if (category == fcNormal &&
|
||||
multiplicand.category == fcNormal &&
|
||||
addend.category == fcNormal) {
|
||||
lostFraction lost_fraction;
|
||||
|
||||
lost_fraction = multiplySignificand(multiplicand, &addend);
|
||||
@ -2004,8 +2002,8 @@ APFloat::convertToSignExtendedInteger(integerPart *parts, unsigned int width,
|
||||
if (truncatedBits) {
|
||||
lost_fraction = lostFractionThroughTruncation(src, partCount(),
|
||||
truncatedBits);
|
||||
if (lost_fraction != lfExactlyZero
|
||||
&& roundAwayFromZero(rounding_mode, lost_fraction, truncatedBits)) {
|
||||
if (lost_fraction != lfExactlyZero &&
|
||||
roundAwayFromZero(rounding_mode, lost_fraction, truncatedBits)) {
|
||||
if (APInt::tcIncrement(parts, dstPartsCount))
|
||||
return opInvalidOp; /* Overflow. */
|
||||
}
|
||||
@ -2149,8 +2147,8 @@ APFloat::convertFromSignExtendedInteger(const integerPart *src,
|
||||
opStatus status;
|
||||
|
||||
assertArithmeticOK(*semantics);
|
||||
if (isSigned
|
||||
&& APInt::tcExtractBit(src, srcCount * integerPartWidth - 1)) {
|
||||
if (isSigned &&
|
||||
APInt::tcExtractBit(src, srcCount * integerPartWidth - 1)) {
|
||||
integerPart *copy;
|
||||
|
||||
/* If we're signed and negative negate a copy. */
|
||||
@ -2287,8 +2285,8 @@ APFloat::roundSignificandWithExponent(const integerPart *decSigParts,
|
||||
integerPart pow5Parts[maxPowerOfFiveParts];
|
||||
bool isNearest;
|
||||
|
||||
isNearest = (rounding_mode == rmNearestTiesToEven
|
||||
|| rounding_mode == rmNearestTiesToAway);
|
||||
isNearest = (rounding_mode == rmNearestTiesToEven ||
|
||||
rounding_mode == rmNearestTiesToAway);
|
||||
|
||||
parts = partCountForBits(semantics->precision + 11);
|
||||
|
||||
@ -3217,8 +3215,8 @@ 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;
|
||||
significand[N-1] &=
|
||||
(((integerPart) 1) << ((Sem.precision % integerPartWidth) - 1)) - 1;
|
||||
|
||||
return Val;
|
||||
}
|
||||
@ -3247,8 +3245,8 @@ 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));
|
||||
Val.significandParts()[partCountForBits(Sem.precision)-1] |=
|
||||
(((integerPart) 1) << ((Sem.precision % integerPartWidth) - 1));
|
||||
|
||||
return Val;
|
||||
}
|
||||
|
@ -702,8 +702,7 @@ static inline uint32_t hashword(const uint64_t *k64, size_t length)
|
||||
a = b = c = 0xdeadbeef + (((uint32_t)length)<<2);
|
||||
|
||||
/*------------------------------------------------- handle most of the key */
|
||||
while (length > 3)
|
||||
{
|
||||
while (length > 3) {
|
||||
a += k[0];
|
||||
b += k[1];
|
||||
c += k[2];
|
||||
@ -2065,8 +2064,8 @@ void APInt::fromString(unsigned numbits, const StringRef& str, uint8_t radix) {
|
||||
assert((slen <= numbits || radix != 2) && "Insufficient bit width");
|
||||
assert(((slen-1)*3 <= numbits || radix != 8) && "Insufficient bit width");
|
||||
assert(((slen-1)*4 <= numbits || radix != 16) && "Insufficient bit width");
|
||||
assert((((slen-1)*64)/22 <= numbits || radix != 10)
|
||||
&& "Insufficient bit width");
|
||||
assert((((slen-1)*64)/22 <= numbits || radix != 10) &&
|
||||
"Insufficient bit width");
|
||||
|
||||
// Allocate memory
|
||||
if (!isSingleWord())
|
||||
@ -2340,8 +2339,8 @@ APInt::tcIsZero(const integerPart *src, unsigned int parts)
|
||||
int
|
||||
APInt::tcExtractBit(const integerPart *parts, unsigned int bit)
|
||||
{
|
||||
return(parts[bit / integerPartWidth]
|
||||
& ((integerPart) 1 << bit % integerPartWidth)) != 0;
|
||||
return (parts[bit / integerPartWidth] &
|
||||
((integerPart) 1 << bit % integerPartWidth)) != 0;
|
||||
}
|
||||
|
||||
/* Set the given bit of a bignum. */
|
||||
|
@ -676,8 +676,8 @@ void cl::ParseCommandLineOptions(int argc, char **argv,
|
||||
<< " positional arguments: See: " << argv[0] << " -help\n";
|
||||
|
||||
ErrorParsing = true;
|
||||
} else if (!HasUnlimitedPositionals
|
||||
&& PositionalVals.size() > PositionalOpts.size()) {
|
||||
} else if (!HasUnlimitedPositionals &&
|
||||
PositionalVals.size() > PositionalOpts.size()) {
|
||||
errs() << ProgramName
|
||||
<< ": Too many positional arguments specified!\n"
|
||||
<< "Can specify at most " << PositionalOpts.size()
|
||||
|
@ -64,8 +64,7 @@ DebugOnly("debug-only", cl::desc("Enable a specific type of debug output"),
|
||||
cl::location(DebugOnlyOptLoc), cl::ValueRequired);
|
||||
|
||||
// Signal handlers - dump debug output on termination.
|
||||
static void debug_user_sig_handler(void *Cookie)
|
||||
{
|
||||
static void debug_user_sig_handler(void *Cookie) {
|
||||
// This is a bit sneaky. Since this is under #ifndef NDEBUG, we
|
||||
// know that debug mode is enabled and dbgs() really is a
|
||||
// circular_raw_ostream. If NDEBUG is defined, then dbgs() ==
|
||||
|
@ -71,4 +71,3 @@ void llvm_unreachable_internal(const char *msg, const char *file,
|
||||
abort();
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user