9.15 __softfp

The __softfp keyword asserts that a function uses software floating-point linkage.

__softfp is a function qualifier. It affects the type of the function.

Note

This keyword has the #pragma equivalent #pragma __softfp_linkage.

Usage

Calls to the function pass floating-point arguments in integer registers. If the result is a floating-point value, the value is returned in integer registers. This duplicates the behavior of compilation targeting software floating-point.
This keyword enables the same library to be used by sources compiled to use hardware and software floating-point.

Note

In C++, if a virtual function qualified with the __softfp keyword is to be overridden, the overriding function must also be declared as __softfp. If the functions do not match, the compiler generates an error.
Related concepts
4.49 Compiler support for floating-point computations and linkage
Related reference
7.70 --fpu=name compiler option
9.96 #pragma softfp_linkage, #pragma no_softfp_linkage
9.44 __attribute__((pcs("calling_convention"))) function attribute
Non-ConfidentialPDF file icon PDF versionARM DUI0375F
Copyright © 2007, 2008, 2011, 2012, 2014 ARM. All rights reserved.