This is the mail archive of the gcc-bugs@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]

Re: nested functions on Arm


> On Wed, Sep 13, 2000 at 03:20:44PM -0400, Michael Meissner wrote:
> > Either that or you can probably add a new macro that passes the static chain
> > register as the first argument (much like we can do for structure returns).
> 
> This is almost certainly the correct option.
> 
> 
> r~


Except there is no way for a trampoline to convert a normal call into a 
static-chain based call (the trampoline would have to push one of the 
registers onto the stack and the caller would then have to know to pop it 
afterwards -- it doesn't, so the stack will become corrupt).

It's a similar problem with using a call-saved register for the static 
chain -- it works ok (well, it should work ok) when the function is called 
directly, but there is no way that a trampoline can save the register it 
is about to corrupt.

R.


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