From f9d8d06037d172b7d42aed68aedcfc18ce51d2b4 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Tue, 29 Dec 2020 12:25:15 -0500 Subject: [PATCH] DSP: Make mailboxes private These aren't used externally anywhere and can be made private. --- Source/Core/Core/DSP/DSPCore.cpp | 4 ++-- Source/Core/Core/DSP/DSPCore.h | 8 +++----- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/Source/Core/Core/DSP/DSPCore.cpp b/Source/Core/Core/DSP/DSPCore.cpp index d06c324118..45e7cdfe8a 100644 --- a/Source/Core/Core/DSP/DSPCore.cpp +++ b/Source/Core/Core/DSP/DSPCore.cpp @@ -387,8 +387,8 @@ void SDSP::DoState(PointerWrap& p) p.Do(step_counter); p.DoArray(ifx_regs); accelerator->DoState(p); - p.Do(mbox[0]); - p.Do(mbox[1]); + p.Do(m_mailbox[0]); + p.Do(m_mailbox[1]); Common::UnWriteProtectMemory(iram, DSP_IRAM_BYTE_SIZE, false); p.DoArray(iram, DSP_IRAM_SIZE); Common::WriteProtectMemory(iram, DSP_IRAM_BYTE_SIZE, false); diff --git a/Source/Core/Core/DSP/DSPCore.h b/Source/Core/Core/DSP/DSPCore.h index bbb4c0041c..c57a35f4c1 100644 --- a/Source/Core/Core/DSP/DSPCore.h +++ b/Source/Core/Core/DSP/DSPCore.h @@ -429,9 +429,6 @@ struct SDSP u32 iram_crc = 0; u64 step_counter = 0; - // Mailbox. - std::atomic mbox[2]; - // Accelerator / DMA / other hardware registers. Not GPRs. std::array ifx_regs{}; @@ -445,8 +442,8 @@ struct SDSP u16* coef = nullptr; private: - auto& GetMailbox(Mailbox mailbox) { return mbox[static_cast(mailbox)]; } - const auto& GetMailbox(Mailbox mailbox) const { return mbox[static_cast(mailbox)]; } + auto& GetMailbox(Mailbox mailbox) { return m_mailbox[static_cast(mailbox)]; } + const auto& GetMailbox(Mailbox mailbox) const { return m_mailbox[static_cast(mailbox)]; } void FreeMemoryPages(); @@ -458,6 +455,7 @@ private: u16 ReadIFXImpl(u16 address); + std::atomic m_mailbox[2]; DSPCore& m_dsp_core; Analyzer m_analyzer; };