[PATCH] D40256: [ARM] disable FPU features when using soft floating point.

Keith Walker via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 20 08:55:21 PST 2017


keith.walker.arm created this revision.
Herald added subscribers: kristof.beyls, javed.absar, aemerson.

To be compatible with GCC if soft floating point is in effect any FPU
specified is effectively ignored, eg,

  -mfloat-abi=soft -fpu=neon

If any floating point features which require FPU hardware are enabled
they must be disable.

There was some support for doing this for NEON, but it did not handle
VFP, nor did it prevent the backend from emitting the build attribute
Tag_FP_arch describing the generated code as using the floating point
hardware if a FPU was specified (even though soft float does not use
the FPU).

Disabling the hardware floating point features for targets which are
compiling for soft float has meant that some tests which were incorrectly
checking for hardware support also needed to be updated.  In such cases,
where appropriate the tests have been updated to check compiling for
soft float and a non-soft float variant (usually softfp).  This was
usually because the target specified in the test defaulted to soft float.


https://reviews.llvm.org/D40256

Files:
  lib/Driver/ToolChains/Arch/ARM.cpp
  test/Driver/arm-cortex-cpus.c
  test/Driver/arm-dotprod.c
  test/Driver/arm-mfpu.c
  test/Preprocessor/arm-target-features.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D40256.123601.patch
Type: text/x-patch
Size: 55033 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20171120/ffacede4/attachment-0001.bin>


More information about the cfe-commits mailing list