-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 >>>>> "Timothy" == Timothy Stack <[EMAIL PROTECTED]> writes:
>> > Working on the MIPS JIT3 I have made some small changes to the > >> architechture-independent register code for JIT3 that at least >> allow > the MIPS JIT to pass all the tests in test/internal. To >> summarize, > slotRegister now returns the `jitter ID' of the >> assigned register (the > index into the reginfo array), instead of >> the `backend ID'. All code > that depends on the former is >> unchanged, and all code that depends on > the latter now uses a new >> macro, `slotRegisterRegister', that is > equivalent to >> slotRegister, but returns the backend ID. >> >> Okie, I'll take a look at this and check it in tonight/tomorrow >> morning. Timothy> I looked at the patch, but I'm not totally convinced its the Timothy> right thing to do... Me neither. I instead changed `slotAlias' to use regno, and not the return value of `slotRegister'. However, I tried something similar to this on x86 and it didn't work. I haven't tried this approach (attached) on x86 yet. Timothy> I'd really prefer something that had stronger typing so that Timothy> these mistakes don't continue to happen. For example, the Timothy> x86 backend mixes up uses of the jitter ID for a register and Timothy> the backend ID. Its a little trivial, but still... I'm in favor of Kevin's idea of renaming one of the two `regno' members in the two structs (`kregs' and `SlotData'). Cheers, - -- Casey Marshall || [EMAIL PROTECTED] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (GNU/Linux) Comment: Processed by Mailcrypt 3.5.7 <http://mailcrypt.sourceforge.net/> iD8DBQFAVfHigAuWMgRGsWsRAsv9AJwL06bDJnTSYxJUfSkYGO4es9EFuwCfVKBI LUqHxizwTTg9Kas4Q3p333Y= =bx2x -----END PGP SIGNATURE-----
Index: kaffe/kaffevm/jit3/machine.c =================================================================== RCS file: /cvs/kaffe/kaffe/kaffe/kaffevm/jit3/machine.c,v retrieving revision 1.48 diff -u -r1.48 machine.c --- kaffe/kaffevm/jit3/machine.c 8 Mar 2004 21:21:13 -0000 1.48 +++ kaffe/kaffevm/jit3/machine.c 15 Mar 2004 18:04:03 -0000 @@ -1115,6 +1115,9 @@ type = s->u[1].value.i; from = s->u[2].slot; + if (from->regno == NOREG) { + slotRegister(from, type, rread, NOREG); + } if (reginfo[from->regno].flags & Rreadonce) { /* * XXX Aggressively spill the floating point register on x86. @@ -1138,7 +1141,7 @@ /* Get the register we're aliasing and attach the 'to' slot * to it. */ - reg = slotRegister(from, type, rread, NOREG); + reg = from->regno; reginfo[reg].refs++; to->regno = reg; to->modified = rwrite;