xxblendvd

VSX Vector Blend Variable Doubleword

xxblendvd XT, XA, XB, XC

Selects doublewords from XA or XB based on the MSB of doublewords in XC.

Details

The xxblendvd instruction performs a variable blend of doublewords from three input vectors A, B, and C based on the immediate field value. The result is determined by logical operations applied to the elements of these vectors.

Pseudocode Operation

// VSX operation -> vs1

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

xxblendvd vs1, vs2, vs3, vs4

Encoding

Binary Layout
60
0
XT
6
XA
11
XB
16
XC
21
36
26
 
Format XX4-form
Opcode 0xF0000024
Extension VSX

Operands

  • XT
    Target
  • XA
    Src A
  • XB
    Src B
  • XC
    Control
  • VRT
    Target VSX Register
  • VRA
    Source VSX Register
  • VRB
    Source VSX Register