https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71917
Eric Botcazou <ebotcazou at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |NEW Assignee|ebotcazou at gcc dot gnu.org |unassigned at gcc dot gnu.org --- Comment #7 from Eric Botcazou <ebotcazou at gcc dot gnu.org> --- > 2016-07-13 Matthew Fortune <matthew.fort...@imgtec.com> > > * interpret-run.cc: Use ffi_arg for FFI integer return types. I think that this change is incorrect (unlike the other one). interpret.cc uses the raw API instead of the regular one and the 32->64 bits adjustment is already done in ffi_java_raw_to_rvalue: static void ffi_java_raw_to_rvalue (ffi_cif *cif, void *rvalue) { #if WORDS_BIGENDIAN && FFI_SIZEOF_ARG == 8 switch (cif->rtype->type) { case FFI_TYPE_UINT8: case FFI_TYPE_UINT16: case FFI_TYPE_UINT32: *(UINT64 *)rvalue >>= 32; break; case FFI_TYPE_SINT8: case FFI_TYPE_SINT16: case FFI_TYPE_SINT32: case FFI_TYPE_INT: *(SINT64 *)rvalue >>= 32; break; case FFI_TYPE_COMPLEX: /* Not supported yet. */ abort(); default: break; } #endif } so we now have a double adjustment on 64-bit big-endian and this breaks. Maybe there is something missing for little-endian MIPS in java_raw_api.c.