Was reading about assembly, part about conventions of calling routines in assembly(Linux, especially).
It is said first 8 floating-point parameters are passed via xmm0
-xmm15
and other parameters in registers rdi
, rsi
, rdx
, rcx
, r8
, r9
, and other remaining parameters should be pushed to stack in reverse order.
What if I have more than 8 floating-point parameters and more than 6 other parameters, in what order should one push them to stack? First floating-point values that do not fit in 8 fp. registers or other parameters that do not fit in 6 registers?
What part of the ABI doc is unclear (https://github.com/hjl-tools/x86-psABI/wiki/X86-psABI)?
Are you asking what happens if there's a mix of int and fp args, and you run out of both kinds of arg-passing registers?
IIRC, they just go on the stack in reverse order, with the last arg at the highest address, and the first non-register arg just above the return address. This is just like in 32-bit code where args are always passed on the stack.
See also http://wiki.osdev.org/System_V_ABI, and the x86 tag wiki.