Commit 53ef934e authored by George Hotz's avatar George Hotz

fix ll, and sc with an ugly hack

parent 00b9ac47
......@@ -152,7 +152,7 @@ contract MIPS {
rs += SignExtImm;
uint32 addr = rs & 0xFFFFFFFC;
mem = m.ReadMemory(stateHash, addr);
if (opcode >= 0x28) {
if (opcode >= 0x28 && opcode != 0x30) {
// store
storeAddr = addr;
}
......@@ -233,6 +233,11 @@ contract MIPS {
}
}
// stupid sc, write a 1 to rt
if (opcode == 0x38) {
stateHash = m.WriteMemory(stateHash, REG_OFFSET + ((insn >> 14) & 0x7C), 1);
}
// write back
if (storeAddr != REG_ZERO) {
stateHash = m.WriteMemory(stateHash, storeAddr, val);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment