[kaffe] XScale jthreads code

Helmer Krämer hkraemer at freenet.de
Sat Sep 18 02:32:34 PDT 2004


On Sat, 18 Sep 2004 10:09:59 +0100
Peter Naulls <peter at chocky.org> wrote:

> In message <20040918110313.618ba619 at moose>
>           Helmer Krämer <hkraemer at freenet.de> wrote:
> 
> > > In any case, I recommend you find the true cause, and take away any code
> > > that checks for an XScale.
> > 
> > to avoid the confusion, we should probably remove the --enable-xscale
> > configure option and have a --with-native-fpu (or whatever) option
> > instead that would default to true on i386 but to false on arm. The
> > different SP_OFFSETs in config/arm/threads.h would then depend on
> > whether an fpu is available and not on whether kaffe is built for
> > an xscale. Does that make more sense?
> 
> No, this is still misleading.  The presense or otherwise of an FPU is
> irrelevant on ARM with respect to the code. My first recommendation
> remains to find out the exact cause of the differences that lead to this
> incorrect conclusion being made.    I also suggest making any comparison
> to i386 might just cloud the issue.

The unix-jthreads threads system uses setjmp/longjmp to switch between
different (java) threads. To do this, it has to extract the value of the
SP from a jmp_buf. On linux, the offset of the SP inside a jmp_buf depends
on the presence of an fpu (unless I misread the glibc sources). Therefore,
kaffe has to know whether an fpu is available, because otherwise it can't
get this offset right.

Regards,
Helmer




More information about the kaffe mailing list