Encoding:

EXTEND

11110

offset 10:5

offset 15:11

SW

11011

rx

ry

offset 4:0

5

6

5

5

3

3

5

Format:

SW ry, offset(rx)

MIPS16e

Store Word (Extended)

Purpose:

Store Word (Extended)

To store a word to memory.

Description:

memory[GPR[rx] + offset] = GPR[ry]

The 16-bit offsetis sign-extended and then added to the contents of GPR rx to form the effective address. The contents of GPR ry are stored at the effective address.

Restrictions:

The effective address must be naturally-aligned. If either of the 2 least-significanbits of the address is non-zero, an

Address Error exception occurs.

Operation:

vAddr = sign_extend(offset) + GPR[Xlat(rx)]
if vAddr1..0 != 02 then
   SignalException(AddressError)
endif
(pAddr, CCA) = AddressTranslation (vAddr, DATA, STORE)
dataword = GPR[Xlat(ry)]
StoreMemory (CCA, WORD, dataword, pAddr, vAddr, DATA)

Exceptions:

TLB Refill, TLB I valid, TLB Modified, Bus Erro , Address Error