Skip to content

Commit

Permalink
DSPEmitter: Make m_unresolved_jumps private
Browse files Browse the repository at this point in the history
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 bbd2fd0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Source/Core/Core/DSP/Jit/x64/DSPEmitter.cpp
Expand Up @@ -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);

Expand Down
8 changes: 6 additions & 2 deletions Source/Core/Core/DSP/Jit/x64/DSPEmitter.h
Expand Up @@ -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);

Expand Down Expand Up @@ -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).
Expand Down

0 comments on commit bbd2fd0

Please sign in to comment.