Assembly:

BEQC rs, rt, address

nanoMIPS, availability varies by format.

Branch if Equal, Compact

Purpose:

Branch if Equal, Compact. PC relative branch to address if registers $rs and $rt are areequal.

Availability:

nanoMIPS, availability varies by format.

Format:

BEQC[32]

100010

rt

rs

00

s[13:1]

s[14]

6

5

5

2

13

1

offset = sign_extend(s, from_nbits=15)
address = effective_address(CPU.next_pc, offset)
not_in_mms = False

BEQC[16], not available in NMS

110110

rs3<rt3 && u!=0

rt3

rs3

u[4:1]

6

3

3

4

rs = decode_gpr(rs3, 'gpr3')
rt = decode_gpr(rt3, 'gpr3')
offset = u
address = effective_address(CPU.next_pc, offset)
not_in_mms = True

Operation:

if not_in_mms and C0.Config5.NMS == 1:
    raise exception('RI')
if GPR[rs] == GPR[rt]:
    CPU.next_pc = address

Exceptions:

Reserved Instruction for BEQC[16] format on NMS cores.