[kaffe] Re: Kaffe JIT on Alpha

Tony Wyatt wyattaw at optushome.com.au
Tue Apr 22 07:01:01 PDT 2003


Hi Dalibor and others,

With respect to debugging the jitter, I have spent the last week or seven
debugging the JIT on the m68k Amiga platform. I've at last found the basic
problem, and the fix is currently being tested to destruction.

The problem was that a translated method makes no attempt to save CPU
registers. When called from the main Kaffe program, (depending on how many
registers are holding important stuff and how many are corrupted), it may
cause a crash.

In the Amiga version, gcc was compiling the sysdepCallMethod macro using a
register (a3) as a save value for the stack pointer, rather than the more
usual means of using the LINK/UNLK instructions. The translated kaffe
method then was destroying a3 and causing a crash on return. Since the value
that was left in a3 was the address of pointer to a translated method, the
result was often that a method was re-entered, causing considerable
confusion.

To fix this problem, I have implemented the register save/restore
functions that are missing from the existing jitter. The result is
rebuilding as I write this and let's hope that testing can continue
successfully.

I should be able to release this new code pretty soon. It should be usable by
other platforms, and may clear up some of the crashes in the m68k Linux
version.

<fingers crossed>

tony





More information about the kaffe mailing list