This is the mail archive of the libffi-discuss@sourceware.org mailing list for the libffi 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: Straying #endif in ppc_closure.S


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


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