[parisc-linux] Re: schedule_tail

Alan Modra alan@linuxcare.com.au
Thu, 22 Feb 2001 18:07:26 +1100 (EST)


On Wed, 21 Feb 2001, Matthew Wilcox wrote:

> On Thu, Feb 22, 2001 at 05:21:49PM +1100, Alan Modra wrote:
> > But this location is allowed to be modified by the callee, and I think you
> > already have a stack frame.
> 
> Umm... I'm not sure we always do.  It shouldn't be hard to arrange though.
> 
> > I wrote up some stuff on stack frames at
> > http://lists.parisc-linux.org/pipermail/parisc-linux/2001-February/011715.html
> 
> thanks, i was going from the pdfs, but yours is easier to understand.
> i don't quite see why it needs `ap' (%r29) to be assigned a value when
> calling a function which has no arguments.

No, it shouldn't be needed in that case.  It may be necessary in any of
the following cases:
a) the called function takes the address of one of it's args
b) has variable arguments
c) has more than 8 words of args (not always the same as more than 8 args)
d) needs to spill one of its args to the stack.
gcc ought to be able to convert a reference via %r29 to one via %r30, but
that doesn't work at the moment.

> would a `call-c-function' macro make sense?

Yes.