mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-07-18 13:15:22 +02:00
More LLVM 3.3 changes.
There is ongoing rework on the AttributeSet class. Also the constructor of APFloat changed.
This commit is contained in:
@@ -675,12 +675,20 @@ LLConstant* DtoConstFP(Type* t, longdouble value)
|
||||
uint64_t bits[] = {0, 0};
|
||||
bits[0] = *reinterpret_cast<uint64_t*>(&value);
|
||||
bits[1] = *reinterpret_cast<uint16_t*>(reinterpret_cast<uint64_t*>(&value) + 1);
|
||||
#if LDC_LLVM_VER >= 303
|
||||
return LLConstantFP::get(gIR->context(), APFloat(APFloat::x87DoubleExtended, APInt(80, 2, bits)));
|
||||
#else
|
||||
return LLConstantFP::get(gIR->context(), APFloat(APInt(80, 2, bits)));
|
||||
#endif
|
||||
} else if(llty == LLType::getPPC_FP128Ty(gIR->context())) {
|
||||
uint64_t bits[] = {0, 0};
|
||||
bits[0] = *reinterpret_cast<uint64_t*>(&value);
|
||||
bits[1] = *reinterpret_cast<uint16_t*>(reinterpret_cast<uint64_t*>(&value) + 1);
|
||||
#if LDC_LLVM_VER >= 303
|
||||
return LLConstantFP::get(gIR->context(), APFloat(APFloat::PPCDoubleDouble, APInt(128, 2, bits)));
|
||||
#else
|
||||
return LLConstantFP::get(gIR->context(), APFloat(APInt(128, 2, bits)));
|
||||
#endif
|
||||
} else {
|
||||
assert(0 && "Unknown floating point type encountered");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user