mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-11 18:33:14 +01:00
Added X86-64 version. Needed significant changes.
This commit is contained in:
@@ -7,6 +7,13 @@ int foo(int op)(int a, int b)
|
||||
mixin("asm{"~OP~" EAX, [ESP+4];}");
|
||||
asm { ret 4; }
|
||||
}
|
||||
else version(X86_64)
|
||||
{
|
||||
const OP = (op == '+') ? "add" : "sub";
|
||||
asm { naked; }
|
||||
mixin("asm{"~OP~" ESI,EDI; mov EAX, ESI;}");
|
||||
asm { ret; }
|
||||
}
|
||||
else static assert(0, "todo");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user