[kaffe] MIPS JIT3 and null pointers.
rsdio at metastatic.org
Fri Mar 19 20:38:02 PST 2004
-----BEGIN PGP SIGNED MESSAGE-----
>>>>> "Kevin" == Kevin D Kissell <kevink at mips.com> writes:
Kevin> Casey Marshall wrote:
>> 2) When it tries to do this when walking back from a `soft' C
>> method, it gets wrong values. In this case, it gets an address in
>> `mips_do_fixup_trampoline' for the previous pc (which I think
>> should be a jitted method instead), and a pointer to an instance of
>> NullPointerException for the previous fp (this should be an address
>> on the stack). 3) The value for the previous frame pointer is
>> invalid since it's way lower than the current frame pointer, so
>> __mipsGetNextFrame fills in pc and fp with zero to mark what it
>> thinks is the end of this stack.
Kevin> The register used as a "frame pointer" in the MIPS calling
Kevin> sequence/ABI, GPR 30, isn't generally used as a frame pointer
Kevin> in MIPS Linux. It's treated as a ninth "static" register ("s8"
Kevin> in the assembler idiom).
Would this be the case for functions in the Kaffe runtime too? When
they're compiled with -fno-omit-frame-pointer?
Kevin> Frame pointers aren't strictly speaking necessary if one's
Kevin> compiler and debugger know how to keep track of stack frames
Kevin> on-the-fly, which has been the case with gcc/gdb for a long
Kevin> time now. If the Kaffe JIT needs to use one, I could
Kevin> understand that, but it should not assume that it's been passed
Kevin> a valid one if invoked from C. If it wants to create and use
Kevin> one itself, it can use r30, provided that it respects the
Kevin> static character of the register, and saves/restores the value
Kevin> provided at entry to a subroutine.
It looks like the prologue and epilogue do this.
But this makes it sound as though __mipsGetNextFrame might just not
work in general.
Casey Marshall || rsdio at metastatic.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.7 <http://mailcrypt.sourceforge.net/>
-----END PGP SIGNATURE-----
More information about the kaffe