logoalt Hacker News

maximilianburkelast Sunday at 2:10 PM2 repliesview on HN

Callee clean-up was (is? is.) standard for the 32-bit Win32 API; it's been pretty stable now for coming up on 40 years now.


Replies

jvertlast Sunday at 11:37 PM

Early in Win32 development, the x86 calling convention was __cdecl. I did all the work to change it to __stdcall (callee clean-up). Yes, it was done purely for performance reasons. It was a huge change to the codebase and as a side-effect turned up a lot of "interesting" code which relied on cdecl calling conventions.

show 1 reply
to11mtmlast Sunday at 2:22 PM

For 32 bit yes, although IIRC x64 convention is caller clean-up.

show 1 reply