This is the mail archive of the
libffi-discuss@sourceware.org
mailing list for the libffi project.
Re: Straying #endif in ppc_closure.S
- From: Alan Modra <amodra at gmail dot com>
- To: Anthony Green <green at moxielogic dot com>
- Cc: libffi-discuss at sourceware dot org
- Date: Tue, 19 Nov 2013 10:44:30 +1030
- Subject: Re: Straying #endif in ppc_closure.S
- Authentication-results: sourceware.org; auth=none
- References: <20131117031650 dot GR22514 at bubble dot grove dot modra dot org> <87eh6e2b4o dot fsf at redhat dot com>
On Mon, Nov 18, 2013 at 06:38:15AM -0500, Anthony Green wrote:
> Alan Modra <amodra@gmail.com> writes:
>
> > An #endif in the wrong place would cause compile failure on powerpcle.
> > Using bl instead of b doesn't cause runtime failures as you might think,
> > but does mess the processor branch prediction.
>
> Thanks Alan. I've committed this along with all of your other recent
> changes. I'm also about to update the README to mention ELFv2 support.
Thanks! Someday I should pull powerpc/ffi.c apart into two files, one
for 32-bit and the other for 64-bit because you can't call 32-bit
functions from 64-bit code or vice versa. Having both lots of code
compiled in is just bloat, and there is really very little shared
code. Also, for the sin of adding #ifdef __STRUCT_PARM_ALIGN__ I
should go through all of the #if's in ffi.c and replace many with
tests on cif->abi, and define quite a few more abi values. Even
"#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE" in ffi.c is wrong, or at
least incomplete in that libffi doesn't handle calls from
-mlong-double-64 code when libffi is compiled with -mlong-double-128.
--
Alan Modra
Australia Development Lab, IBM