SPU LLVM: Remove dead interpreter ret fallback

This commit is contained in:
Malcolm 2026-05-19 22:18:53 -04:00 committed by kd-11
parent b41b10a031
commit 3058a71d72

View File

@ -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())