4.8.4. TBB and TBH

Table Branch Byte and Table Branch Halfword.


TBB [Rn, Rm]
TBH [Rn, Rm, LSL #1]



is the base register. This contains the address of the table of branch lengths. Rn must not be r13.

If r15 is specified for Rn, the value used is the address of the instruction plus 4.


is the index register. This contains an index into the table.

Rm must not be r15 or r13.


These instructions cause a pc-relative forward branch using a table of single byte offsets (TBB) or halfword offsets (TBH). Rn provides a pointer to the table, and Rm supplies an index into the table. The branch length is twice the value of the byte (TBB) or the halfword (TBH) returned from the table.


In Thumb-2EE, if the value in the base register is zero, execution branches to the NullCheck handler at HandlerBase - 4.


These 32-bit Thumb instructions are available in ARMv6T2 and above.

There are no ARM, or 16-bit Thumb, versions of these instructions.

Copyright © 2002-2010 ARM. All rights reserved.ARM DUI 0204J