UM10429
All information provided in this document is subject to legal disclaimers.
© NXP B.V. 2010. All rights reserved.
User manual
Rev. 1 — 20 October 2010
201 of 258
NXP Semiconductors
UM10429
Chapter 19: Appendix LPC1102 ARM Cortex-M0 reference
19.4.3.3.4
ROR
Rotate right by
n
bits moves the left-hand 32-
n
bits of the register
Rm
, to the right by
n
places, into the right-hand 32-
n
bits of the result, and it moves the right-hand
n
bits of the
register into the left-hand
n
bits of the result. See
.
When the instruction is RORS the carry flag is updated to the last bit rotation, bit[
n
-1], of
the register
Rm
.
Remark:
•
If
n
is 32, then the value of the result is same as the value in
Rm
, and if the carry flag
is updated, it is updated to bit[31] of
Rm
.
•
ROR
with shift length,
n
, greater than 32 is the same as
ROR
with shift length
n
-32.
19.4.3.4 Address alignment
An aligned access is an operation where a word-aligned address is used for a word, or
multiple word access, or where a halfword-aligned address is used for a halfword access.
Byte accesses are always aligned.
There is no support for unaligned accesses on the Cortex-M0 processor. Any attempt to
perform an unaligned memory access operation results in a HardFault exception.
19.4.3.5 PC-relative expressions
A PC-relative expression or
label
is a symbol that represents the address of an instruction
or literal data. It is represented in the instruction as the PC value plus or minus a numeric
offset. The assembler calculates the required offset from the label and the address of the
current instruction. If the offset is too big, the assembler produces an error.
Remark:
•
For most instructions, the value of the PC is the address of the current instruction plus
4 bytes.
•
Your assembler might permit other syntaxes for PC-relative expressions, such as a
label plus or minus a number, or an expression of the form [PC, #
imm
].
Fig 46. ROR #3
31
1 0
2
4
5
3
...
Carry
Flag