1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00

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
This commit is contained in:
Dale Johannesen 2009-10-23 04:02:51 +00:00
parent 7d48a41864
commit 3f91e235b8

View File

@ -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);