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

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


Warning: This is a message in MIME format. Your mail reader does not
support MIME. Some parts of this message will be readable as plain text.
To see the rest, you will need to upgrade your mail reader. Following are
some URLs where you can find MIME-capable mail programs for common platforms:

  Amiga............: YAM          http://www.yam.ch/
  Unix.............: Metamail     ftp://ftp.bellcore.com/nsb/
  Windows/Macintosh: Eudora       http://www.qualcomm.com/

General info about MIME can be found at:

http://www.cis.ohio-state.edu/hypertext/faq/usenet/mail/mime-faq/top.html


--BOUNDARY.141663792.3
Content-Type: text/plain

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


--BOUNDARY.141663792.3
Content-Type: text/plain; charset=iso-8859-1; name="jit3-m68k.diff"
Content-Disposition: attachment; filename="jit3-m68k.diff"
Content-Transfer-Encoding: quoted-printable

--- /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);=0D
 	l->at =3D (uintp)CODEPC+2;=0D
 	op_addal_ia(0, REG_a0);=0D
+
+#if	(0)		// don't destroy our good registers
 #if !defined(HAVE_NO_SUBAW)=0D
 	op_subaw_ia(SRNR * SLOTSIZE, REG_a0);=0D
 #else=0D
 	op_subal_ia(SRNR * SLOTSIZE, REG_a0);=0D
 #endif=0D
+#endif		// end no-oped section
+
 	op_moveal_aa(REG_a0, REG_sp);=0D
 }=0D
 =0D

--BOUNDARY.141663792.3--