|RE: stack-based vs. register-based firstname.lastname@example.org (Scott J. McCaughrin) (2001-01-26)|
|RE: stack-based vs. register-based email@example.com (Scott J. McCaughrin) (2001-01-28)|
|Re: stack-based vs. register-based firstname.lastname@example.org (Scott Moore) (2001-02-01)|
|From:||"Scott J. McCaughrin" <email@example.com>|
|Date:||28 Jan 2001 02:10:31 -0500|
|Posted-Date:||28 Jan 2001 02:10:31 EST|
The first complete Pascal compiler I wrote was targeted for a stack
machine, and it was a real pain after having written phases of other
compilers for non-stack targets.
The biggest drawback is the 0-operand mode of the stack architecture
vs. 2- or 3-operand mode with register operands. The LIFO nature of
the stack leads to much larger code generated, even after optimiza-
tion, than with registers.
Yes, it is true that being stack-based frees you from the pitfalls
of register-based code, but you also lose the advantages.
Return to the
Search the comp.compilers archives again.