vctzlsbb
Vector Count Trailing Zero Least Significant Bits Byte
Counts the number of trailing zero bits in each byte element of a vector.
Details
Counts the number of trailing zero bits in each byte of the source vector and stores the scalar result (the count from the least-significant byte) in a GPR. This VMX instruction updates CR6 based on the result to indicate whether all bytes contain zero or not.
Pseudocode Operation
RA ← count_trailing_zeros_lsb_byte(vB[0:7])
Programming Note
Use vctzlsbb to efficiently count the number of contiguous trailing zero bytes with a zero least-significant bit. Ensure that the input vector is properly aligned and that you have the necessary privileges to execute this instruction. The result is stored in a general-purpose register, so be mindful of register usage and dependencies.
Example
Encoding
Operands
-
RA
Target GPR -
vB
Source -
VRT
Target Vector Register -
VRA
Source Vector Register