This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Pretend Argument Alignment Query


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]