@@ -460,12 +460,6 @@ class IEEEFloat final {
460460 LLVM_ABI opStatus convertToInteger (MutableArrayRef<integerPart>, unsigned int ,
461461 bool , roundingMode, bool *) const ;
462462 LLVM_ABI opStatus convertFromAPInt (const APInt &, bool , roundingMode);
463- LLVM_ABI opStatus convertFromSignExtendedInteger (const integerPart *,
464- unsigned int , bool ,
465- roundingMode);
466- LLVM_ABI opStatus convertFromZeroExtendedInteger (const integerPart *,
467- unsigned int , bool ,
468- roundingMode);
469463 LLVM_ABI Expected<opStatus> convertFromString (StringRef, roundingMode);
470464 LLVM_ABI APInt bitcastToAPInt () const ;
471465 LLVM_ABI double convertToDouble () const ;
@@ -805,6 +799,16 @@ class DoubleAPFloat final {
805799 unsigned int Width, bool IsSigned,
806800 roundingMode RM, bool *IsExact) const ;
807801
802+ // Convert an unsigned integer Src to a floating point number,
803+ // rounding according to RM. The sign of the floating point number is not
804+ // modified.
805+ opStatus convertFromUnsignedParts (const integerPart *Src,
806+ unsigned int SrcCount, roundingMode RM);
807+
808+ // Handle overflow. Sign is preserved. We either become infinity or
809+ // the largest finite number.
810+ opStatus handleOverflow (roundingMode RM);
811+
808812public:
809813 LLVM_ABI DoubleAPFloat (const fltSemantics &S);
810814 LLVM_ABI DoubleAPFloat (const fltSemantics &S, uninitializedTag);
@@ -860,14 +864,6 @@ class DoubleAPFloat final {
860864 roundingMode RM, bool *IsExact) const ;
861865 LLVM_ABI opStatus convertFromAPInt (const APInt &Input, bool IsSigned,
862866 roundingMode RM);
863- LLVM_ABI opStatus convertFromSignExtendedInteger (const integerPart *Input,
864- unsigned int InputSize,
865- bool IsSigned,
866- roundingMode RM);
867- LLVM_ABI opStatus convertFromZeroExtendedInteger (const integerPart *Input,
868- unsigned int InputSize,
869- bool IsSigned,
870- roundingMode RM);
871867 LLVM_ABI unsigned int convertToHexString (char *DST, unsigned int HexDigits,
872868 bool UpperCase,
873869 roundingMode RM) const ;
@@ -1344,22 +1340,15 @@ class APFloat : public APFloatBase {
13441340 // the precision of the conversion.
13451341 LLVM_ABI opStatus convertToInteger (APSInt &Result, roundingMode RM,
13461342 bool *IsExact) const ;
1343+
1344+ // Convert a two's complement integer Input to a floating point number,
1345+ // rounding according to RM. IsSigned is true if the integer is signed,
1346+ // in which case it must be sign-extended.
13471347 opStatus convertFromAPInt (const APInt &Input, bool IsSigned,
13481348 roundingMode RM) {
13491349 APFLOAT_DISPATCH_ON_SEMANTICS (convertFromAPInt (Input, IsSigned, RM));
13501350 }
1351- opStatus convertFromSignExtendedInteger (const integerPart *Input,
1352- unsigned int InputSize, bool IsSigned,
1353- roundingMode RM) {
1354- APFLOAT_DISPATCH_ON_SEMANTICS (
1355- convertFromSignExtendedInteger (Input, InputSize, IsSigned, RM));
1356- }
1357- opStatus convertFromZeroExtendedInteger (const integerPart *Input,
1358- unsigned int InputSize, bool IsSigned,
1359- roundingMode RM) {
1360- APFLOAT_DISPATCH_ON_SEMANTICS (
1361- convertFromZeroExtendedInteger (Input, InputSize, IsSigned, RM));
1362- }
1351+
13631352 LLVM_ABI Expected<opStatus> convertFromString (StringRef, roundingMode);
13641353 APInt bitcastToAPInt () const {
13651354 APFLOAT_DISPATCH_ON_SEMANTICS (bitcastToAPInt ());
0 commit comments