This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch,libffi] Add MIPS64 soft-float support to libffi.


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]