Assembly:

LI rt, s

nanoMIPS, availability varies by format.

Load Immediate

Purpose:

Load Immediate. Load immediate value s to register $rt.

Availability:

nanoMIPS, availability varies by format.

Format:

LI[16]

110100

rt3

eu

6

3

7

rt = decode_gpr(rt3, 'gpr3')
s = -1 if eu == 127 else eu
not_in_nms = False

LI[48], not available in NMS

011000

rt

00000

s[15:0]

s[31:16]

6

5

5

16

16

s = sign_extend(s[31:16] @ s[15:0])
not_in_nms = True

Operation:

if not_in_nms and C0.Config5.NMS == 1:
    raise exception('RI')
GPR[rt] = s

Exceptions:

Reserved Instruction for LI[48] format on NMS cores.