Xref: utzoo comp.unix.questions:30084 comp.unix.internals:2485 comp.unix.programmer:1495 comp.lang.c:37950 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!zephyr.ens.tek.com!tekgen!sail!terryl From: terryl@sail.LABS.TEK.COM Newsgroups: comp.unix.questions,comp.unix.internals,comp.unix.programmer,comp.lang.c Subject: Re: Unix Stack Frame Questions Message-ID: <9272@sail.LABS.TEK.COM> Date: 4 Apr 91 18:15:36 GMT References: <125@epic.epic.com> <3465@unisoft.UUCP> Reply-To: terryl@sail.LABS.TEK.COM Followup-To: comp.unix.questions Distribution: na Organization: Tektronix, Inc., Beaverton, OR. Lines: 25 In article <3465@unisoft.UUCP> greywolf@unisoft.UUCP (The Grey Wolf) writes: >/* by goehring@gnu.ai.mit.edu > * In article <125@epic.epic.com> tan@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, 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!" __________________________________________________________