mirror of
https://github.com/RPCS3/rpcs3.git
synced 2026-06-02 04:36:57 -06:00
SPU LLVM: Remove dead interpreter ret fallback
This commit is contained in:
parent
b41b10a031
commit
3058a71d72
@ -3912,20 +3912,23 @@ public:
|
||||
}
|
||||
else if (!(itype & spu_itype::branch))
|
||||
{
|
||||
// Hack: inline ret instruction before final jmp; this is not reliable.
|
||||
// Inline ret exits the instruction helper directly.
|
||||
#ifdef ARCH_X64
|
||||
m_ir->CreateCall(InlineAsm::get(get_ftype<void>(), "ret", "", true, false, InlineAsm::AD_Intel));
|
||||
#else
|
||||
m_ir->CreateCall(InlineAsm::get(get_ftype<void>(), "ret", "", true, false));
|
||||
#endif
|
||||
fret = ret_func;
|
||||
m_ir->CreateUnreachable();
|
||||
}
|
||||
|
||||
const auto arg3 = UndefValue::get(get_type<u32>());
|
||||
const auto _ret = m_ir->CreateCall(if_type, fret, {m_lsptr, m_thread, m_interp_pc, arg3, m_interp_table, m_interp_7f0, m_interp_regs});
|
||||
_ret->setCallingConv(CallingConv::GHC);
|
||||
_ret->setTailCall();
|
||||
m_ir->CreateRetVoid();
|
||||
if (!m_ir->GetInsertBlock()->getTerminator())
|
||||
{
|
||||
const auto arg3 = UndefValue::get(get_type<u32>());
|
||||
const auto _ret = m_ir->CreateCall(if_type, fret, {m_lsptr, m_thread, m_interp_pc, arg3, m_interp_table, m_interp_7f0, m_interp_regs});
|
||||
_ret->setCallingConv(CallingConv::GHC);
|
||||
_ret->setTailCall();
|
||||
m_ir->CreateRetVoid();
|
||||
}
|
||||
}
|
||||
|
||||
if (!m_ir->GetInsertBlock()->getTerminator())
|
||||
|
||||
Loading…
Reference in New Issue
Block a user