| |||
| Home > NEON and VFP Programming > FPSCR, the floating-point status and control register | |||
The FPSCR contains all the user-level NEON
and VFP status and control bits. NEON only uses bits[31:27]. The
bits are used as follows:
Are the N, Z, C, and V flags. These are the NEON and VFP status flags. They cannot be used to control conditional execution until they have been copied into the status flags in the CPSR.
Is the QC, cumulative saturation flag. This is set if saturation occurs in NEON saturating instructions.
Is the Default NaN (DN) mode control bit:
Disabled. NaN operands propagate through to the output of a floating-point operation.
Enabled. Any operation involving one or more NaNs returns the Default NaN.
NEON always uses the Default NaN enabled setting regardless of this bit.
Is the flush-to-zero mode control bit:
Flush-to-zero mode is disabled.
Flush-to-zero mode is enabled.
Flush-to-zero mode can provide greater performance, depending on your hardware and software, at the expense of loss of range.
NEON always uses flush-to-zero mode regardless of this bit.
Flush-to-zero mode must not be used when IEEE 754 compatibility is a requirement.
Control rounding mode as follows:
Round to Nearest (RN) mode.
Round towards Plus infinity (RP) mode.
Round towards Minus infinity (RM) mode.
Round towards Zero (RZ) mode.
NEON always uses the Round to Nearest mode regardless of these bits.
STRIDE is
the distance between successive values in a vector. Stride is controlled as
follows:
STRIDE = 1
STRIDE =
2.
LEN is
the number of registers used by each vector. It is 1 + the value
of bits[18:16]:
LEN = 1
…
LEN =
8.
Are the exception trap enable bits:
input denormal exception enable
inexact exception enable
underflow exception enable
overflow exception enable
division by zero exception enable
invalid operation exception enable.
This document does not cover the use of floating-point exception trapping. For information see the technical reference manual for the VFP coprocessor you are using.
Are the cumulative exception bits:
input denormal exception
inexact exception
underflow exception
overflow exception
division by zero exception
invalid operation exception.
Cumulative exception bits are set when the corresponding exception
occurs. They remain set until you clear them by writing directly
to the FPSCR.
Are unused in the basic NEON and VFP specification. They can be used in particular implementations. Do not modify these bits except in accordance with any use in a particular implementation.
To change some bits without affecting other bits, use a read-modify-write procedure.
The use of vector mode is deprecated. Set LEN and STRIDE to
1.
The Technical Reference Manual for your VFP coprocessor.