Add half precision floating point support (float16) to APFloat,

patch by Peter Johnson! (PR5195)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84239 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2009-10-16 02:13:51 +00:00
parent a43fc3452b
commit cc4287a374
2 changed files with 72 additions and 1 deletions

View File

@@ -125,6 +125,7 @@ namespace llvm {
public:
/* We support the following floating point semantics. */
static const fltSemantics IEEEhalf;
static const fltSemantics IEEEsingle;
static const fltSemantics IEEEdouble;
static const fltSemantics IEEEquad;
@@ -321,12 +322,14 @@ namespace llvm {
opStatus roundSignificandWithExponent(const integerPart *, unsigned int,
int, roundingMode);
APInt convertHalfAPFloatToAPInt() const;
APInt convertFloatAPFloatToAPInt() const;
APInt convertDoubleAPFloatToAPInt() const;
APInt convertQuadrupleAPFloatToAPInt() const;
APInt convertF80LongDoubleAPFloatToAPInt() const;
APInt convertPPCDoubleDoubleAPFloatToAPInt() const;
void initFromAPInt(const APInt& api, bool isIEEE = false);
void initFromHalfAPInt(const APInt& api);
void initFromFloatAPInt(const APInt& api);
void initFromDoubleAPInt(const APInt& api);
void initFromQuadrupleAPInt(const APInt &api);