Implement spu_runtime::reset

To handle JIT: Out Of Memory error.
This commit is contained in:
Nekotekina 2019-03-18 23:01:16 +03:00
parent 1880a17f79
commit 4b381fbbb1
7 changed files with 332 additions and 92 deletions

View file

@ -568,8 +568,26 @@ void spu_thread::cpu_task()
if (jit)
{
while (LIKELY(!state || !check_state()))
// Register SPU runtime user
spu_runtime::passive_lock _passive_lock(jit->get_runtime());
while (true)
{
if (UNLIKELY(state))
{
if (check_state())
{
if (state & cpu_flag::jit_return)
{
// Handle jit_return as a special case
jit->get_runtime().handle_return(this);
continue;
}
break;
}
}
spu_runtime::g_dispatcher[pc / 4](*this, vm::_ptr<u8>(offset), nullptr);
}