mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-08 16:01:42 +12:00
LLVM stack overflow fix
This commit is contained in:
parent
a342de6143
commit
ec8519b969
3 changed files with 17 additions and 15 deletions
|
@ -2019,14 +2019,14 @@ void Compiler::HACK(u32 index) {
|
|||
CreateBranch(nullptr, lr_i32, false, true);
|
||||
}
|
||||
// copied from Compiler::SC()
|
||||
auto ret_i1 = Call<bool>("PollStatus", m_poll_status_function, m_state.args[CompileTaskState::Args::State]);
|
||||
auto cmp_i1 = m_ir_builder->CreateICmpEQ(ret_i1, m_ir_builder->getInt1(true));
|
||||
auto then_bb = GetBasicBlockFromAddress(m_state.current_instruction_address, "then_true");
|
||||
auto merge_bb = GetBasicBlockFromAddress(m_state.current_instruction_address, "merge_true");
|
||||
m_ir_builder->CreateCondBr(cmp_i1, then_bb, merge_bb);
|
||||
m_ir_builder->SetInsertPoint(then_bb);
|
||||
m_ir_builder->CreateRet(m_ir_builder->getInt32(0xFFFFFFFF));
|
||||
m_ir_builder->SetInsertPoint(merge_bb);
|
||||
//auto ret_i1 = Call<bool>("PollStatus", m_poll_status_function, m_state.args[CompileTaskState::Args::State]);
|
||||
//auto cmp_i1 = m_ir_builder->CreateICmpEQ(ret_i1, m_ir_builder->getInt1(true));
|
||||
//auto then_bb = GetBasicBlockFromAddress(m_state.current_instruction_address, "then_true");
|
||||
//auto merge_bb = GetBasicBlockFromAddress(m_state.current_instruction_address, "merge_true");
|
||||
//m_ir_builder->CreateCondBr(cmp_i1, then_bb, merge_bb);
|
||||
//m_ir_builder->SetInsertPoint(then_bb);
|
||||
//m_ir_builder->CreateRet(m_ir_builder->getInt32(0xFFFFFFFF));
|
||||
//m_ir_builder->SetInsertPoint(merge_bb);
|
||||
}
|
||||
|
||||
void Compiler::SC(u32 lev) {
|
||||
|
@ -6087,7 +6087,9 @@ BranchType ppu_recompiler_llvm::GetBranchTypeFromInstruction(u32 instruction) {
|
|||
} else if (field2 == 528) {
|
||||
type = lk ? BranchType::FunctionCall : BranchType::LocalBranch;
|
||||
}
|
||||
} else if (field1 == 1 && (instruction & EIF_PERFORM_BLR)) {
|
||||
type = BranchType::Return;
|
||||
}
|
||||
|
||||
|
||||
return type;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue