mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-03 16:41:06 +03:00
Merge branch 'ltsmaster'
This commit is contained in:
commit
dcb781004b
14 changed files with 80 additions and 22 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue