public inbox for libffi-discuss@sourceware.org
 help / color / mirror / Atom feed
* Important LIBFFI bug in PowerPC subtree
@ 2010-07-15 20:23 Radu Sion
  0 siblings, 0 replies; only message in thread
From: Radu Sion @ 2010-07-15 20:23 UTC (permalink / raw)
  To: green; +Cc: libffi-discuss


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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-07-15 20:23 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-15 20:23 Important LIBFFI bug in PowerPC subtree Radu Sion

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).