diff --git a/rpcs3/Emu/CPU/CPUDisAsm.h b/rpcs3/Emu/CPU/CPUDisAsm.h index 38cffdb770..6921addf85 100644 --- a/rpcs3/Emu/CPU/CPUDisAsm.h +++ b/rpcs3/Emu/CPU/CPUDisAsm.h @@ -17,6 +17,7 @@ class CPUDisAsm protected: const CPUDisAsmMode m_mode; const std::add_pointer_t m_offset; + u32 m_op = 0; virtual void Write(const std::string& value) { @@ -25,20 +26,20 @@ protected: case CPUDisAsm_DumpMode: { last_opcode = fmt::format("\t%08x:\t%02x %02x %02x %02x\t%s\n", dump_pc, - m_offset[dump_pc], - m_offset[dump_pc + 1], - m_offset[dump_pc + 2], - m_offset[dump_pc + 3], value); + static_cast(m_op >> 24), + static_cast(m_op >> 16), + static_cast(m_op >> 8), + static_cast(m_op >> 0), value); break; } case CPUDisAsm_InterpreterMode: { last_opcode = fmt::format("[%08x] %02x %02x %02x %02x: %s", dump_pc, - m_offset[dump_pc], - m_offset[dump_pc + 1], - m_offset[dump_pc + 2], - m_offset[dump_pc + 3], value); + static_cast(m_op >> 24), + static_cast(m_op >> 16), + static_cast(m_op >> 8), + static_cast(m_op >> 0), value); break; } diff --git a/rpcs3/Emu/Cell/PPUDisAsm.cpp b/rpcs3/Emu/Cell/PPUDisAsm.cpp index aab2444c02..0359f20599 100644 --- a/rpcs3/Emu/Cell/PPUDisAsm.cpp +++ b/rpcs3/Emu/Cell/PPUDisAsm.cpp @@ -7,8 +7,8 @@ const ppu_decoder s_ppu_disasm; u32 PPUDisAsm::disasm(u32 pc) { dump_pc = pc; - const u32 op = *reinterpret_cast*>(m_offset + pc); - (this->*(s_ppu_disasm.decode(op)))({ op }); + m_op = *reinterpret_cast*>(m_offset + pc); + (this->*(s_ppu_disasm.decode(m_op)))({ m_op }); return 4; } diff --git a/rpcs3/Emu/Cell/SPUDisAsm.cpp b/rpcs3/Emu/Cell/SPUDisAsm.cpp index c7a0d3013c..5f1fdd4a5e 100644 --- a/rpcs3/Emu/Cell/SPUDisAsm.cpp +++ b/rpcs3/Emu/Cell/SPUDisAsm.cpp @@ -12,8 +12,8 @@ const spu_decoder s_spu_iflag; u32 SPUDisAsm::disasm(u32 pc) { dump_pc = pc; - const u32 op = *reinterpret_cast*>(m_offset + pc); - (this->*(s_spu_disasm.decode(op)))({ op }); + m_op = *reinterpret_cast*>(m_offset + pc); + (this->*(s_spu_disasm.decode(m_op)))({ m_op }); return 4; }