Allocation of PASM registers (in PASM mode)

Klaas-Jan Stol parrotcode at gmail.com
Mon Nov 24 19:14:24 UTC 2008


hi,
There is one minor detail on register allocation unclear to me, regarding
PASM registers (in PASM files).
When using/specifying PASM registers in PASM code, must these exact
registers be used, or should the PASM compiler do the allocation?

So, when writing:

new P42, 'Integer'
set P42, 100
print P42

Should P42 be mapped to P0 (i.e. the first available register), or should
P42 be used (thus allocating at least 43 (counting from 0) registers).
It's the difference between full power to the user (s/he might know what
s/he's doing), or doing the allocation for the user.

IMCC was originally written to handle the register allocation, as the
default assembler did not handle that (which basically implies that register
allocation should not be done in PASM mode). I do  not intend to change the
implementation of IMCC (which, AFAIK, does register allocation even in PASM
mode), but for PIRC, I can go either way: submit the PASM registers to the
register allocator/optimizer, or use the registers as specified by the user.

thanks,
kjs
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.parrot.org/pipermail/parrot-dev/attachments/20081124/dbc05d93/attachment.htm 


More information about the parrot-dev mailing list