4.41 Compiler support for floating-point arithmetic

The compiler provides many features for managing floating-point arithmetic both in hardware and in software.

For example, you can specify software or hardware support for floating-point, particular hardware architectures, and the level of conformance to IEEE floating-point standards.
The selection of floating-point options determines various trade-offs between floating-point performance, system cost, and system flexibility. To obtain the best trade-off between performance, cost, and flexibility, you have to make sensible choices in your selection of floating-point options.
Floating-point arithmetic can be supported, either:
  • In software, through the floating-point library fplib. This library provides functions that can be called to implement floating-point operations using no additional hardware.
  • In hardware, using a hardware Vector Floating Point (VFP) coprocessor with the ARM processor to provide the required floating-point operations. VFP is a coprocessor architecture that implements IEEE floating-point and supports single and double precision, but not extended precision.


    In practice, floating-point arithmetic in the VFP is implemented using a combination of hardware, that executes the common cases, and software, that deals with the uncommon cases, and cases causing exceptions.
Code that uses hardware support for floating-point arithmetic is more compact and offers better performance than code that performs floating-point arithmetic in software. However, hardware support for floating-point arithmetic requires a VFP coprocessor.
Related concepts
4.42 Default selection of hardware or software floating-point support
4.43 Example of hardware and software support differences for floating-point arithmetic
4.44 Vector Floating-Point (VFP) architectures
4.45 Limitations on hardware handling of floating-point arithmetic
4.46 Implementation of Vector Floating-Point (VFP) support code
4.47 Compiler and library support for half-precision floating-point numbers
4.48 Half-precision floating-point number format
4.49 Compiler support for floating-point computations and linkage
4.50 Types of floating-point linkage
4.51 Compiler options for floating-point linkage and computations
Related reference
4.52 Floating-point linkage and computational requirements of compiler options
4.53 Processors and their implicit Floating-Point Units (FPUs)
9.96 #pragma softfp_linkage, #pragma no_softfp_linkage
7.29 --cpu=name compiler option
7.43 --device=name
9.112 __fabs intrinsic
7.67 --fp16_format=format
7.68 --fpmode=model
7.69 --fpu=list
7.70 --fpu=name compiler option
9.133 __sqrt intrinsic
9.151 GNU built-in functions
9.152 Predefined macros
9.147 VFP status intrinsic
8.14 Hexadecimal floats
8.38 Hexadecimal floating-point constants
17.3 Limits for floating-point numbers
Related information
Institute of Electrical and Electronics Engineers
Floating-point Support
Non-ConfidentialPDF file icon PDF versionARM DUI0375F
Copyright © 2007, 2008, 2011, 2012, 2014 ARM. All rights reserved.