[kaffe] JIT3 on M68k Platform (Amiga/Linux)

Tony Wyatt wyattaw at optushome.com.au
Thu May 8 04:41:01 PDT 2003


Hi all,

I thought this little gem should be shared with other M68k owners. There was
only one big problem that made the JIT3 crash on the Amiga and native m68k
Linux on my machine, and this patch fixes it.

Dalibor, I am including this for the "generic" m68k version of
"jit3-m68k.def". Later I shall produce an Amiga-specfic version.

The patch deletes the "restore registers" instruction from the "eprolog"
instruction sequence. This sequence was only executed during an exception,
and caused havoc when it "restored" rubbish into perfectly good registers,
some with return addresses in them. The "restoration" was unnecessary anyway,
so I have deleted it altogether. JIT3 now runs as well as JIT1 on both the
Amiga and Debian running natively on my m68k platform.

I still have problems with floating point in both jitters, and I am just
about to address that problem.

cheers
tony

-------------- next part --------------
--- /Distributions/kaffe/kaffe-1.0.7/config/m68k/jit3-m68k.def	Mon Jun 18 02:39:10 2001
+++ /kaffe/config/m68k/jit3-m68k.def	Thu May  8 21:30:04 2003
@@ -1318,11 +1318,15 @@
 	op_moveal_aa(REG_fp, REG_a0);
 	l->at = (uintp)CODEPC+2;
 	op_addal_ia(0, REG_a0);
+
+#if	(0)		// don't destroy our good registers
 #if !defined(HAVE_NO_SUBAW)
 	op_subaw_ia(SRNR * SLOTSIZE, REG_a0);
 #else
 	op_subal_ia(SRNR * SLOTSIZE, REG_a0);
 #endif
+#endif		// end no-oped section
+
 	op_moveal_aa(REG_a0, REG_sp);
 }
 


More information about the kaffe mailing list