Re: Problems with sibling calls

2009-06-01 Thread Georg-Johann Lay
Ulrich Weigand schrieb: Georg-Johann Lay wrote: I'd like to support sibling calls for a target where function args can be passed in call-saved registers, namely AVR. The s390 back-end already has the very same issue. You may want to have a look at config/s390/s390.c:s390_call_saved_register_us

Re: Problems with sibling calls

2009-05-30 Thread Ulrich Weigand
Georg-Johann Lay wrote: > I'd like to support sibling calls for a target where function args can > be passed in call-saved registers, namely AVR. The s390 back-end already has the very same issue. You may want to have a look at config/s390/s390.c:s390_call_saved_register_used and how it is used

Re: Problems with sibling calls

2009-05-29 Thread Dave Korn
Georg-Johann Lay wrote: > Yes that's right. It would work if I recreate the information which code > a couple of lines away did already, I just wanted to avoid doubling > (some parts of) the code/work in order to keep the backend clean. Well, then don't! Factor out the common parts of your sta

Re: Problems with sibling calls

2009-05-29 Thread Dave Korn
Georg-Johann Lay wrote: > But this will only (or is intended to) track information for the caller, > not information needed for the callee that was gathered in the mentioned > hooks. It can be used, of course, to exchange data between hooks > provided with CUMULATIVE_ARGS and hooks that aren't, bu

Re: Problems with sibling calls

2009-05-29 Thread Georg-Johann Lay
Dave Korn schrieb: Georg-Johann Lay wrote: The trouble is this: If a callee gets some arguments passed on the stack or in call-saved regs, the callee is not ok for a sibling call. That's because sibcall_epilogue executes before sibcall insns. All this information is pretty easy available in FU

Re: Problems with sibling calls

2009-05-29 Thread Georg-Johann Lay
Ian Lance Taylor schrieb: Georg-Johann Lay writes: The trouble is this: If a callee gets some arguments passed on the stack or in call-saved regs, the callee is not ok for a sibling call. That's because sibcall_epilogue executes before sibcall insns. I'm having trouble with your terminology

Re: Problems with sibling calls

2009-05-29 Thread Ian Lance Taylor
Georg-Johann Lay writes: > The trouble is this: If a callee gets some arguments passed on the > stack or in call-saved regs, the callee is not ok for a sibling > call. That's because sibcall_epilogue executes before sibcall insns. I'm having trouble with your terminology "call-saved regs". Do t

Re: Problems with sibling calls

2009-05-29 Thread Dave Korn
Georg-Johann Lay wrote: > The trouble is this: If a callee gets some arguments passed on the stack > or in call-saved regs, the callee is not ok for a sibling call. That's > because sibcall_epilogue executes before sibcall insns. > > All this information is pretty easy available in FUNCTION_ARGS

Problems with sibling calls

2009-05-29 Thread Georg-Johann Lay
Hi, I'd like to support sibling calls for a target where function args can be passed in call-saved registers, namely AVR. The trouble is this: If a callee gets some arguments passed on the stack or in call-saved regs, the callee is not ok for a sibling call. That's because sibcall_epilogue e