public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: kaz Kojima <kkojima@rr.iij4u.or.jp>
To: gcc-patches@gcc.gnu.org, java-patches@gcc.gnu.org
Cc: aph@cambridge.redhat.com, jsturm@one-point.com,
	tromey@redhat.com, aoliva@redhat.com, joern.rennecke@superh.com
Subject: Re: [PATCH/RFA] libjava: SH support
Date: Fri, 26 Jul 2002 20:23:00 -0000	[thread overview]
Message-ID: <200207270224.g6R2OoN01986@r-rr.iij4u.or.jp> (raw)
In-Reply-To: Your message of "Thu, 25 Jul 2002 22:26:20 +0900" <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

  reply	other threads:[~2002-07-27  2:24 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-23 21:02 kaz Kojima
2002-07-23 21:16 ` Jeff Sturm
2002-07-23 21:46   ` kaz Kojima
2002-07-24 15:27     ` kaz Kojima
2002-07-24 22:14       ` Tom Tromey
2002-07-25  3:35         ` kaz Kojima
2002-07-25  6:14           ` Jeff Sturm
2002-07-25  6:19             ` kaz Kojima
2002-07-25  7:32               ` Andrew Haley
2002-07-25  7:39                 ` kaz Kojima
2002-07-26 20:23                   ` kaz Kojima [this message]
2002-08-09  1:26                     ` Alexandre Oliva
2002-08-09 17:06                       ` kaz Kojima
2002-08-14 12:46                         ` Tom Tromey
2002-08-14 17:42                           ` kaz Kojima
2002-07-25  9:28           ` Tom Tromey
2002-07-25 16:21             ` kaz Kojima
2002-07-25 18:14               ` Tom Tromey
2002-07-25 22:57                 ` kaz Kojima

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200207270224.g6R2OoN01986@r-rr.iij4u.or.jp \
    --to=kkojima@rr.iij4u.or.jp \
    --cc=aoliva@redhat.com \
    --cc=aph@cambridge.redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=java-patches@gcc.gnu.org \
    --cc=joern.rennecke@superh.com \
    --cc=jsturm@one-point.com \
    --cc=tromey@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).