vmaxuh
Vector Maximum Unsigned Halfword
Selects maximum value per halfword (unsigned).
Details
The vmaxuh instruction compares each pair of unsigned halfwords from the source vectors VRA and VRB, and stores the larger value in the corresponding position of the destination vector VRT.
Pseudocode Operation
Programming Note
The vmaxuh instruction is used to perform element-wise comparisons of unsigned halfwords from two source vectors and store the maximum values in a destination vector. Ensure that the Vector Facility (MSR.VEC) is enabled before using this instruction; otherwise, it will raise an exception. This instruction operates on 16-bit unsigned integers, so ensure proper alignment and data type handling to avoid unexpected results.
Example
Encoding
Operands
-
vD
Target -
vA
Src A -
vB
Src B