Hacker News new | ask | show | jobs
by saagarjha 1312 days ago
Interestingly System-V passes the number of floating point registers used for a variadic function in rax.
1 comments

It only uses %al and leaves the upper 56 bits of %rax undefined. OpenVMS adds an arg count in %ah and then uses the rest of the register to hold bitmasks showing whether each register-passed argument was integer or float, and also (optionally) a pointer (stored as offset from call address) to a data structure containing type info for the stack arguments.