| |||
| 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
VopL{cond}.datatypeQd,Dn,Dm
VopW{cond}.datatypeQd,Qn,Dm
where:
Qif present, indicates that if any of the results overflow, they are saturated.
opmust be either ADD or SUB.
condis an optional condition code (see Condition codes).
datatypemust be one of:
I8, I16, I32, I64, F32for VADD or VSUB
S8, S16, S32for VQADD, VQSUB, VADDL, VADDW, VSUBL, or
VSUBW
U8, U16, U32for VQADD, VQSUB, VADDL, VADDW, VSUBL, or
VSUBW
S64, U64for VQADD or VQSUB.
Qd, Qn, Qmare the destination vector, the first operand vector, and the second operand vector, for a quadword operation.
Dd, Dn, Dmare the destination vector, the first operand vector, and the second operand vector, for a doubleword operation.
Qd, Dn, Dmare the destination vector, the first operand vector, and the second operand vector, for a long operation.
Qd, Qn, Dmare the destination vector, the first operand vector, and the second operand vector, for a wide operation.