mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-04-10 13:59:02 +02:00
changes to get the naked asm stuff working for x64
This commit is contained in:
@@ -179,8 +179,8 @@ void emitABIReturnAsmStmt(IRAsmBlock* asmblock, Loc loc, FuncDeclaration* fdecl)
|
||||
asmblock->retty = llretTy;
|
||||
asmblock->retn = 1;
|
||||
|
||||
// x86
|
||||
if (global.params.cpu == ARCHx86)
|
||||
// x86 or x86_64
|
||||
if (global.params.cpu == ARCHx86 || global.params.cpu == ARCHx86_64)
|
||||
{
|
||||
LINK l = fdecl->linkage;
|
||||
assert((l == LINKd || l == LINKc || l == LINKwindows) && "invalid linkage for asm implicit return");
|
||||
|
||||
@@ -464,7 +464,7 @@ DValue* DtoCallFunction(Loc& loc, Type* resulttype, DValue* fnval, Expressions*
|
||||
LLValue* retllval = (retinptr) ? args[0] : call->get();
|
||||
|
||||
// swap real/imag parts on a x87
|
||||
if (global.params.cpu == ARCHx86 && tf->nextOf()->toBasetype()->iscomplex())
|
||||
if ((global.params.cpu == ARCHx86 || global.params.cpu == ARCHx86_64) && tf->nextOf()->toBasetype()->iscomplex())
|
||||
{
|
||||
retllval = DtoAggrPairSwap(retllval);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user