johnw@astroatc.UUCP (John F. Wardale) (11/03/87)
There has been discussion about using a stack, a stack architecture (I assume) and a stack-cache to get many of the gains of register windows cheaply. Unless I'm totally missing the boat, this requires using a stack architecture. These architectures were thought to be great at increasing code density by eliminating all those repetative operandes....just keep them on a stack. Analyses of real code shows that most expressions are of one of these 3 forms: (Sorry, I forgot the numbers...) a=0; a++; a=b+c; All of which tend to take more code on a stack architecture than on a vax, or RISC beast (to be fair, count bits...) The other *BIG* loss for a stack machine is that using the stack for temporaries, tends to *CREATE* hazards (in the stack) A = B*C + D*E B;C;*;D;E;*;+;store A (operations pushes implied) 1 2 1 2 3 2 1 0 (stack depth) Here the 2nd * must wait for the the first to complete. With a pipelined multiplier on a register based machine, the *'s can proceed in parallel. Sorry if this is clear as mud...basically, Stack machines have lost popularity because we've discovered better ways to build fast computers, or more specifically, its hard to build really fast stack-architecture machines. -- John Wardale ... {seismo | harvard | ihnp4} ! {uwvax | cs.wisc.edu} ! astroatc!johnw To err is human, to really foul up world news requires the net!
mwm@eris.BERKELEY.EDU (Mike (My watch has windows) Meyer) (11/04/87)
In article <543@astroatc.UUCP> johnw@astroatc.UUCP (John F. Wardale) writes:
<There has been discussion about using a stack, a stack
<architecture (I assume) and a stack-cache to get many of the gains
<of register windows cheaply.
<
<Unless I'm totally missing the boat, this requires using a stack
Sorry, but the boat left without you :-).
The idea behind caching the top of the stack is from the observation
that programs written in HLLs tend to have lots of accesses to the
last stack frame, and a small number to global variables.
So you cache the top N K of the stack, and then demonstrate that the
customers application always uses less than that much stack :-).
<mike
--
[Our regularly scheduled .signature preempted.] Mike Meyer
The Amiga 1000: Let's build _the_ hackers machine. mwm@berkeley.edu
The Amiga 500: Let's build one as cheaply as possible! ucbvax!mwm
The Amiga 2000: Let's build one inside an IBM PC! mwm@ucbjade.BITNET