mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-05 01:20:51 +03:00
- Fixed x86-32 C ABI for complex number return values.
- Removed unused code from the ABI class.
This commit is contained in:
parent
757601af09
commit
61dfb11bc5
7 changed files with 110 additions and 36 deletions
|
@ -392,6 +392,8 @@ LLValue* DtoNestedContext(Loc loc, Dsymbol* sym)
|
|||
// ASSIGNMENT HELPER (store this in that)
|
||||
////////////////////////////////////////////////////////////////////////////////////////*/
|
||||
|
||||
// is this a good approach at all ?
|
||||
|
||||
void DtoAssign(Loc& loc, DValue* lhs, DValue* rhs)
|
||||
{
|
||||
Logger::println("DtoAssign(...);\n");
|
||||
|
@ -402,7 +404,7 @@ void DtoAssign(Loc& loc, DValue* lhs, DValue* rhs)
|
|||
|
||||
if (t->ty == Tstruct) {
|
||||
if (!t->equals(t2)) {
|
||||
// TODO: fix this, use 'rhs' for something
|
||||
// FIXME: use 'rhs' for something !?!
|
||||
DtoAggrZeroInit(lhs->getLVal());
|
||||
}
|
||||
else {
|
||||
|
@ -476,7 +478,7 @@ void DtoAssign(Loc& loc, DValue* lhs, DValue* rhs)
|
|||
DtoStore(r, l);
|
||||
}
|
||||
else if (t->iscomplex()) {
|
||||
LLValue* dst;
|
||||
LLValue *dst, *src;
|
||||
if (DLRValue* lr = lhs->isLRValue()) {
|
||||
dst = lr->getLVal();
|
||||
rhs = DtoCastComplex(loc, rhs, lr->getLType());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue