packed-switch

Purpose

Jump to a new instruction based on the value in the given register, using a table of offsets corresponding to each value in a particular integral range, or fall through to the next instruction if there is no match.

Note: The address of the table is guaranteed to be even (that is, 4-byte aligned). If the code size of the method is otherwise odd, then an extra code unit is inserted between the main code and the table whose value is the same as a nop.

Details

Op & Format Mnemonic / Syntax Arguments
2b 31t packed-switch vAA, +BBBBBBBB (with supplemental data as specified below in "packed-switch Format") A: register to test
B: signed "branch" offset to table data (32 bits)

Constraints

Behavior

Exceptions

None.