This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch,libffi] Add MIPS64 soft-float support to libffi.
- From: Anthony Green <green at redhat dot com>
- To: David Daney <ddaney at caviumnetworks dot com>
- Cc: GCJ-patches <java-patches at gcc dot gnu dot org>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 28 Aug 2009 13:59:21 -0400
- Subject: Re: [Patch,libffi] Add MIPS64 soft-float support to libffi.
- References: <4A9818E8.4090503@caviumnetworks.com>
David Daney wrote:
libffi is lacking support for the mips64 soft-float ABIs. In addition
be being annoying in and of itself, it also causes libjava failures.
The patch adds soft-float support for both n32 and n64 ABIs. Quite a
bit of code had to be touched as the rules for passing structures
containing floating point elements are a slightly complex.
While working on the patch I noticed that we were failing a bunch if
pointer passing test cases that where recently added. It turns out
that the original closure support for returning pointers was incorrect
and this was unmasked by the new test cases. I wrapped fixes for this
into the patch as well (Yes, I know it is technically a no-no). The
change to ffi_java_raw_to_rvalue() is needed with with the fixed
closure pointer return.
I would like to add that I think there is still incorrect handling for
values of most types on big-endian systems in java_raw_api.c, but
since the java interpreter only uses a couple of types, the
problematical cases are never used.
The end result is that all libffi tests except for some long double
things now pass at -O0. There are a couple of floating point failures
with optimization turned on, but they look like they may be issues
with libgcc's soft-float support. The long double FAILures seem to
be due to lack of support in my glibc's printf.
Tested on mips64-unknown-linux-gnu soft-float with both n32 and n64
ABIs with no regressions. Currently testing mips64-unknown-linux-gnu
hard-float n32 and n64.
OK to commit given the hard-float testing is good?
Thanks David. Please commit once you've confirmed good test results.
I'll move the patch to the libffi repository once I see your commit.
AG