Just invalidate blocks on ClearCacheAt().

This makes it safe to call from a jitted syscall, etc.
This commit is contained in:
Unknown W. Brackets committed 2013-09-01 00:32:43 -07:00
1 parent 14bcca1f53
commit b558189c37
8 files changed
+14 -14

No files matched your search

+3 -2
View File
@@ -308,9 +308,10 @@ void CtrlDisAsmView::assembleOpcode(u32 address, std::string defaultText)
result = MIPSAsm::MipsAssembleOpcode(op.c_str(),debugger,address,encoded);
if (result == true)
{
Memory::Write_U32(encoded,address);
Memory::Write_U32(encoded, address);
// In case this is a delay slot or combined instruction, clear cache above it too.
if (MIPSComp::jit)
MIPSComp::jit->ClearCacheAt(address);
MIPSComp::jit->ClearCacheAt(address - 4, 8);
redraw();
} else {
MessageBox(wnd,L"Couldn't assemble.",L"Error",MB_OK);