The pod states:
I5 through I31
The first 26 integer parameters.
S5 through S31 The first 27 string parameters.
N5 through N31 The first 27 numeric parameters.
P5 through P31 The first 27 PMC parameters.
Ignoring a slight off by one error ;), where should these registers come from? For sure, some are temp vars, and when there are 27 registers of one kind (or more) necessary, to feed a sub, there are probably a lot of temps active too. Just to do the assignments to get the sub params into the correct register, would need a lot of spilling regs in and out.
This could of course somehow optimized, so that the destination registers is already the register of the temp, but what if there are 2 such subs, which just one additional parameter at the end, which would shift all others and makes such an optimization impractical.
Next problem is, imcc needs one P-Reg (currently P31) for a spill array, which for sure is necessary, when there are +27 P regs to be passed to a sub.
So my proposal is, to reduce the amount of parameters passed in registers to some lower value, to take some pressure off the register allocator.
x5 through x15
would be still a lot of params.
leo