EXTEND 11110 |
offset 10:5 |
offset 15:11 |
LHU 10101 |
rx |
ry |
offset 4:0 |
5 |
6 |
5 |
5 |
3 |
3 |
5 |
LHU ry, offset(rx) |
MIPS16e |
Load Halfword Unsigned (Extended) |
Load Halfword Unsigned (Extended)
To load a halfword from memory as an unsigned value.
GPR[ry] = memory[GPR[rx] + offset]
The 16-bit offsetis sign-extended and then added to the contents of GPR rx to form the effective address. The contents of the halfword at the memory location specifie by the effective address are zero-extended and loaded into GPR
ry.
The effective address must be naturally-aligned.Ifthe least-significanbit ofthe address is non-zero, an Address
Error exception occurs.
vAddr = sign_extend(offset) + GPR[Xlat(rx)] if vAddr0 != 0 then SignalException(AddressError) endif (pAddr, CCA) = AddressTranslation (vAddr, DATA, LOAD) pAddr = pAddrPSIZE-1..2 || (pAddr1..0 xor (ReverseEndian || 0)) memword = LoadMemory (CCA, HALFWORD, pAddr, vAddr, DATA) byte = vAddr1..0 xor (BigEndianCPU || 0) GPR[Xlat(ry)] = zero_extend(memword15+8*byte..8*byte)
TLB Refill, TLB I valid, Bus Error, Address Error