4.40 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.41 Default selection of hardware or software floating-point support
4.42 Example of hardware and software support differences for floating-point arithmetic
4.43 Vector Floating-Point (VFP) architectures
4.44 Limitations on hardware handling of floating-point arithmetic
4.45 Implementation of Vector Floating-Point (VFP) support code
4.46 Compiler and library support for half-precision floating-point numbers
4.47 Half-precision floating-point number format
4.48 Compiler support for floating-point computations and linkage
4.49 Types of floating-point linkage
4.50 Compiler options for floating-point linkage and computations
Related reference
4.51 Floating-point linkage and computational requirements of compiler options
4.52 Processors and their implicit Floating-Point Units (FPUs)
9.94 #pragma softfp_linkage, #pragma no_softfp_linkage
7.27 --cpu=name compiler option
9.110 __fabs intrinsic
7.64 --fp16_format=format
7.65 --fpmode=model
7.66 --fpu=list
7.67 --fpu=name compiler option
9.132 __sqrt intrinsic
9.150 Predefined macros
9.146 VFP status intrinsic
8.14 Hexadecimal floats
8.38 Hexadecimal floating-point constants
16.3 Limits for floating-point numbers
Related information
Floating-point Support
Institute of Electrical and Electronics Engineers
Non-ConfidentialPDF file icon PDF versionARM DUI0375E
Copyright © 2007, 2008, 2011, 2012, 2014 ARM. All rights reserved.