Encoding:

SB16

100010

rt

base

offset

6

3

3

4

Format:

SB16 rt, offset(base)

microMIPS

Store Byte (16-bit instr size)

Purpose:

Store Byte (16-bit instr size)

To store a byte to memory

Description:

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

The least-significant 8-bit byte of GPR rt is stored in memory at the location specified by the effective address. The

4-bit unsigned offset is added to the contents of GPR base to form the effective address.

Restrictions:

The 3-bit base register field can only specify GPRs $2-$7, $16, $17.

The 3-bit rt register field can only specify GPRs $0, $2-$7, $17.

Operation:

vAddr = zero_extend(offset) + GPR[base]
(pAddr, CCA) = AddressTranslation (vAddr, DATA, STORE)
pAddr = pAddrPSIZE-1..3 || (pAddr2..0 xor ReverseEndian3)
bytesel = vAddr2..0 xor BigEndianCPU3
datadoubleword = GPR[rt]63-8*bytesel..0 || 08*bytesel
StoreMemory (CCA, BYTE, datadoubleword, pAddr, vAddr, DATA)

Exceptions:

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