Normally platforms where the ABI uses registers for argument passing switch to a different calling convention for variadic functions, whereby everything is passed on the stack. This is why the C standard assigned undefined behavior to calling a variadic function without a prototype; without a prototype, on such platforms the compiler will generate an incorrect call.
It should be noted that some platforms use more complicated (uselessly complicated, I would say) methods of passing arguments to variadic functions, such as constructing a sort of linked list and passing a hidden pointer to that list, which the implementation of va_start
is then somehow able to obtain. As a programmer, you should just treat the whole stdarg.h
stuff as a black box that does what's expected, and pray that you never have to see the gorey details of some of the uglier implementations...