3 ms·
> Using rdi, rsi, rdx, rcx, r8, r9 and then the stack is the calling convention used on x64 linux It's more complicated than that - floats/doubles and structs
by account42 6y ago
> Using rdi, rsi, rdx, rcx, r8, r9 and then the stack is the calling convention used on x64 linux
It's more complicated than that - floats/doubles and structs of them are put in SSE registers instead. Mixed structs are packed into integer registers (!) if they are small enough.
And with C++ classes with non-trivial destructor/etc. are always passed on the stack.