I did some further testing: void foo(int a, int b) { writefln("a: %s", a); writefln("b: %s", b); } unittest { foo(1, 2); asm { mov RDI, 1; mov RSI, 2; call foo; } } Produces: a: 1 b: 2 a: 2 b: 1 Unless I'm mistaken, DMD does not respect the C calling convention on Linux/AMD64.