This is the mail archive of the
libffi-discuss@sourceware.org
mailing list for the libffi project.
[libffi][mipsel]o32.S fails to build for softfloat target with upstream gcc-4.9
- From: Alex Potapenko <opotapenko at gmail dot com>
- To: libffi-discuss at sourceware dot org
- Date: Wed, 15 Apr 2015 10:45:56 +0300
- Subject: [libffi][mipsel]o32.S fails to build for softfloat target with upstream gcc-4.9
- Authentication-results: sourceware.org; auth=none
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