DSPDisassembler: remove unused base_addr parameter
This commit is contained in:
parent
2564823522
commit
1d0185d7d5
|
@ -56,7 +56,7 @@ bool Disassemble(const std::vector<u16>& code, bool line_numbers, std::string& t
|
|||
settings.decode_registers = true;
|
||||
|
||||
DSPDisassembler disasm(settings);
|
||||
bool success = disasm.Disassemble(code, 0x0000, text);
|
||||
bool success = disasm.Disassemble(code, text);
|
||||
return success;
|
||||
}
|
||||
|
||||
|
@ -79,9 +79,9 @@ bool Compare(const std::vector<u16>& code1, const std::vector<u16>& code2)
|
|||
{
|
||||
std::string line1, line2;
|
||||
u16 pc = i;
|
||||
disassembler.DisassembleOpcode(&code1[0], 0x0000, &pc, line1);
|
||||
disassembler.DisassembleOpcode(&code1[0], &pc, line1);
|
||||
pc = i;
|
||||
disassembler.DisassembleOpcode(&code2[0], 0x0000, &pc, line2);
|
||||
disassembler.DisassembleOpcode(&code2[0], &pc, line2);
|
||||
printf("!! %04x : %04x vs %04x - %s vs %s\n", i, code1[i], code2[i], line1.c_str(),
|
||||
line2.c_str());
|
||||
}
|
||||
|
@ -94,7 +94,7 @@ bool Compare(const std::vector<u16>& code1, const std::vector<u16>& code2)
|
|||
{
|
||||
u16 pc = i;
|
||||
std::string line;
|
||||
disassembler.DisassembleOpcode(&longest[0], 0x0000, &pc, line);
|
||||
disassembler.DisassembleOpcode(&longest[0], &pc, line);
|
||||
printf("!! %s\n", line.c_str());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,11 +25,11 @@ DSPDisassembler::DSPDisassembler(const AssemblerSettings& settings) : settings_(
|
|||
{
|
||||
}
|
||||
|
||||
bool DSPDisassembler::Disassemble(const std::vector<u16>& code, int base_addr, std::string& text)
|
||||
bool DSPDisassembler::Disassemble(const std::vector<u16>& code, std::string& text)
|
||||
{
|
||||
for (u16 pc = 0; pc < code.size();)
|
||||
{
|
||||
if (!DisassembleOpcode(code.data(), base_addr, &pc, text))
|
||||
if (!DisassembleOpcode(code.data(), &pc, text))
|
||||
return false;
|
||||
text.append("\n");
|
||||
}
|
||||
|
@ -129,8 +129,7 @@ std::string DSPDisassembler::DisassembleParameters(const DSPOPCTemplate& opc, u1
|
|||
return buf;
|
||||
}
|
||||
|
||||
bool DSPDisassembler::DisassembleOpcode(const u16* binbuf, int base_addr, u16* pc,
|
||||
std::string& dest)
|
||||
bool DSPDisassembler::DisassembleOpcode(const u16* binbuf, u16* pc, std::string& dest)
|
||||
{
|
||||
if ((*pc & 0x7fff) >= 0x1000)
|
||||
{
|
||||
|
|
|
@ -34,10 +34,10 @@ class DSPDisassembler
|
|||
public:
|
||||
explicit DSPDisassembler(const AssemblerSettings& settings);
|
||||
|
||||
bool Disassemble(const std::vector<u16>& code, int base_addr, std::string& text);
|
||||
bool Disassemble(const std::vector<u16>& code, std::string& text);
|
||||
|
||||
// Warning - this one is trickier to use right.
|
||||
bool DisassembleOpcode(const u16* binbuf, int base_addr, u16* pc, std::string& dest);
|
||||
bool DisassembleOpcode(const u16* binbuf, u16* pc, std::string& dest);
|
||||
|
||||
private:
|
||||
std::string DisassembleParameters(const DSPOPCTemplate& opc, u16 op1, u16 op2);
|
||||
|
|
|
@ -230,7 +230,7 @@ void AutoDisassembly(u16 start_addr, u16 end_addr)
|
|||
addr_to_line[addr] = line_counter;
|
||||
|
||||
std::string buf;
|
||||
if (!disasm.DisassembleOpcode(ptr, 0, &addr, buf))
|
||||
if (!disasm.DisassembleOpcode(ptr, &addr, buf))
|
||||
{
|
||||
ERROR_LOG(DSPLLE, "disasm failed at %04x", addr);
|
||||
break;
|
||||
|
|
|
@ -23,7 +23,7 @@ static bool RoundTrippableDissassemble(const std::vector<u16>& code, std::string
|
|||
settings.show_pc = false;
|
||||
DSP::DSPDisassembler disasm(settings);
|
||||
|
||||
return disasm.Disassemble(code, 0x0000, text);
|
||||
return disasm.Disassemble(code, text);
|
||||
}
|
||||
|
||||
// This test goes from text ASM to binary to text ASM and once again back to binary.
|
||||
|
|
Loading…
Reference in New Issue