VFP Programmer’s Model
ARM DDI 0301H
Copyright © 2004-2009 ARM Limited. All rights reserved.
20-4
ID012310
Non-Confidential, Unrestricted Access
RunFast mode
In RunFast mode, default handling of subnormal inputs, underflows, and NaN
inputs is not fully compliant with the IEEE 754 standard. No user trap handlers
are permitted in RunFast mode.
When flush-to-zero and default NaN modes are enabled, and all exceptions are
disabled, the VFP11 coprocessor operates in RunFast mode. While the potential
loss of accuracy for very small values is present, RunFast mode removes a
significant number of performance-limiting stall conditions. By not requiring the
floating-point support code, RunFast mode enables increased performance of
typical and optimized code and a reduction in the size of kernel code. See
Hazards
on page 21-6 for more information on performance improvements in RunFast
mode.
Supported formats
The supported formats are:
•
Single-precision and double-precision. No extended format is supported.
•
Integer formats:
—
unsigned 32-bit integers
—
two’s complement signed 32-bit integers.
NaN handling
Any single-precision or double-precision values with the maximum exponent field value and a
nonzero fraction field are valid NaNs. A most significant fraction bit of zero indicates a
Signaling NaN
(SNaN). A one indicates a
Quiet NaN
(QNaN). Two NaN values are treated as
different NaNs if they differ in any bit. Table 20-1 lists the default NaN values in both single and
double precision.
Any SNaN passed as input to an operation causes an Invalid Operation exception and sets the
IOC flag, FPSCR[0]. If the IOE bit, FPSCR[8], is set, control passes to a user trap handler if
present. If IOE is not set, a default QNaN is written to the destination register. The rules for cases
involving multiple NaN operands are in the
ARM Architecture Reference Manual
.
Processing of input NaNs for ARM floating-point coprocessors and libraries is defined as
follows:
•
In full-compliance mode, NaNs are handled according to the
ARM Architecture Reference
Manual
. The hardware does not process the NaNs directly for arithmetic CDP
instructions, but traps to the support code for all NaN processing. For data transfer
operations, NaNs are transferred without raising the Invalid Operation exception or
trapping to support code. For the nonarithmetic CDP instructions, FABS, FNEG, and
FCPY, NaNs are copied, with a change of sign if specified in the instructions, without
causing the Invalid Operation exception or trapping to support code.
Table 20-1 Default NaN values
Single-precision
Double-precision
Sign
0
0
Exponent
0xFF
0x7FF
Fraction
Bit [22] = 1
Bits [21:0] are all zeros
Bit [51] = 1
Bits [50:0] are all zeros