| |||

Home > NEON and VFP Programming > NEON general arithmetic instructions > V{Q}ABS and V{Q}NEG |

`VABS`

(Vector Absolute) takes the absolute value
of each element in a vector, and places the results in a second
vector. (The floating-point version only clears the sign bit.)

`VNEG`

(Vector Negate) negates each element in
a vector, and places the results in a second vector. (The floating-point
version only inverts the sign bit.)

Saturating versions of both instructions are available. The sticky QC flag (FPSCR bit[27]) is set if saturation occurs.

V{Q}{`op`

}.`cond`

`datatype`

,`Qd`

`Qm`

V{Q}{`op`

}.`cond`

`datatype`

,`Dd`

`Dm`

where:

`Q`

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

`op`

must be either

`ABS`

or`NEG`

.`cond`

is an optional condition code.

`datatype`

must be one of:

`S8`

,`S16`

,`S32`

for

`VABS`

,`VNEG`

,`VQABS`

, or`VQNEG`

`F32`

for

`VABS`

and`VNEG`

only.

,`Qd`

`Qm`

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

,`Dd`

`Dm`

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

- Reference