| |||

Home > NEON and VFP Programming > NEON general arithmetic instructions > VMAX, VMIN, VPMAX, and VPMIN |

`VMAX`

(Vector Maximum) compares corresponding
elements in two vectors, and copies the larger of each pair into
the corresponding element in the destination vector.

`VMIN`

(Vector Minimum) compares corresponding
elements in two vectors, and copies the smaller of each pair into
the corresponding element in the destination vector.

`VPMAX`

(Vector Pairwise Maximum) compares adjacent
pairs of elements in two vectors, and copies the larger of each
pair into the corresponding element in the destination vector. Operands
and results must be doubleword vectors.

`VPMIN`

(Vector Pairwise Minimum) compares adjacent
pairs of elements in two vectors, and copies the smaller of each
pair into the corresponding element in the destination vector. Operands
and results must be doubleword vectors.

See Figure 5.5 for a diagram of a pairwise operation.

V{`op`

}.`cond`

`datatype`

,`Qd`

,`Qn`

`Qm`

V{`op`

}.`cond`

`datatype`

,`Dd`

,`Dn`

`Dm`

VP{`op`

}.`cond`

`datatype`

,`Dd`

,`Dn`

`Dm`

where:

`op`

must be either

`MAX`

or`MIN`

.`cond`

is an optional condition code (see

*Condition codes*).`datatype`

must be one of

`S8`

,`S16`

,`S32`

,`U8`

,`U16`

,`U32`

, or`F32`

.,`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.