mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-13 18:28:35 +12:00
SPU MFC: Never clear tag status in WrTagUpdate
This commit is contained in:
parent
5d1fc546a8
commit
235d12aa6b
3 changed files with 10 additions and 6 deletions
|
@ -2515,7 +2515,6 @@ void spu_recompiler::WRCH(spu_opcode_t op)
|
||||||
|
|
||||||
c->bind(zero);
|
c->bind(zero);
|
||||||
c->mov(SPU_OFF_32(ch_tag_upd), qw0->r32());
|
c->mov(SPU_OFF_32(ch_tag_upd), qw0->r32());
|
||||||
c->mov(SPU_OFF_64(ch_tag_stat), 0);
|
|
||||||
c->jmp(ret);
|
c->jmp(ret);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -5702,9 +5702,9 @@ public:
|
||||||
}
|
}
|
||||||
case MFC_WrTagUpdate:
|
case MFC_WrTagUpdate:
|
||||||
{
|
{
|
||||||
if (auto ci = llvm::dyn_cast<llvm::ConstantInt>(val.value))
|
if (auto ci = llvm::dyn_cast<llvm::ConstantInt>(val.value); true)
|
||||||
{
|
{
|
||||||
const u64 upd = ci->getZExtValue();
|
const u64 upd = ci ? ci->getZExtValue() : UINT64_MAX;
|
||||||
|
|
||||||
const auto tag_mask = m_ir->CreateLoad(spu_ptr<u32>(&spu_thread::ch_tag_mask));
|
const auto tag_mask = m_ir->CreateLoad(spu_ptr<u32>(&spu_thread::ch_tag_mask));
|
||||||
const auto mfc_fence = m_ir->CreateLoad(spu_ptr<u32>(&spu_thread::mfc_fence));
|
const auto mfc_fence = m_ir->CreateLoad(spu_ptr<u32>(&spu_thread::mfc_fence));
|
||||||
|
@ -5722,8 +5722,14 @@ public:
|
||||||
else if (upd <= MFC_TAG_UPDATE_ALL)
|
else if (upd <= MFC_TAG_UPDATE_ALL)
|
||||||
{
|
{
|
||||||
const auto cond = upd == MFC_TAG_UPDATE_ANY ? m_ir->CreateICmpNE(completed, m_ir->getInt32(0)) : m_ir->CreateICmpEQ(completed, tag_mask);
|
const auto cond = upd == MFC_TAG_UPDATE_ANY ? m_ir->CreateICmpNE(completed, m_ir->getInt32(0)) : m_ir->CreateICmpEQ(completed, tag_mask);
|
||||||
m_ir->CreateStore(m_ir->CreateSelect(cond, m_ir->getInt32(MFC_TAG_UPDATE_IMMEDIATE), m_ir->getInt32(static_cast<u32>(upd))), upd_ptr);
|
m_ir->CreateStore(m_ir->CreateSelect(cond, m_ir->getInt32(MFC_TAG_UPDATE_IMMEDIATE), val.value), upd_ptr);
|
||||||
m_ir->CreateStore(m_ir->CreateSelect(cond, stat_val, m_ir->getInt64(0)), stat_ptr);
|
const auto next = llvm::BasicBlock::Create(m_context, "", m_function);
|
||||||
|
const auto update = llvm::BasicBlock::Create(m_context, "", m_function);
|
||||||
|
m_ir->CreateCondBr(cond, update, next);
|
||||||
|
m_ir->SetInsertPoint(update);
|
||||||
|
m_ir->CreateStore(stat_val, stat_ptr);
|
||||||
|
m_ir->CreateBr(next);
|
||||||
|
m_ir->SetInsertPoint(next);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2817,7 +2817,6 @@ bool spu_thread::set_ch_value(u32 ch, u32 value)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ch_tag_upd = value;
|
ch_tag_upd = value;
|
||||||
ch_tag_stat.set_value(0, false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue