[kaffe] Re: "PS2" Patches to Kaffe
Kevin D. Kissell
kevink at mips.com
Tue Jul 9 00:42:48 PDT 2002
From: "Dylan Schell" <dylans at xs4all.nl>
> Kevin D. Kissell wrote:
> > So with that modification, I applied Dylan's
> > patches both my MIPS Malta 2.4.18 platform and
> > my PS2 (actually, I had independently done most
> > of them, and thank Dylan for having attacked the
> > software-floating-double hack, which was the last
> > thing I ran up against before setting the problem
> > aside). On the PS2, things build, and many things
> > run. As Dylan may recall, I was working on fixing
> > the FPU emulation for the PS2 kernel, and I have
> > that *partly* working. If I do a default build,
> > the jit3 code seems to be active, and it is generating
> > a fair amount of double-precision FPU instructions
> > that are being fed to the emulator. The output of
> > a "make check" looks as follows:
> I was wondering about this part of my patch, would this go
> away when a FPU emulator is present?
The FPU emulator is essential if the JIT is to be used,
unless we do a rewrite of the JIT to have masses of
#ifdef _R5900 cruft. But in interpreted mode, it
should not be invoked (and indeed, the kernel that
I'm using has an 80% functional emulator which is
logging its invocations, and there were lots of them
if I ran the JIT and zero if I ran interpreted).
> I also have 5 failures left for the interpreter, they
> all seem to come back to the difference between 0.0 and -0.0 and
> Inf/-Inf. Does the FPU emulator know the difference between these
> values? Also note that one of Float tests ( don't remember which )
> is acually a Float/Double test that fails on the Double part....
As integrated into the 2.4.x MIPS kernels, the FPU
emulator correctly deals with the distinction between
0.0 and -0.0, etc. As I've got it limping on the PS2
currently, there is a problem with these comparisons,
most likely in the emulation of branch-on-floating-condition.
But in the *interpreter*, the problem can't be the emulator!
I would assume that it's a matter of something being
missing from the hack that you put in to deal with
the hybrid hardware-single/sofware-double execution
model of the R5900.
There's an interesting little test program for IEEE
floating point conformity and stability, written many
years ago in C, called "paranoia". I've got the sources
up on my FTP server, in
I tested the PS2/Linux hybrid FP environment
with it, and it checks out perfectly. It would be
interesting to port those tests to Java as a Java
FP implementation test. One hopes that someone
has already done so, and that it's on the web
somewhere, but for the moment I am preoccupied
with the problem of getting the non-PS2 MIPS
version of kaffe to run at all.
More information about the kaffe