diff options
author | Dale Johannesen <dalej@apple.com> | 2009-10-23 04:02:51 +0000 |
---|---|---|
committer | Dale Johannesen <dalej@apple.com> | 2009-10-23 04:02:51 +0000 |
commit | 0d670b5b92fc7bdd4e57473712b54a3bf7460e86 (patch) | |
tree | 106f725f75341d159201138f172f965b9e14eb80 | |
parent | 49c5232d9f1fcd6af0e35f1613fc7fa2ddaba98b (diff) | |
download | bcm5719-llvm-0d670b5b92fc7bdd4e57473712b54a3bf7460e86.tar.gz bcm5719-llvm-0d670b5b92fc7bdd4e57473712b54a3bf7460e86.zip |
Commit fixes for half precision I noted in review, so
they don't get lost; I don't think the originator has
write access.
llvm-svn: 84928
-rw-r--r-- | llvm/lib/Support/APFloat.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Support/APFloat.cpp b/llvm/lib/Support/APFloat.cpp index 361614a8283..7e42e2dac10 100644 --- a/llvm/lib/Support/APFloat.cpp +++ b/llvm/lib/Support/APFloat.cpp @@ -2830,11 +2830,11 @@ APFloat::convertHalfAPFloatToAPInt() const myexponent = 0; mysignificand = 0; } else if (category==fcInfinity) { - myexponent = 0xff; + myexponent = 0x1f; mysignificand = 0; } else { assert(category == fcNaN && "Unknown category!"); - myexponent = 0xff; + myexponent = 0x1f; mysignificand = (uint32_t)*significandParts(); } @@ -3089,7 +3089,7 @@ APFloat::initFromHalfAPInt(const APInt & api) { assert(api.getBitWidth()==16); uint32_t i = (uint32_t)*api.getRawData(); - uint32_t myexponent = (i >> 15) & 0x1f; + uint32_t myexponent = (i >> 10) & 0x1f; uint32_t mysignificand = i & 0x3ff; initialize(&APFloat::IEEEhalf); |