DSPAnalyzer: Implement DSP analyzer skeleton and use it
Attempts to simply make use of the interface. Cleanup will follow in subsequent commits to make for nicer review.
This commit is contained in:
1 parent
8f4c6ad7b1
commit
5756ece7ce
8 files changed
+59
-67
No files matched your search
@@ -42,14 +42,16 @@ void Interpreter::ExecuteInstruction(const UDSPInstruction inst)
|
||||
|
||||
void Interpreter::Step()
|
||||
{
|
||||
m_dsp_core.CheckExceptions();
|
||||
m_dsp_core.DSPState().step_counter++;
|
||||
auto& state = m_dsp_core.DSPState();
|
||||
|
||||
const u16 opc = m_dsp_core.DSPState().FetchInstruction();
|
||||
m_dsp_core.CheckExceptions();
|
||||
state.step_counter++;
|
||||
|
||||
const u16 opc = state.FetchInstruction();
|
||||
ExecuteInstruction(UDSPInstruction{opc});
|
||||
|
||||
const auto pc = m_dsp_core.DSPState().pc;
|
||||
if ((Analyzer::GetCodeFlags(static_cast<u16>(pc - 1)) & Analyzer::CODE_LOOP_END) != 0)
|
||||
const auto pc = state.pc;
|
||||
if ((state.GetAnalyzer().GetCodeFlags(static_cast<u16>(pc - 1)) & Analyzer::CODE_LOOP_END) != 0)
|
||||
HandleLoop();
|
||||
}
|
||||
|
||||
@@ -114,7 +116,7 @@ int Interpreter::RunCyclesDebug(int cycles)
|
||||
}
|
||||
|
||||
// Idle skipping.
|
||||
if ((Analyzer::GetCodeFlags(state.pc) & Analyzer::CODE_IDLE_SKIP) != 0)
|
||||
if ((state.GetAnalyzer().GetCodeFlags(state.pc) & Analyzer::CODE_IDLE_SKIP) != 0)
|
||||
return 0;
|
||||
|
||||
Step();
|
||||
@@ -170,7 +172,7 @@ int Interpreter::RunCycles(int cycles)
|
||||
return 0;
|
||||
|
||||
// Idle skipping.
|
||||
if ((Analyzer::GetCodeFlags(state.pc) & Analyzer::CODE_IDLE_SKIP) != 0)
|
||||
if ((state.GetAnalyzer().GetCodeFlags(state.pc) & Analyzer::CODE_IDLE_SKIP) != 0)
|
||||
return 0;
|
||||
|
||||
Step();
|
||||
|
||||
Reference in new issue
Block a user