vmaxub
Vector Maximum Unsigned Byte
vmaxub vD, vA, vB
Selects maximum value per byte (unsigned).
Details
The vmaxub instruction compares each byte element of two vector registers and stores the larger unsigned byte value in the corresponding element of a third vector register.
Pseudocode Operation
Programming Note
The vmaxub instruction is used to perform element-wise comparison of unsigned bytes from two vector registers and store the maximum values in a third register. Ensure that the Vector Facility (MSR.VEC) is enabled before using this instruction; otherwise, it will raise an exception. This instruction operates on 16-byte vectors, so ensure proper alignment for optimal performance.
Example
vmaxub vd, va, vb
Encoding
Binary Layout
4
0
vD
6
vA
11
vB
16
4
21
Operands
-
vD
Target -
vA
Src A -
vB
Src B