NOTICE: The Processors Wiki will End-of-Life on January 15, 2021. It is recommended to download any files or other content you may need that are hosted on processors.wiki.ti.com. The site is now set to read only.

IEEE 754 Support in TI Compilers

From Texas Instruments Wiki
Jump to: navigation, search

The IEEE Standard for Floating-Point Arithmetic (IEEE 754, also published as ISO/IEC/IEEE 60559:2011) is a widely-used standard for floating-point format and arithmetic.

The TI compilers for all devices support IEEE 754 floating-point arithmetic, whether or not those devices have native floating-point processing.

All current TI compilers support IEEE 754 32-bit and 64-bit formats; 64-bit format is not available in some modes (MSP430 COFF).

The TI compiler does not support every aspect of IEEE 754; in particular, it only attempts to support that portion of IEEE 754 required by the C standard. Technically, the C89 standard does not require IEEE 754 support, and for C99, full IEEE 754 support is optional. TI compilers support only 32- and 64-bit floating-point values. Not all targets support 64-bit floating-point values.

The support for IEEE 754 is of significantly different quality between devices which natively support IEEE 754 and those which do not. When the device does not natively support IEEE 754, these operations must be performed with helper functions located in the RTS library. These functions tend not to handle special values (Inf, NaN, denormal) correctly.

For devices that natively support IEEE 754, such as C6600 and Cortex-A8, the TI compiler-generated code is conformant to that part of IEEE 754 (ISO/IEC/IEEE 60559) available in C89 features, with the following caveats:

  • The --fp_mode=strict option must be specified
  • The --fp_reassoc=off option must be specified
  • Only one NaN, qNaN (quiet NaN) is supported
  • Only "round to nearest/even" mode is supported
  • The compiler might not preserve the "literal meaning" of some constant expressions which should raise a run-time FPE. In particular, "inexact" is not supported for constant expressions.
  • Exact precision (in particular, due to rounding) is only provided for fundamental operations (addition, multiplication, etc). For C library functions such as sin and cos, the results may not be correct to the last bit. This is a quality-of-implementation issue and does not impact IEEE 754 conformance.

The following are not currently supported:

  • C99 float rounding mode manipulation features
  • C99 floating-point exception manipulation features

See also[edit]

External references[edit]

E2e.jpg {{
  1. switchcategory:MultiCore=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article IEEE 754 Support in TI Compilers here.

Keystone=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article IEEE 754 Support in TI Compilers here.

C2000=For technical support on the C2000 please post your questions on The C2000 Forum. Please post only comments about the article IEEE 754 Support in TI Compilers here. DaVinci=For technical support on DaVincoplease post your questions on The DaVinci Forum. Please post only comments about the article IEEE 754 Support in TI Compilers here. MSP430=For technical support on MSP430 please post your questions on The MSP430 Forum. Please post only comments about the article IEEE 754 Support in TI Compilers here. OMAP35x=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article IEEE 754 Support in TI Compilers here. OMAPL1=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article IEEE 754 Support in TI Compilers here. MAVRK=For technical support on MAVRK please post your questions on The MAVRK Toolbox Forum. Please post only comments about the article IEEE 754 Support in TI Compilers here. For technical support please post your questions at http://e2e.ti.com. Please post only comments about the article IEEE 754 Support in TI Compilers here.

}}

Hyperlink blue.png Links

Amplifiers & Linear
Audio
Broadband RF/IF & Digital Radio
Clocks & Timers
Data Converters

DLP & MEMS
High-Reliability
Interface
Logic
Power Management

Processors

Switches & Multiplexers
Temperature Sensors & Control ICs
Wireless Connectivity