SPU Analyzer: Fix register origin for Reduced Loop
This commit is contained in:
@@ -6194,7 +6194,7 @@ spu_program spu_recompiler_base::analyse(const be_t<u32>* ls, u32 entry_point, s
|
|||||||
{
|
{
|
||||||
const auto arg = reduced_loop->find_reg(reg);
|
const auto arg = reduced_loop->find_reg(reg);
|
||||||
|
|
||||||
if (arg && reg != op_rt)
|
if (arg && arg->regs.count() != 0)
|
||||||
{
|
{
|
||||||
if (reg_first == reg)
|
if (reg_first == reg)
|
||||||
{
|
{
|
||||||
@@ -6217,6 +6217,12 @@ spu_program spu_recompiler_base::analyse(const be_t<u32>* ls, u32 entry_point, s
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (type & spu_itype::memory || type == spu_itype::RDCH || type == spu_itype::RCHCNT)
|
||||||
|
{
|
||||||
|
// Register external origin
|
||||||
|
org.add_register_origin(s_reg_max);
|
||||||
|
}
|
||||||
|
|
||||||
*ensure(reduced_loop->find_reg(op_rt)) = org;
|
*ensure(reduced_loop->find_reg(op_rt)) = org;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -364,7 +364,7 @@ public:
|
|||||||
|
|
||||||
struct origin_t
|
struct origin_t
|
||||||
{
|
{
|
||||||
std::bitset<s_reg_max> regs{};
|
std::bitset<s_reg_max + 1> regs{};
|
||||||
u32 modified = 0;
|
u32 modified = 0;
|
||||||
spu_itype_t mod1_type = spu_itype::UNK;
|
spu_itype_t mod1_type = spu_itype::UNK;
|
||||||
spu_itype_t mod2_type = spu_itype::UNK;
|
spu_itype_t mod2_type = spu_itype::UNK;
|
||||||
|
|||||||
Reference in New Issue
Block a user