2 ms·
Nope, the Windows ABI uses a different set of registers than the SysV (Unix) ABI. SysV uses rdi, rsi, rdx, rcx, r8, r9 (in that order), and Windows uses rcx, rd
by jcranmer 8y ago
Nope, the Windows ABI uses a different set of registers than the SysV (Unix) ABI. SysV uses rdi, rsi, rdx, rcx, r8, r9 (in that order), and Windows uses rcx, rdx, r8, r9 (in that order).
- billti 8y agoIt's not just the registers, the use of the stack (e.g. lack of a "red zone" on Windows) as well as the data used for exception handling are different too. The MSDN links above are quite detailed on what Windows implements. The post by Eli at https://eli.thegreenplace.net/2011/09/06/stack-frame-layout-on-x86-64/ https://eli.thegreenplace.net/2011/09/06/stack-frame-layout-... goes over some Windows differences towards the end.