mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-11 18:33:14 +01:00
Merge branch 'master' into merge-2.061-2
This commit is contained in:
@@ -207,35 +207,35 @@ static void LLVM_D_BuildRuntimeModule()
|
||||
llvm::AttributeSet
|
||||
NoAttrs,
|
||||
Attr_NoAlias
|
||||
= NoAttrs.addAttr(gIR->context(), 0, llvm::Attribute::get(gIR->context(), llvm::AttrBuilder().addAttribute(llvm::Attribute::NoAlias))),
|
||||
= NoAttrs.addAttribute(gIR->context(), 0, llvm::Attribute::NoAlias),
|
||||
Attr_NoUnwind
|
||||
= NoAttrs.addAttr(gIR->context(), ~0U, llvm::Attribute::get(gIR->context(), llvm::AttrBuilder().addAttribute(llvm::Attribute::NoUnwind))),
|
||||
= NoAttrs.addAttribute(gIR->context(), ~0U, llvm::Attribute::NoUnwind),
|
||||
Attr_ReadOnly
|
||||
= NoAttrs.addAttr(gIR->context(), ~0U, llvm::Attribute::get(gIR->context(), llvm::AttrBuilder().addAttribute(llvm::Attribute::ReadOnly))),
|
||||
= NoAttrs.addAttribute(gIR->context(), ~0U, llvm::Attribute::ReadOnly),
|
||||
Attr_ReadOnly_NoUnwind
|
||||
= Attr_ReadOnly.addAttr(gIR->context(), ~0U, llvm::Attribute::get(gIR->context(), llvm::AttrBuilder().addAttribute(llvm::Attribute::NoUnwind))),
|
||||
= Attr_ReadOnly.addAttribute(gIR->context(), ~0U, llvm::Attribute::NoUnwind),
|
||||
Attr_ReadOnly_1_NoCapture
|
||||
= Attr_ReadOnly.addAttr(gIR->context(), 1, llvm::Attribute::get(gIR->context(), llvm::AttrBuilder().addAttribute(llvm::Attribute::NoCapture))),
|
||||
= Attr_ReadOnly.addAttribute(gIR->context(), 1, llvm::Attribute::NoCapture),
|
||||
Attr_ReadOnly_1_3_NoCapture
|
||||
= Attr_ReadOnly_1_NoCapture.addAttr(gIR->context(), 3, llvm::Attribute::get(gIR->context(), llvm::AttrBuilder().addAttribute(llvm::Attribute::NoCapture))),
|
||||
= Attr_ReadOnly_1_NoCapture.addAttribute(gIR->context(), 3, llvm::Attribute::NoCapture),
|
||||
Attr_ReadOnly_NoUnwind_1_NoCapture
|
||||
= Attr_ReadOnly_1_NoCapture.addAttr(gIR->context(), ~0U, llvm::Attribute::get(gIR->context(), llvm::AttrBuilder().addAttribute(llvm::Attribute::NoUnwind))),
|
||||
= Attr_ReadOnly_1_NoCapture.addAttribute(gIR->context(), ~0U, llvm::Attribute::NoUnwind),
|
||||
Attr_ReadNone
|
||||
= NoAttrs.addAttr(gIR->context(), ~0U, llvm::Attribute::get(gIR->context(), llvm::AttrBuilder().addAttribute(llvm::Attribute::ReadNone))),
|
||||
= NoAttrs.addAttribute(gIR->context(), ~0U, llvm::Attribute::ReadNone),
|
||||
Attr_1_NoCapture
|
||||
= NoAttrs.addAttr(gIR->context(), 1, llvm::Attribute::get(gIR->context(), llvm::AttrBuilder().addAttribute(llvm::Attribute::NoCapture))),
|
||||
= NoAttrs.addAttribute(gIR->context(), 1, llvm::Attribute::NoCapture),
|
||||
Attr_NoAlias_1_NoCapture
|
||||
= Attr_1_NoCapture.addAttr(gIR->context(), 0, llvm::Attribute::get(gIR->context(), llvm::AttrBuilder().addAttribute(llvm::Attribute::NoAlias))),
|
||||
= Attr_1_NoCapture.addAttribute(gIR->context(), 0, llvm::Attribute::NoAlias),
|
||||
#if DMDV1
|
||||
Attr_NoAlias_3_NoCapture
|
||||
= Attr_NoAlias.addAttr(gIR->context(), 3, llvm::Attribute::get(gIR->context(), llvm::AttrBuilder().addAttribute(llvm::Attribute::NoCapture))),
|
||||
= Attr_NoAlias.addAttribute(gIR->context(), 3, llvm::Attribute::NoCapture),
|
||||
#endif
|
||||
Attr_1_2_NoCapture
|
||||
= Attr_1_NoCapture.addAttr(gIR->context(), 2, llvm::Attribute::get(gIR->context(), llvm::AttrBuilder().addAttribute(llvm::Attribute::NoCapture))),
|
||||
= Attr_1_NoCapture.addAttribute(gIR->context(), 2, llvm::Attribute::NoCapture),
|
||||
Attr_1_3_NoCapture
|
||||
= Attr_1_NoCapture.addAttr(gIR->context(), 3, llvm::Attribute::get(gIR->context(), llvm::AttrBuilder().addAttribute(llvm::Attribute::NoCapture))),
|
||||
= Attr_1_NoCapture.addAttribute(gIR->context(), 3, llvm::Attribute::NoCapture),
|
||||
Attr_1_4_NoCapture
|
||||
= Attr_1_NoCapture.addAttr(gIR->context(), 4, llvm::Attribute::get(gIR->context(), llvm::AttrBuilder().addAttribute(llvm::Attribute::NoCapture)));
|
||||
= Attr_1_NoCapture.addAttribute(gIR->context(), 4, llvm::Attribute::NoCapture);
|
||||
#elif LDC_LLVM_VER == 302
|
||||
llvm::AttrListPtr
|
||||
NoAttrs,
|
||||
|
||||
@@ -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