Permalink
Browse files

DSPTables: Separate interpreter and JIT functions from main info table

This is one of the last things that needed to be done in order to
finally separate the x86-64-specific code from the rest of the common
DSP code. This splits the tables up similar to how it's currently done
for the PowerPC CPU tables.

Now, the tables are split up and within their own relevant source files,
so the main table within the common DSP code acts as the "info" table
that provides specifics about a particular instruction, while the other
tables contain the actual instruction.

With this out of the way, all that's left is to make a general base for
the emitters and we can then replace the x64 JIT pointer in DSPCore with
it, getting all x64 out of the common code once and for all.

While shuffling all the code around, the removal of the DSPEmitter
includes in some places uncovered indirect inclusions, so this also
fixes those as well.
  • Loading branch information...
lioncash committed Jun 18, 2018
1 parent 091efcc commit 474c1bb4f76373b4acca5a1913a9af8b03142efd
@@ -58,16 +58,18 @@ add_library(core
DSP/Interpreter/DSPIntLoadStore.cpp
DSP/Interpreter/DSPIntMisc.cpp
DSP/Interpreter/DSPIntMultiplier.cpp
DSP/Interpreter/DSPIntTables.cpp
DSP/Jit/x64/DSPEmitter.cpp
DSP/Jit/x64/DSPJitRegCache.cpp
DSP/Jit/x64/DSPJitExtOps.cpp
DSP/Jit/x64/DSPJitBranch.cpp
DSP/Jit/x64/DSPJitCCUtil.cpp
DSP/Jit/x64/DSPJitArithmetic.cpp
DSP/Jit/x64/DSPJitLoadStore.cpp
DSP/Jit/x64/DSPJitMisc.cpp
DSP/Jit/x64/DSPJitMultiplier.cpp
DSP/Jit/x64/DSPJitTables.cpp
DSP/Jit/x64/DSPJitUtil.cpp
DSP/Jit/x64/DSPJitMisc.cpp
FifoPlayer/FifoAnalyzer.cpp
FifoPlayer/FifoDataFile.cpp
FifoPlayer/FifoPlaybackAnalyzer.cpp
@@ -81,6 +81,7 @@
<ClCompile Include="DSP\Interpreter\DSPIntLoadStore.cpp" />
<ClCompile Include="DSP\Interpreter\DSPIntMisc.cpp" />
<ClCompile Include="DSP\Interpreter\DSPIntMultiplier.cpp" />
<ClCompile Include="DSP\Interpreter\DSPIntTables.cpp" />
<ClCompile Include="DSP\Jit\x64\DSPEmitter.cpp" />
<ClCompile Include="DSP\Jit\x64\DSPJitArithmetic.cpp" />
<ClCompile Include="DSP\Jit\x64\DSPJitBranch.cpp" />
@@ -90,6 +91,7 @@
<ClCompile Include="DSP\Jit\x64\DSPJitMisc.cpp" />
<ClCompile Include="DSP\Jit\x64\DSPJitMultiplier.cpp" />
<ClCompile Include="DSP\Jit\x64\DSPJitRegCache.cpp" />
<ClCompile Include="DSP\Jit\x64\DSPJitTables.cpp" />
<ClCompile Include="DSP\Jit\x64\DSPJitUtil.cpp" />
<ClCompile Include="DSP\LabelMap.cpp" />
<ClCompile Include="FifoPlayer\FifoAnalyzer.cpp" />
@@ -341,9 +343,11 @@
<ClInclude Include="DSP\Interpreter\DSPIntCCUtil.h" />
<ClInclude Include="DSP\Interpreter\DSPInterpreter.h" />
<ClInclude Include="DSP\Interpreter\DSPIntExtOps.h" />
<ClInclude Include="DSP\Interpreter\DSPIntTables.h" />
<ClInclude Include="DSP\Interpreter\DSPIntUtil.h" />
<ClInclude Include="DSP\Jit\x64\DSPEmitter.h" />
<ClInclude Include="DSP\Jit\x64\DSPJitRegCache.h" />
<ClInclude Include="DSP\Jit\x64\DSPJitTables.h" />
<ClInclude Include="DSP\LabelMap.h" />
<ClInclude Include="FifoPlayer\FifoAnalyzer.h" />
<ClInclude Include="FifoPlayer\FifoDataFile.h" />
@@ -240,6 +240,9 @@
<ClCompile Include="DSP\Interpreter\DSPIntMultiplier.cpp">
<Filter>DSPCore\Interpreter</Filter>
</ClCompile>
<ClCompile Include="DSP\Interpreter\DSPIntTables.cpp">
<Filter>DSPCore\Interpreter</Filter>
</ClCompile>
<ClCompile Include="DSP\Jit\x64\DSPJitRegCache.cpp">
<Filter>DSPCore\Jit\x64</Filter>
</ClCompile>
@@ -267,6 +270,9 @@
<ClCompile Include="DSP\Jit\x64\DSPEmitter.cpp">
<Filter>DSPCore\Jit\x64</Filter>
</ClCompile>
<ClCompile Include="DSP\Jit\x64\DSPJitTables.cpp">
<Filter>DSPCore\Jit\x64</Filter>
</ClCompile>
<ClCompile Include="DSP\Jit\x64\DSPJitUtil.cpp">
<Filter>DSPCore\Jit\x64</Filter>
</ClCompile>
@@ -960,12 +966,18 @@
<ClInclude Include="DSP\Interpreter\DSPIntExtOps.h">
<Filter>DSPCore\Interpreter</Filter>
</ClInclude>
<ClInclude Include="DSP\Interpreter\DSPIntTables.h">
<Filter>DSPCore\Interpreter</Filter>
</ClInclude>
<ClInclude Include="DSP\Interpreter\DSPIntUtil.h">
<Filter>DSPCore\Interpreter</Filter>
</ClInclude>
<ClInclude Include="DSP\Jit\x64\DSPJitRegCache.h">
<Filter>DSPCore\Jit\x64</Filter>
</ClInclude>
<ClInclude Include="DSP\Jit\x64\DSPJitTables.h">
<Filter>DSPCore\Jit\x64</Filter>
</ClInclude>
<ClInclude Include="DSP\Jit\x64\DSPEmitter.h">
<Filter>DSPCore\Jit\x64</Filter>
</ClInclude>
@@ -12,6 +12,7 @@
#include "Common/CommonTypes.h"
#include "Common/File.h"
#include "Common/FileUtil.h"
#include "Common/MsgHandler.h"
#include "Common/StringUtil.h"
#include "Common/Swap.h"
@@ -11,6 +11,7 @@
#include <vector>
#include "Common/CommonTypes.h"
#include "Common/Logging/Log.h"
#include "Common/StringUtil.h"
#include "Core/DSP/DSPTables.h"
@@ -144,9 +145,8 @@ bool DSPDisassembler::DisassembleOpcode(const u16* binbuf, u16* pc, std::string&
// Find main opcode
const DSPOPCTemplate* opc = FindOpInfoByOpcode(op1);
const DSPOPCTemplate fake_op = {
"CW", 0x0000, 0x0000, nullptr, nullptr, 1, 1, {{P_VAL, 2, 0, 0, 0xffff}},
false, false, false, false, false};
const DSPOPCTemplate fake_op = {"CW", 0x0000, 0x0000, 1, 1, {{P_VAL, 2, 0, 0, 0xffff}},
false, false, false, false, false};
if (!opc)
opc = &fake_op;
Oops, something went wrong.

0 comments on commit 474c1bb

Please sign in to comment.