SPU: properly support STOP 0x0 instruction

This commit is contained in:
Nekotekina 2020-01-20 23:40:10 +03:00
parent 0f87c6c7c3
commit 98a8eeaac2
2 changed files with 12 additions and 0 deletions

View File

@ -1076,6 +1076,12 @@ void spu_recompiler_base::dispatch(spu_thread& spu, void*, u8* rip)
spu.jit->init();
// Compile
if (spu._ref<u32>(spu.pc) == 0)
{
spu_runtime::g_escape(&spu);
return;
}
const auto func = spu.jit->compile(spu.jit->analyse(spu._ptr<u32>(0), spu.pc));
if (!func)

View File

@ -1148,6 +1148,12 @@ void spu_thread::cpu_task()
break;
}
if (_ref<u32>(pc) == 0x0)
{
spu_thread::stop_and_signal(0x0);
continue;
}
spu_runtime::g_gateway(*this, vm::_ptr<u8>(offset), nullptr);
}