pre-Release 6
SDC2 111110 |
base |
rt |
offset |
6 |
5 |
5 |
16 |
Release 6
COP2 010010 |
SDC2 01111 |
rt |
base |
offset |
6 |
5 |
5 |
5 |
11 |
SDC2 rt, offset(base) |
MIPS32 |
Store Doubleword from Coprocessor 2 |
Store Doubleword from Coprocessor 2
To store a doubleword from a Coprocessor 2 register to memory
memory[GPR[base] + offset] = CPR[2,rt,0]
The 64-bit doubleword in Coprocessor 2 register rt is stored in memory at the location specified by the aligned effective address. The 16-bit signed offset is added to the contents of GPR base to form the effective address.
Pre-Release 6: An Address Error exception occurs if EffectiveAddress2..0 != 0 (not doubleword-aligned).
Release 6 allows hardware to provide address misalignment support in lieu of requiring natural alignment.
Note: The pseudocode is not completely adapted for Release 6 misalignment support as the handling is implementation dependent.
This instruction has been recoded for Release 6.
vAddr = sign_extend(offset) + GPR[base] (pAddr, CCA) = AddressTranslation(vAddr, DATA, STORE) datadoubleword = CPR[2,rt,0] StoreMemory(CCA, DOUBLEWORD, datadoubleword, pAddr, vAddr, DATA) lsw = CPR[2,rt,0] msw = CPR[2,rt+1,0] paddr = paddr xor ((BigEndianCPU xor ReverseEndian) || 02) StoreMemory(CCA, WORD, lsw, pAddr, vAddr, DATA) paddr = paddr xor 0b100 StoreMemory(CCA, WORD, msw, pAddr, vAddr+4, DATA)
Coprocessor Unusable, Reserved Instruction, TLB Refill, TLB Invalid, TLB Modified, Address Error, Watch
As shown in the instruction drawing above, Release 6 implements an 11-bit offset, whereas all release levels lower than Release 6 of the MIPS architecture implement a 16-bit offset.