SPU LLVM: Optimize spu_idisable

This commit is contained in:
Eladash 2023-09-01 15:48:43 +03:00 committed by Elad Ashkenazi
parent 1c793edf7d
commit f9f2657c98
2 changed files with 19 additions and 0 deletions

View file

@ -2607,6 +2607,12 @@ void spu_recompiler::BI(spu_opcode_t op)
{
spu_log.error("[0x%x] BI: no targets", m_pos);
}
else if (op.d && found->second.size() == 1 && found->second[0] == spu_branch_target(m_pos, 1))
{
// Interrupts-disable pattern
c->mov(SPU_OFF_8(interrupts_enabled), 0);
return;
}
c->mov(*addr, SPU_OFF_32(gpr, op.ra, &v128::_u32, 3));
c->and_(*addr, 0x3fffc);