5 ms·
> Standardize abi What's with this strange desire to mandate One True Way to implement function calls in every language implementation? If I want to use rbx/r1
by Joker_vD 2y ago
> Standardize abi
What's with this strange desire to mandate One True Way to implement function calls in every language implementation? If I want to use rbx/r11/r10/r9 for argument passing and return results in rdx/rsi by default and have to use
@if os.LINUX and cpu.X64
import external func[[regseq("rdi,rsi,rdx,rcx|rax"), library("libc.so")]] fwrite(buff ptr, size int64, count int64, stream ptr) int64;
@endif
to interoperate with one particular implementation of libc for one particular OS on one particular ISA, then that should be perfectly fine.
- dale_glass 2y agoThat in no way conflicts with the existence of a standard. A standard is just a common default, you can deviate from it. And this being C the ability to do so when needed would be expected.