mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-04 05:51:27 +12:00
PPU/LLVM: Added noexcept and some fixes
This commit is contained in:
parent
3208a7713f
commit
11eeab0a1a
2 changed files with 14 additions and 6 deletions
|
@ -609,7 +609,7 @@ bool ppu_recompiler_llvm::CPUHybridDecoderRecompiler::PollStatus(PPUThread * ppu
|
||||||
catch (...)
|
catch (...)
|
||||||
{
|
{
|
||||||
ppu_state->pending_exception = std::current_exception();
|
ppu_state->pending_exception = std::current_exception();
|
||||||
return ExecutionStatus::ExecutionStatusPropagateException;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif // LLVM_AVAILABLE
|
#endif // LLVM_AVAILABLE
|
||||||
|
|
|
@ -1754,9 +1754,8 @@ void Compiler::BC(u32 bo, u32 bi, s32 bd, u32 aa, u32 lk) {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static u32
|
static u32
|
||||||
wrappedExecutePPUFuncByIndex(PPUThread &CPU, u32 index)
|
wrappedExecutePPUFuncByIndex(PPUThread &CPU, u32 index) noexcept {
|
||||||
{
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
execute_ppu_func_by_index(CPU, index);
|
execute_ppu_func_by_index(CPU, index);
|
||||||
|
@ -1785,7 +1784,7 @@ void Compiler::HACK(u32 index) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static u32 wrappedDoSyscall(PPUThread &CPU, u64 code) {
|
static u32 wrappedDoSyscall(PPUThread &CPU, u64 code) noexcept {
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
SysCalls::DoSyscall(CPU, code);
|
SysCalls::DoSyscall(CPU, code);
|
||||||
|
@ -1801,7 +1800,16 @@ static u32 wrappedDoSyscall(PPUThread &CPU, u64 code) {
|
||||||
void Compiler::SC(u32 lev) {
|
void Compiler::SC(u32 lev) {
|
||||||
switch (lev) {
|
switch (lev) {
|
||||||
case 0:
|
case 0:
|
||||||
Call<void>("wrappedDoSyscall", &wrappedDoSyscall, m_state.args[CompileTaskState::Args::State], GetGpr(11));
|
{
|
||||||
|
llvm::Value *status = Call<u32>("wrappedDoSyscall", &wrappedDoSyscall, m_state.args[CompileTaskState::Args::State], GetGpr(11));
|
||||||
|
llvm::BasicBlock *cputhreadexitblock = GetBasicBlockFromAddress(m_state.current_instruction_address, "early_exit");
|
||||||
|
llvm::Value *isCPUThreadExit = m_ir_builder->CreateICmpEQ(status, m_ir_builder->getInt32(ExecutionStatus::ExecutionStatusPropagateException));
|
||||||
|
llvm::BasicBlock *normal_execution = GetBasicBlockFromAddress(m_state.current_instruction_address, "normal_execution");
|
||||||
|
m_ir_builder->CreateCondBr(isCPUThreadExit, cputhreadexitblock, normal_execution);
|
||||||
|
m_ir_builder->SetInsertPoint(cputhreadexitblock);
|
||||||
|
m_ir_builder->CreateRet(m_ir_builder->getInt32(ExecutionStatus::ExecutionStatusPropagateException));
|
||||||
|
m_ir_builder->SetInsertPoint(normal_execution);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
Call<void>("PPUThread.FastStop", &PPUThread::fast_stop, m_state.args[CompileTaskState::Args::State]);
|
Call<void>("PPUThread.FastStop", &PPUThread::fast_stop, m_state.args[CompileTaskState::Args::State]);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue