mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-04-18 01:39:03 +02:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user