vmaxuw
Vector Maximum Unsigned Word
Selects maximum value per word (unsigned).
Details
Compares four unsigned word elements from vA and vB, writing the maximum value of each pair to the corresponding word element in vD. This is a VMX (AltiVec) instruction that operates on all four 32-bit words in parallel with no condition register or status updates.
Pseudocode Operation
vD[0:31] ← max(vA[0:31], vB[0:31])
vD[32:63] ← max(vA[32:63], vB[32:63])
vD[64:95] ← max(vA[64:95], vB[64:95])
vD[96:127] ← max(vA[96:127], vB[96:127])
Programming Note
The vmaxuw instruction is used to perform element-wise comparison of unsigned 32-bit words in vector registers. Ensure that the Vector Facility (MSR.VEC) is enabled before using this instruction; otherwise, a Vector_Unavailable exception will be raised. The operation does not require any specific alignment for the data being processed.
Example
Encoding
Operands
-
vD
Target -
vA
Src A -
vB
Src B