This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Pretend Argument Alignment Query
- From: Dan Towner <dant at picochip dot com>
- To: gcc at gcc dot gnu dot org
- Date: Mon, 27 May 2002 20:05:07 +0100
- Subject: Pretend Argument Alignment Query
- Organization: picoChip Designs Ltd.
Hi all,
I am writing a gcc port for a 16-bit DSP. The target has 32-bit
alignment requirements for the stack/frame/argument pointers. The first
12 bytes of arguments in a function call are passed in registers, and
the remainder on the stack. When a varadic function is called, it pushes
the non-named arguments on to the stack (i.e., pretend arguments).
Suppose there are 10 bytes of pretend arguments. Am I correct in
thinking that the pretend argument area on the stack should be padded to
12 bytes, and then a new definition of va_start should be used which
accesses the first pretend argument by adding the size of the padding to
the argument pointer?
Thanks,
Dan.
=============================================================================
Dr Daniel Towner
picoChip Designs Ltd., Riverside Buildings, 108, Walcot Street, BATH,
BA1 5BG
dant@picochip.com
07786 702589