summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2018-06-04 15:35:06 -0400
committerLioncash <mathew1800@gmail.com>2018-06-04 15:46:08 -0400
commitbbd2fd080e3039e8e7432f735545e5250907ccae (patch)
treec0902d3d4b40d2db6858a4c88f7f9d4f798b3663 /Source/Core
parent5f29e891d369079d545c20c7a2e7e864c8c94c29 (diff)
DSPEmitter: Make m_unresolved_jumps private
By making the jitted function a private static function of DSPEmitter, we can allow access to data members within the context of the function without making them public overall. This finally makes all data members for the x64 DSP emitter private.
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/Core/DSP/Jit/x64/DSPEmitter.cpp2
-rw-r--r--Source/Core/Core/DSP/Jit/x64/DSPEmitter.h8
2 files changed, 7 insertions, 3 deletions
diff --git a/Source/Core/Core/DSP/Jit/x64/DSPEmitter.cpp b/Source/Core/Core/DSP/Jit/x64/DSPEmitter.cpp
index afc29800b8..a3649f2754 100644
--- a/Source/Core/Core/DSP/Jit/x64/DSPEmitter.cpp
+++ b/Source/Core/Core/DSP/Jit/x64/DSPEmitter.cpp
@@ -365,7 +365,7 @@ void DSPEmitter::Compile(u16 start_addr)
JMP(m_return_dispatcher, true);
}
-static void CompileCurrent(DSPEmitter& emitter)
+void DSPEmitter::CompileCurrent(DSPEmitter& emitter)
{
emitter.Compile(g_dsp.pc);
diff --git a/Source/Core/Core/DSP/Jit/x64/DSPEmitter.h b/Source/Core/Core/DSP/Jit/x64/DSPEmitter.h
index 369da3ae37..4c4efdd4e6 100644
--- a/Source/Core/Core/DSP/Jit/x64/DSPEmitter.h
+++ b/Source/Core/Core/DSP/Jit/x64/DSPEmitter.h
@@ -205,9 +205,11 @@ public:
void madd(UDSPInstruction opc);
void msub(UDSPInstruction opc);
- std::array<std::list<u16>, MAX_BLOCKS> m_unresolved_jumps;
-
private:
+ // The emitter emits calls to this function. It's present here
+ // within the class itself to allow access to member variables.
+ static void CompileCurrent(DSPEmitter& emitter);
+
void WriteBranchExit();
void WriteBlockLink(u16 dest);
@@ -307,6 +309,8 @@ private:
std::vector<Block> m_block_links;
Block m_block_link_entry;
+ std::array<std::list<u16>, MAX_BLOCKS> m_unresolved_jumps;
+
u16 m_cycles_left = 0;
// The index of the last stored ext value (compile time).