| |||
| 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.
VADD and VSUB have these forms:
Saturating. The sticky QC flag (FPSCR bit[27]) is set if saturation occurs.
Long.
Wide.
V{Q}op{cond}.datatype {Qd}, Qn, Qm ; Saturating instruction
V{Q}op{cond}.datatype {Dd}, Dn, Dm ; Saturating instruction
VopL{cond}.datatypeQd,Dn,Dm; Long instruction
VopW{cond}.datatype{Qd},Qn,Dm; Wide instruction
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.
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.