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

What's commonly known as the C ABI is actually the System V ABI:

http://wiki.osdev.org/System_V_ABI

Projects that are meant to be widely reused should export their functionality through that simple ABI. Otherwise people will rewrite it in C.



It's known as the System V ABI on Linux. Not on Windows (Microsoft X64 Calling Convention for x64 windows).

https://stackoverflow.com/a/44893431


Those are not actually the same. There are several differences, but the most obvious one is that the standard ABI on x86-64 Linux passes integer parameters in the following order: rdi, rsi, rdx, rcx, r8, r9.

I noticed this immediately the first time I tried reading some Windows disassembly, as “rdi rsi rdx” is very thoroughly burned into my brain...


Didn't mean to imply that they are the same ABI, sorry. Just that they're both "What's commonly known as the C ABI".


My bad for misunderstanding you!




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

Search: