Assembly:

LWE rt, offset(rs)

nanoMIPS. Optional, present when Config5.EVA=1. Requires CP0 privilege.

Load Word using EVA addressing

Purpose:

Load Word using EVA addressing.

Load word to register $rt from virtual address $rs +

offset,translating the virtual address as though the core is in user mode, although it is actually in
 kernel mode.

Availability:

nanoMIPS. Optional, present when Config5.EVA=1. Requires CP0 privilege.

Format:

101001

rt

rs

s[8]

1000

0

10

s[7:0]

6

5

5

1

4

1

2

8

Operation:

offset = sign_extend(s, from_nbits=9)
if not C0.Config5.EVA:
    raise exception('RI')
if not IsCoprocessor0Enabled():
    raise coprocessor_exception(0)
va = effective_address(GPR[rs], offset, 'Load', eva=True)
data = read_memory_at_va(va, nbytes=4, eva=True)
GPR[rt] = sign_extend(data, from_nbits=32)

Exceptions:

Address Error. Bus Error. Coprocessor unusable. Reserved Instruction if EVA not implemented. TLB Invalid. TLB Read Inhibit. TLB Refill. Watch.