From 54ef5299bbce467201ead6f33c61511ae358870a Mon Sep 17 00:00:00 2001 From: Michael Maltese Date: Mon, 15 May 2017 17:16:55 -0700 Subject: [PATCH] DSPDisassembler: remove UnkOps.txt write on destruction --- Source/Core/Core/DSP/DSPDisassembler.cpp | 31 ------------------------ Source/Core/Core/DSP/DSPDisassembler.h | 2 -- 2 files changed, 33 deletions(-) diff --git a/Source/Core/Core/DSP/DSPDisassembler.cpp b/Source/Core/Core/DSP/DSPDisassembler.cpp index ebe8121cf2..d6b94a9597 100644 --- a/Source/Core/Core/DSP/DSPDisassembler.cpp +++ b/Source/Core/Core/DSP/DSPDisassembler.cpp @@ -25,36 +25,6 @@ DSPDisassembler::DSPDisassembler(const AssemblerSettings& settings) : settings_( { } -DSPDisassembler::~DSPDisassembler() -{ - // Some old code for logging unknown ops. - std::string filename = File::GetUserPath(D_DUMPDSP_IDX) + "UnkOps.txt"; - std::ofstream uo(filename); - if (!uo) - return; - - int count = 0; - for (const auto& entry : unk_opcodes) - { - if (entry.second > 0) - { - count++; - uo << StringFromFormat("OP%04x\t%d", entry.first, entry.second); - for (int j = 15; j >= 0; j--) // print op bits - { - if ((j & 0x3) == 3) - uo << "\tb"; - - uo << StringFromFormat("%d", (entry.first >> j) & 0x1); - } - - uo << "\n"; - } - } - - uo << StringFromFormat("Unknown opcodes count: %d\n", count); -} - bool DSPDisassembler::Disassemble(const std::vector& code, int base_addr, std::string& text) { for (u16 pc = 0; pc < code.size();) @@ -264,7 +234,6 @@ bool DSPDisassembler::DisassembleOpcode(const u16* binbuf, int base_addr, u16* p if (opc->opcode_mask == 0) { // unknown opcode - unk_opcodes[op1]++; dest += "\t\t; *** UNKNOWN OPCODE ***"; } diff --git a/Source/Core/Core/DSP/DSPDisassembler.h b/Source/Core/Core/DSP/DSPDisassembler.h index d3c2f97260..8332f0f204 100644 --- a/Source/Core/Core/DSP/DSPDisassembler.h +++ b/Source/Core/Core/DSP/DSPDisassembler.h @@ -34,7 +34,6 @@ class DSPDisassembler { public: explicit DSPDisassembler(const AssemblerSettings& settings); - ~DSPDisassembler(); bool Disassemble(const std::vector& code, int base_addr, std::string& text); @@ -43,7 +42,6 @@ public: private: std::string DisassembleParameters(const DSPOPCTemplate& opc, u16 op1, u16 op2); - std::map unk_opcodes; const AssemblerSettings settings_;