Mercurial > projects > ldc
comparison gen/tollvm.cpp @ 1347:3647bef175d7
Remove some other code that tested for LLVM before r67588.
author | Frits van Bommel <fvbommel wxs.nl> |
---|---|
date | Tue, 12 May 2009 16:02:51 +0200 |
parents | c74dfdcc5043 |
children | 45aca7e7cc88 |
comparison
equal
deleted
inserted
replaced
1346:6f4154b318ef | 1347:3647bef175d7 |
---|---|
541 | 541 |
542 if(llty == LLType::FloatTy || llty == LLType::DoubleTy) | 542 if(llty == LLType::FloatTy || llty == LLType::DoubleTy) |
543 return LLConstantFP::get(llty, value); | 543 return LLConstantFP::get(llty, value); |
544 else if(llty == LLType::X86_FP80Ty) { | 544 else if(llty == LLType::X86_FP80Ty) { |
545 uint64_t bits[] = {0, 0}; | 545 uint64_t bits[] = {0, 0}; |
546 #if LLVM_REV < 67562 | |
547 // Prior to r67562, the i80 APInt format expected by the APFloat | |
548 // constructor was different than the memory layout on the actual | |
549 // processor. | |
550 bits[1] = *(uint16_t*)&value; | |
551 bits[0] = *(uint64_t*)((uint16_t*)&value + 1); | |
552 #else | |
553 bits[0] = *(uint64_t*)&value; | 546 bits[0] = *(uint64_t*)&value; |
554 bits[1] = *(uint16_t*)((uint64_t*)&value + 1); | 547 bits[1] = *(uint16_t*)((uint64_t*)&value + 1); |
555 #endif | |
556 return LLConstantFP::get(APFloat(APInt(80, 2, bits))); | 548 return LLConstantFP::get(APFloat(APInt(80, 2, bits))); |
557 } else { | 549 } else { |
558 assert(0 && "Unknown floating point type encountered"); | 550 assert(0 && "Unknown floating point type encountered"); |
559 } | 551 } |
560 } | 552 } |