public inbox for java-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Matthew Fortune <Matthew.Fortune@imgtec.com>
To: Anthony Green <green@redhat.com>
Cc: "java-patches@gcc.gnu.org" <java-patches@gcc.gnu.org>,
	"aurelien@aurel32.net" <aurelien@aurel32.net>,
	Yunqiang Su	<Yunqiang.Su@imgtec.com>
Subject: RE: [RFC] interpreter use of closures and return types
Date: Wed, 22 Jun 2016 12:53:00 -0000	[thread overview]
Message-ID: <6D39441BF12EF246A7ABCE6654B023537E45740C@HHMAIL01.hh.imgtec.org> (raw)
In-Reply-To: <87inx12ysl.fsf@laptop.atgreen.org>

Anthony Green <green@redhat.com> writes:
> Matthew Fortune <Matthew.Fortune@imgtec.com> writes:
> 
> > The root of the problem seems to be in a oddity of FFI that integer return
> > values less than word (or rather register) size are returned as an
> > ffi_arg.
> 
> Yes, this is expected behaviour.
> 
> > The java interpreter does not appear to adhere to this and the patch below
> > seems to fix the issue. Can anyone comment if this looks like the right
> > approach?
> 
> On the surface it looks good to me.

Thanks, I'll get on with testing then. As you can see I was somewhat unsure
of the fix, I initially had patched libffi for MIPS n32 until I realised
the ffi_arg quirk. It seems a few projects have fallen foul of this with
32-bit integers and 64-bit architectures. Libguile had the same issue some
time ago.

Matthew

  reply	other threads:[~2016-06-22 12:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-22 11:54 Matthew Fortune
2016-06-22 12:28 ` Anthony Green
2016-06-22 12:53   ` Matthew Fortune [this message]
2016-06-22 16:49 ` Aurelien Jarno

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=6D39441BF12EF246A7ABCE6654B023537E45740C@HHMAIL01.hh.imgtec.org \
    --to=matthew.fortune@imgtec.com \
    --cc=Yunqiang.Su@imgtec.com \
    --cc=aurelien@aurel32.net \
    --cc=green@redhat.com \
    --cc=java-patches@gcc.gnu.org \
    /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).