[kaffe] Bug Report: accessing array doesn't throw NullPointerException under MIPS

Kevin D. Kissell kevink at mips.com
Wed Mar 12 02:49:01 PST 2003


> > Note that the problems you reported on Feb 3 were
> > not
> > the same as those that I'm seeing with the
> > MIPS/Linux
> > platform.  In your case, you had 3 regression
> > failures.
> 
> I had the same problem :
> 
> java/lang/Double.java:25: error:Double literal
> "4.9406564584124654418e-324" is too small [JLS 3.10.2]
> 
> with kaffe+kjc failing to build the class libraries.
> So I used jikes, and reported back what I've found.

OK, that makes sense.  Complaints about bad floating
point values practically shout that there's a problem in
argument passing, and I just spotted some more code
in jit3-mips.def that implements part of that.  It'll take
me a while to wrap my head around it, though, and
it's interesting (though not absurd) that the problem
becomes different and more severe with the JIT3
update.

As long as I have your attention, there's one other 
oddity I've found in the MIPS JIT3 support that you
might be able to explain.  In jit3-icode.h for MIPS,
we have

#define HAVE_fakecall_constpool         fakecall_xCC

but in jit3-mips.def we have

define_insn(fake_call, fakecall_xCC)
{
        label* tol = const_label(2);
        label* froml = const_label(1);

        froml->type |= Lfuncrelative|Llong16;
        froml->at = CODEPC;
        ldst_RRC(_LW, REG_ra, REG_gp, 0);
        debug(("        lw ra,?(gp)\n"));

        tol->type |= Lfuncrelative|Llong16;
        tol->at = CODEPC;
        ldst_RRC(_LW, REG_i25, REG_gp, 0);
        debug(("        lw t9,?(gp)\n"));

        insn_RRR(_JALR, REG_i0, REG_i25, REG_i0);
        debug(("        jr t9\n"));

        NOP();
}

Which follows the model of the i386 definition pretty
closely, and the i386 jit3-icode.h defines HAVE_fakecall,
not HAVE_fakecall_constpool.

So...Is the situation in MIPS-land normal, should the
jit3-icode.h definition be for HAVE_fakecall instead
of HAVE_fakecall_constpool, or should the definition
in jit3-mips.def be of fake_call_constpool instead of
fake_call?  On a hunch, I tried the modification to
jit3-icode.h, but the result was neither better nor worse
on any of the regression tests I'm studying.

            Kevin K.




More information about the kaffe mailing list