@@ -460,12 +460,6 @@ class IEEEFloat final {
460
460
LLVM_ABI opStatus convertToInteger (MutableArrayRef<integerPart>, unsigned int ,
461
461
bool , roundingMode, bool *) const ;
462
462
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);
469
463
LLVM_ABI Expected<opStatus> convertFromString (StringRef, roundingMode);
470
464
LLVM_ABI APInt bitcastToAPInt () const ;
471
465
LLVM_ABI double convertToDouble () const ;
@@ -805,6 +799,16 @@ class DoubleAPFloat final {
805
799
unsigned int Width, bool IsSigned,
806
800
roundingMode RM, bool *IsExact) const ;
807
801
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
+
808
812
public:
809
813
LLVM_ABI DoubleAPFloat (const fltSemantics &S);
810
814
LLVM_ABI DoubleAPFloat (const fltSemantics &S, uninitializedTag);
@@ -860,14 +864,6 @@ class DoubleAPFloat final {
860
864
roundingMode RM, bool *IsExact) const ;
861
865
LLVM_ABI opStatus convertFromAPInt (const APInt &Input, bool IsSigned,
862
866
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);
871
867
LLVM_ABI unsigned int convertToHexString (char *DST, unsigned int HexDigits,
872
868
bool UpperCase,
873
869
roundingMode RM) const ;
@@ -1344,22 +1340,15 @@ class APFloat : public APFloatBase {
1344
1340
// the precision of the conversion.
1345
1341
LLVM_ABI opStatus convertToInteger (APSInt &Result, roundingMode RM,
1346
1342
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.
1347
1347
opStatus convertFromAPInt (const APInt &Input, bool IsSigned,
1348
1348
roundingMode RM) {
1349
1349
APFLOAT_DISPATCH_ON_SEMANTICS (convertFromAPInt (Input, IsSigned, RM));
1350
1350
}
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
+
1363
1352
LLVM_ABI Expected<opStatus> convertFromString (StringRef, roundingMode);
1364
1353
APInt bitcastToAPInt () const {
1365
1354
APFLOAT_DISPATCH_ON_SEMANTICS (bitcastToAPInt ());
0 commit comments