LLVM  6.0.0svn
Classes | Namespaces | Macros | Functions | Variables
APFloat.cpp File Reference
#include "llvm/ADT/APFloat.h"
#include "llvm/ADT/APSInt.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/FoldingSet.h"
#include "llvm/ADT/Hashing.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/Support/raw_ostream.h"
#include <cstring>
#include <limits.h>
Include dependency graph for APFloat.cpp:

Go to the source code of this file.


struct  llvm::fltSemantics
struct  llvm::decimalInfo


 Compute iterated dominance frontiers using a linear time algorithm.
 Implementation details of the pass manager interfaces.


#define PackCategoriesIntoKey(_lhs, _rhs)   ((_lhs) * 4 + (_rhs))
 A macro used to combine two fcCategory enums into one key which can be used in a switch statement to classify how the interaction of two APFloat's categories affects an operation. More...


static unsigned int llvm::partCountForBits (unsigned int bits)
static unsigned int llvm::decDigitValue (unsigned int c)
static int llvm::readExponent (StringRef::iterator begin, StringRef::iterator end)
static int llvm::totalExponent (StringRef::iterator p, StringRef::iterator end, int exponentAdjustment)
static StringRef::iterator llvm::skipLeadingZeroesAndAnyDot (StringRef::iterator begin, StringRef::iterator end, StringRef::iterator *dot)
static void llvm::interpretDecimal (StringRef::iterator begin, StringRef::iterator end, decimalInfo *D)
static lostFraction llvm::trailingHexadecimalFraction (StringRef::iterator p, StringRef::iterator end, unsigned int digitValue)
static lostFraction llvm::lostFractionThroughTruncation (const APFloatBase::integerPart *parts, unsigned int partCount, unsigned int bits)
static lostFraction llvm::shiftRight (APFloatBase::integerPart *dst, unsigned int parts, unsigned int bits)
static lostFraction llvm::combineLostFractions (lostFraction moreSignificant, lostFraction lessSignificant)
static unsigned int llvm::HUerrBound (bool inexactMultiply, unsigned int HUerr1, unsigned int HUerr2)
static APFloatBase::integerPart llvm::ulpsFromBoundary (const APFloatBase::integerPart *parts, unsigned int bits, bool isNearest)
static unsigned int llvm::powerOf5 (APFloatBase::integerPart *dst, unsigned int power)
static unsigned int llvm::partAsHex (char *dst, APFloatBase::integerPart part, unsigned int count, const char *hexDigitChars)
static charllvm::writeUnsignedDecimal (char *dst, unsigned int n)
static charllvm::writeSignedDecimal (char *dst, int value)
hash_code llvm::detail::hash_value (const IEEEFloat &Arg)
int llvm::detail::ilogb (const IEEEFloat &Arg)
IEEEFloat llvm::detail::scalbn (IEEEFloat X, int Exp, IEEEFloat::roundingMode)
IEEEFloat llvm::detail::frexp (const IEEEFloat &Val, int &Exp, IEEEFloat::roundingMode RM)
hash_code llvm::detail::hash_value (const DoubleAPFloat &Arg)
DoubleAPFloat llvm::detail::scalbn (DoubleAPFloat Arg, int Exp, APFloat::roundingMode RM)
DoubleAPFloat llvm::detail::frexp (const DoubleAPFloat &Arg, int &Exp, APFloat::roundingMode RM)
hash_code llvm::hash_value (const APFloat &Arg)
 See friend declarations above. More...


static const fltSemantics llvm::semIEEEhalf = {15, -14, 11, 16}
static const fltSemantics llvm::semIEEEsingle = {127, -126, 24, 32}
static const fltSemantics llvm::semIEEEdouble = {1023, -1022, 53, 64}
static const fltSemantics llvm::semIEEEquad = {16383, -16382, 113, 128}
static const fltSemantics llvm::semX87DoubleExtended = {16383, -16382, 64, 80}
static const fltSemantics llvm::semBogus = {0, 0, 0, 0}
static const fltSemantics llvm::semPPCDoubleDouble = {-1, 0, 0, 0}
static const fltSemantics llvm::semPPCDoubleDoubleLegacy
const unsigned int llvm::maxExponent = 16383
const unsigned int llvm::maxPrecision = 113
const unsigned int llvm::maxPowerOfFiveExponent = maxExponent + maxPrecision - 1
const unsigned int llvm::maxPowerOfFiveParts = 2 + ((maxPowerOfFiveExponent * 815) / (351 * APFloatBase::integerPartWidth))
static const char llvm::hexDigitsLower [] = "0123456789abcdef0"
static const char llvm::hexDigitsUpper [] = "0123456789ABCDEF0"
static const char llvm::infinityL [] = "infinity"
static const char llvm::infinityU [] = "INFINITY"
static const char llvm::NaNL [] = "nan"
static const char llvm::NaNU [] = "NAN"

Macro Definition Documentation


do { \
if (usesLayout<IEEEFloat>(getSemantics())) \
if (usesLayout<DoubleAPFloat>(getSemantics())) \
return U.Double.METHOD_CALL; \
llvm_unreachable("Unexpected semantics"); \
} while (false)

Definition at line 29 of file APFloat.cpp.

Referenced by llvm::APFloat::convertFromString().

◆ PackCategoriesIntoKey

#define PackCategoriesIntoKey (   _lhs,
)    ((_lhs) * 4 + (_rhs))

A macro used to combine two fcCategory enums into one key which can be used in a switch statement to classify how the interaction of two APFloat's categories affects an operation.

TODO: If clang source code is ever allowed to use constexpr in its own codebase, change this into a static inline function.

Definition at line 46 of file APFloat.cpp.

Referenced by llvm::detail::IEEEFloat::compare(), and llvm::detail::IEEEFloat::compareAbsoluteValue().