vpdepd
Vector Parallel Bits Deposit Doubleword
Deposits bits from source to target under control of a mask (Power10).
Details
The contents of bits in doubleword element i of VSR[VRT+32] corresponding to bits in doubleword element i of VSR[VRB+32] that contain a 0 are set to 0. The contents of the rightmost n bits of doubleword element i of VSR[VRA+32] are placed into doubleword element i of VSR[VRT+32] under control of the mask in doubleword element i of VSR[VRB+32].
Pseudocode Operation
Programming Note
The vpdepd instruction is used to deposit bits from one vector register into another based on a mask specified in a third vector register. Ensure that the Vector Facility (MSR.VEC) is enabled before using this instruction; otherwise, it will raise an exception. The operation processes each doubleword element independently, and the alignment of the input vectors must be considered to avoid unexpected results. This instruction is particularly useful for bit manipulation tasks where selective depositing of bits is required.
Example
Encoding
Operands
-
vD
Target -
vA
Source -
vB
Mask -
VRT
Target Vector Register -
VRA
Source Vector Register -
VRB
Mask Vector Register