Lines Matching full:semantics

42   /* Represents floating point arithmetic semantics.  */
56 /* Number of bits actually used in the semantics. */
582 semantics = ourSemantics; in initialize()
598 assert(semantics == rhs.semantics); in assign()
636 unsigned bitsToPreserve = semantics->precision - 1; in makeNaN()
644 unsigned QNaNBit = semantics->precision - 2; in makeNaN()
663 if (semantics == &APFloat::x87DoubleExtended) in makeNaN()
678 if (semantics != rhs.semantics) { in operator =()
680 initialize(rhs.semantics); in operator =()
692 semantics = rhs.semantics; in operator =()
698 rhs.semantics = &Bogus; in operator =()
704 return isFiniteNonZero() && (exponent == semantics->minExponent) && in isDenormal()
706 semantics->precision - 1) == 0); in isDenormal()
714 return isFiniteNonZero() && exponent == semantics->minExponent && in isSmallest()
729 PartCount*integerPartWidth - semantics->precision + 1; in isSignificandAllOnes()
751 PartCount*integerPartWidth - semantics->precision + 1; in isSignificandAllZeros()
766 return isFiniteNonZero() && exponent == semantics->maxExponent in isLargest()
783 if (semantics != rhs.semantics || in bitwiseIsEqual()
824 initialize(rhs.semantics); in APFloat()
828 APFloat::APFloat(APFloat &&rhs) : semantics(&Bogus) { in APFloat()
845 return partCountForBits(semantics->precision + 1); in partCount()
849 APFloat::semanticsPrecision(const fltSemantics &semantics) in semanticsPrecision() argument
851 return semantics.precision; in semanticsPrecision()
854 APFloat::semanticsMaxExponent(const fltSemantics &semantics) in semanticsMaxExponent() argument
856 return semantics.maxExponent; in semanticsMaxExponent()
859 APFloat::semanticsMinExponent(const fltSemantics &semantics) in semanticsMinExponent() argument
861 return semantics.minExponent; in semanticsMinExponent()
864 APFloat::semanticsSizeInBits(const fltSemantics &semantics) in semanticsSizeInBits() argument
866 return semantics.sizeInBits; in semanticsSizeInBits()
911 assert(semantics == rhs.semantics); in addSignificand()
926 assert(semantics == rhs.semantics); in subtractSignificand()
947 assert(semantics == rhs.semantics); in multiplySignificand()
949 precision = semantics->precision; in multiplySignificand()
987 const fltSemantics *savedSemantics = semantics; in multiplySignificand()
1001 /* Create new semantics. */ in multiplySignificand()
1002 extendedSemantics = *semantics; in multiplySignificand()
1009 semantics = &extendedSemantics; in multiplySignificand()
1029 semantics = savedSemantics; in multiplySignificand()
1075 assert(semantics == rhs.semantics); in divideSignificand()
1097 unsigned int precision = semantics->precision; in divideSignificand()
1178 assert(bits < semantics->precision); in shiftSignificandLeft()
1195 assert(semantics == rhs.semantics); in compareAbsoluteValue()
1231 exponent = semantics->maxExponent; in handleOverflow()
1233 semantics->precision); in handleOverflow()
1297 exponentChange = omsb - semantics->precision; in normalize()
1301 if (exponent + exponentChange > semantics->maxExponent) in normalize()
1306 if (exponent + exponentChange < semantics->minExponent) in normalize()
1307 exponentChange = semantics->minExponent - exponent; in normalize()
1350 exponent = semantics->minExponent; in normalize()
1356 if (omsb == (unsigned) semantics->precision + 1) { in normalize()
1360 if (exponent == semantics->maxExponent) { in normalize()
1374 if (omsb == semantics->precision) in normalize()
1378 assert(omsb < semantics->precision); in normalize()
1873 if (isFiniteNonZero() && exponent+1 >= (int)semanticsPrecision(*semantics)) in roundToIntegral()
1882 APInt IntegerConstant(NextPowerOf2(semanticsPrecision(*semantics)), 1); in roundToIntegral()
1883 IntegerConstant <<= semanticsPrecision(*semantics)-1; in roundToIntegral()
1884 APFloat MagicConstant(*semantics); in roundToIntegral()
1915 assert(semantics == rhs.semantics); in compare()
1997 const fltSemantics &fromSemantics = *semantics; in convert()
2014 // If this is a truncation of a denormal number, and the target semantics in convert()
2015 // has larger exponent range than the source semantics (this can happen in convert()
2054 // Now that we have the right storage, switch the semantics. in convert()
2055 semantics = &toSemantics; in convert()
2070 if (!X86SpecialNan && semantics == &APFloat::x87DoubleExtended) in convert()
2071 APInt::tcSetBit(significandParts(), semantics->precision - 1); in convert()
2130 truncatedBits = semantics->precision -1U - exponent; in convertToSignExtendedInteger()
2140 if (bits < semantics->precision) { in convertToSignExtendedInteger()
2141 /* We truncate (semantics->precision - bits) bits. */ in convertToSignExtendedInteger()
2142 truncatedBits = semantics->precision - bits; in convertToSignExtendedInteger()
2146 APInt::tcExtract(parts, dstPartsCount, src, semantics->precision, 0); in convertToSignExtendedInteger()
2147 APInt::tcShiftLeft(parts, dstPartsCount, bits - semantics->precision); in convertToSignExtendedInteger()
2271 precision = semantics->precision; in convertFromUnsignedParts()
2424 expAdjustment += semantics->precision; in convertFromHexadecimalString()
2447 parts = partCountForBits(semantics->precision + 11); in roundSignificandWithExponent()
2457 excessPrecision = calcSemantics.precision - semantics->precision; in roundSignificandWithExponent()
2481 if (decSig.exponent < semantics->minExponent) { in roundSignificandWithExponent()
2482 excessPrecision += (semantics->minExponent - decSig.exponent); in roundSignificandWithExponent()
2509 exponent = (decSig.exponent + semantics->precision in roundSignificandWithExponent()
2568 8651 * (semantics->minExponent - (int) semantics->precision)) { in convertFromDecimalString()
2576 >= 12655 * semantics->maxExponent) { in convertFromDecimalString()
2784 valueBits = semantics->precision + 3; in convertNormalToHexString()
2871 Arg.semantics->precision); in hash_value()
2875 Arg.semantics->precision, Arg.exponent, in hash_value()
2893 assert(semantics == (const llvm::fltSemantics*)&x87DoubleExtended); in convertF80LongDoubleAPFloatToAPInt()
2925 assert(semantics == (const llvm::fltSemantics*)&PPCDoubleDouble); in convertPPCDoubleDoubleAPFloatToAPInt()
2938 fltSemantics extendedSemantics = *semantics; in convertPPCDoubleDoubleAPFloatToAPInt()
2976 assert(semantics == (const llvm::fltSemantics*)&IEEEquad); in convertQuadrupleAPFloatToAPInt()
3012 assert(semantics == (const llvm::fltSemantics*)&IEEEdouble); in convertDoubleAPFloatToAPInt()
3042 assert(semantics == (const llvm::fltSemantics*)&IEEEsingle); in convertFloatAPFloatToAPInt()
3071 assert(semantics == (const llvm::fltSemantics*)&IEEEhalf); in convertHalfAPFloatToAPInt()
3104 if (semantics == (const llvm::fltSemantics*)&IEEEhalf) in bitcastToAPInt()
3107 if (semantics == (const llvm::fltSemantics*)&IEEEsingle) in bitcastToAPInt()
3110 if (semantics == (const llvm::fltSemantics*)&IEEEdouble) in bitcastToAPInt()
3113 if (semantics == (const llvm::fltSemantics*)&IEEEquad) in bitcastToAPInt()
3116 if (semantics == (const llvm::fltSemantics*)&PPCDoubleDouble) in bitcastToAPInt()
3119 assert(semantics == (const llvm::fltSemantics*)&x87DoubleExtended && in bitcastToAPInt()
3127 assert(semantics == (const llvm::fltSemantics*)&IEEEsingle && in convertToFloat()
3128 "Float semantics are not IEEEsingle"); in convertToFloat()
3136 assert(semantics == (const llvm::fltSemantics*)&IEEEdouble && in convertToDouble()
3137 "Float semantics are not IEEEdouble"); in convertToDouble()
3397 /// semantics.
3405 exponent = semantics->maxExponent; in makeLargest()
3415 PartCount*integerPartWidth - semantics->precision; in makeLargest()
3422 /// semantics.
3430 exponent = semantics->minExponent; in makeSmallest()
3599 int exp = exponent - ((int) semantics->precision - 1); in toString()
3600 APInt significand(semantics->precision, in toString()
3602 partCountForBits(semantics->precision))); in toString()
3614 FormatPrecision = 2 + semantics->precision * 59 / 196; in toString()
3627 significand = significand.zext(semantics->precision + exp); in toString()
3639 // <= semantics->precision + e * 137 / 59 in toString()
3642 unsigned precision = semantics->precision + (137 * texp + 136) / 59; in toString()
3779 if (significandLSB() != semantics->precision - 1) in getExactInverse()
3783 APFloat reciprocal(*semantics, 1ULL); in getExactInverse()
3793 reciprocal.significandLSB() == reciprocal.semantics->precision - 1); in getExactInverse()
3807 return !APInt::tcExtractBit(significandParts(), semantics->precision - 2); in isSignaling()
3858 exponent = semantics->maxExponent + 1; in next()
3868 // 1. exponent != semantics->minExponent. This implies we are not in the in next()
3872 exponent != semantics->minExponent && isSignificandAllZeros(); in next()
3894 APInt::tcSetBit(Parts, semantics->precision - 1); in next()
3911 APInt::tcSetBit(Parts, semantics->precision - 1); in next()
3912 assert(exponent != semantics->maxExponent && in next()
3914 " by the given floating point semantics."); in next()
3934 exponent = semantics->maxExponent + 1; in makeInf()
3942 exponent = semantics->minExponent-1; in makeZero()