vclzw
Vector Count Leading Zeros Word
vclzw vD, vB
Counts the number of leading zero bits in each word element of a vector register.
Details
For vclzw, the number of consecutive zero bits starting at bit 0 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
vclzw counts leading zeros in each word of the input vector. Ensure VSR[VRB+32] is properly aligned and accessible. This instruction operates at user privilege level unless MSR.VEC is set, in which case it raises an exception.
Example
vclzw vd, vb
Encoding
Binary Layout
4
0
vD
6
0
11
vB
16
1922
Operands
-
vD
Target -
vB
Source -
VRT
Target Vector Register -
VRB
Source Vector Register