vclzdm

Vector Count Leading Zeros Doubleword under bit Mask

vclzdm VRT, VRA, VRB

Counts the number of leading zeros in each doubleword element of a vector, considering a mask.

Details

For each of the two doubleword elements in VRA, this instruction counts the number of leading zeros among only those bit positions selected by the corresponding mask bits in VRB (where a mask bit of 1 indicates the bit is considered). The result for each doubleword is placed into the corresponding doubleword element of VRT. Bit positions not selected by the mask are ignored in the count.

Pseudocode Operation

Not available in specification

Programming Note

Use vclzdm to efficiently count leading zeros in masked bit positions within doublewords. Ensure that VRB contains a valid mask where 1s indicate bits to be considered for zero counting. This instruction operates at user privilege level and does not generate exceptions under normal conditions.

Example

vclzdm v1, v2, v3

Encoding

Binary Layout
18
0
LI
6
AA
30
LK
31
 
Format X-form
Opcode 0x7C00062A
Extension VMX (AltiVec)

Operands

  • VRT
    Target Vector Register
  • VRA
    Source Vector Register
  • VRB
    Source Vector Register