X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=include%2Fllvm%2FADT%2FAPFloat.h;h=29a89dd06c2d53acc14b42ec1e950f1acef7701a;hb=6de603071879bdc5d7d663826354c24a9d176469;hp=fc5203c546f33d11a014c01d112ab66755623e40;hpb=f25381ed35c345c252da8b8a8ae9af41eef6b35c;p=oota-llvm.git diff --git a/include/llvm/ADT/APFloat.h b/include/llvm/ADT/APFloat.h index fc5203c546f..29a89dd06c2 100644 --- a/include/llvm/ADT/APFloat.h +++ b/include/llvm/ADT/APFloat.h @@ -129,7 +129,7 @@ namespace llvm { static const fltSemantics IEEEquad; static const fltSemantics PPCDoubleDouble; static const fltSemantics x87DoubleExtended; - /* And this psuedo, used to construct APFloats that cannot + /* And this pseudo, used to construct APFloats that cannot conflict with anything real. */ static const fltSemantics Bogus; @@ -191,14 +191,14 @@ namespace llvm { static APFloat getNaN(const fltSemantics &Sem, bool Negative = false) { return APFloat(Sem, fcNaN, Negative); } - + /// Profile - Used to insert APFloat objects, or objects that contain /// APFloat objects, into FoldingSets. void Profile(FoldingSetNodeID& NID) const; - + /// @brief Used by the Bitcode serializer to emit APInts to Bitcode. void Emit(Serializer& S) const; - + /// @brief Used by the Bitcode deserializer to deserialize APInts. static APFloat ReadVal(Deserializer& D); @@ -207,6 +207,9 @@ namespace llvm { opStatus subtract(const APFloat &, roundingMode); opStatus multiply(const APFloat &, roundingMode); opStatus divide(const APFloat &, roundingMode); + /* IEEE remainder. */ + opStatus remainder(const APFloat &); + /* C fmod, or llvm frem. */ opStatus mod(const APFloat &, roundingMode); opStatus fusedMultiplyAdd(const APFloat &, const APFloat &, roundingMode); @@ -216,9 +219,9 @@ namespace llvm { void copySign(const APFloat &); /* Conversions. */ - opStatus convert(const fltSemantics &, roundingMode); + opStatus convert(const fltSemantics &, roundingMode, bool *); opStatus convertToInteger(integerPart *, unsigned int, bool, - roundingMode) const; + roundingMode, bool *) const; opStatus convertFromAPInt(const APInt &, bool, roundingMode); opStatus convertFromSignExtendedInteger(const integerPart *, unsigned int, @@ -226,7 +229,7 @@ namespace llvm { opStatus convertFromZeroExtendedInteger(const integerPart *, unsigned int, bool, roundingMode); opStatus convertFromString(const char *, roundingMode); - APInt convertToAPInt() const; + APInt bitcastToAPInt() const; double convertToDouble() const; float convertToFloat() const; @@ -239,6 +242,9 @@ namespace llvm { compare unordered, 0==-0). */ cmpResult compare(const APFloat &) const; + /* Bitwise comparison for equality (QNaNs compare equal, 0!=-0). */ + bool bitwiseIsEqual(const APFloat &) const; + /* Write out a hexadecimal representation of the floating point value to DST, which must be of sufficient size, in the C99 form [-]0xh.hhhhp[+-]d. Return the number of characters written, @@ -246,9 +252,6 @@ namespace llvm { unsigned int convertToHexString(char *dst, unsigned int hexDigits, bool upperCase, roundingMode) const; - /* Bitwise comparison for equality (QNaNs compare equal, 0!=-0). */ - bool bitwiseIsEqual(const APFloat &) const; - /* Simple queries. */ fltCategory getCategory() const { return category; } const fltSemantics &getSemantics() const { return *semantics; } @@ -290,6 +293,7 @@ namespace llvm { opStatus addOrSubtractSpecials(const APFloat &, bool subtract); opStatus divideSpecials(const APFloat &); opStatus multiplySpecials(const APFloat &); + opStatus modSpecials(const APFloat &); /* Miscellany. */ void makeNaN(void); @@ -299,7 +303,7 @@ namespace llvm { opStatus handleOverflow(roundingMode); bool roundAwayFromZero(roundingMode, lostFraction, unsigned int) const; opStatus convertToSignExtendedInteger(integerPart *, unsigned int, bool, - roundingMode) const; + roundingMode, bool *) const; opStatus convertFromUnsignedParts(const integerPart *, unsigned int, roundingMode); opStatus convertFromHexadecimalString(const char *, roundingMode);