| |||

Home > NEON and VFP Programming > NEON general arithmetic instructions > V{Q}ADD, VADDL, VADDW, V{Q}SUB, VSUBL, and VSUBW |

`VADD`

(Vector Add) adds corresponding elements
in two vectors, and places the results in the destination vector.

`VSUB`

(Vector Subtract) subtracts the elements
of one vector from the corresponding elements of another vector,
and places the results in the destination vector.

Saturating, Long, and Wide versions are available. The sticky QC flag (FPSCR bit[27]) is set if saturation occurs.

V{Q}{`op`

}.`cond`

{`datatype`

},`Qd`

,`Qn`

`Qm`

V{Q}{`op`

}.`cond`

{`datatype`

},`Dd`

,`Dn`

`Dm`

VL{`op`

}.`cond`

`datatype`

,`Qd`

,`Dn`

`Dm`

VW{`op`

}.`cond`

{`datatype`

},`Qd`

,`Qn`

`Dm`

where:

`Q`

if present, indicates that if any of the results overflow, they are saturated.

`op`

must be either

`ADD`

or`SUB`

.`cond`

is an optional condition code (see

*Condition codes*).`datatype`

must be one of:

`I8`

,`I16`

,`I32`

,`I64`

,`F32`

for

`VADD`

or`VSUB`

`S8`

,`S16`

,`S32`

for

`VQADD`

,`VQSUB`

,`VADDL`

,`VADDW`

,`VSUBL`

,`or VSUBW`

`U8`

,`U16`

,`U32`

for

`VQADD`

,`VQSUB`

,`VADDL`

,`VADDW`

,`VSUBL`

,`or VSUBW`

`S64`

,`U64`

for

`VQADD`

or`VQSUB`

.

,`Qd`

,`Qn`

`Qm`

are the destination vector, the first operand vector, and the second operand vector, for a quadword operation.

,`Dd`

,`Dn`

`Dm`

are the destination vector, the first operand vector, and the second operand vector, for a doubleword operation.

,`Qd`

,`Dn`

`Dm`

are the destination vector, the first operand vector, and the second operand vector, for a long operation.

,`Qd`

,`Qn`

`Dm`

are the destination vector, the first operand vector, and the second operand vector, for a wide operation.