![Atmel SAM4S Series Скачать руководство пользователя страница 166](http://html1.mh-extra.com/html/atmel/sam4s-series/sam4s-series_preliminary-data-sheet_3003408166.webp)
166
11100B–ATARM–31-Jul-12
SAM4S Series [Preliminary]
The table below shows the ranges for the various branch instructions.
The
.W
suffix might be used to get the maximum branch range. See
.
Restrictions
The restrictions are:
• do not use PC in the
BLX
instruction
• for
BX
and
BLX
, bit[0] of
Rm
must be 1 for correct execution but a branch occurs to the target
address created by changing bit[0] to 0
• when any of these instructions is inside an IT block, it must be the last instruction of the IT
block.
Bcond
is the only conditional instruction that is not required to be inside an IT block. However, it
has a longer branch range when it is inside an IT block.
Condition Flags
These instructions do not change the flags.
Examples
B
loopA
; Branch to loopA
BLE
ng
; Conditionally branch to label ng
B.W
target
; Branch to target within 16MB range
BEQ
target
; Conditionally branch to target
BEQ.W
target
; Conditionally branch to target within 1MB
BL
funC
; Branch with link (Call) to function funC, return
; address stored in LR
BX
LR
; Return from function call
BXNE
R0
; Conditionally branch to address stored in R0
BLX
R0
; Branch with link and exchange (Call) to a address
; stored in R0.
Table 11-26. Branch Ranges
Instruction
Branch Range
B label
−
16 MB to +16 MB
Bcond label
(outside IT block)
−
1 MB to +1 MB
Bcond label
(inside IT block)
−
16 MB to +16 MB
BL{cond} label
−
16 MB to +16 MB
BX{cond} Rm
Any value in register
BLX{cond} Rm
Any value in register
Содержание SAM4S Series
Страница 44: ...44 11100B ATARM 31 Jul 12 SAM4S Series Preliminary ...
Страница 412: ...412 11100B ATARM 31 Jul 12 SAM4S Series Preliminary ...
Страница 1105: ...1105 11100B ATARM 31 Jul 12 SAM4S Series Preliminary ...
Страница 1142: ...1142 11100B ATARM 31 Jul 12 SAM4S Series Preliminary Figure 43 3 100 ball VFBGA Package Drawing ...
Страница 1143: ...1143 11100B ATARM 31 Jul 12 SAM4S Series Preliminary Figure 43 4 64 lead LQFP Package Drawing ...
Страница 1145: ...1145 11100B ATARM 31 Jul 12 SAM4S Series Preliminary Figure 43 5 64 lead QFN Package Drawing ...