null (out PMC)
An C<out> register gets a new value at that point, the register allocator can reuse this register because the old contents got discarded. This information is necessary for the register allocator.
Now we have some opcodes, that implicitely set new values on a range of registers or silently use a register (it has to exist).
clearp # set P0..P31 to PMCNULL poptopi # set I16..I31 from I register stack callmethod # use existing P0, P2, S0 callmethodcc # use existing P0, P2, S0, create new P1
There are currently some hacks inside imcc[1], to handle some of these opcodes but opcodes change faster then the code, so I'd rather have this autogenerated from e.g.:
op clearp () :base_core,out=P0-P31 op callmethodcc :object_base,in=P0,P2,S0,I0-I4,out=P1,I0-I4
I'm not sure yet, if register stack store operations do need a hint:
pushbottomp # doesn't care if a register is valid or not
OTOH the equivalent pop definitely sets all P0..P15.
So that's part one - annotate the opsfiles.
2) is parse this information and generate bitmasks for the C<op_info_t> structure defined in F<include/parrot/op.h>.
That would be something like:
int {in,out}_{I,S,P,N}_argdir; # 1 bit per register per in/out per kind
Thanks, leo
[1] s. imcc/instructions.c: 87 ff