VFP Programmer’s Model
ARM DDI 0301H
Copyright © 2004-2009 ARM Limited. All rights reserved.
20-16
ID012310
Non-Confidential, Unrestricted Access
Vector length and stride control
FPSCR[18:16] is the LEN field and controls the vector length for VFP instructions that operate
on short vectors. The vector length is the number of iterations in a short vector instruction.
FPSCR[21:20] is the STRIDE field and controls the vector stride. The vector stride is the
increment value used to select the registers involved in the next iteration of the short vector
instruction.
The rules for vector operation do not enable a vector to use the same register more than once.
LEN and STRIDE combinations that use a register more than once produce Unpredictable
results, as Table 20-7 lists. Some combinations that work normally in single-precision short
vector instructions cause Unpredictable results in double-precision instructions.
20.4.3
Floating-point exception register, FPEXC
In a bounce situation, the FPEXC register records the exceptional status. The FPEXC register
information assists the support code in processing the exceptional condition or reporting the
condition to a system trap handler or a user trap handler.
You must save and restore the FPEXC register whenever changing the context. If the EX flag,
FPEXC[31], is set, then the VFP11 coprocessor is in the exceptional state, and you must also
save and restore the FPINST and FPINST2 registers. You can write the context switch code to
determine from the EX flag the registers to save and restore or to save all three.
The EN bit, FPEXC[30], is the VFP enable bit. Clearing EN disables the VFP11 coprocessor.
The VFP11 coprocessor clears the EN bit on reset.
Table 20-7 Vector length and stride combinations
LEN
Vector length
STRIDE
Vector stride
Single-precision
vector instructions
Double-precision
vector instructions
b000
1
b00
-
All instructions are scalar
All instructions are scalar
b000
1
b11
-
Unpredictable
Unpredictable
b001
2
b00
1
Work normally
Work normally
b001
2
b11
2
Work normally
Work normally
b010
3
b00
1
Work normally
Work normally
b010
3
b11
2
Work normally
Unpredictable
b011
4
b00
1
Work normally
Work normally
b011
4
b11
2
Work normally
Unpredictable
b100
5
b00
1
Work normally
Unpredictable
b100
5
b11
2
Unpredictable
Unpredictable
b101
6
b00
1
Work normally
Unpredictable
b101
6
b11
2
Unpredictable
Unpredictable
b110
7
b00
1
Work normally
Unpredictable
b110
7
b11
2
Unpredictable
Unpredictable
b111
8
b00
1
Work normally
Unpredictable
b111
8
b11
2
Unpredictable
Unpredictable