mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-06 06:33:24 +00:00
[APFloat] Rename llvm::exponent_t => llvm::APFloat::ExponentType.
exponent_t is only used internally in APFloat and no exponent_t values are exposed via the APFloat API. In light of such conditions it does not make any sense to gum up the llvm namespace with said type. Plus it makes it clearer that exponent_t is associated with APFloat. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184686 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
cbfa1ca993
commit
db045ab153
@ -21,9 +21,6 @@
|
|||||||
|
|
||||||
namespace llvm {
|
namespace llvm {
|
||||||
|
|
||||||
/// A signed type to represent a floating point numbers unbiased exponent.
|
|
||||||
typedef signed short exponent_t;
|
|
||||||
|
|
||||||
struct fltSemantics;
|
struct fltSemantics;
|
||||||
class APSInt;
|
class APSInt;
|
||||||
class StringRef;
|
class StringRef;
|
||||||
@ -125,6 +122,9 @@ enum lostFraction { // Example of truncated bits:
|
|||||||
class APFloat {
|
class APFloat {
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
/// A signed type to represent a floating point numbers unbiased exponent.
|
||||||
|
typedef signed short ExponentType;
|
||||||
|
|
||||||
/// \name Floating Point Semantics.
|
/// \name Floating Point Semantics.
|
||||||
/// @{
|
/// @{
|
||||||
|
|
||||||
@ -555,7 +555,7 @@ private:
|
|||||||
} significand;
|
} significand;
|
||||||
|
|
||||||
/// The signed unbiased exponent of the value.
|
/// The signed unbiased exponent of the value.
|
||||||
exponent_t exponent;
|
ExponentType exponent;
|
||||||
|
|
||||||
/// What kind of floating point number this is.
|
/// What kind of floating point number this is.
|
||||||
///
|
///
|
||||||
|
@ -38,11 +38,11 @@ namespace llvm {
|
|||||||
struct fltSemantics {
|
struct fltSemantics {
|
||||||
/* The largest E such that 2^E is representable; this matches the
|
/* The largest E such that 2^E is representable; this matches the
|
||||||
definition of IEEE 754. */
|
definition of IEEE 754. */
|
||||||
exponent_t maxExponent;
|
APFloat::ExponentType maxExponent;
|
||||||
|
|
||||||
/* The smallest E such that 2^E is a normalized number; this
|
/* The smallest E such that 2^E is a normalized number; this
|
||||||
matches the definition of IEEE 754. */
|
matches the definition of IEEE 754. */
|
||||||
exponent_t minExponent;
|
APFloat::ExponentType minExponent;
|
||||||
|
|
||||||
/* Number of bits in the significand. This includes the integer
|
/* Number of bits in the significand. This includes the integer
|
||||||
bit. */
|
bit. */
|
||||||
@ -288,9 +288,9 @@ interpretDecimal(StringRef::iterator begin, StringRef::iterator end,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Adjust the exponents for any decimal point. */
|
/* Adjust the exponents for any decimal point. */
|
||||||
D->exponent += static_cast<exponent_t>((dot - p) - (dot > p));
|
D->exponent += static_cast<APFloat::ExponentType>((dot - p) - (dot > p));
|
||||||
D->normalizedExponent = (D->exponent +
|
D->normalizedExponent = (D->exponent +
|
||||||
static_cast<exponent_t>((p - D->firstSigDigit)
|
static_cast<APFloat::ExponentType>((p - D->firstSigDigit)
|
||||||
- (dot > D->firstSigDigit && dot < p)));
|
- (dot > D->firstSigDigit && dot < p)));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1121,7 +1121,7 @@ lostFraction
|
|||||||
APFloat::shiftSignificandRight(unsigned int bits)
|
APFloat::shiftSignificandRight(unsigned int bits)
|
||||||
{
|
{
|
||||||
/* Our exponent should not overflow. */
|
/* Our exponent should not overflow. */
|
||||||
assert((exponent_t) (exponent + bits) >= exponent);
|
assert((ExponentType) (exponent + bits) >= exponent);
|
||||||
|
|
||||||
exponent += bits;
|
exponent += bits;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user