irjit: Implement ll/sc.

These occur more than I expected in LittleBigPlanet while loading.
This commit is contained in:
Unknown W. Brackets committed 2023-07-29 17:57:44 -07:00
1 parent 48586ed0ad
commit df2462b1d9
19 files changed
+93 -3

No files matched your search

+24
View File
@@ -105,6 +105,30 @@ namespace MIPSComp {
}
}
void IRFrontend::Comp_StoreSync(MIPSOpcode op) {
CONDITIONAL_DISABLE(LSU);
int offset = _IMM16;
MIPSGPReg rt = _RT;
MIPSGPReg rs = _RS;
// Note: still does something even if loading to zero.
CheckMemoryBreakpoint(rs, offset);
switch (op >> 26) {
case 48: // ll
ir.Write(IROp::Load32Linked, rt, rs, ir.AddConstant(offset));
break;
case 56: // sc
ir.Write(IROp::Store32Conditional, rt, rs, ir.AddConstant(offset));
break;
default:
INVALIDOP;
}
}
void IRFrontend::Comp_Cache(MIPSOpcode op) {
CONDITIONAL_DISABLE(LSU);