mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-04 22:19:02 +00:00
PPU LLVM: allow to drop setting SAT flag (optimization, module-wide)
Implement ppu_attr::has_mfvscr (partially, module-wide search). If this instruction isn't found, allow to drop setting SAT flag. It's based on presumption that only MFVSCR can retrieve SAT flag.
This commit is contained in:
parent
86b194014b
commit
c9d8e59dbf
5 changed files with 57 additions and 1 deletions
|
|
@ -141,6 +141,7 @@ Function* PPUTranslator::Translate(const ppu_function& info)
|
|||
// Instruction address is (m_addr + base)
|
||||
const u64 base = m_reloc ? m_reloc->addr : 0;
|
||||
m_addr = info.addr - base;
|
||||
m_attr = info.attr;
|
||||
|
||||
// Don't emit check in small blocks without terminator
|
||||
bool need_check = info.size >= 16;
|
||||
|
|
@ -4816,7 +4817,10 @@ void PPUTranslator::SetOverflow(Value* bit)
|
|||
|
||||
void PPUTranslator::SetSat(Value* bit)
|
||||
{
|
||||
RegStore(m_ir->CreateOr(RegLoad(m_sat), bit), m_sat);
|
||||
if (m_attr & ppu_attr::has_mfvscr)
|
||||
{
|
||||
RegStore(m_ir->CreateOr(RegLoad(m_sat), bit), m_sat);
|
||||
}
|
||||
}
|
||||
|
||||
Value* PPUTranslator::CheckTrapCondition(u32 to, Value* left, Value* right)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue