![Atmel SAM4S Series Preliminary Data Sheet Download Page 113](http://html1.mh-extra.com/html/atmel/sam4s-series/sam4s-series_preliminary-data-sheet_3003408113.webp)
113
11100B–ATARM–31-Jul-12
SAM4S Series [Preliminary]
Examples
ASR
R7, R8, #9
; Arithmetic shift right by 9 bits
LSLS
R1, R2, #3
; Logical shift left by 3 bits with flag update
LSR
R4, R5, #6
; Logical shift right by 6 bits
ROR
R4, R5, R6
; Rotate right by the value in the bottom byte of R6
RRX
R4, R5
; Rotate right with extend.
11.6.5.4
CLZ
Count Leading Zeros.
Syntax
CLZ{cond} Rd, Rm
where:
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
cond
is an optional condition code, see
Rd
is the destination register.
Rm
is the operand register.
Summary of Contents for SAM4S Series
Page 44: ...44 11100B ATARM 31 Jul 12 SAM4S Series Preliminary ...
Page 412: ...412 11100B ATARM 31 Jul 12 SAM4S Series Preliminary ...
Page 1105: ...1105 11100B ATARM 31 Jul 12 SAM4S Series Preliminary ...
Page 1143: ...1143 11100B ATARM 31 Jul 12 SAM4S Series Preliminary Figure 43 4 64 lead LQFP Package Drawing ...
Page 1145: ...1145 11100B ATARM 31 Jul 12 SAM4S Series Preliminary Figure 43 5 64 lead QFN Package Drawing ...