Encoding:

POOL32C

011000

rt

base

LWU

1110

offset

6

5

5

4

12

Format:

LWU rt, offset(base)

microMIPS64

Load Word Unsigned

Purpose:

Load Word Unsigned

To load a word from memory as an unsigned value.

Description:

 GPR[rt] = memory[GPR[base] + offset]

The contents of the 32-bit word at the memory location specified by the aligned effective address are fetched, zeroextended, and placed in GPR rt. The 12-bit signed offset is added to the contents of GPR base to form the effective address.

Restrictions:

Pre-Release 6: The effective address must be naturally-aligned. If either of the 2 least-significant bits of the address is non-zero, an Address Error exception occurs.

Release 6 allows hardware to provide address misalignment support in lieu of requiring natural alignment.

Note: The pseoducode is not completely adapted for Release 6 misalignment support because the handling is implementation dependent.

Operation:

vAddr = sign_extend(offset) + GPR[base]
(pAddr, CCA) = AddressTranslation (vAddr, DATA, LOAD)
pAddr = pAddrPSIZE-1..3 || (pAddr2..0 xor (ReverseEndian || 02))
memdoubleword = LoadMemory (CCA, WORD, pAddr, vAddr, DATA)
byte = vAddr2..0 xor (BigEndianCPU || 02)
GPR[rt] = 032 || memdoubleword31+8*byte..8*byte

Exceptions:

TLB Refill, TLB Invalid, Bus Error, Address Error, Reserved Instruction, Watch