public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libffi/31937]  New: libffi doesn't support ppc without FPU
@ 2007-05-15 15:39 patrick dot olinet at gmail dot com
  2007-05-16 13:23 ` [Bug libffi/31937] " patrick dot olinet at gmail dot com
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: patrick dot olinet at gmail dot com @ 2007-05-15 15:39 UTC (permalink / raw)
  To: gcc-bugs

PowerPC CPU without FPU (such as the PPC405EP) doesn't pass the libffi
testsuite. Most of the tests crash with an "illegal instruction" error message,
even those that don't manipulate double/float. For instance, it crashes with
the "cls_uint" test.

After investigating, I think the problem comes from the ppc assembly code from
the libffi/src/powerpc directory that includes FPU instructions not supported
by those CPU. In particular, the ppc_closure.S file contains "stfd" FPU
instructions that are supposed to save FPU registers and are always executed,
even if no fpu operation is to be performed.

If you don't need fpu support (as I do), a quick and dirty hack is to comment
out those "stfd" instructions from the ppc_closure.S file.

I guess the right way to fix it would be to use the soft-float system when no
FPU is present. But that's something I don't know how to do...

I've tried with gcc 3.4.3 and gcc 4.1.0, but I guess all versions are affected.


-- 
           Summary: libffi doesn't support ppc without FPU
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libffi
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: patrick dot olinet at gmail dot com
 GCC build triplet: i686-linux-gnu
  GCC host triplet: powerpc-405-linux-gnu
GCC target triplet: powerpc-405-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31937


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2007-12-01 21:02 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-05-15 15:39 [Bug libffi/31937] New: libffi doesn't support ppc without FPU patrick dot olinet at gmail dot com
2007-05-16 13:23 ` [Bug libffi/31937] " patrick dot olinet at gmail dot com
2007-11-02 22:02 ` andreast at gcc dot gnu dot org
2007-11-06 22:55 ` andreast at gcc dot gnu dot org
2007-11-08 19:34 ` andreast at gcc dot gnu dot org
2007-11-21 22:13 ` andreast at gcc dot gnu dot org
2007-11-21 22:14 ` andreast at gcc dot gnu dot org
2007-12-01 21:00 ` andreast at gcc dot gnu dot org
2007-12-01 21:02 ` andreast at gcc dot gnu dot org

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).