Argument Passing in C

will summers will.summers at p6.f18.n114.z1.fidonet.org
Thu Sep 22 09:33:42 AEST 1988


In message <69210 at sun.uucp> swilson%thetone at Sun.COM (Scott Wilson) writes:
 > 
 > Can someone explain to me what the difference is between a hardware stack
 > and a software stack?  I worked on a C compiler project once where
 > one person said the target machine "doesn't even have a hardware stack."
 > I asked what the difference was between the target machine and, say, a
 > 68000.
 > The answer was the 68000 had a stack because it supported addressing modes
 > like "movl d7, at sp-" whereas the target machine required you to use two
 > instructions, first a move then an explicit decrement of the stack pointer.

Interesting point.  Methinks a "proper" distinction would place any stack 
implemented in the store in the software category. Some kind of on-chip or 
auxilliary-chip stack would seem to me to be necessary to qualify as a 
"hardware" stack.                                 

A possible exception would be an implementation where the stack storage 
had a completely separate address space.  It's semantics, but seems to me 
that for a distinction there should be a difference, and one vs. two 
instructions seems too narrow a difference...

    \/\/ill 


--  
St. Joseph's Hospital/Medical Center - Usenet <=> FidoNet Gateway
Uucp: ...{gatech,ames,rutgers}!ncar!noao!asuvax!stjhmc!18.6!will.summers



More information about the Comp.lang.c mailing list