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]

Re: Variadic functions arguments passing


On Fri, Apr 25, 2014 at 11:27 AM, Umesh Kalappa
<umesh.kalappa0@gmail.com> wrote:
>
> In our private port ,we define function_arg hook  to pass the first
> three args in the reg and rest will go to stack.
>
> But for variadic  functions the arguments  need  to  pass  through the stack.
>
> How we can achieve this ?? Any inputs will be appreciate.

In INIT_CUMULATIVE_ARGS, which gets the type of the function being
called, set a flag in your CUMULATIVE_ARGS struct, and check it in
FUNCTION_ARG.

Ian


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