Skip to content
Permalink
Browse files

Merge pull request #4776 from lioncash/dspemitter

DSPEmitter: Convert a C array to a std::array
  • Loading branch information...
Helios747 committed Mar 1, 2017
2 parents 83bd74a + 4846f26 commit 8dc96fce4df9ee80ef58cea03239202f1fa4cdcc
Showing with 6 additions and 5 deletions.
  1. +4 −4 Source/Core/Core/DSP/Jit/DSPEmitter.cpp
  2. +2 −1 Source/Core/Core/DSP/Jit/DSPEmitter.h
@@ -75,7 +75,7 @@ void DSPEmitter::DoState(PointerWrap& p)

void DSPEmitter::ClearIRAM()
{
for (int i = 0x0000; i < 0x1000; i++)
for (size_t i = 0; i < DSP_IRAM_SIZE; i++)
{
m_blocks[i] = (DSPCompiledCode)m_stub_entry_point;
m_block_links[i] = nullptr;
@@ -91,7 +91,7 @@ void DSPEmitter::ClearIRAMandDSPJITCodespaceReset()
CompileDispatcher();
m_stub_entry_point = CompileStub();

for (int i = 0x0000; i < 0x10000; i++)
for (size_t i = 0; i < MAX_BLOCKS; i++)
{
m_blocks[i] = (DSPCompiledCode)m_stub_entry_point;
m_block_links[i] = nullptr;
@@ -339,7 +339,7 @@ void DSPEmitter::Compile(u16 start_addr)
{
m_block_links[start_addr] = m_block_link_entry;

for (u16 i = 0x0000; i < 0xffff; ++i)
for (size_t i = 0; i < 0xffff; ++i)
{
if (!m_unresolved_jumps[i].empty())
{
@@ -386,7 +386,7 @@ static void CompileCurrent()
while (retry)
{
retry = false;
for (u16 i = 0x0000; i < 0xffff; ++i)
for (size_t i = 0; i < 0xffff; ++i)
{
if (!g_dsp_jit->m_unresolved_jumps[i].empty())
{
@@ -4,6 +4,7 @@

#pragma once

#include <array>
#include <cstddef>
#include <list>
#include <vector>
@@ -253,7 +254,7 @@ class DSPEmitter : public Gen::X64CodeBlock
void madd(const UDSPInstruction opc);
void msub(const UDSPInstruction opc);

std::list<u16> m_unresolved_jumps[MAX_BLOCKS];
std::array<std::list<u16>, MAX_BLOCKS> m_unresolved_jumps;

private:
void WriteBranchExit();

0 comments on commit 8dc96fc

Please sign in to comment.
You can’t perform that action at this time.