Re: Stack based machines

bonzini@my-deja.com
25 Mar 2000 02:34:41 -0500

          From comp.compilers

Related articles
Stack based machines thand@pmail.net (Linus Thand) (2000-03-23)
Re: Stack based machines plakal@cs.wisc.edu (2000-03-23)
Re: Stack based machines dvdeug@x8b4e53cd.dhcp.okstate.edu (2000-03-25)
Re: Stack based machines pieter@cs.kun.nl (Pieter Koopman) (2000-03-25)
Re: Stack based machines galexand@sietch.bloomington.in.us (2000-03-25)
Re: Stack based machines bonzini@my-deja.com (2000-03-25)
Re: Stack based machines gneuner@dyn.com (2000-03-25)
Re: Stack based machines dxj@mnsinc.com (Deepak Janardhanan) (2000-03-25)
Re: Stack based machines koopman@cmu.edu (Philip Koopman) (2000-03-25)
Re: Stack based machines Keith@wootten.demon.co.uk (Keith Wootten) (2000-03-28)
Re: Stack based machines bpaysan@mikron.de (Bernd Paysan) (2000-03-28)
Re: Stack based machines dxj@mnsinc.com (Deepak Janardhanan) (2000-03-28)
| List of all articles for this month |

From: bonzini@my-deja.com
Newsgroups: comp.compilers,comp.arch
Date: 25 Mar 2000 02:34:41 -0500
Organization: Deja.com - Before you buy.
References: 00-03-101 00-03-124
Keywords: architecture

plakal@cs.wisc.edu wrote:
> Linus Thand <thand@pmail.net> wrote:
> > What is happening in the world of stack-based machines?
> > Are there any active groups working on processors or compilers


And our wise moderator added:
> > [Registers give an architecture
> > a big performance boost, and it's hard to fake that by caching to top of
> > the stack. -John]


It is interesting that the x86 math coprocessors have been making
their stack-like registers architecture more and more un orthodox
since the Pentium. Stack operations now work by simple renaming of
registers, and the same goes for the FXCH instruction (which swaps the
stack top with another element).


In particular, FXCH (almost) always pairs with other instructions, and
allows one to (almost) emulate a register based architecture. In
particular, A*B+C*D+E*F can be rewritten to pipeline the three
multiplications so they run in parallel and are joined at the end.
Not exactly a conventional stack-based architecture...


Paolo Bonzini
[I think most people now agree that making the x86 FPU use a stack was
a mistake. Dunno why they did in the first place, I can't see any
particular advantage to it even on the 8087. -John]



Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.