clz

Count Leading Zeros (A32)

CLZ<c> <Rd>, <Rm>

Counts the number of consecutive zeros from MSB.

Details

The Count Leading Zeros instruction counts the number of consecutive zeros from MSB.

Pseudocode Operation

Rd ← count of leading zero bits in Rm

Example

CLZ r0, r2

Encoding

Binary Layout
cond
0001
0110
1111
Rd
1111
0001
Rm
 
Format Data Proc
Opcode 0x016F0F10
Extension A32 (Base)

Operands

  • Rd
    Destination general-purpose register
  • Rm
    Second source / offset general-purpose register