1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-22 02:32:36 +01:00

vm::cast in PPUInterpreter

This commit is contained in:
Nekotekina 2015-01-14 19:48:50 +03:00
parent 4237043f38
commit 809ba66290
4 changed files with 159 additions and 723 deletions

View File

@ -265,15 +265,7 @@ void _se_translator(unsigned int u, EXCEPTION_POINTERS* pExp)
// it's dangerous because destructors won't be executed
}
// TODO: allow recovering from a page fault as a feature of PS3 virtual memory
if (CPUThread* t = GetCurrentCPUThread())
{
throw fmt::Format("Access violation %s location 0x%x (is_alive=%d, last_syscall=0x%llx (%s))", is_writing ? "writing" : "reading", addr,
t->IsAlive() ? 1 : 0, t->m_last_syscall, SysCalls::GetHLEFuncName((u32)t->m_last_syscall).c_str());
}
else
{
throw fmt::Format("Access violation %s location 0x%x", is_writing ? "writing" : "reading", addr);
}
throw fmt::Format("Access violation %s location 0x%x", is_writing ? "writing" : "reading", addr);
}
// else some fatal error (should crash)
@ -363,15 +355,7 @@ void signal_handler(int sig, siginfo_t* info, void* uct)
}
// TODO: allow recovering from a page fault as a feature of PS3 virtual memory
if (CPUThread* t = GetCurrentCPUThread())
{
throw fmt::Format("Access violation %s location 0x%x (is_alive=%d, last_syscall=0x%llx (%s))", /*is_writing ? "writing" : "reading"*/ "at", addr,
t->IsAlive() ? 1 : 0, t->m_last_syscall, SysCalls::GetHLEFuncName((u32)t->m_last_syscall).c_str());
}
else
{
throw fmt::Format("Access violation %s location 0x%x", /*is_writing ? "writing" : "reading"*/ "at", addr);
}
throw fmt::Format("Access violation %s location 0x%x", /*is_writing ? "writing" : "reading"*/ "at", addr);
}
// else some fatal error

View File

@ -310,12 +310,14 @@ void CPUThread::Task()
}
catch (const std::string& e)
{
LOG_ERROR(GENERAL, "Exception: %s", e.c_str());
LOG_ERROR(GENERAL, "Exception: %s (is_alive=%d, m_last_syscall=0x%llx (%s))", e, IsAlive(), m_last_syscall, SysCalls::GetHLEFuncName((u32)m_last_syscall));
LOG_NOTICE(GENERAL, RegsToString());
Emu.Pause();
}
catch (const char* e)
{
LOG_ERROR(GENERAL, "Exception: %s", e);
LOG_ERROR(GENERAL, "Exception: %s (is_alive=%d, m_last_syscall=0x%llx (%s))", e, IsAlive(), m_last_syscall, SysCalls::GetHLEFuncName((u32)m_last_syscall));
LOG_NOTICE(GENERAL, RegsToString());
Emu.Pause();
}

File diff suppressed because it is too large Load Diff

View File

@ -189,7 +189,7 @@ int FPRdouble::Cmp(PPCdouble a, PPCdouble b)
u64 PPUThread::GetStackArg(s32 i)
{
return vm::read64(GPR[1] + 0x70 + 0x8 * (i - 9));
return vm::read64(vm::cast(GPR[1] + 0x70 + 0x8 * (i - 9)));
}
u64 PPUThread::FastCall2(u32 addr, u32 rtoc)