ARM Technical Support Knowledge Articles

How do I make my VFPv2 code IEEE 754 compliant?

Applies to: DS-5, RealView Development Suite (RVDS)

Answer

If you build VFPv2 code with the option --fpu=vfpv2 or target a processor based on ARM architecture v6 such as the ARM1176JF-S, the default option --fpmode=std will only generate code that is sub-compliant to IEEE 754.

For functions that require VFP hardware support, and compliance with IEEE 754 (built with --fpmode=model, where model is one of: ieee_full, ieee_fixed or ieee_no_fenv) VFP support code must be present.

In the RVDS installation path, you can find several examples that support different floating point modes, specified by the --fpmode option:

install_directory\RVDS\Examples\...\vfpsupport

The VFP support code is also included within the following directory:

install_directory\RVDS\Examples\...\vfpsupport\vfp_support

For running a small test with IEEE 754 compliant VFPv2 code, you can simply use the example code directly, but before making any changes to the RVDS example code, make sure you create a backup copy:

  1. Modify and use the build.bat file in the vfp_support folder to generate the vfp_support code .a library file for a later link step against your VFPv2 code
  2. Use or reference the vfp initialization code in the vfp_init folder
  3. Use or reference the system initialization code in each buildx folder
  4. Replace the main.c file with your own.

Notes:

Tips:

See also:

Article last edited on: 2011-08-30 15:57:04

Rate this article

[Bad]
|
|
[Good]
Disagree? Move your mouse over the bar and click

Did you find this article helpful? Yes No

How can we improve this article?

Link to this article
Copyright © 2011 ARM Limited. All rights reserved. External (Open), Non-Confidential