Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Doesn't the compiler at least need to use the platform-standard argument convention when calling OS functions?


Yes. Every Windows API is prefixed with WINAPI, which is a macro for the calling convention.


The 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.)




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: