SAM3X8E Atmel Corporation, SAM3X8E Datasheet - Page 140

no-image

SAM3X8E

Manufacturer Part Number
SAM3X8E
Description
Manufacturer
Atmel Corporation
Datasheets
11.17.4
11.17.4.1
11.17.4.2
11.17.4.3
11.17.4.4
140
140
SAM3X/A
SAM3X/A
TBB and TBH
Syntax
Operation
Restrictions
Condition flags
Table Branch Byte and Table Branch Halfword.
where:
Rn
then the address of the table is the address of the byte immediately following the TBB or TBH
instruction.
Rm
LSL #1 doubles the value in Rm to form the right offset into the table.
These instructions cause a PC-relative forward branch using a table of single byte offsets for
TBB, or halfword offsets for TBH. Rn provides a pointer to the table, and Rm supplies an index
into the table. For TBB the branch offset is twice the unsigned value of the byte returned from
the table. and for TBH the branch offset is twice the unsigned value of the halfword returned
from the table. The branch occurs to the address at that offset from the address of the byte
immediately after the TBB or TBH instruction.
The restrictions are:
These instructions do not change the flags.
• Rn must not be SP
• Rm must not be SP and must not be PC
• when any of these instructions is used inside an IT block, it must be the last instruction of the
IT block.
TBB [Rn, Rm]
TBH [Rn, Rm, LSL #1]
is the register containing the address of the table of branch lengths. If Rn is PC,
is the index register. This contains an index into the table. For halfword tables,
11057A–ATARM–17-Feb-12
11057A–ATARM–17-Feb-12

Related parts for SAM3X8E