[kaffe] patch for kaffe1.0.7jit3 code runing on MIPS
robilad at kaffe.org
Thu Jul 8 03:40:42 PDT 2004
Yoshiharu Oba wrote:
> Hi Dalibor
> I appreciate your advice very much. Now I'm writing a changelog and
> remake a new patch, It's also included.
thanks for the updated patch and the ChangeLog. I've started to merge
parts of it in. Since Dylan Schell's port to PS2Linux is already in the
CVS, it would be nice if you could try to see if the CVS head builds for
you, too, on ps2linux, and adapt yout patch accordingly. I'll comment to
the changelog on what I've checked in & how it has been adapated.
> Wed Jul 07 11:00:00 JST 2004 Yoshiharu Oba <ooba at ps2.1ba.co.jp>
> * config/mips/common.h: Defined the PS2LINUX macro and undefine
> the MIPSII instructions macro. the COMPARE_AND_EXCHANGE macro that is
> imported same macro from KAFFE-1.1.4.
I'va adapted the code a little bit, since Dylan's patch had the same
defines. I've added a guarded include for sgidefs.h to all files using
_MIPS_* macros directly. I've replaced the COMPARE_AND_EXCHANGE macro's
assembler code with compare_and_swap from gcc, in the new file
config/mips/atomicity.h. It seems to be slightly different from your
code, but as I don't speak mips assembler, I can't tell the differences.
> * config/mips/jit.h: Add current stackpointer register into
> the structure of exception frame.
Sounds good to me.
> * config/mips/threads.h:Align FP_OFFSET and SP_OFFSET macro with linux
> * config/mips/linux/md.h: Align FP_OFFSET, EXCEPTIONPROTO macro with linux
That has been implemented in CVS head by Dylan's code.
> * config/mips/mips.c:Fetch the return address from the stackpointer
> that is under certain instruction. (What reason, the exception frame is
> built on the stackpointer when exception occurs in INTERFACE class.
> In this case, Walk backwards process uses the stackpointer
> instead of the framepointer )
I'm not quite sure I understand correctly: When an exception occurs in
an interface, you use the stack pointer instead of the frame pointer to
unwind the stack, right?
> * config/mips/jit3-icode.h: Undefine the double types instruction.
> Only the PlayStation2, Although it has FPU, since only double type
> instructions does not have.
Sounds good. Is there something like -msoft-float for
playstation2-linux-gcc ? FAQ.ps2linux talks about possible FPU emulation
in the kernel, has that happenend? See
http://www.kaffe.org/doc/kaffe/FAQ.ps2linux . Feel free to update it.
> * kaffe/kaffevm/jit3/icode.c: Its on the same reason.
> * config/mips/jit3-mips.def: Bug fixes, How to use of floating point
> register was corrected.
Sounds good, too.
> * configure: Add sgidefs.h
> * kaffe/kaffevm/debug.c: For cleaning linker error
Adapted and checked in.
More information about the kaffe