vctzw
Vector Count Trailing Zeros Word
Counts the number of trailing zero bits in each word element of a vector register.
Details
For vctzw, the number of consecutive zero bits starting at bit 31 of each word element in VSR[VRB+32] is counted and placed into the corresponding word element in VSR[VRT+32].
Pseudocode Operation
Programming Note
The vctzw instruction counts the number of trailing zeros in each word element of a vector register. Ensure that the Vector Facility is enabled by checking and setting the VEC bit in the MSR register. This instruction operates on 32-bit words, so input data must be aligned accordingly. The result is stored in another vector register, preserving the original data unless explicitly overwritten.
Example
Encoding
Operands
-
vD
Target -
vB
Source -
VRT
Target Vector Register -
VRB
Source Vector Register