This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: PATCH: libffi vs. SPARC (again)
- From: Tom Tromey <tromey at redhat dot com>
- To: Jeff Sturm <jsturm at one-point dot com>
- Cc: java-patches at gcc dot gnu dot org
- Date: 14 Nov 2001 09:41:43 -0700
- Subject: Re: PATCH: libffi vs. SPARC (again)
- References: <Pine.LNX.4.10.10111140345290.8053-100000@mars.deadcafe.org>
- Reply-to: tromey at redhat dot com
>>>>> "Jeff" == Jeff Sturm <jsturm@one-point.com> writes:
Jeff> It stands to reason that if the return value must be one full
Jeff> word, the return type must also reflect its size.
I don't follow the reasoning here.
Jeff> (IMHO ffi_prep_cif should complain if it sees e.g. rtype ==
Jeff> FFI_TYPE_SINT8, but we ignore ffi_prep_cif errors anyway so that
Jeff> wouldn't be much help.)
With your patch, libgcj knows that `byte' (and other small integer)
returns must be promoted to `int'. It seems to me that this is an ABI
issue. And, if that is the case, then libffi properly should handle
this case.
In other words, suppose we change libffi to give an error if the
return type is FFI_TYPE_SINT8. Once we've done that, why not simply
fix libffi to handle this piece of the ABI?
(We should of course do something with ffi_prep_cif errors.)
Tom