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]

Important LIBFFI bug in PowerPC subtree



Anthony, all,


there seems to be a somewhat important bug in the PowerPC subtree of libffi that makes it unusable on powerpc chips with no floating point support.

To summarize: despite being told no floating point hardware
exists at configure/compile time, libffi-3.0.9/src/powerpc/sysv.S
contains active floating point instructions for loading/unloading
floating point values when invoking functions.

E.g., lines 88-96, etc.

This results in "Illegal Instruction" being thrown by the target platform
(PowerPC 405) -- and as no kernel-emulation of floating point exists, this
crashed anything linked with libffi.

It is unclear how to change the calling convention to match whatever
gcc would generate for this, but as it stands, FFI cannot be used to invoke any floating-point related code on hardware without floating point support if it returns a float or has a float parameter.


cheers,
radu

--
radu sion
http://www.cs.stonybrook.edu/~sion



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