Datasheet
112
11011B–ATARM–21-Feb-12
SAM3N
10.13.4 CLZ
Count Leading Zeros.
10.13.4.1 Syntax
CLZ{cond} Rd, Rm
where:
cond is an optional condition code, see “Conditional execution” on page 84.
Rd is the destination register.
Rm is the operand register.
10.13.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.
10.13.4.3 Restrictions
Do not use SP and do not use PC.
10.13.4.4 Condition flags
This instruction does not change the flags.
10.13.4.5 Examples
CLZ R4,R9
CLZNE R2,R3