5 ms·
Hah, interesting. A new spin on RIIR: RIIRFTSOETC ("rewrite it in rust for the sake of exporting it to C").
by wyldfire 7y ago
Hah, interesting. A new spin on RIIR: RIIRFTSOETC ("rewrite it in rust for the sake of exporting it to C").
- matheusmoreira 7y agoWhat's commonly known as the C ABI is actually the System V ABI: http://wiki.osdev.org/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.
- gpm 7y agoIt's known as the System V ABI on Linux. Not on Windows (Microsoft X64 Calling Convention for x64 windows). https://stackoverflow.com/a/44893431 https://stackoverflow.com/a/44893431
- umanwizard 7y agoThose 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...
- gpm 7y agoDidn't mean to imply that they are the same ABI, sorry. Just that they're both "What's commonly known as the C ABI".
- umanwizard 7y agoMy bad for misunderstanding you!