SAM3SD8C Atmel Corporation, SAM3SD8C Datasheet - Page 110

no-image

SAM3SD8C

Manufacturer Part Number
SAM3SD8C
Description
Manufacturer
Atmel Corporation
Datasheets
10.12.3
10.12.3.1
10.12.3.2
10.12.3.3
10.12.3.4
110
110
SAM3S8/SD8
SAM3S8/SD8
ASR, LSL, LSR, ROR, and RRX
Syntax
Operation
Restrictions
Condition flags
Arithmetic Shift Right, Logical Shift Left, Logical Shift Right, Rotate Right, and Rotate Right with
Extend.
where:
op
S
result of the operation, see
Rd
Rm
Rs
significant byte is used and can be in the range 0 to 255.
n
MOV{S}{cond} Rd, Rm is the preferred syntax for LSL{S}{cond} Rd, Rm, #0.
ASR, LSL, LSR, and ROR move the bits in the register Rm to the left or right by the number of
places specified by constant n or register Rs.
RRX moves the bits in register Rm to the right by 1.
In all these instructions, the result is written to Rd, but the value in register Rm remains
unchanged. For details on what result is generated by the different instructions, see
ations” on page
Do not use SP and do not use PC.
If S is specified:
• these instructions update the N and Z flags according to the result
op{S}{cond} Rd, Rm, Rs
op{S}{cond} Rd, Rm, #n
RRX{S}{cond} Rd, Rm
ASR
LSL
LSR
ROR
ASR
LSL
LSR
ROR
is one of:
Arithmetic Shift Right.
Logical Shift Left.
Logical Shift Right.
Rotate Right.
is an optional suffix. If S is specified, the condition code flags are updated on the
is the destination register.
is the register holding the value to be shifted.
is the register holding the shift length to apply to the value in Rm. Only the least
is the shift length. The range of shift length depends on the instruction:
shift length from 1 to 32
shift length from 0 to 31
shift length from 1 to 32
shift length from 1 to 31.
81.
“Conditional execution” on page
84.
11090A–ATARM–10-Feb-12
11090A–ATARM–10-Feb-12
“Shift Oper-

Related parts for SAM3SD8C