vctzd
Vector Count Trailing Zeros Doubleword
Counts the number of consecutive zero bits starting at bit 63 of each doubleword element in VSR[VRB+32] and places the result into VSR[VRT+32].
Details
For vctzd, for each integer value i from 0 to 1, a count of the number of consecutive zero bits starting at bit 63 of doubleword element i of VSR[VRB+32] is placed into doubleword element i of VSR[VRT+32]. This number ranges from 0 to 64, inclusive.
Pseudocode Operation
Programming Note
The vctzd instruction counts trailing zeros in each doubleword of the input vector. Ensure that the Vector Facility is enabled by checking and setting the MSR.VEC bit. This instruction operates on 64-bit elements, so input vectors must be aligned accordingly. The result is a count from 0 to 64 for each element, indicating the number of trailing zeros.
Example
Encoding
Operands
-
vD
Target -
vB
Source -
VRT
Target Vector Register -
VRB
Source Vector Register