xxblendvb
VSX Vector Blend Variable Byte
Selects bytes from XA or XB based on the MSB of bytes in XC.
Details
For xxblendvb, the contents of VSR[XT] are determined by the contents of VSR[XC]. If bit 0 of byte element i in VSR[XC] is 0, then byte element i of VSR[XT] is taken from VSR[XA]; otherwise, it is taken from VSR[XB].
Pseudocode Operation
Programming Note
The xxblendvb instruction blends bytes from two source vectors based on a control vector. Ensure that the VSX (Vector Scalar Extensions) are enabled in the MSR register to avoid an exception. The instruction operates on 16-byte vectors, and each byte is independently selected from either of the two source vectors based on the corresponding bit in the control vector. This instruction is useful for conditional data merging but requires careful handling of the control vector to achieve the desired result.
Example
Encoding
Operands
-
XT
Target -
XA
Src A -
XB
Src B -
XC
Control