Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

On PASM and PIR registers

0 views
Skip to first unread message

Klaas-Jan Stol

unread,
Jan 31, 2007, 6:00:50 AM1/31/07
to perl6-i...@perl.org
hello,

Parrot has 2 categories of registers: PASM registers, which are of the
form [S|N|I|P]<digit><digit> (which is kinda odd, if only regs 0-31 are
available) and PIR registers, which are formed like: $[S|N|I|P]<digit>+

In the old days, this distinction was necessary for the register
allocator to translate PIR registers to PASM registers, because there
were only 32 regs of each type (S/N/I/P).

IIUC, the number of registers is now equal to "the necessary number of
registers"; that is, each sub has as many registers as it needs to do
its job.

So, my question is now, why do we still need the PASM registers (except
for backward compatibility) if we have PIR registers (which, after a
possible "we don't need them", brings the question, why we need the "$",
but that's a different topic). In other words, why not stick to 1 category:
either $[SNIP]<digit>+ (or maybe skip the $ altogether, but again,
that's not the point here)?

regards,
klaas-jan

Leopold Toetsch

unread,
Feb 1, 2007, 3:21:56 PM2/1/07
to perl6-i...@perl.org, Klaas-Jan Stol
Am Mittwoch, 31. Januar 2007 12:00 schrieb Klaas-Jan Stol:
> So, my question is now, why do we still need the PASM registers

PASM registers are physically allocated within the Parrot virtual machine.
PIR registers are virtual registers, like .local variable w/o a name. The
register allocator assign PIR regs/vars to physical registers.

We need both kinds for PIR.

leo

0 new messages