Merge branch 'ltsmaster'

This commit is contained in:
Kai Nacke 2016-03-03 07:50:17 +01:00
commit dcb781004b
14 changed files with 80 additions and 22 deletions

View file

@ -63,7 +63,9 @@ LLAttribute DtoShouldExtend(Type *type) {
case Tuns8:
case Tuns16:
return LLAttribute::ZExt;
case Tchar:
case Twchar:
return LLAttribute::ZExt;
default:
// Do not extend.
@ -410,6 +412,15 @@ LLConstant *DtoConstFP(Type *t, longdouble value) {
return LLConstantFP::get(gIR->context(), APFloat(APFloat::x87DoubleExtended,
APInt(80, 2, bits)));
}
if (llty == LLType::getFP128Ty(gIR->context())) {
union {
longdouble ld;
uint64_t bits[2];
} t;
t.ld = value;
return LLConstantFP::get(
gIR->context(), APFloat(APFloat::IEEEquad, APInt(128, 2, t.bits)));
}
if (llty == LLType::getPPC_FP128Ty(gIR->context())) {
uint64_t bits[] = {0, 0};
bits[0] = *reinterpret_cast<uint64_t *>(&value);