Assembly:

LWX rd, rs(rt)

nanoMIPS

Load Word indeXed

Purpose:

Load Word indeXed. Load word to register $rd from memory address $rt + $rs (registerplus register).

Availability:

nanoMIPS

Format:

001000

rt

rs

rd

1000

0

000

111

6

5

5

5

4

1

3

3

Operation:

va = effective_address(GPR[rs], GPR[rt], 'Load')
data = read_memory_at_va(va, nbytes=4)
GPR[rd] = sign_extend(data, from_nbits=32)

Exceptions:

Address Error. Bus Error. TLB Invalid. TLB Read Inhibit. TLB Refill. Watch.