diff --git a/Source/Core/Core/DSP/DSPAnalyzer.cpp b/Source/Core/Core/DSP/DSPAnalyzer.cpp index 14cbbc1f46..3f225e9345 100644 --- a/Source/Core/Core/DSP/DSPAnalyzer.cpp +++ b/Source/Core/Core/DSP/DSPAnalyzer.cpp @@ -2,6 +2,8 @@ // Licensed under GPLv2 // Refer to the license.txt file included. +#include + #include "Core/DSP/DSPAnalyzer.h" #include "Core/DSP/DSPInterpreter.h" #include "Core/DSP/DSPMemoryMap.h" @@ -10,7 +12,7 @@ namespace DSPAnalyzer { // Holds data about all instructions in RAM. -u8 code_flags[ISPACE]; +std::array code_flags; // Good candidates for idle skipping is mail wait loops. If we're time slicing // between the main CPU and the DSP, if the DSP runs into one of these, it might @@ -62,7 +64,7 @@ const u16 idle_skip_sigs[NUM_IDLE_SIGS][MAX_IDLE_SIG_SIZE + 1] = static void Reset() { - memset(code_flags, 0, sizeof(code_flags)); + code_flags.fill(0); } static void AnalyzeRange(int start_addr, int end_addr) diff --git a/Source/Core/Core/DSP/DSPAnalyzer.h b/Source/Core/Core/DSP/DSPAnalyzer.h index 17121b5cbe..5a603d7429 100644 --- a/Source/Core/Core/DSP/DSPAnalyzer.h +++ b/Source/Core/Core/DSP/DSPAnalyzer.h @@ -4,6 +4,7 @@ #pragma once +#include #include "Core/DSP/DSPInterpreter.h" // Basic code analysis. @@ -27,7 +28,7 @@ enum // Easy to query array covering the whole of instruction memory. // Just index by address. // This one will be helpful for debuggers and jits. -extern u8 code_flags[ISPACE]; +extern std::array code_flags; // This one should be called every time IRAM changes - which is basically // every time that a new ucode gets uploaded, and never else. At that point,