Mercurial > projects > ldc
changeset 661:99f32e967746
Simplify fp80 handling in DtoConstFP
author | Christian Kamm <kamm incasoftware de> |
---|---|
date | Mon, 06 Oct 2008 21:27:29 +0200 |
parents | d6b71647b622 |
children | 88e23f8c2354 |
files | gen/tollvm.cpp |
diffstat | 1 files changed, 1 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/gen/tollvm.cpp Mon Oct 06 16:39:47 2008 +0200 +++ b/gen/tollvm.cpp Mon Oct 06 21:27:29 2008 +0200 @@ -535,13 +535,7 @@ else if(llty == LLType::X86_FP80Ty) { uint64_t bits[] = {0, 0}; bits[1] = *(uint16_t*)&value; - bits[0] = *((uint16_t*)&value + 4); - bits[0] <<= 16; - bits[0] += *((uint16_t*)&value + 3); - bits[0] <<= 16; - bits[0] += *((uint16_t*)&value + 2); - bits[0] <<= 16; - bits[0] += *((uint16_t*)&value + 1); + bits[0] = *(uint64_t*)((uint16_t*)&value + 1); return LLConstantFP::get(APFloat(APInt(80, 2, bits))); } else { assert(0 && "Unknown floating point type encountered");