From 0bd282113ba74f44ac01256d6f10a01196823b84 Mon Sep 17 00:00:00 2001 From: Christian Kamm Date: Mon, 6 Oct 2008 21:27:29 +0200 Subject: [PATCH] Simplify fp80 handling in DtoConstFP --- gen/tollvm.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/gen/tollvm.cpp b/gen/tollvm.cpp index 6378f5bd..da1dd525 100644 --- a/gen/tollvm.cpp +++ b/gen/tollvm.cpp @@ -535,13 +535,7 @@ llvm::ConstantFP* DtoConstFP(Type* t, long double value) 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");