vpopcntd
Vector Population Count Doubleword
Counts set bits in each doubleword.
Details
The vpopcntd instruction counts the number of bits set to 1 in each doubleword element of a vector register and stores the result in another vector register. The operation is performed on each of the two doublewords (64-bit elements) in the source vector, and the results are stored in the corresponding positions in the destination vector.
Pseudocode Operation
Programming Note
The vpopcntd instruction is useful for counting the number of set bits in each 64-bit element of a vector. Ensure that the Vector Facility (MSR.VEC) is enabled before using this instruction; otherwise, it will raise an exception. This instruction operates on two doublewords per vector register, and results are stored in the corresponding positions of the destination vector.
Example
Encoding
Operands
-
vD
Target -
vB
Source