public inbox for libffi-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Alex Potapenko <opotapenko@gmail.com>
To: libffi-discuss@sourceware.org
Subject: [libffi][mipsel]o32.S fails to build for softfloat target with upstream gcc-4.9
Date: Wed, 15 Apr 2015 07:46:00 -0000	[thread overview]
Message-ID: <CAF5aO=+f0MNq1pvVDKB5iqW9fO7A7Oy=e5TwW0wp73yESKXXRQ@mail.gmail.com> (raw)

Dear all!

After this change:
https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=221001
libffi does not build o32.S for softfloat mips, since '-msoft-float'
is passed to the assembler (needed to work with binutils-2.25: see
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64569). As a workaround,
'-Wa,-mhard-float' can be passed to the compiler, yet this is not an
option for FPU-less targets that have FPU emulation disabled in the
kernel (like in case of recent dd-wrt firmwares). It would be perfect
to create ffi_call_O32 and ffi_closure_O32 implementations without the
use of floating point instructions to port libffi to these targets.
>
> ../src/mips/o32.S: Assembler messages:
> ../src/mips/o32.S:94: Error: opcode not supported on this processor: mips32 (mips32) `l.d $f12,0*4($sp)'
> ../src/mips/o32.S:101: Error: opcode not supported on this processor: mips32 (mips32) `l.s $f12,0*4($sp)'
> ../src/mips/o32.S:109: Error: opcode not supported on this processor: mips32 (mips32) `l.d $f12,0*4($sp)'
> ../src/mips/o32.S:110: Error: opcode not supported on this processor: mips32 (mips32) `l.d $f14,2*4($sp)'
> ../src/mips/o32.S:115: Error: opcode not supported on this processor: mips32 (mips32) `l.s $f12,0*4($sp)'
> ../src/mips/o32.S:116: Error: opcode not supported on this processor: mips32 (mips32) `l.s $f14,1*4($sp)'
> ../src/mips/o32.S:123: Error: opcode not supported on this processor: mips32 (mips32) `l.d $f12,0*4($sp)'
> ../src/mips/o32.S:124: Error: opcode not supported on this processor: mips32 (mips32) `l.s $f14,2*4($sp)'
> ../src/mips/o32.S:131: Error: opcode not supported on this processor: mips32 (mips32) `l.s $f12,0*4($sp)'
> ../src/mips/o32.S:132: Error: opcode not supported on this processor: mips32 (mips32) `l.d $f14,2*4($sp)'
> ../src/mips/o32.S:161: Error: opcode not supported on this processor: mips32 (mips32) `s.s $f0,0($8)'
> ../src/mips/o32.S:168: Error: opcode not supported on this processor: mips32 (mips32) `s.d $f0,0($8)'
> ../src/mips/o32.S:265: Error: opcode not supported on this processor: mips32 (mips32) `s.d $f12,((14*4)-10*4)($fp)'
> ../src/mips/o32.S:266: Error: opcode not supported on this processor: mips32 (mips32) `s.d $f14,((14*4)-8*4)($fp)'
> ../src/mips/o32.S:285: Error: opcode not supported on this processor: mips32 (mips32) `l.s $f0,((14*4)-6*4)($fp)'
> ../src/mips/o32.S:289: Error: opcode not supported on this processor: mips32 (mips32) `l.d $f0,((14*4)-6*4)($fp)'

The same happens with mips32r2 as well:
>
> ../src/mips/o32.S: Assembler messages:
> ../src/mips/o32.S:94: Error: opcode not supported on this processor: mips32r2 (mips32r2) `l.d $f12,0*4($sp)'
> ../src/mips/o32.S:101: Error: opcode not supported on this processor: mips32r2 (mips32r2) `l.s $f12,0*4($sp)'
> ../src/mips/o32.S:109: Error: opcode not supported on this processor: mips32r2 (mips32r2) `l.d $f12,0*4($sp)'
> ../src/mips/o32.S:110: Error: opcode not supported on this processor: mips32r2 (mips32r2) `l.d $f14,2*4($sp)'
> ../src/mips/o32.S:115: Error: opcode not supported on this processor: mips32r2 (mips32r2) `l.s $f12,0*4($sp)'
> ../src/mips/o32.S:116: Error: opcode not supported on this processor: mips32r2 (mips32r2) `l.s $f14,1*4($sp)'
> ../src/mips/o32.S:123: Error: opcode not supported on this processor: mips32r2 (mips32r2) `l.d $f12,0*4($sp)'
> ../src/mips/o32.S:124: Error: opcode not supported on this processor: mips32r2 (mips32r2) `l.s $f14,2*4($sp)'
> ../src/mips/o32.S:131: Error: opcode not supported on this processor: mips32r2 (mips32r2) `l.s $f12,0*4($sp)'
> ../src/mips/o32.S:132: Error: opcode not supported on this processor: mips32r2 (mips32r2) `l.d $f14,2*4($sp)'
> ../src/mips/o32.S:161: Error: opcode not supported on this processor: mips32r2 (mips32r2) `s.s $f0,0($8)'
> ../src/mips/o32.S:168: Error: opcode not supported on this processor: mips32r2 (mips32r2) `s.d $f0,0($8)'
> ../src/mips/o32.S:265: Error: opcode not supported on this processor: mips32r2 (mips32r2) `s.d $f12,((14*4)-10*4)($fp)'
> ../src/mips/o32.S:266: Error: opcode not supported on this processor: mips32r2 (mips32r2) `s.d $f14,((14*4)-8*4)($fp)'
> ../src/mips/o32.S:285: Error: opcode not supported on this processor: mips32r2 (mips32r2) `l.s $f0,((14*4)-6*4)($fp)'
> ../src/mips/o32.S:289: Error: opcode not supported on this processor: mips32r2 (mips32r2) `l.d $f0,((14*4)-6*4)($fp)


Since these are all just store and load instructions, it should be
possible to replace them with integer commands and store values in
integer registers. Any ideas how to do this? Thanks in advance!

-- 
Best regards,
Alex Potapenko

                 reply	other threads:[~2015-04-15  7:46 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAF5aO=+f0MNq1pvVDKB5iqW9fO7A7Oy=e5TwW0wp73yESKXXRQ@mail.gmail.com' \
    --to=opotapenko@gmail.com \
    --cc=libffi-discuss@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).