Skip to content
Permalink
Browse files
Merge pull request #6972 from JosJuice/default-jit
When CPU core is invalid, fall back to JIT instead of interpreter
  • Loading branch information
leoetlino committed May 26, 2018
2 parents 71c6eb2 + 792446e commit f568e41
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
@@ -64,7 +64,9 @@ CPUCoreBase* InitJitCore(int core)
break;

default:
PanicAlert("Unrecognizable cpu_core: %d", core);
PanicAlertT("The selected CPU emulation core (%d) is not available. "
"Please select a different CPU emulation core in the settings.",
core);
g_jit = nullptr;
return nullptr;
}
@@ -164,20 +164,13 @@ static void InitializeCPUCore(int cpu_core)
s_cpu_core_base = JitInterface::InitJitCore(cpu_core);
if (!s_cpu_core_base) // Handle Situations where JIT core isn't available
{
WARN_LOG(POWERPC, "Jit core %d not available. Defaulting to interpreter.", cpu_core);
s_cpu_core_base = s_interpreter;
WARN_LOG(POWERPC, "CPU core %d not available. Falling back to default.", cpu_core);
s_cpu_core_base = JitInterface::InitJitCore(DefaultCPUCore());
}
break;
}

if (s_cpu_core_base != s_interpreter)
{
s_mode = CoreMode::JIT;
}
else
{
s_mode = CoreMode::Interpreter;
}
s_mode = s_cpu_core_base == s_interpreter ? CoreMode::Interpreter : CoreMode::JIT;
}

const std::vector<CPUCore>& AvailableCPUCores()

0 comments on commit f568e41

Please sign in to comment.