Encoding:

EXTEND

11110

Imm[10:5]

Imm[15:11]

SWSP

11010

rx

sel = 3

Imm[4:0]

5

5

5

5

5

3

3

Format:

SB rx, immediate(gp)

MIPS16e2

Store Byte (GP-relative) Extended

Purpose:

Store Byte (GP-relative) Extended

To store a byte to memory.

Description:

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

The 16-bit immediate value is sign-extended, then added to the contents of GPR 28 to form the effective address. The least-significant byte of GPR rx is stored at the effective address.

Restrictions:

Unpredictable prior to MIPS16e2.

Operation:

vAddr = sign_extend(immediate) + GPR[28]
(pAddr, CCA) = AddressTranslation (vAddr, DATA, STORE)
pAddr = pAddrPSIZE-1..2 || (pAddr1..0 xor ReverseEndian2)
bytesel = vAddr1..0 xor BigEndianCPU2
dataword = GPR[Xlat[rx]]31-8*bytesel..0 || 08*bytesel
StoreMemory (CCA, BYTE, dataword, pAddr, vAddr, DATA)

Exceptions:

TLB Refill, TLB Invalid, TLB Modified, Bus Error, Address Error