public inbox for libffi-discuss@sourceware.org
 help / color / mirror / Atom feed
* [libffi][mipsel]o32.S fails to build for softfloat target with upstream gcc-4.9
@ 2015-04-15  7:46 Alex Potapenko
  0 siblings, 0 replies; only message in thread
From: Alex Potapenko @ 2015-04-15  7:46 UTC (permalink / raw)
  To: libffi-discuss

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

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

only message in thread, other threads:[~2015-04-15  7:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-15  7:46 [libffi][mipsel]o32.S fails to build for softfloat target with upstream gcc-4.9 Alex Potapenko

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