Permalink
Browse files

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.
  • Loading branch information...
lioncash committed Jun 4, 2018
1 parent 5f29e89 commit bbd2fd080e3039e8e7432f735545e5250907ccae
Showing with 7 additions and 3 deletions.
  1. +1 −1 Source/Core/Core/DSP/Jit/x64/DSPEmitter.cpp
  2. +6 −2 Source/Core/Core/DSP/Jit/x64/DSPEmitter.h
@@ -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);
@@ -205,9 +205,11 @@ class DSPEmitter : public Gen::X64CodeBlock
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 @@ class DSPEmitter : public Gen::X64CodeBlock
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).

0 comments on commit bbd2fd0

Please sign in to comment.