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 12:03:07 -0600
- cc: Michael Meissner <meissner at cygnus dot com>, egcs at cygnus dot com
- Reply-To: law at cygnus dot com
In message <199710100357.QAA01814@ongaonga.chch.cri.nz>you write:
> Michael Meissner writes:
> > Michael P. Hayes writes:
> > |
> > | The c4x port I have been working on requires a weird function argument
> > | passing model to be compatible with the vendor's compiler. The order
> > | that registers are allocated depends on the number of floating point
> > | arguments passed. To date, I have hacked calls.c and function.c to
> > | include a macro FUNCTION_ARG_PRESCAN, which is used during a first
> > | pass scan to allow the backend to determine the types of arguments to
> > | expect. Can someone suggest a better strategy or have I missed
> > | something obvious?
> >
> > You don't need it. You can do it via INIT_CUMULATIVE_ARGS and
> > INIT_CUMULATIVE_INCOMING_ARGS. See rs6000/rs6000.{h,c} for something
> > similar, where we need to know whether it is call a prototyped
> > function or not.
>
> I had considered this approach but the problem is if there is no
> prototype, the argument types are unknown in advance, without using a
> pre-scan pass.
What exactly are the calling conventions for this target?
jeff