
DR
AFT
DR
AFT
DRAFT
DR
D
RAFT
DRAFT
DRA
FT DRAF
D
RAFT DRAFT DRAFT DRAFT DRAFT D
DRAFT
D
RAFT DRA
FT DRAFT DRAFT DRAFT DRA
UM10360_0
© NXP B.V. 2009. All rights reserved.
User manual
Rev. 00.06 — 5 June 2009
654 of 808
NXP Semiconductors
UM10360
Chapter 34: Appendix: Cortex-M3 User Guide
2.5.4 CLZ
Count Leading Zeros.
2.5.4.1
Syntax
CLZ{cond} Rd, Rm
where:
cond
is an optional condition code, see
Rd
is the destination register.
Rm
is the operand register.
2.5.4.2
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 in the source register, and zero if
bit[31] is set.
2.5.4.3
Restrictions
Do not use SP and do not use PC.
2.5.4.4
Condition flags
This instruction does not change the flags.
2.5.4.5
Examples
CLZ
R4,R9
CLZNE
R2,R3