Leo,

I've been away from email for the weekend, so sorry for the delay.

Leopold Toetsch wrote:

Well C<word> and C<$I13> or some such is the same for the compiler. Both
need a Parrot register allocation. If they aren't reused after this
instruction, there isn't any problem to put these into the same
register.

But *if* C<word> is reused after this instruction, then it's of course a
bug. The usage in e.g. F<debug.imc> doesn't indicate any reuse of
C<word>.


Actually, I hadn't appreciated that imcc was seeing that 'word' was freed up and became available for $I13 mid statement. That's clever.

In the example that I posted things seems to working correctly now (especially when I use the values as I do in the code that I snipped).

I'll go back to the original version of the code in which I originally saw the problem. I picked it up exactly because 'word' /was/ being used (and at the time $I13 was ignored after the line in question).

Thanks for the help Leo.

BTW:
Currently ".param"(s) must be immediately following after the ".sub" line
(no empty line, no comment line) and the return statement is also bogus. see
F<imcc/docs/calling_conventions.pod>

Fixed, thanks.

Nick




Reply via email to