SPECIAL3 011111 |
base |
rt |
offset |
0 |
SWLE 100001 |
6 |
5 |
5 |
9 |
1 |
6 |
SWLE rt, offset(base) |
MIPS32, removed in Release 6 |
Store Word Left EVA |
Store Word Left EVA
To store the most-significant part of a word to an unaligned user mode virtual address while operating in kernel mode.
memory[GPR[base] + offset] = GPR[rt]
The 9-bit signed offset is added to the contents of GPR base to form an effective address (EffAddr). EffAddr is the address of the most-significant of 4 consecutive bytes forming a word (W) in memory starting at an arbitrary byte boundary.
A part of W (the most-significant 1 to 4 bytes) is in the aligned word containing EffAddr. The same number of the most-significant (left) bytes from the word in GPR rt are stored into these bytes of W.
If GPR rt is a 64-bit register, the source word is the low word of the register.
The following figure shows this operation using big-endian byte ordering for 32-bit and 64-bit registers. The 4 consecutive bytes in 2..5 form an unaligned word starting at location 2. A part of W (2 bytes) is located in the aligned word containing the most-significant byte at 2.
Only usable when access to Coprocessor0 is enabled and when accessing an address within a segment configured using UUSK, MUSK or MUSUK access mode.
Release 6 removes the load/store-left/right family of instructions, and requires the system to support misaligned memory accesses.
vAddr = sign_extend(offset) + GPR[base] (pAddr, CCA) = AddressTranslation (vAddr, DATA, STORE) pAddr = pAddrPSIZE-1..3 || (pAddr2..0 xor ReverseEndian3) If BigEndianMem = 0 then pAddr = pAddrPSIZE-1..2 || 02 endif byte = vAddr1..0 xor BigEndianCPU2 if (vAddr2 xor BigEndianCPU) = 0 then datadoubleword = 032 || 024-8*byte || GPR[rt]31..24-8*byte else datadoubleword = 024-8*byte || GPR[rt]31..24-8*byte || 032 endif dataword = 024-8*byte || GPR[rt]31..24-8*byte StoreMemory(CCA, byte, datadoubleword, pAddr, vAddr, DATA)
TLB Refill, TLB Invalid, TLB Modified, Bus Error, Address Error, Watch, Reserved Instruction, Coprocessor Unusable