Encoding:

EXTEND

11110

Imm[10:5]

Imm[15:11]

LWSP

10010

rx

sel = 5

Imm[4:0]

5

5

5

5

5

3

3

Format:

LBU rx, immediate(gp)

MIPS16e2

Load Byte Unsigned (GP-relative) Extended

Purpose:

Load Byte Unsigned (GP-relative) Extended

To load a byte from memory as an unsigned value

Description:

GPR[rx] = memory[GPR[gp] + immediate]

The 16-bit immediate value is sign-extended, then added to the contents of GPR 28 to form the effective address. The contents of the byte at the memory location specified by the effective address are zero-extended and loaded into GPR

rx.

Restrictions:

Unpredictable prior to MIPS16e2.

Operation:

vAddr = sign_extend(immediate) + GPR[28]
(pAddr, CCA) = AddressTranslation (vAddr, DATA, LOAD)
pAddr = pAddrPSIZE-1..2 || (pAddr1..0 xor ReverseEndian2)
memword = LoadMemory (CCA, BTE, pAddr, vAddr, DATA)
byte = vAddr1..0 xor BigEndianCPU2
GPR[Xlat(rx)] = zero_extend(memword7+8*byte..8*byte)

Exceptions:

TLB Refill, TLB Invalid, Bus Error, Address Error