Encoding:

EXTEND

11110

offset 10:5

offset 15:11

B

00010

0

000000

offset 4:0

5

6

5

5

6

5

Format:

B offset

MIPS16e

Unconditional Branch (Extended)

Purpose:

Unconditional Branch (Extended)

To do an unconditional PC-relative branch.

Description:

branch

The 16-bit offset is shifted left 1 bit, sign-extended, and then added to the address of the instruction after the branch to form the target address. The program branches to the target address unconditionally.

Restrictions:

None

Operation:

I:    PC = PC + 4 + sign_extend(offset || 0)

Exceptions:

None

Programming Notes:

In MIPS16e mode, the branch offset is interpreted as halfword-aligned. This is unlike 32-bit MIPS mode, which interprets the offset value as word-aligned.