comparison run/mini/naked_asm5.d @ 1630:d0efa3ae5522 default tip

run/mini/naked_asm5: New x86_64 ABI passes the arguments in reverse order.
author David Nadlinger <code@klickverbot.at>
date Sat, 23 Apr 2011 22:57:32 +0200
parents c6ef09dfba4d
children
comparison
equal deleted inserted replaced
1629:64206c1b3ef2 1630:d0efa3ae5522
17 } 17 }
18 else version(X86_64) 18 else version(X86_64)
19 { 19 {
20 const OP = (op == '+') ? "add" : "sub"; 20 const OP = (op == '+') ? "add" : "sub";
21 asm { naked; } 21 asm { naked; }
22 mixin("asm{"~OP~" ESI,EDI; mov EAX, ESI;}"); 22 mixin("asm{"~OP~" EDI,ESI; mov EAX, EDI;}");
23 asm { ret; } 23 asm { ret; }
24 } 24 }
25 else static assert(0, "todo"); 25 else static assert(0, "todo");
26 } 26 }
27 27