EXTEND 11110 |
offset 10:5 |
offset 15:11 |
B 00010 |
0 000000 |
offset 4:0 |
5 |
6 |
5 |
5 |
6 |
5 |
B offset |
MIPS16e |
Unconditional Branch (Extended) |
Unconditional Branch (Extended)
To do an unconditional PC-relative branch.
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.
None
I: PC = PC + 4 + sign_extend(offset || 0)
None
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.