llvm.org GIT mirror llvm / fce241d
APFloat cleanup: Remove now unused fields "sign2" and "exponent2". git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166952 91177308-0d34-0410-b5e6-96231b3b80d8 Ulrich Weigand 6 years ago
2 changed file(s) with 9 addition(s) and 28 deletion(s). Raw diff Collapse all Expand all
454454
455455 /* The sign bit of this number. */
456456 unsigned int sign: 1;
457
458 /* For PPCDoubleDouble, we have a second exponent and sign (the second
459 significand is appended to the first one, although it would be wrong to
460 regard these as a single number for arithmetic purposes). These fields
461 are not meaningful for any other type. */
462 exponent_t exponent2 : 11;
463 unsigned int sign2: 1;
464457 };
465458 } /* namespace llvm */
466459
620620 sign = rhs.sign;
621621 category = rhs.category;
622622 exponent = rhs.exponent;
623 sign2 = rhs.sign2;
624 exponent2 = rhs.exponent2;
625623 if (category == fcNormal || category == fcNaN)
626624 copySignificand(rhs);
627625 }
715713 category != rhs.category ||
716714 sign != rhs.sign)
717715 return false;
718 if (semantics==(const llvm::fltSemantics*)&PPCDoubleDouble &&
719 sign2 != rhs.sign2)
720 return false;
721716 if (category==fcZero || category==fcInfinity)
722717 return true;
723718 else if (category==fcNormal && exponent!=rhs.exponent)
724 return false;
725 else if (semantics==(const llvm::fltSemantics*)&PPCDoubleDouble &&
726 exponent2!=rhs.exponent2)
727719 return false;
728720 else {
729721 int i= partCount();
737729 }
738730 }
739731
740 APFloat::APFloat(const fltSemantics &ourSemantics, integerPart value)
741 : exponent2(0), sign2(0) {
732 APFloat::APFloat(const fltSemantics &ourSemantics, integerPart value) {
742733 assertArithmeticOK(ourSemantics);
743734 initialize(&ourSemantics);
744735 sign = 0;
748739 normalize(rmNearestTiesToEven, lfExactlyZero);
749740 }
750741
751 APFloat::APFloat(const fltSemantics &ourSemantics) : exponent2(0), sign2(0) {
742 APFloat::APFloat(const fltSemantics &ourSemantics) {
752743 assertArithmeticOK(ourSemantics);
753744 initialize(&ourSemantics);
754745 category = fcZero;
755746 sign = false;
756747 }
757748
758 APFloat::APFloat(const fltSemantics &ourSemantics, uninitializedTag tag)
759 : exponent2(0), sign2(0) {
749 APFloat::APFloat(const fltSemantics &ourSemantics, uninitializedTag tag) {
760750 assertArithmeticOK(ourSemantics);
761751 // Allocates storage if necessary but does not initialize it.
762752 initialize(&ourSemantics);
763753 }
764754
765755 APFloat::APFloat(const fltSemantics &ourSemantics,
766 fltCategory ourCategory, bool negative)
767 : exponent2(0), sign2(0) {
756 fltCategory ourCategory, bool negative) {
768757 assertArithmeticOK(ourSemantics);
769758 initialize(&ourSemantics);
770759 category = ourCategory;
775764 makeNaN();
776765 }
777766
778 APFloat::APFloat(const fltSemantics &ourSemantics, StringRef text)
779 : exponent2(0), sign2(0) {
767 APFloat::APFloat(const fltSemantics &ourSemantics, StringRef text) {
780768 assertArithmeticOK(ourSemantics);
781769 initialize(&ourSemantics);
782770 convertFromString(text, rmNearestTiesToEven);
783771 }
784772
785 APFloat::APFloat(const APFloat &rhs) : exponent2(0), sign2(0) {
773 APFloat::APFloat(const APFloat &rhs) {
786774 initialize(rhs.semantics);
787775 assign(rhs);
788776 }
32993287 return Val;
33003288 }
33013289
3302 APFloat::APFloat(const APInt& api, bool isIEEE) : exponent2(0), sign2(0) {
3290 APFloat::APFloat(const APInt& api, bool isIEEE) {
33033291 initFromAPInt(api, isIEEE);
33043292 }
33053293
3306 APFloat::APFloat(float f) : exponent2(0), sign2(0) {
3294 APFloat::APFloat(float f) {
33073295 initFromAPInt(APInt::floatToBits(f));
33083296 }
33093297
3310 APFloat::APFloat(double d) : exponent2(0), sign2(0) {
3298 APFloat::APFloat(double d) {
33113299 initFromAPInt(APInt::doubleToBits(d));
33123300 }
33133301