3 ms·
Doesn't x32 only have four registers available in the calling convention, AX-DX?
by pjc50 11mo ago
Doesn't x32 only have four registers available in the calling convention, AX-DX?
- ack_complete 11mo agoThe stdcall calling convention used APIs and API callbacks on Windows x86 doesn't use registers at all, all parameters are passed on the stack. MSVC does support thiscall/fastcall/vectorcall conventions that pass some values in registers, but the system APIs and COM interfaces all use stdcall. Windows x64 and ARM64 do use register passing, with 4 registers for x64 (rcx/rdx/r8/r9) and 8 registers for ARM64 (x0-x7). Passing an additional parameter on the stack would be cheap compared to the workarounds that everyone has to do now.
- pwdisswordfishy 11mo agoThe x32 ABI uses the same fastcall convention as the regular x86-64 ABI. It's mostly syscall numbers that are affected by the shrunk pointers.