Re: imcc code generation problem

2004-04-26 Thread Nick Glencross
Leo, I've been away from email for the weekend, so sorry for the delay. Leopold Toetsch wrote: Well C 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 re

Re: imcc code generation problem

2004-04-23 Thread Leopold Toetsch
Nick Glencross <[EMAIL PROTECTED]> wrote: > The problem is that $I13 has become *I16*, not (say) I17, so the line > $I13 = word & 0xff00 > has actually had the side effect of changing 'word'. Well C and C<$I13> or some such is the same for the compiler. Both need a Parrot register allocatio

Re: imcc code generation problem

2004-04-23 Thread Nick Glencross
Leopold Toetsch wrote: Well. That's it. Just use $I10 ... $I13 and they will stay what they were. Put a print thereafter for debugging which uses these regs. I should have emphasised the oddity a bit better. 'word' has mapped to I16 correctly, and I17 has been used for $I10..$I12. That's fin

Re: imcc code generation problem

2004-04-23 Thread Leopold Toetsch
Nick Glencross <[EMAIL PROTECTED]> wrote: > $I10 = word & 0x00ff > $I11 = word & 0xff00 > $I12 = word & 0x00ff > $I13 = word & 0xff00 > and the resulting code becomes > band I17, I16, 0x00ff > band I17, I16, 0xff00 > band

Re: imcc code generation problem

2004-04-23 Thread Dan Sugalski
At 7:02 PM +0100 4/23/04, Nick Glencross wrote: Ok, so doing a 'parrot -d 8' shows that word doesn't seem to interfere with $I13 as far as it is concerned ... Dumping the Interf. graph: --- ... word -> $I10 $I11 $I12 (3) ... $I10 -> word (1) $I11 -> word (1

Re: imcc code generation problem

2004-04-23 Thread Nick Glencross
Ok, so doing a 'parrot -d 8' shows that word doesn't seem to interfere with $I13 as far as it is concerned ... Dumping the Interf. graph: --- ... word -> $I10 $I11 $I12 (3) ... $I10 -> word (1) $I11 -> word (1) $I12 -> word (1) $I13 -> (0) ... I won

Re: imcc code generation problem

2004-04-23 Thread Nick Glencross
I've now reduced the code down to this, a much simpler example [don't expect it to run!] Regards, Nick .sub _md5_create_buffer .param string str .local int word $I0 = length str $I1 = $I0 / 64 $I2 = $I0 % 64 $I3 = 64 * $I1 word = 0 md5_create_buffer_loop:

imcc code generation problem

2004-04-23 Thread Nick Glencross
Guys, I'll log a bug for this if need be, but I'd rather solve the problem myself (with some help). I'm in the middle of writing a routine (MD5 hashing for fun), and stumbled upon the following code generation problem in imcc. In the attached code, I've got $I10 = word & 0x00ff $