The Cortex-M4 Instruction Set
ARM DUI 0553A
Copyright © 2010 ARM. All rights reserved.
3-48
ID121610
Non-Confidential
3.5.4
CLZ
Count Leading Zeros.
Syntax
CLZ{
cond
}
Rd
,
Rm
where:
cond
Is an optional condition code, see
.
Rd
Specifies the destination register.
Rm
Specifies the operand register.
Operation
The
CLZ
instruction counts the number of leading zeros in the value in
Rm
and returns the result
in
Rd
. The result value is 32 if no bits are set and zero if bit[31] is set.
Restrictions
Do not use SP and do not use PC.
Condition flags
This instruction does not change the flags.
Examples
CLZ
R4,R9
CLZNE
R2,R3