Assembly:

LWPC rt, address

nanoMIPS, not available in NMS

Load Word PC relative

Purpose:

Load Word PC relative. Load word to register $rt from PC relative address address.

Availability:

nanoMIPS, not available in NMS

Format:

LWPC[48]

011000

rt

01011

s[15:0]

s[31:16]

6

5

5

16

16

offset = sign_extend(s, from_nbits=32)

Operation:

if C0.Config5.NMS == 1:
    raise exception('RI')
address = effective_address(CPU.next_pc, offset)
data = read_memory_at_va(address, nbytes=4)
GPR[rt] = sign_extend(data, from_nbits=32)

Exceptions:

Address Error. Bus Error. Reserved Instruction on NMS cores TLB Invalid. TLB Read Inhibit. TLB Refill. Watch.