This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: [PATCH/RFA] libjava: SH support
- From: kaz Kojima <kkojima at rr dot iij4u dot or dot jp>
- To: gcc-patches at gcc dot gnu dot org, java-patches at gcc dot gnu dot org
- Cc: aph at cambridge dot redhat dot com, jsturm at one-point dot com, tromey at redhat dot com, aoliva at redhat dot com, joern dot rennecke at superh dot com
- Date: Sat, 27 Jul 2002 11:08:25 +0900
- Subject: Re: [PATCH/RFA] libjava: SH support
- References: <200207251342.g6PDgbN03913@r-rr.iij4u.or.jp>
kaz Kojima <kkojima@rr.iij4u.or.jp> wrote:
>> Was the whole toolchain configured using sjlj exceptions?
>
> Yep, though I'd like to check it again. Anyway, it's a great hint
> for me. Thanks a lot Andrew and Jeff.
I've found a cause of many gij failures on SH port.
Interpreter takes JVM stack and local variables as variable
sized arrays:
void
_Jv_InterpMethod::run (void *retp, ffi_raw *args)
{
using namespace java::lang::reflect;
_Jv_word stack[max_stack];
_Jv_word *sp = stack;
_Jv_word locals[max_locals];
...
and the compiler generates the code which _Unwind_SjLj_Register
is called _before_ allocating machine stack for these arrays.
So the stack pointer is set to the higher address than these
arrays when the exception threw, and the contents of these arrays
are clobbered. I don't know how to fix it.
As a test, if these arrays are allocated by GC_malloc_atomic,
then the remained failures are
FAIL: PR1343 compilation from bytecode
FAIL: PR1343 -O compilation from bytecode
FAIL: zeroexp compilation from source
FAIL: zeroexp byte compilation
FAIL: zeroexp -O compilation from source
FAIL: zeroexp byte compilation
FAIL: Array_3 execution - gij test
FAIL: Array_3 compilation from bytecode
FAIL: Array_3 execution - gij test
FAIL: Array_3 -O compilation from bytecode
FAIL: PR141 output - gij test
FAIL: PR141 output - gij test
FAIL: PR218 execution - gij test
FAIL: PR218 execution - gij test
FAIL: TLtest compilation from bytecode
FAIL: TLtest -O compilation from bytecode
FAIL: Throw_2 execution - source compiled test
FAIL: Throw_2 execution - gij test
FAIL: Throw_2 execution - bytecode->native test
FAIL: Throw_2 -O execution - source compiled test
FAIL: Throw_2 execution - gij test
FAIL: Throw_2 -O execution - bytecode->native test
FAIL: inner4 output - gij test
FAIL: inner4 output - gij test
FAIL: negzero output - gij test
FAIL: negzero output - gij test
Regards,
kaz