This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: INIT_CUMULATIVE_ARGS()
On Tue, 2003-03-25 at 18:16, Hans-Peter Nilsson wrote:
> On 25 Mar 2003, Anders Ådland wrote:
>
> > Thanks for all the help you have given me so fare. I need some more...
> >
> > I am using INIT_CUMULATIVE_ARGS(cum, fntype, libname, indirect) to
> > initialize the cum variable. The first register to use for passing
> > arguments depends on the size of the argument.
>
> These two sentences makes me think you want to look at a
> function argument in INIT_CUMULATIVE_ARGS. That's wrong; you
> use FUNCTION_ARG (and FUNCTION_INCOMING_ARG) for looking at
> argument types and position and deciding where the parameter is
> passed and FUNCTION_ARG_ADVANCE to update the iterator you
> initialized in INIT_CUMULATIVE_ARGS.
Is this what happends?
- INIT_CUMULATIVE_ARGS is called to initialize iterator.
- FUNCTION_ARG is called one or more times and returns where the first
argument is passed.
- FUNCTION_ARG_ADVANCE is called to update iterator.
- FUNCTION_ARG is called one or more times and returns where the second
argument is passed.
- FUNCTION_ARG_ADVANCE is called to update iterator.
...
Anders