[kaffe] jit3 move_register

Casey Marshall csm at gnu.org
Thu Jul 29 13:15:29 PDT 2004

>>>>> "Helmer" == Helmer Krämer <hkraemer at freenet.de> writes:

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

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

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

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

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

Helmer> Comments?

You are definitely correct: this was the source of many of my problems
on mipsel. Your change looks better than what I had, and I may be able
to test this out on mipsel soon.

Casey Marshall || csm at gnu.org

More information about the kaffe mailing list