[Patch] libffi: Add MIPS64 support.
Richard Sandiford
richard@codesourcery.com
Thu Aug 9 09:58:00 GMT 2007
David Daney <ddaney@avtrex.com> writes:
> This patch adds full MIPS64 support to libffi. Previously libffi had
> disabled MIPS64 and the code that was there failed many test cases.
Thanks for doing this.
> In addition to cleaning up the existing code and fixing some failing
> corner cases, I added support for ffi closures and throwing of
> exceptions through libffi. Most of the changes only touch the n32 and
> n64 ABIs which had previously been disabled. The one exception was to
> move a parameter to a different register($12) in the o32 closure code so
> that the trampoline generation code could be shared with n32.
>
> Tested on x86_64-pc-linux-gnu, mips64-linux{o32, n32, n64} with no
> failures in the libffi testsuite.
>
> OK to Commit?
Looks good to me. I can't claim to have mulled over every line,
but I couldn't see anything obvious reading through. One question
though:
> + /* The size of a pointer depends on the ABI */
> + if (type == FFI_TYPE_POINTER)
> + type =
> + (ecif->cif->abi == FFI_N64) ? FFI_TYPE_UINT64 : FFI_TYPE_UINT32;
Was there a reason for preferring UINT to SINT here? Naively, I'd have
expected to see pointers treated as signed, especially for n32. I can well
imagine it makes no practical difference. I just thought I'd ask.
Also, as a minor nit, the patch mixed space and tab indentation quite a bit,
which made it hard to read (and might make future patches hard to read).
I won't insist that you change it though.
OK if no-one more familiar with the code objects in 24 hours.
Richard
More information about the Java-patches
mailing list