[kaffe] questions about 1.0.6 on embedded mips
brad at parker.boston.ma.us
Thu Jun 6 08:08:47 PDT 2002
I'm new here, so please forgive any ignorance on my part.
I'm been cross compiling 1.0.6 for an Alchemy AU1000 MIP board running
linux, using Montavista's HHL 2.0 (journeyman tools).
the au1000 is a MIPS32 cpu
the gcc/binutils are :
gcc version 2.95.3 20010315 (release/MontaVista)
GNU ld version 2.10.91 (with BFD 22.214.171.124.2)
on the target the kernel is 2.4.17
libc.so.6 -> libc-2.2.3.so
It has floating point emulation built in.
I initially build with the jit turned on but the VM would crash, so I backed
off to a static build and the interpreter only. Here's how I config:
../kaffe-1.0.6/configure --prefix=/opt/kaffe/mips --host=mips-spartacus-linux-gnu --target=mips-spartacus-linux-gnu --with-includes= --without-x --with-staticvm --with-engine=intrp
This almost works but I crash with an unhandle exception
init-2.04# /opt/kaffe/mips/bin/java HelloWorld
Internal error: caught an unexpected exception.
Please check your CLASSPATH and your installation.
I tracked this down to kaffe.def:define_insn(FDIV)
I added printf's of the args, and it's not dividing by zero. And, sometimes
it works and sometimes it doesn't. It's as if something is not initialized.
If I force the argument to int's and do an int divide the hello world works,
but caffine failes...
One thing has me puzzled. In intrp/slots.c
#define stack(N) (&sp[-(N)])
#define stack_long(N) (&sp[-(N)-1])
What's with the "-1"? The slots struct is a union and 8 bytes on my
machine. So, it looks like all of the entries will be the same size -
this "-1" code looks like a vestige of an implementation where int's
and long's took up a different amount of space on the stack (but,
since the slot struct is a union, it seems like they will always take
up the same amount of space, 8 bytes).
This may have nothing to do with the fdiv problem, but I thought I'd
am I lost in space? Any advise on how to debug this?
More information about the kaffe