P.S.: if code that is missing prototypes for stdarg functions is of no concern, there is another ABI alternative that might give good code density for architectures like ARC that have pre-decrement
addressing modes and allow immediates to be pushed:

You could put all unnamed arguments on the stack (thus simplifying varargs processing), and
leave all registers not used for argument passing call-saved.
Thus, the callers wouldn't have to worry about saving these registers or reloading their values
from the stack.

For gcc, this would require making the call fusage really work - probably involving a hook to tell the middle-end that the port really wants that - or a kludge to make affected call insn not look
like call insns, similar to the sfuncs.

Reply via email to