# HG changeset patch # User Christian Kamm # Date 1223321249 -7200 # Node ID 99f32e96774681c48ed1992037034414b054f90a # Parent d6b71647b6229c0dd8a6b788f0cfc1d6542ba731 Simplify fp80 handling in DtoConstFP diff -r d6b71647b622 -r 99f32e967746 gen/tollvm.cpp --- 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");