mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-11 18:33:14 +01:00
To follow D ABI, swap real and imaginary parts of a complex return value on X86_64
TODO: should we disable this transformation for ldc1 in order to keep its ABI unchanged?
This commit is contained in:
19
gen/abi.cpp
19
gen/abi.cpp
@@ -29,25 +29,6 @@ void ABIRewrite::getL(Type* dty, DValue* v, llvm::Value* lval)
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// simply swap of real/imag parts for proper x87 complex abi
|
||||
struct X87_complex_swap : ABIRewrite
|
||||
{
|
||||
LLValue* get(Type*, DValue* v)
|
||||
{
|
||||
return DtoAggrPairSwap(v->getRVal());
|
||||
}
|
||||
LLValue* put(Type*, DValue* v)
|
||||
{
|
||||
return DtoAggrPairSwap(v->getRVal());
|
||||
}
|
||||
const LLType* type(Type*, const LLType* t)
|
||||
{
|
||||
return t;
|
||||
}
|
||||
};
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
struct X86_cfloat_rewrite : ABIRewrite
|
||||
{
|
||||
// i64 -> {float,float}
|
||||
|
||||
Reference in New Issue
Block a user