### 5.17.2. Vectors

A vector can use up to eight single-precision registers, or four double-precision registers, from the same bank. The number of registers used by a vector is controlled by the LEN bits in the FPSCR (see FPSCR, the floating‑point status and control register).

A vector can start from any register. The first register used by a vector is specified in the register fields in the individual instructions.

#### Vector wrap-around

If the vector extends beyond the end of a bank, it wraps around to the beginning of the same bank, for example:

• a vector of length 6 starting at s5 is {s5, s6, s7, s0, s1, s2}

• a vector of length 3 starting at s15 is {s15, s8, s9}

• a vector of length 4 starting at s22 is {s22, s23, s16, s17}

• a vector of length 2 starting at d7 is {d7, d4}

• a vector of length 3 starting at d10 is {d10, d11, d8}.

A vector cannot contain registers from more than one bank.

#### Vector stride

Vectors can occupy consecutive registers, as in the examples above, or they can occupy alternate registers. This is controlled by the STRIDE bits in the FPSCR (see FPSCR, the floating‑point status and control register). For example:

• a vector of length 3, stride 2, starting at s1, is {s1, s3, s5}

• a vector of length 4, stride 2, starting at s6, is {s6, s0, s2, s4}

• a vector of length 2, stride 2, starting at d1, is {d1, d3}.

#### Restriction on vector length

A vector cannot use the same register twice. Enabling for vector wrap-around, this means that you cannot have:

• a single-precision vector with length > 4 and stride = 2

• a double-precision vector with length > 4 and stride = 1

• a double-precision vector with length > 2 and stride = 2.