This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
RE: [RFC] interpreter use of closures and return types
- From: Matthew Fortune <Matthew dot Fortune at imgtec dot com>
- To: Anthony Green <green at redhat dot com>
- Cc: "java-patches at gcc dot gnu dot org" <java-patches at gcc dot gnu dot org>, "aurelien at aurel32 dot net" <aurelien at aurel32 dot net>, Yunqiang Su <Yunqiang dot Su at imgtec dot com>
- Date: Wed, 22 Jun 2016 12:53:11 +0000
- Subject: RE: [RFC] interpreter use of closures and return types
- Authentication-results: sourceware.org; auth=none
- References: <6D39441BF12EF246A7ABCE6654B023537E45723C at HHMAIL01 dot hh dot imgtec dot org> <87inx12ysl dot fsf at laptop dot atgreen dot 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