[kaffe] More mipsel jit3

Kevin D. Kissell kevink at mips.com
Tue Mar 9 12:14:03 PST 2004


> Kevin> That's not at all surprising.  The trickiest thing that I had
> Kevin> to fix to get the kaffe interpreter working for MIPS was to fix
> Kevin> the calling convention stuff.  Argument passing in MIPS *is*
> Kevin> pretty baroque, and worse, there are variants that we'll have
> Kevin> to deal with when we try to support 64-bit MIPS/Linux with
> Kevin> kaffe.  Do you have decent documentation on the MIPS ABI?  I've
> Kevin> probably got some ancient documents in electronic format around
> Kevin> here somewhere.  If you've got Dom Sweetman's "See MIPS Run"
> Kevin> (recommended reading for MIPS hackers everywhere), it's covered
> Kevin> pretty well in chapter 10.
> 
> Yeah, some documentation might help ;)

I'll try to find something and send it to you without copying the whole list.
If you haven't got a copy of Dom's book, I'll see if I can't get MIPS to
send you a copy if you'll likewise send me your mailing address by point-to-point
email.

> I think what's happening is a push_int (or reference, or something) is
> being called, which causes push_float (when we get to that point for
> calling soft_fcmpl) to push its arguments into registers i5 and i6
> because `pushed_int' has been set to `true', but soft_fcmpl expects
> them in f12 and f14.

The rules say that the first two floating args go into f12 and f14
IF AND ONLY IF the first argument is a float.  The historical
reason was so that varargs functions like printf() would work.
So a function that had arguments {int, float, float} would look
for them in i4, i5, and i6 respectively, but a function which had
arguments {float, float} would look for them in f12 and f14.
That much I can tell you off the top of my head.  I'd have to
find some documents (or just look at some disassembled
gcc output) to tell you what happens in cases like {float, int, float}.
 
> So either (1) the call to push_int preceding this is bogus, or (2)
> that call needs to be followed by a popargs, but isn't.

If soft_fcmpl doesn't take an integer as its first argument, I don't
understand where the push_int comes from.

            Regards,

            Kevin K.




More information about the kaffe mailing list