Unix Stack Frame Questions

terryl at sail.LABS.TEK.COM terryl at sail.LABS.TEK.COM
Fri Apr 5 04:15:36 AEST 1991


In article <3465 at unisoft.UUCP> greywolf at unisoft.UUCP (The Grey Wolf) writes:
>/* <GOEHRING.91Mar25113709 at gnu.ai.mit.edu> by goehring at gnu.ai.mit.edu
> * In article <125 at epic.epic.com> tan at epic.epic.com (Andy Tan) writes:
> *    1. Is it right to assume that the address of the last automatic
> *       variable is the bottom of stack frame ?
> * it is not right to assume that there is a stack frame, and some
> * compilers aren't going to put autos in the frame even if a frame
> * exists since they can be more cheaply handled with registers.
>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...?  And how would you return...?

     Repeat after me: ALL THE WORLD IS NOT A VAX!!!! Repeat that 10 TIMES.

     Many cpus are happy passing the first N parameters in registers (where
0 < n < <#-of-total-registers>). Many cpus are also happy stuffing the return
address of a jsr, bsr, <insert-favorite-subroutine-call-pneumonic-here> into
a register. You have to learn to think globally, instead of just your tiny
little world....

__________________________________________________________
Terry Laskodi		"There's a permanent crease
     of			 in your right and wrong."
Tektronix		Sly and the Family Stone, "Stand!"
__________________________________________________________



More information about the Comp.unix.questions mailing list