aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/ADT/APFloat.h
diff options
context:
space:
mode:
authorDale Johannesen <dalej@apple.com>2007-10-11 18:07:22 +0000
committerDale Johannesen <dalej@apple.com>2007-10-11 18:07:22 +0000
commit2aef569811b24bf254b27cab0f6307c2c8d27d17 (patch)
tree5585aa5c69106bf208bebbc089dccd54bd09154b /include/llvm/ADT/APFloat.h
parent6ad3bd1689f2fc9732c982a8b8429b82856858fd (diff)
downloadexternal_llvm-2aef569811b24bf254b27cab0f6307c2c8d27d17.zip
external_llvm-2aef569811b24bf254b27cab0f6307c2c8d27d17.tar.gz
external_llvm-2aef569811b24bf254b27cab0f6307c2c8d27d17.tar.bz2
Next PPC long double bits. First cut at constants.
No compile-time support for constant operations yet, just format transformations. Make readers and writers work. Split constants into 2 doubles in Legalize. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42865 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/ADT/APFloat.h')
-rw-r--r--include/llvm/ADT/APFloat.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/include/llvm/ADT/APFloat.h b/include/llvm/ADT/APFloat.h
index f5511f4..38d110d 100644
--- a/include/llvm/ADT/APFloat.h
+++ b/include/llvm/ADT/APFloat.h
@@ -126,6 +126,7 @@ namespace llvm {
static const fltSemantics IEEEsingle;
static const fltSemantics IEEEdouble;
static const fltSemantics IEEEquad;
+ static const fltSemantics PPCDoubleDouble;
static const fltSemantics x87DoubleExtended;
/* And this psuedo, used to construct APFloats that cannot
conflict with anything real. */
@@ -175,7 +176,7 @@ namespace llvm {
APFloat(const fltSemantics &, fltCategory, bool negative);
explicit APFloat(double d);
explicit APFloat(float f);
- explicit APFloat(const APInt &);
+ explicit APFloat(const APInt &, bool isIEEE = false);
APFloat(const APFloat &);
~APFloat();
@@ -276,10 +277,12 @@ namespace llvm {
APInt convertFloatAPFloatToAPInt() const;
APInt convertDoubleAPFloatToAPInt() const;
APInt convertF80LongDoubleAPFloatToAPInt() const;
- void initFromAPInt(const APInt& api);
+ APInt convertPPCDoubleDoubleAPFloatToAPInt() const;
+ void initFromAPInt(const APInt& api, bool isIEEE = false);
void initFromFloatAPInt(const APInt& api);
void initFromDoubleAPInt(const APInt& api);
void initFromF80LongDoubleAPInt(const APInt& api);
+ void initFromPPCDoubleDoubleAPInt(const APInt& api);
void assign(const APFloat &);
void copySignificand(const APFloat &);
@@ -306,6 +309,13 @@ namespace llvm {
/* The sign bit of this number. */
unsigned int sign: 1;
+
+ /* For PPCDoubleDouble, we have a second exponent and sign (the second
+ significand is appended to the first one, although it would be wrong to
+ regard these as a single number for arithmetic purposes). These fields
+ are not meaningful for any other type. */
+ exponent_t exponent2 : 11;
+ unsigned int sign2: 1;
};
} /* namespace llvm */