vabsdub
Vector Absolute Difference Unsigned Byte
Returns the absolute value of the difference of integer values in byte elements.
Details
For vabsdub, the absolute value of the difference between corresponding byte elements of VSR[VRA+32] and VSR[VRB+32] is placed into corresponding byte elements of VSR[VRT+32].
Pseudocode Operation
Programming Note
This instruction computes the absolute difference between corresponding bytes of two vector registers and stores the result in another register. Ensure that the Vector Facility is enabled by checking and setting the VEC bit in the MSR register. The operation does not require any specific alignment, but both input vectors must be properly loaded into the specified registers. This instruction operates at a high performance due to its parallel processing capabilities on vector elements.
Example
Encoding
Operands
-
vD
Target -
vA
Src A -
vB
Src B -
VRT
Target Vector Register -
VRA
Source Vector Register -
VRB
Source Vector Register