vaddsbs
Vector Add Signed Byte Saturate
Adds 16 signed bytes with saturation (-128..127).
Details
The vaddsbs instruction performs a vectorized addition of signed bytes from two source vectors, saturating the results to fit within an 8-bit signed integer range. If the sum exceeds the maximum value (127), it is clamped to 127; if it goes below the minimum value (-128), it is clamped to -128.
Pseudocode Operation
Programming Note
The vaddsbs instruction is commonly used for vectorized addition of signed bytes, ensuring that results are clamped to the 8-bit signed integer range. Ensure that the Vector Facility (MSR.VEC) is enabled before using this instruction; otherwise, a Vector_Unavailable exception will be raised. This instruction operates on 16-byte vectors and processes each byte independently.
Example
Encoding
Operands
-
vD
Target -
vA
Src A -
vB
Src B