EXTEND 11110 |
offset 10:5 |
offset 15:11 |
SWSP 11010 |
rx |
0 000 |
offset 4:0 |
5 |
6 |
5 |
5 |
3 |
3 |
5 |
SW rx, offset(sp) |
MIPS16e |
Store Word (SP-Relative) |
Store Word
rx
(SP-Relative, Extended)
To store an SP-relative word to memory.
memory[GPR[sp] + offset] = GPR[rx]
The 16-bit offsetis sign-extended and then added to the contents of GPR 29 to form the effective address. The contents of GPR rx are stored at the effective address.
The effective address must be naturally-aligned. If either of the two least-significan bits of the address is non-zero, an
Address Error exception occurs.
vAddr = sign_extend(offset) + GPR[29] if vAddr1..0 != 02 then SignalException(AddressError) endif (pAddr, CCA) = AddressTranslation (vAddr, DATA, STORE) dataword = GPR[Xlat(rx)] StoreMemory (CCA, WORD, dataword, pAddr, vAddr, DATA)
TLB Refill, TLB I valid, TLB Modified, Bus Erro , Address Error