RE: [RFC] interpreter use of closures and return types
Matthew Fortune <[email protected]> Wed, 22 Jun 2016 12:53:11 +0000
| Newsgroups | gmane.comp.gcc.java.patches |
|---|---|
| Message-ID | <[email protected]> |
Anthony Green <[email protected]> writes: > Matthew Fortune <[email protected]> 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