Assembly:

SHX rd, rs(rt)

nanoMIPS, not available in NMS

Store Half indeXed

Purpose:

Store Half indeXed. Store halfword from register $rt to memory address $rt + $rs (registerplus register).

Availability:

nanoMIPS, not available in NMS

Format:

001000

rt

rs

rd

0101

0

000

111

6

5

5

5

4

1

3

3

Operation:

if C0.Config5.NMS == 1:
    raise exception('RI')
va = effective_address(GPR[rs], GPR[rt], 'Store')
data = zero_extend(GPR[rd], from_nbits=16)
write_memory_at_va(data, va, nbytes=2)

Exceptions:

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