aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/ADT/APFloat.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-10-16 02:13:51 +0000
committerChris Lattner <sabre@nondot.org>2009-10-16 02:13:51 +0000
commitcc4287a374a33fb03ef41b92f74783e31ef47650 (patch)
tree6e0ef91ec8913e34be23c1d48b957036ed1cf59d /include/llvm/ADT/APFloat.h
parenta43fc3452b4c5a853054b6b671eacbdd05039130 (diff)
downloadexternal_llvm-cc4287a374a33fb03ef41b92f74783e31ef47650.zip
external_llvm-cc4287a374a33fb03ef41b92f74783e31ef47650.tar.gz
external_llvm-cc4287a374a33fb03ef41b92f74783e31ef47650.tar.bz2
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
Diffstat (limited to 'include/llvm/ADT/APFloat.h')
-rw-r--r--include/llvm/ADT/APFloat.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/llvm/ADT/APFloat.h b/include/llvm/ADT/APFloat.h
index 4d7e7ae..30d998f 100644
--- a/include/llvm/ADT/APFloat.h
+++ b/include/llvm/ADT/APFloat.h
@@ -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);