vprtybq
Vector Parity Byte Quadword
Calculates the parity of each byte in a vector register and stores the result in another vector register.
Details
The vprtybq instruction calculates the parity of each byte in the source vector register VRB and stores the result in the target vector register VRT. The result is a single bit (0 or 1) indicating whether the number of 1s in the bytes is odd or even.
Pseudocode Operation
Programming Note
The vprtybq instruction calculates the parity of each byte in the source vector register VRB and stores the result in the target vector register VRT. Ensure that the Vector Facility is enabled by checking and setting the MSR.VEC bit. The instruction processes 16 bytes from VRB, and the result is a single bit indicating the parity for each byte, which is then replicated across all 128 bits of VRT.
Example
Encoding
Operands
-
vD
Target -
vB
Source -
VRT
Target Vector Register -
VRB
Source Vector Register