Merge pull request #4540 from lioncash/dspemit

DSP: Move DSPEmitter into the Jit subdirectory
This commit is contained in:
Markus Wick 2016-12-23 12:13:47 +01:00 committed by GitHub
commit 01c2c50f6a
24 changed files with 57 additions and 45 deletions

View File

@ -33,7 +33,6 @@ set(SRCS ActionReplay.cpp
DSP/DSPMemoryMap.cpp
DSP/DSPStacks.cpp
DSP/DSPAnalyzer.cpp
DSP/DSPEmitter.cpp
DSP/DSPCodeUtil.cpp
DSP/LabelMap.cpp
DSP/DSPCore.cpp
@ -46,6 +45,7 @@ set(SRCS ActionReplay.cpp
DSP/Interpreter/DSPIntLoadStore.cpp
DSP/Interpreter/DSPIntMisc.cpp
DSP/Interpreter/DSPIntMultiplier.cpp
DSP/Jit/DSPEmitter.cpp
DSP/Jit/DSPJitRegCache.cpp
DSP/Jit/DSPJitExtOps.cpp
DSP/Jit/DSPJitBranch.cpp

View File

@ -59,7 +59,6 @@
<ClCompile Include="DSP\DSPCaptureLogger.cpp" />
<ClCompile Include="DSP\DSPCodeUtil.cpp" />
<ClCompile Include="DSP\DSPCore.cpp" />
<ClCompile Include="DSP\DSPEmitter.cpp" />
<ClCompile Include="DSP\DSPHWInterface.cpp" />
<ClCompile Include="DSP\DSPMemoryMap.cpp" />
<ClCompile Include="DSP\DSPStacks.cpp" />
@ -72,6 +71,7 @@
<ClCompile Include="DSP\Interpreter\DSPIntLoadStore.cpp" />
<ClCompile Include="DSP\Interpreter\DSPIntMisc.cpp" />
<ClCompile Include="DSP\Interpreter\DSPIntMultiplier.cpp" />
<ClCompile Include="DSP\Jit\DSPEmitter.cpp" />
<ClCompile Include="DSP\Jit\DSPJitArithmetic.cpp" />
<ClCompile Include="DSP\Jit\DSPJitBranch.cpp" />
<ClCompile Include="DSP\Jit\DSPJitCCUtil.cpp" />
@ -286,7 +286,6 @@
<ClInclude Include="DSP\DSPCodeUtil.h" />
<ClInclude Include="DSP\DSPCommon.h" />
<ClInclude Include="DSP\DSPCore.h" />
<ClInclude Include="DSP\DSPEmitter.h" />
<ClInclude Include="DSP\DSPHost.h" />
<ClInclude Include="DSP\DSPHWInterface.h" />
<ClInclude Include="DSP\DSPMemoryMap.h" />
@ -296,6 +295,7 @@
<ClInclude Include="DSP\Interpreter\DSPInterpreter.h" />
<ClInclude Include="DSP\Interpreter\DSPIntExtOps.h" />
<ClInclude Include="DSP\Interpreter\DSPIntUtil.h" />
<ClInclude Include="DSP\Jit\DSPEmitter.h" />
<ClInclude Include="DSP\Jit\DSPJitRegCache.h" />
<ClInclude Include="DSP\LabelMap.h" />
<ClInclude Include="ec_wii.h" />

View File

@ -210,6 +210,9 @@
<ClCompile Include="DSP\Interpreter\DSPIntMultiplier.cpp">
<Filter>DSPCore\Interpreter</Filter>
</ClCompile>
<ClCompile Include="DSP\Jit\DSPEmitter.cpp">
<Filter>DSPCore\Jit</Filter>
</ClCompile>
<ClCompile Include="DSP\Jit\DSPJitArithmetic.cpp">
<Filter>DSPCore\Jit</Filter>
</ClCompile>
@ -237,9 +240,6 @@
<ClCompile Include="DSP\Jit\DSPJitUtil.cpp">
<Filter>DSPCore\Jit</Filter>
</ClCompile>
<ClCompile Include="DSP\DSPEmitter.cpp">
<Filter>DSPCore\Jit</Filter>
</ClCompile>
<ClCompile Include="FifoPlayer\FifoAnalyzer.cpp">
<Filter>FifoPlayer</Filter>
</ClCompile>
@ -821,10 +821,10 @@
<ClInclude Include="DSP\Interpreter\DSPIntUtil.h">
<Filter>DSPCore\Interpreter</Filter>
</ClInclude>
<ClInclude Include="DSP\Jit\DSPJitRegCache.h">
<ClInclude Include="DSP\Jit\DSPEmitter.h">
<Filter>DSPCore\Jit</Filter>
</ClInclude>
<ClInclude Include="DSP\DSPEmitter.h">
<ClInclude Include="DSP\Jit\DSPJitRegCache.h">
<Filter>DSPCore\Jit</Filter>
</ClInclude>
<ClInclude Include="FifoPlayer\FifoAnalyzer.h">

View File

@ -18,11 +18,11 @@
#include "Common/MsgHandler.h"
#include "Core/DSP/DSPAnalyzer.h"
#include "Core/DSP/DSPEmitter.h"
#include "Core/DSP/DSPHWInterface.h"
#include "Core/DSP/DSPHost.h"
#include "Core/DSP/Interpreter/DSPIntUtil.h"
#include "Core/DSP/Interpreter/DSPInterpreter.h"
#include "Core/DSP/Jit/DSPEmitter.h"
SDSP g_dsp;
DSPBreakpoints g_dsp_breakpoints;

View File

@ -13,7 +13,8 @@
#include "Core/DSP/DSPBreakpoints.h"
#include "Core/DSP/DSPCaptureLogger.h"
#include "Core/DSP/DSPEmitter.h"
class DSPEmitter;
enum : u32
{

View File

@ -64,3 +64,21 @@ void dsp_dmem_write(u16 addr, u16 val)
break;
}
}
u16 dsp_fetch_code()
{
u16 opc = dsp_imem_read(g_dsp.pc);
g_dsp.pc++;
return opc;
}
u16 dsp_peek_code()
{
return dsp_imem_read(g_dsp.pc);
}
void dsp_skip_inst()
{
g_dsp.pc += opTable[dsp_peek_code()]->size;
}

View File

@ -7,27 +7,10 @@
#include "Common/CommonTypes.h"
#include "Core/DSP/DSPCore.h"
#include "Core/DSP/DSPTables.h"
u16 dsp_imem_read(u16 addr);
void dsp_dmem_write(u16 addr, u16 val);
u16 dsp_dmem_read(u16 addr);
inline u16 dsp_fetch_code()
{
u16 opc = dsp_imem_read(g_dsp.pc);
g_dsp.pc++;
return opc;
}
inline u16 dsp_peek_code()
{
return dsp_imem_read(g_dsp.pc);
}
inline void dsp_skip_inst()
{
g_dsp.pc += opTable[dsp_peek_code()]->size;
}
u16 dsp_fetch_code();
u16 dsp_peek_code();
void dsp_skip_inst();

View File

@ -8,9 +8,9 @@
#include "Common/CommonTypes.h"
#include "Core/DSP/DSPEmitter.h"
#include "Core/DSP/Interpreter/DSPIntExtOps.h"
#include "Core/DSP/Interpreter/DSPInterpreter.h"
#include "Core/DSP/Jit/DSPEmitter.h"
// clang-format off
const DSPOPCTemplate opcodes[] =

View File

@ -7,7 +7,7 @@
#pragma once
#include "Core/DSP/DSPCommon.h"
#include "Core/DSP/DSPEmitter.h"
#include "Core/DSP/Jit/DSPEmitter.h"
// The non-ADDR ones that end with _D are the opposite one - if the bit specify
// ACC0, then ACC_D will be ACC1.

View File

@ -5,6 +5,7 @@
#include "Core/DSP/Interpreter/DSPIntExtOps.h"
#include "Core/DSP/DSPMemoryMap.h"
#include "Core/DSP/DSPTables.h"
#include "Core/DSP/Interpreter/DSPIntUtil.h"
// not needed for game ucodes (it slows down interpreter/dspjit32 + easier to compare int VS

View File

@ -5,6 +5,7 @@
#pragma once
#include "Common/Assert.h"
#include "Common/CommonTypes.h"
#include "Core/DSP/DSPCore.h"

View File

@ -2,7 +2,7 @@
// Licensed under GPLv2+
// Refer to the license.txt file included.
#include "Core/DSP/DSPEmitter.h"
#include "Core/DSP/Jit/DSPEmitter.h"
#include <cstring>
@ -15,7 +15,7 @@
#include "Core/DSP/DSPCore.h"
#include "Core/DSP/DSPHost.h"
#include "Core/DSP/DSPMemoryMap.h"
#include "Core/DSP/Interpreter/DSPInterpreter.h"
#include "Core/DSP/DSPTables.h"
#define MAX_BLOCK_SIZE 250
#define DSP_IDLE_SKIP_CYCLES 0x1000

View File

@ -6,8 +6,9 @@
#include "Common/CommonTypes.h"
#include "Core/DSP/DSPEmitter.h"
#include "Core/DSP/DSPCore.h"
#include "Core/DSP/DSPMemoryMap.h"
#include "Core/DSP/Jit/DSPEmitter.h"
using namespace Gen;

View File

@ -5,8 +5,10 @@
#include "Common/CommonTypes.h"
#include "Core/DSP/DSPAnalyzer.h"
#include "Core/DSP/DSPEmitter.h"
#include "Core/DSP/DSPCore.h"
#include "Core/DSP/DSPMemoryMap.h"
#include "Core/DSP/DSPTables.h"
#include "Core/DSP/Jit/DSPEmitter.h"
using namespace Gen;

View File

@ -5,7 +5,7 @@
// Additional copyrights go to Duddie and Tratax (c) 2004
#include "Core/DSP/DSPCore.h"
#include "Core/DSP/DSPEmitter.h"
#include "Core/DSP/Jit/DSPEmitter.h"
using namespace Gen;

View File

@ -4,8 +4,8 @@
#include "Common/CommonTypes.h"
#include "Core/DSP/DSPEmitter.h"
#include "Core/DSP/DSPMemoryMap.h"
#include "Core/DSP/DSPCore.h"
#include "Core/DSP/Jit/DSPEmitter.h"
using namespace Gen;

View File

@ -6,9 +6,10 @@
#include "Common/CommonTypes.h"
#include "Core/DSP/DSPEmitter.h"
#include "Core/DSP/DSPCore.h"
#include "Core/DSP/DSPMemoryMap.h"
#include "Core/DSP/Interpreter/DSPInterpreter.h"
#include "Core/DSP/Jit/DSPEmitter.h"
using namespace Gen;

View File

@ -4,9 +4,10 @@
#include "Common/CommonTypes.h"
#include "Core/DSP/DSPEmitter.h"
#include "Core/DSP/DSPCore.h"
#include "Core/DSP/DSPMemoryMap.h"
#include "Core/DSP/Interpreter/DSPInterpreter.h"
#include "Core/DSP/Jit/DSPEmitter.h"
using namespace Gen;

View File

@ -9,7 +9,7 @@
#include "Common/CommonTypes.h"
#include "Core/DSP/DSPCore.h"
#include "Core/DSP/DSPEmitter.h"
#include "Core/DSP/Jit/DSPEmitter.h"
using namespace Gen;

View File

@ -9,8 +9,9 @@
#include "Common/Assert.h"
#include "Common/Logging/Log.h"
#include "Core/DSP/DSPEmitter.h"
#include "Core/DSP/DSPCore.h"
#include "Core/DSP/DSPMemoryMap.h"
#include "Core/DSP/Jit/DSPEmitter.h"
using namespace Gen;

View File

@ -4,9 +4,9 @@
#include "Common/CommonTypes.h"
#include "Core/DSP/DSPEmitter.h"
#include "Core/DSP/DSPCore.h"
#include "Core/DSP/DSPHWInterface.h"
#include "Core/DSP/DSPMemoryMap.h"
#include "Core/DSP/Jit/DSPEmitter.h"
using namespace Gen;

View File

@ -9,6 +9,7 @@
#include "Core/ConfigManager.h"
#include "Core/DSP/DSPAnalyzer.h"
#include "Core/DSP/DSPCore.h"
#include "Core/DSP/Jit/DSPEmitter.h"
#include "Core/HW/DSP.h"
#include "Core/HW/DSPLLE/DSPLLETools.h"
#include "Core/HW/DSPLLE/DSPSymbols.h"

View File

@ -13,6 +13,7 @@
#include "Common/CommonTypes.h"
#include "Common/Event.h"
#include "Common/Logging/Log.h"
#include "Common/MemoryUtil.h"
#include "Common/Thread.h"
#include "Core/ConfigManager.h"
#include "Core/Core.h"