Unix Stack Frame Questions

Guy Harris guy at auspex.auspex.com
Sat Apr 6 05:19:29 AEST 1991


>If, of course, you have the registers (68K only have so many).
>If there's not a stack frame, how are parameters passed to the
>function...?

In registers.

>And how would you return...?

The return value might also be in a register.

Of course, at least some systems that pass parameters in registers also
tend to have stack frames (the SPARC calling conventions have them);
however, as indicated, there's no absolute guarantee that automatics are
on the stack frame, as compilers may just stick them in registers (yes,
even if they're not declared "register"), and a compiler might well not
bother allocating a stack frame at all for, say, a leaf procedure, if
there aren't any automatic variables in it. 



More information about the Comp.unix.programmer mailing list