Best ABI for stdarg/varargs ??
Greg McGary
greg@mcgary.org
Fri Apr 6 16:44:00 GMT 2001
I am doing a new port to a MIPS-like CPU and have the freedom to
define the ABI. What do you consider to be a clean way to handle
stdarg/varargs for such a CPU? If an existing port does it well,
please refer me to it, otherwise please describe how it should be
done.
BTW, an out-of-the-ordinary thing I plan to do in this ABI is to grow
the stack from low to high addresses. The rationale is to keep
stack-saved frame chain and procedure linkage at lower addresses than
the current function's automatic variables, so that buffer overruns
can't clobber them.
Greg
More information about the Gcc
mailing list