mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-07 07:25:26 +00:00
PPU/LLVM: Fix for crashes on exit with jit
This commit is contained in:
parent
97f62571ff
commit
3208a7713f
2 changed files with 26 additions and 10 deletions
|
|
@ -1785,10 +1785,23 @@ void Compiler::HACK(u32 index) {
|
|||
}
|
||||
}
|
||||
|
||||
static u32 wrappedDoSyscall(PPUThread &CPU, u64 code) {
|
||||
try
|
||||
{
|
||||
SysCalls::DoSyscall(CPU, code);
|
||||
return ExecutionStatus::ExecutionStatusBlockEnded;
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
CPU.pending_exception = std::current_exception();
|
||||
return ExecutionStatus::ExecutionStatusPropagateException;
|
||||
}
|
||||
}
|
||||
|
||||
void Compiler::SC(u32 lev) {
|
||||
switch (lev) {
|
||||
case 0:
|
||||
Call<void>("SysCalls.DoSyscall", SysCalls::DoSyscall, m_state.args[CompileTaskState::Args::State], GetGpr(11));
|
||||
Call<void>("wrappedDoSyscall", &wrappedDoSyscall, m_state.args[CompileTaskState::Args::State], GetGpr(11));
|
||||
break;
|
||||
case 3:
|
||||
Call<void>("PPUThread.FastStop", &PPUThread::fast_stop, m_state.args[CompileTaskState::Args::State]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue