[kaffe] mipsel and jit3

Dalibor Topic robilad at kaffe.org
Thu Oct 7 18:38:37 PDT 2004

Mikolaj Habryn wrote:

Hi Mikolaj,

i went to bed before you popped in on irc last night :(

> I'm trying to run a jit3'd kaffe (CVS HEAD) on a mipsel/uClibc box. It
> isn't much of a box; it's actually a Linksys wireless router with a
> Broadcom embedded MIPS core, but I figured it was worth a try. MIPS is
> MIPS, right? Right? :)

Cool. And CVS HEAD, too, that's good hacking spirit. Let's see if we can 
get it fly on your board.

> Unfortunately, it bombs out more or less instantly, apparently as soon
> as it tries to jit, with an Illegal Instruction error (in
> java/lang/Object). Reading the mailing list archives, it appears that
> there's been some serious progress for this architecture this year, so I
> expect I'm doing something horribly wrong somewhere.

It's not necessarily your fault ;) The MIPS jit seems to have be broken 
for a while now, unfortunately. It would take a bit of excerising the 
jit regression tests and debugging by a motivated hacker to fix it. 
Would you be interested in having a go at it?

> root at OpenWrt:~# LD_LIBRARY_PATH=. ./kaffe-bin -verbosejit
> -Xnative-big-math -Xbootclasspath:./sparse-2.jar -cp ./parsesol.jar
> to.rcpt.mikolaj.ParseSolicitation
> <JIT: java/lang/String.<clinit>()V time 12ms (12ms) @ 0x1008cc08
> (0x100630b4)>
> <JIT: java/lang/String$ICComp.<init>(Ljava/lang/String$1;)V time 2ms
> (14ms) @ 0x1008c9e8 (0x10064b30)>
> <JIT: java/lang/String$ICComp.<init>()V time 2ms (16ms) @ 0x1008cdc8
> (0x10064af4)>
> <JIT: java/lang/Object.<init>()V time 0ms (16ms) @ 0x2ab4bc90
> (0x100572a4)>
> Illegal instruction (core dumped)
> root at OpenWrt:~# sh: turning off NDELAY mode

That definitely looks bad ;)

> I'd like to supply more information, but I can't even get a cross-gdb
> built with --enable-targets=all to recognize the core file or the
> executable (*boggle*). Again, I'm obviously doing something hideously
> wrong, but I'm at my wits' end trying to work out what it might be.
> I've put all of the files up at http://mikolaj.tv/kaffe/ if they're of
> use to anyone.

You could try crosstools, I believe that it has a mips toolchain. I 
don't know if specialized gdb is a part of it, though. You could ask on 
the linksys lists about pointers for a gdb capable of dealing with it.

> Interpreted mode works fine, if one could describe a 25 minute wait to
> verify a signed XML file with a couple of embedded certificates as fine.

Uh ... no, you definitely want to have a jit ;)

> Um. Help? Please? :)

Sure. Given that interpreter works, it appears to be a jit-specific 
problem. There are jit-specific regression tests, in test/internal. You 
can try to check those out to work out how & why the jit fails.

The other very welcome thing would be to clean up the compiler warnings 
in config/mips directory.

Finally, do all regression tests pass for you with interpreter engine?

dalibor topic

More information about the kaffe mailing list