develooper Front page | perl.perl6.internals | Postings from September 2001

Re: An overview of the Parrot interpreter

Thread Previous | Thread Next
From:
Nick Ing-Simmons
Date:
September 5, 2001 06:42
Subject:
Re: An overview of the Parrot interpreter
Message ID:
20010905134220.1755.2@bactrian.ni-s.u-net.com
Paolo Molaro <lupus@debian.org> writes:
>
>It's easier to generate code for a stack machine 

True, but it is easier to generate FAST code for a register machine.
A stack machine forces a lot of book-keeping either run-time inc/dec of sp, 
or alternatively compile-time what-is-offset-now stuff. The latter is a real 
pain if you are trying to issue multiple instructions at once.

>
>Too bad less than 1 % of the people that will use parrot have
>an alpha or a Cray. Optimize for the common case. 

The common case will be Pentium-III+ or IA64.
P-III+ are multi-issue machines with lots of registers and re-naming
(the fact that they do a "run-time compile" to that form from 386 binary ops
is a pain.) Explicit stack ops are going to give them indigestion.
The P-III+ model is that most things are "on the C stack" i.e. offsets
from the few "base" registers. The hardware then "aliases" those offsets 
into its real registers. I don't think Parrot's register files will give 
it much trouble, but throwing away the right inc/dec-of-pointer ops that
a stack machine implies will (there are obviously HW special cases for x86's
push - but Parrot-as-C is unlikely to use x86's sp as its stack-pointer, 
as the C compiler will have snaffled it.)



-- 
Nick Ing-Simmons
http://www.ni-s.u-net.com/


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About