Encoding:

EXTEND

11110

offset 10:5

offset 15:11

I8

01100

BTEQZ

000

000

0

offset 4:0

5

6

5

5

3

3

5

Format:

BTEQZ offset

MIPS16e

Branch on T Equal to Zero (Extended)

Purpose:

Branch on T Equal to Zero (Extended)

To test special register T then do a PC-relative conditional branch.

Description:

if (T = 0) then 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. If the contents of GPR 24 are equal to zero, the program branches to the target address.

Restrictions:

None

Operation:

I:    tgt_offset = sign_extend(offset || 0)
      condition = (GPR[24] = 0GPRLEN)
      if condition then
         PC = PC + 4 + tgt_offset
      endif

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.