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: [RFC]: Argument setup for sibcalls


In message <200304141716 dot h3EHGfgp018309 at hiauly1 dot hia dot nrc dot ca>, "John David Anglin
" writes:
 >When FUNCTION_INCOMING_ARG is defined, it is used to set up the outgoing
 >arguments for sibling calls.  This is the cause of the problem noted in
 >PR 10271.  On the PA, FUNCTION_ARG and FUNCTION_INCOMING_ARG have been
 >used for many years to distinguish outgoing and incoming arguments.
 >However, if FUNCTION_INCOMING_ARG is to be used for both incoming and
 >outgoing arguments, I need to come up with a different way to do this.
 >
 >Is the use of FUNCTION_INCOMING_ARG for outgoing sibcall arguments correct?
 >
 >Alan Modra hit the same problem as that in PR 10271 doing some development
 >work on the powerpc.  He suggested that we might want a new macro
 >SIBCALL_FUNCTION_ARG.
 >
 >There are several ports that define FUNCTION_INCOMING_ARG.  I believe
 >that FUNCTION_INCOMING_ARG was used to obtain the correct sibcall
 >argument setup on the sparc.  However, it's not clear whether the
 >current sibcall argument setup is correct on the other ports.
I haven't looked at Alan's bug report, but using FUNCTION_INCOMING_ARG is
definitely the right thing for sibcalls.

The whole idea behind argument setup for a sibcall is you overwrite the
incoming arguments for the current function with the arguments for the
sibcall because you're simply going to jump to the sibcall target.  You
don't have outgoing arguments because you don't have an outgoing argument
area.


Jeff



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