Cleanup disasm classes a bit

This commit is contained in:
Eladash 2020-12-16 08:53:59 +02:00 committed by Ivan
parent e449111c33
commit ef884642e4
13 changed files with 28 additions and 38 deletions

View file

@ -3146,8 +3146,7 @@ spu_program spu_recompiler_base::analyse(const be_t<u32>* ls, u32 entry_point)
void spu_recompiler_base::dump(const spu_program& result, std::string& out)
{
SPUDisAsm dis_asm(CPUDisAsm_DumpMode);
dis_asm.offset = reinterpret_cast<const u8*>(result.data.data()) - result.lower_bound;
SPUDisAsm dis_asm(CPUDisAsm_DumpMode, reinterpret_cast<const u8*>(result.data.data()) - result.lower_bound);
std::string hash;
{
@ -3166,7 +3165,6 @@ void spu_recompiler_base::dump(const spu_program& result, std::string& out)
{
for (u32 pos = bb.first, end = bb.first + bb.second.size * 4; pos < end; pos += 4)
{
dis_asm.dump_pc = pos;
dis_asm.disasm(pos);
fmt::append(out, ">%s\n", dis_asm.last_opcode);
}