09.12.2012 Views

Cortex-A8 Technical Reference Manual - ARM Information Center

Cortex-A8 Technical Reference Manual - ARM Information Center

Cortex-A8 Technical Reference Manual - ARM Information Center

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

13.6 Compliance with the IEEE 754 standard<br />

NEON and VFP Programmers Model<br />

The VFP coprocessor is fully compliant with the IEEE 754 standard in hardware, no support<br />

code is required to achieve this compliance.<br />

See the <strong>ARM</strong> Architecture <strong>Reference</strong> <strong>Manual</strong> for information about VFP architectural<br />

compliance with the IEEE 754 standard.<br />

13.6.1 Complete implementation of the IEEE 754 standard<br />

The following operations from the IEEE 754 standard are not supplied by the VFP instruction<br />

set:<br />

• remainder<br />

• round floating-point number to integer-valued floating-point number<br />

• binary-to-decimal conversions<br />

• decimal-to-binary conversions<br />

• direct comparison of single-precision and double-precision values.<br />

For complete implementation of the IEEE 754 standard, the VFP coprocessor must be<br />

augmented with library functions that implement these operations. See Application Note 98,<br />

VFP Support Code for details of the available library functions.<br />

13.6.2 IEEE 754 standard implementation choices<br />

Some of the implementation choices permitted by the IEEE 754 standard and used in the VFPv3<br />

architecture are described in the <strong>ARM</strong> Architecture <strong>Reference</strong> <strong>Manual</strong>.<br />

NaN handling<br />

Any single-precision or double-precision values with the maximum exponent field value and a<br />

nonzero fraction field are valid NaNs. A most significant fraction bit of zero indicates a<br />

Signaling NaN (SNaN). A one indicates a Quiet NaN (QNaN). Two NaN values are treated as<br />

different NaNs if they differ in any bit. Table 13-13 shows the default NaN values in both single<br />

and double precision.<br />

Table 13-13 Default NaN values<br />

Single-precision Double-precision<br />

Sign 0 0<br />

Exponent 0xFF 0x7FF<br />

Fraction bit [22] = 1 bits [21:0] are all zeros bit [51] = 1 bits [50:0] are all zeros<br />

Any SNaN passed as input to an operation causes an Invalid Operation exception and sets the<br />

IOC flag, FPSCR[0], to 1. A default QNaN is written to the destination register. The rules for<br />

cases involving multiple NaN operands are in the <strong>ARM</strong> Architecture <strong>Reference</strong> <strong>Manual</strong>.<br />

Processing of input NaNs for <strong>ARM</strong> floating-point coprocessors and libraries is defined as<br />

follows:<br />

• In full-compliance mode, NaNs are handled according to the <strong>ARM</strong> Architecture <strong>Reference</strong><br />

<strong>Manual</strong>. The hardware processes the NaNs directly for arithmetic CDP instructions. For<br />

data transfer operations, NaNs are transferred without raising the Invalid Operation<br />

<strong>ARM</strong> DDI 0344K Copyright © 2006-2010 <strong>ARM</strong> Limited. All rights reserved. 13-17<br />

ID060510 Non-Confidential

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!