[PATCH, MIPS] .gnu.attribute support for sdemtk -mno-float

Jim Wilson wilson@codesourcery.com
Sat Apr 24 02:47:00 GMT 2010


The mipsisa32r2-sdemtk-elf target supports a -mno-float option, which
disallows any FP operations.  It uses the -msoft-float ABI, and then
links with a library without the soft-float routines.  Since it doesn't
allow any FP operations, it is ABI compatible with all other ABIs with
respect to FP support.

The MIPS port uses .gnu.attribute 4,X to describe the FP ABI being used.
We need to emit 0 for the -mno-float option, to indicate that we can
link with any FP ABI.

I expanded the .gnu.attribute support and added some comments to make it
clearer what was going on.    Then added the SUBTARGET_AS_GNU_ATTRIBUTE
macro so that the sdemtk port can handle -mno-float.

This was tested with a mipsisa32r2-sde-elf build and testsuite run for C
and C++.  There were no regressions.  This was tested by hand on small
testcases to verify that I got the correct correct in all cases for both
the sde and sdemtk toolchains.

OK?

Jim

-------------- next part --------------
A non-text attachment was scrubbed...
Name: sdemtk-gnu-attr.patch
Type: text/x-patch
Size: 1848 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20100424/bbda18e9/attachment.bin>


More information about the Gcc-patches mailing list