Unix Stack Frame Questions

Donald Lewine lewine at cheshirecat.webo.dg.com
Thu Apr 4 06:30:01 AEST 1991


In article <3465 at unisoft.UUCP>, greywolf at unisoft.UUCP (The Grey Wolf) writes:
|> 
|> I didn't think that a CPU ever "enforced" a stack frame; ostensibly one
|> could ignore the references to "4(fp)" in the manual and do it their own
|> way.
The VAX comes very close to enforcing a stack frame in hardware/
microcode.  

|> 
|> But a stack frame seems to be the most efficient way of dealing with
|> calls and returns.
Wrong!  Passing arguments in registers is more efficient.  That is a
major reason why RISC's with 32 (or more) registers win.  A fast
call/return is worth a great deal in the MIPS war.

In short, if your code makes any assumptions about where arguments
are located, you have reduced your portability by a mile.

--------------------------------------------------------------------
Donald A. Lewine                (508) 870-9008 Voice
Data General Corporation        (508) 366-0750 FAX
4400 Computer Drive. MS D112A
Westboro, MA 01580  U.S.A.

uucp: uunet!dg!lewine   Internet: lewine at cheshirecat.webo.dg.com



More information about the Comp.unix.programmer mailing list