Lines Matching refs:APFloat
139 if (&Sem == &llvm::APFloat::IEEEhalf()) in SemanticsToEnum()
141 else if (&Sem == &llvm::APFloat::BFloat()) in SemanticsToEnum()
143 else if (&Sem == &llvm::APFloat::IEEEsingle()) in SemanticsToEnum()
145 else if (&Sem == &llvm::APFloat::IEEEdouble()) in SemanticsToEnum()
147 else if (&Sem == &llvm::APFloat::x87DoubleExtended()) in SemanticsToEnum()
149 else if (&Sem == &llvm::APFloat::IEEEquad()) in SemanticsToEnum()
151 else if (&Sem == &llvm::APFloat::PPCDoubleDouble()) in SemanticsToEnum()
440 D->exponent += static_cast<APFloat::ExponentType>((dot - p) - (dot > p)); in interpretDecimal()
442 static_cast<APFloat::ExponentType>((p - D->firstSigDigit) in interpretDecimal()
3969 bool IEEEFloat::getExactInverse(APFloat *inv) const { in getExactInverse()
3993 *inv = APFloat(reciprocal, *semantics); in getExactInverse()
4218 Floats(new APFloat[2]{APFloat(semIEEEdouble), APFloat(semIEEEdouble)}) { in DoubleAPFloat()
4224 Floats(new APFloat[2]{APFloat(semIEEEdouble, uninitialized), in DoubleAPFloat()
4225 APFloat(semIEEEdouble, uninitialized)}) { in DoubleAPFloat()
4230 : Semantics(&S), Floats(new APFloat[2]{APFloat(semIEEEdouble, I), in DoubleAPFloat()
4231 APFloat(semIEEEdouble)}) { in DoubleAPFloat()
4237 Floats(new APFloat[2]{ in DoubleAPFloat()
4238 APFloat(semIEEEdouble, APInt(64, I.getRawData()[0])), in DoubleAPFloat()
4239 APFloat(semIEEEdouble, APInt(64, I.getRawData()[1]))}) { in DoubleAPFloat()
4243 DoubleAPFloat::DoubleAPFloat(const fltSemantics &S, APFloat &&First, in DoubleAPFloat()
4244 APFloat &&Second) in DoubleAPFloat()
4246 Floats(new APFloat[2]{std::move(First), std::move(Second)}) { in DoubleAPFloat()
4254 Floats(RHS.Floats ? new APFloat[2]{APFloat(RHS.Floats[0]), in DoubleAPFloat()
4255 APFloat(RHS.Floats[1])} in DoubleAPFloat()
4280 APFloat::opStatus DoubleAPFloat::addImpl(const APFloat &a, const APFloat &aa, in addImpl()
4281 const APFloat &c, const APFloat &cc, in addImpl()
4284 APFloat z = a; in addImpl()
4296 if (AComparedToC == APFloat::cmpGreaterThan) { in addImpl()
4311 APFloat zz = aa; in addImpl()
4313 if (AComparedToC == APFloat::cmpGreaterThan) { in addImpl()
4328 APFloat q = a; in addImpl()
4359 APFloat::opStatus DoubleAPFloat::addWithSpecial(const DoubleAPFloat &LHS, in addWithSpecial()
4394 APFloat A(LHS.Floats[0]), AA(LHS.Floats[1]), C(RHS.Floats[0]), in addWithSpecial()
4405 APFloat::opStatus DoubleAPFloat::add(const DoubleAPFloat &RHS, in add()
4410 APFloat::opStatus DoubleAPFloat::subtract(const DoubleAPFloat &RHS, in subtract()
4418 APFloat::opStatus DoubleAPFloat::multiply(const DoubleAPFloat &RHS, in multiply()
4419 APFloat::roundingMode RM) { in multiply()
4462 APFloat A = Floats[0], B = Floats[1], C = RHS.Floats[0], D = RHS.Floats[1]; in multiply()
4464 APFloat T = A; in multiply()
4473 APFloat Tau = A; in multiply()
4479 APFloat V = A; in multiply()
4482 APFloat W = B; in multiply()
4489 APFloat U = T; in multiply()
4504 APFloat::opStatus DoubleAPFloat::divide(const DoubleAPFloat &RHS, in divide()
4505 APFloat::roundingMode RM) { in divide()
4507 APFloat Tmp(semPPCDoubleDoubleLegacy, bitcastToAPInt()); in divide()
4509 Tmp.divide(APFloat(semPPCDoubleDoubleLegacy, RHS.bitcastToAPInt()), RM); in divide()
4514 APFloat::opStatus DoubleAPFloat::remainder(const DoubleAPFloat &RHS) { in remainder()
4516 APFloat Tmp(semPPCDoubleDoubleLegacy, bitcastToAPInt()); in remainder()
4518 Tmp.remainder(APFloat(semPPCDoubleDoubleLegacy, RHS.bitcastToAPInt())); in remainder()
4523 APFloat::opStatus DoubleAPFloat::mod(const DoubleAPFloat &RHS) { in mod()
4525 APFloat Tmp(semPPCDoubleDoubleLegacy, bitcastToAPInt()); in mod()
4526 auto Ret = Tmp.mod(APFloat(semPPCDoubleDoubleLegacy, RHS.bitcastToAPInt())); in mod()
4531 APFloat::opStatus
4534 APFloat::roundingMode RM) { in fusedMultiplyAdd()
4536 APFloat Tmp(semPPCDoubleDoubleLegacy, bitcastToAPInt()); in fusedMultiplyAdd()
4538 APFloat(semPPCDoubleDoubleLegacy, Multiplicand.bitcastToAPInt()), in fusedMultiplyAdd()
4539 APFloat(semPPCDoubleDoubleLegacy, Addend.bitcastToAPInt()), RM); in fusedMultiplyAdd()
4544 APFloat::opStatus DoubleAPFloat::roundToIntegral(APFloat::roundingMode RM) { in roundToIntegral()
4546 APFloat Tmp(semPPCDoubleDoubleLegacy, bitcastToAPInt()); in roundToIntegral()
4557 APFloat::cmpResult
4578 APFloat::fltCategory DoubleAPFloat::getCategory() const { in getCategory()
4596 Floats[0] = APFloat(semIEEEdouble, APInt(64, 0x7fefffffffffffffull)); in makeLargest()
4597 Floats[1] = APFloat(semIEEEdouble, APInt(64, 0x7c8ffffffffffffeull)); in makeLargest()
4610 Floats[0] = APFloat(semIEEEdouble, APInt(64, 0x0360000000000000ull)); in makeSmallestNormalized()
4621 APFloat::cmpResult DoubleAPFloat::compare(const DoubleAPFloat &RHS) const { in compare()
4624 if (Result == APFloat::cmpEqual) in compare()
4649 Expected<APFloat::opStatus> DoubleAPFloat::convertFromString(StringRef S, in convertFromString()
4652 APFloat Tmp(semPPCDoubleDoubleLegacy); in convertFromString()
4658 APFloat::opStatus DoubleAPFloat::next(bool nextDown) { in next()
4660 APFloat Tmp(semPPCDoubleDoubleLegacy, bitcastToAPInt()); in next()
4666 APFloat::opStatus
4671 return APFloat(semPPCDoubleDoubleLegacy, bitcastToAPInt()) in convertToInteger()
4675 APFloat::opStatus DoubleAPFloat::convertFromAPInt(const APInt &Input, in convertFromAPInt()
4679 APFloat Tmp(semPPCDoubleDoubleLegacy); in convertFromAPInt()
4685 APFloat::opStatus
4690 APFloat Tmp(semPPCDoubleDoubleLegacy); in convertFromSignExtendedInteger()
4696 APFloat::opStatus
4701 APFloat Tmp(semPPCDoubleDoubleLegacy); in convertFromZeroExtendedInteger()
4712 return APFloat(semPPCDoubleDoubleLegacy, bitcastToAPInt()) in convertToHexString()
4749 APFloat(semPPCDoubleDoubleLegacy, bitcastToAPInt()) in toString()
4753 bool DoubleAPFloat::getExactInverse(APFloat *inv) const { in getExactInverse()
4755 APFloat Tmp(semPPCDoubleDoubleLegacy, bitcastToAPInt()); in getExactInverse()
4758 APFloat Inv(semPPCDoubleDoubleLegacy); in getExactInverse()
4760 *inv = APFloat(semPPCDoubleDouble, Inv.bitcastToAPInt()); in getExactInverse()
4764 DoubleAPFloat scalbn(DoubleAPFloat Arg, int Exp, APFloat::roundingMode RM) { in scalbn()
4771 APFloat::roundingMode RM) { in frexp()
4773 APFloat First = frexp(Arg.Floats[0], Exp, RM); in frexp()
4774 APFloat Second = Arg.Floats[1]; in frexp()
4775 if (Arg.getCategory() == APFloat::fcNormal) in frexp()
4782 APFloat::Storage::Storage(IEEEFloat F, const fltSemantics &Semantics) { in Storage()
4790 DoubleAPFloat(Semantics, APFloat(std::move(F), S), in Storage()
4791 APFloat(semIEEEdouble)); in Storage()
4797 Expected<APFloat::opStatus> APFloat::convertFromString(StringRef Str, in convertFromString()
4802 hash_code hash_value(const APFloat &Arg) { in hash_value()
4803 if (APFloat::usesLayout<detail::IEEEFloat>(Arg.getSemantics())) in hash_value()
4805 if (APFloat::usesLayout<detail::DoubleAPFloat>(Arg.getSemantics())) in hash_value()
4810 APFloat::APFloat(const fltSemantics &Semantics, StringRef S) in APFloat() function in llvm::APFloat
4811 : APFloat(Semantics) { in APFloat()
4817 APFloat::opStatus APFloat::convert(const fltSemantics &ToSemantics, in convert()
4830 *this = APFloat(ToSemantics, U.IEEE.bitcastToAPInt()); in convert()
4836 *this = APFloat(std::move(getIEEE()), ToSemantics); in convert()
4842 APFloat APFloat::getAllOnesValue(const fltSemantics &Semantics, in getAllOnesValue()
4844 return APFloat(Semantics, APInt::getAllOnesValue(BitWidth)); in getAllOnesValue()
4847 void APFloat::print(raw_ostream &OS) const { in print()
4854 LLVM_DUMP_METHOD void APFloat::dump() const { print(dbgs()); } in dump()
4857 void APFloat::Profile(FoldingSetNodeID &NID) const { in Profile()
4865 APFloat::opStatus APFloat::convertToInteger(APSInt &result, in convertToInteger()