5 ms·
Doesn't the compiler at least need to use the platform-standard argument convention when calling OS functions?
by cbr 10y ago
Doesn't the compiler at least need to use the platform-standard argument convention when calling OS functions?
- inlined 10y agoYes. Every Windows API is prefixed with WINAPI, which is a macro for the calling convention.
- int_19h 10y agoThe macro expands to nothing on Win64, though, because it has one standard calling convention. (At the ABI boundary, anyway. There's also __vectorcall now. And, of course, the compiler can use whatever it wants for functions that are not exposed at the boundary - even arbitrary register assignments based on where the function is actually called, to minimize the amount of work needed to save registers etc.)