[kaffe] jit3 move_register

Helmer Krämer hkraemer at freenet.de
Thu Jul 29 05:20:10 PDT 2004


while having a closer look at the jit3 engine to find out what
broke the m68k backend, I also noticed a few other things that
might help e.g. mipsel.

First of all, move_register() seems to pass wrong values to the
backend's HAVE_move_register_foo:

 #if defined(HAVE_move_register_int)
 	if (reginfo[toreg].type & (Rint|Rsubint)) {
		HAVE_move_register_int(toreg, fromreg);
 		return (1);

The values passed to the HAVE_move_register_foo are the indices
for the reginfo array. However, I think it would be correct to
pass the regno field of the register instead:
	HAVE_move_register_int(reginfo[toreg].regno, reginfo[fromreg].regno);
Since these are the same values that are returned by slotRegister().

With the attached patch applied, it should be possible to add a
HAVE_move_register_float to the mipsel backend, which in turn might
save a few spills when allocating a floating point register.


-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: move_register.patch
Url: http://kaffe.org/pipermail/kaffe/attachments/20040729/d9eb78ae/attachment-0002.txt 

More information about the kaffe mailing list