Vector Floating-point Programming

6.3Vector and scalar operations

You can use VFP arithmetic instructions to operate:

on scalars

on vectors

on scalars and vectors together.

Use the LEN bits in the FPSCR to control the length of vectors (see FPSCR, the floating-point status and control register on page 6-10).

When LEN is 1 all operations are scalar.

6.3.1Control of scalar, vector and mixed operations

When LEN is greater than 1, the behavior of arithmetic operations depends on which register bank the destination and operand registers are in (see Register banks on page 6-5).

The behavior of instructions of the following general forms:

Op Fd,Fn,Fm

Op Fd,Fm

is as follows:

If Fd is in the first bank of registers, s0 to s7 or d0 to d3, the operation is scalar.

If the Fm is in the first bank of registers, but Fd is not, the operation is mixed.

If neither Fd nor Fm are in the first bank of registers, the operation is vector.

Scalar operations

Op acts on the value in Fm, and the value in Fn if present. The result is placed in Fd.

Vector operations

Op acts on the values in the vector starting at Fm, together with the values in the vector starting at Fn if present. The results are placed in the vector starting at Fd.

Mixed scalar and vector operations

For single-operand instructions, Op acts on the single value in Fm. LEN copies of the result are placed in the vector starting at Fd.

For multiple-operand instructions, Op acts on the single value in Fm, together with the values in the vector starting at Fn. The results are placed in the vector starting at Fd.

ARM DUI 0068B

Copyright © 2000, 2001 ARM Limited. All rights reserved.

6-7

Page 245
Image 245
ARM VERSION 1.2 manual Vector and scalar operations, Control of scalar, vector and mixed operations, Scalar operations