Assembly:

SWPC rt, address

nanoMIPS, not available in NMS

Store Word PC relative

Purpose:

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

Availability:

nanoMIPS, not available in NMS

Format:

SWPC[48]

011000

rt

01111

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, 'Store')
data = zero_extend(GPR[rt], from_nbits=32)
write_memory_at_va(data, address, nbytes=4)

Exceptions:

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