Fix cfloat return on x86_64: only perform ABI transformation for non-extern(D)

functions.
There's no need to waste cycles with extern(D), which we get to define
ourselves. Fixes tests/mini/asm8.d. (Since the asm abiret code already assumed
{xmm0, xmm1} returns)
This commit is contained in:
Frits van Bommel
2009-02-26 23:35:39 +01:00
parent 4f51adc810
commit 03ce6604a0
3 changed files with 66 additions and 52 deletions

View File

@@ -279,7 +279,7 @@ void emitABIReturnAsmStmt(IRAsmBlock* asmblock, Loc loc, FuncDeclaration* fdecl)
// For compatibility, use the GCC/LLVM-GCC way for extern(C/Windows)
// extern(C) cfloat -> %xmm0 (extract two floats)
as->out_c = "={xmm0},";
asmblock->retty = LLStructType::get(LLType::DoubleTy, NULL);;
asmblock->retty = LLType::DoubleTy;
asmblock->retfixup = &x86_64_cfloatRetFixup;
} else if (rt->iscomplex()) {
// cdouble and extern(D) cfloat -> re=%xmm0, im=%xmm1