vsubuhm
Vector Subtract Unsigned Halfword Modulo
Subtracts 8 halfwords modulo 65536.
Details
The Vector Subtract Unsigned Halfword Modulo instruction subtracts each unsigned halfword element of VRB from the corresponding element in VRA, modulo 65536. The result is stored in VRT.
Pseudocode Operation
Programming Note
This instruction is useful for performing element-wise subtraction of unsigned halfwords with modulo 65536, which can be particularly handy in graphics or audio processing where overflow needs to wrap around. Ensure that the vector registers are properly aligned and that the VEC bit in the MSR register is set to enable vector operations. Be cautious of potential performance overhead if used in tight loops without optimization.
Example
Encoding
Operands
-
vD
Target -
vA
Src A -
vB
Src B