xxblendvd
VSX Vector Blend Variable Doubleword
Selects doublewords from XA or XB based on the MSB of doublewords in XC.
Details
Selects whole doublewords from XA or XB based on the MSB of the corresponding doubleword in control register XC. If the MSB of a doubleword in XC is 1, the doubleword from XB is selected; otherwise the doubleword from XA is selected. This VSX instruction does not affect condition registers or status fields.
Pseudocode Operation
for i in 0 to 1:
if XC[64*i] == 1:
XT[64*i:64*i+63] ← XB[64*i:64*i+63]
else:
XT[64*i:64*i+63] ← XA[64*i:64*i+63]
Programming Note
The xxblendvd instruction is useful for selectively blending elements from two source vectors (A and B) into a destination vector based on control bits derived from a third vector (C). Ensure that all input vectors are properly aligned to avoid alignment faults. This instruction operates at the user privilege level and may raise exceptions if the immediate field value exceeds valid range or if there are invalid operand types.
Example
Encoding
Operands
-
XT
Target -
XA
Src A -
XB
Src B -
XC
Control -
VRT
Target VSX Register -
VRA
Source VSX Register -
VRB
Source VSX Register