This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Passing function arguments in registers
- To: "Michael P. Hayes" <michaelh at ongaonga dot chch dot cri dot nz>
- Subject: Re: Passing function arguments in registers
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Tue, 14 Oct 1997 16:13:11 -0600
- cc: Michael Meissner <meissner at cygnus dot com>, egcs at cygnus dot com
- Reply-To: law at cygnus dot com
In message <199710142047.JAA17466@ongaonga.chch.cri.nz>you write:
> Jeffrey A Law writes:
> > What exactly are the calling conventions for this target?
>
> The register allocation order is AR2, R2, R3, RC, RS, RE (then stack).
>
> However, the first and second floating point values are always in R2
> and R3 (and all other floats are on the stack). Structs are always
> passed on the stack.
So, say you want to pass int, int, int, float, float, int (A, B, C, D, E, F).
Do you pass them as:
AR2 = A
R2 = D
R3 = E
RC = B
RS = C
RE = F
?
Weird.
How does your target implement varargs & stdarg? I don't really see a
good way to correctly implement them if I understand the calling conventions
correctly.
jeff