5.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
5.42 Default selection of hardware or software floating-point support
5.43 Example of hardware and software support differences for floating-point arithmetic
5.44 Vector Floating-Point (VFP) architectures
5.45 Limitations on hardware handling of floating-point arithmetic
5.46 Implementation of Vector Floating-Point (VFP) support code
5.47 Compiler and library support for half-precision floating-point numbers
5.48 Half-precision floating-point number format
5.49 Compiler support for floating-point computations and linkage
5.50 Types of floating-point linkage
5.51 Compiler options for floating-point linkage and computations
Related reference
5.52 Floating-point linkage and computational requirements of compiler options
5.53 Processors and their implicit Floating-Point Units (FPUs)
10.98 #pragma softfp_linkage, #pragma no_softfp_linkage
8.39 --cpu=name compiler option
8.55 --device=name
10.114 __fabs intrinsic
8.84 --fp16_format=format
8.85 --fpmode=model
8.86 --fpu=list
8.87 --fpu=name compiler option
10.136 __sqrt intrinsic
10.154 GNU built-in functions
10.155 Predefined macros
10.150 VFP status intrinsic
9.14 Hexadecimal floats
9.38 Hexadecimal floating-point constants
17.3 Limits for floating-point numbers
Related information
ARM and Thumb floating-point build options (ARMv6 and earlier)
ARM and Thumb floating-point build options (ARMv7 and later)
Floating-point Support
Institute of Electrical and Electronics Engineers
Non-ConfidentialPDF file icon PDF versionARM DUI0472J
Copyright © 2010-2013 ARM. All rights reserved.