mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-14 06:50:29 +02:00
jit: Lock around changes to the jit pointer.
This commit is contained in:
1 parent
0c6c2fb47a
commit
b8ab7f39df
17 files changed
+87
-33
No files matched your search
@@ -633,23 +633,25 @@ bool CBreakPoints::HasMemChecks()
|
||||
return !memChecks_.empty();
|
||||
}
|
||||
|
||||
void CBreakPoints::Update(u32 addr)
|
||||
{
|
||||
if (MIPSComp::jit)
|
||||
{
|
||||
void CBreakPoints::Update(u32 addr) {
|
||||
if (MIPSComp::jit) {
|
||||
bool resume = false;
|
||||
if (Core_IsStepping() == false)
|
||||
{
|
||||
if (Core_IsStepping() == false) {
|
||||
Core_EnableStepping(true, "cpu.breakpoint.update", addr);
|
||||
Core_WaitInactive(200);
|
||||
resume = true;
|
||||
}
|
||||
|
||||
// In case this is a delay slot, clear the previous instruction too.
|
||||
if (addr != 0)
|
||||
MIPSComp::jit->InvalidateCacheAt(addr - 4, 8);
|
||||
else
|
||||
MIPSComp::jit->ClearCache();
|
||||
|
||||
{
|
||||
std::lock_guard<std::recursive_mutex> guard(MIPSComp::jitLock);
|
||||
if (MIPSComp::jit) {
|
||||
// In case this is a delay slot, clear the previous instruction too.
|
||||
if (addr != 0)
|
||||
MIPSComp::jit->InvalidateCacheAt(addr - 4, 8);
|
||||
else
|
||||
MIPSComp::jit->ClearCache();
|
||||
}
|
||||
}
|
||||
|
||||
if (resume)
|
||||
Core_EnableStepping(false);
|
||||
|
||||
Reference in new issue
Block a user