DSPMemoryMap: Move function implementations into the cpp file
This allows removing DSPCore and DSPTables includes from the header file. Doing allows resolving quite a bit of indirect includes that were present throughout the DSP source files. Another plus with this is that changes to the DSPEmitter don't require an almost total rebuild of all DSP source files. The underlying reason for most of the files being rebuilt it because DSPMemoryMap is used quite extensively, however its header includes DSPTables.h. DSPTables.h includes DSPEmitter.h as it uses the DSPEmitter type in a typedef. So any change to the emitter would propagate through the DSPMemoryMap header. This will no longer happen.
This commit is contained in:
parent
af28ce7ecb
commit
5852e3961d
|
@ -64,3 +64,21 @@ void dsp_dmem_write(u16 addr, u16 val)
|
||||||
break;
|
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;
|
||||||
|
}
|
||||||
|
|
|
@ -7,27 +7,10 @@
|
||||||
|
|
||||||
#include "Common/CommonTypes.h"
|
#include "Common/CommonTypes.h"
|
||||||
|
|
||||||
#include "Core/DSP/DSPCore.h"
|
|
||||||
#include "Core/DSP/DSPTables.h"
|
|
||||||
|
|
||||||
u16 dsp_imem_read(u16 addr);
|
u16 dsp_imem_read(u16 addr);
|
||||||
void dsp_dmem_write(u16 addr, u16 val);
|
void dsp_dmem_write(u16 addr, u16 val);
|
||||||
u16 dsp_dmem_read(u16 addr);
|
u16 dsp_dmem_read(u16 addr);
|
||||||
|
|
||||||
inline u16 dsp_fetch_code()
|
u16 dsp_fetch_code();
|
||||||
{
|
u16 dsp_peek_code();
|
||||||
u16 opc = dsp_imem_read(g_dsp.pc);
|
void dsp_skip_inst();
|
||||||
|
|
||||||
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;
|
|
||||||
}
|
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
#include "Core/DSP/Interpreter/DSPIntExtOps.h"
|
#include "Core/DSP/Interpreter/DSPIntExtOps.h"
|
||||||
|
|
||||||
#include "Core/DSP/DSPMemoryMap.h"
|
#include "Core/DSP/DSPMemoryMap.h"
|
||||||
|
#include "Core/DSP/DSPTables.h"
|
||||||
#include "Core/DSP/Interpreter/DSPIntUtil.h"
|
#include "Core/DSP/Interpreter/DSPIntUtil.h"
|
||||||
|
|
||||||
// not needed for game ucodes (it slows down interpreter/dspjit32 + easier to compare int VS
|
// not needed for game ucodes (it slows down interpreter/dspjit32 + easier to compare int VS
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
#include "Core/DSP/DSPCore.h"
|
#include "Core/DSP/DSPCore.h"
|
||||||
#include "Core/DSP/DSPHost.h"
|
#include "Core/DSP/DSPHost.h"
|
||||||
#include "Core/DSP/DSPMemoryMap.h"
|
#include "Core/DSP/DSPMemoryMap.h"
|
||||||
#include "Core/DSP/Interpreter/DSPInterpreter.h"
|
#include "Core/DSP/DSPTables.h"
|
||||||
|
|
||||||
#define MAX_BLOCK_SIZE 250
|
#define MAX_BLOCK_SIZE 250
|
||||||
#define DSP_IDLE_SKIP_CYCLES 0x1000
|
#define DSP_IDLE_SKIP_CYCLES 0x1000
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
|
|
||||||
#include "Common/CommonTypes.h"
|
#include "Common/CommonTypes.h"
|
||||||
|
|
||||||
|
#include "Core/DSP/DSPCore.h"
|
||||||
#include "Core/DSP/DSPMemoryMap.h"
|
#include "Core/DSP/DSPMemoryMap.h"
|
||||||
#include "Core/DSP/Jit/DSPEmitter.h"
|
#include "Core/DSP/Jit/DSPEmitter.h"
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,9 @@
|
||||||
#include "Common/CommonTypes.h"
|
#include "Common/CommonTypes.h"
|
||||||
|
|
||||||
#include "Core/DSP/DSPAnalyzer.h"
|
#include "Core/DSP/DSPAnalyzer.h"
|
||||||
|
#include "Core/DSP/DSPCore.h"
|
||||||
#include "Core/DSP/DSPMemoryMap.h"
|
#include "Core/DSP/DSPMemoryMap.h"
|
||||||
|
#include "Core/DSP/DSPTables.h"
|
||||||
#include "Core/DSP/Jit/DSPEmitter.h"
|
#include "Core/DSP/Jit/DSPEmitter.h"
|
||||||
|
|
||||||
using namespace Gen;
|
using namespace Gen;
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
#include "Common/CommonTypes.h"
|
#include "Common/CommonTypes.h"
|
||||||
|
|
||||||
#include "Core/DSP/DSPMemoryMap.h"
|
#include "Core/DSP/DSPCore.h"
|
||||||
#include "Core/DSP/Jit/DSPEmitter.h"
|
#include "Core/DSP/Jit/DSPEmitter.h"
|
||||||
|
|
||||||
using namespace Gen;
|
using namespace Gen;
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
|
|
||||||
#include "Common/CommonTypes.h"
|
#include "Common/CommonTypes.h"
|
||||||
|
|
||||||
|
#include "Core/DSP/DSPCore.h"
|
||||||
#include "Core/DSP/DSPMemoryMap.h"
|
#include "Core/DSP/DSPMemoryMap.h"
|
||||||
#include "Core/DSP/Interpreter/DSPInterpreter.h"
|
#include "Core/DSP/Interpreter/DSPInterpreter.h"
|
||||||
#include "Core/DSP/Jit/DSPEmitter.h"
|
#include "Core/DSP/Jit/DSPEmitter.h"
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
|
|
||||||
#include "Common/CommonTypes.h"
|
#include "Common/CommonTypes.h"
|
||||||
|
|
||||||
|
#include "Core/DSP/DSPCore.h"
|
||||||
#include "Core/DSP/DSPMemoryMap.h"
|
#include "Core/DSP/DSPMemoryMap.h"
|
||||||
#include "Core/DSP/Interpreter/DSPInterpreter.h"
|
#include "Core/DSP/Interpreter/DSPInterpreter.h"
|
||||||
#include "Core/DSP/Jit/DSPEmitter.h"
|
#include "Core/DSP/Jit/DSPEmitter.h"
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
#include "Common/Assert.h"
|
#include "Common/Assert.h"
|
||||||
#include "Common/Logging/Log.h"
|
#include "Common/Logging/Log.h"
|
||||||
|
|
||||||
|
#include "Core/DSP/DSPCore.h"
|
||||||
#include "Core/DSP/DSPMemoryMap.h"
|
#include "Core/DSP/DSPMemoryMap.h"
|
||||||
#include "Core/DSP/Jit/DSPEmitter.h"
|
#include "Core/DSP/Jit/DSPEmitter.h"
|
||||||
|
|
||||||
|
|
|
@ -4,8 +4,8 @@
|
||||||
|
|
||||||
#include "Common/CommonTypes.h"
|
#include "Common/CommonTypes.h"
|
||||||
|
|
||||||
|
#include "Core/DSP/DSPCore.h"
|
||||||
#include "Core/DSP/DSPHWInterface.h"
|
#include "Core/DSP/DSPHWInterface.h"
|
||||||
#include "Core/DSP/DSPMemoryMap.h"
|
|
||||||
#include "Core/DSP/Jit/DSPEmitter.h"
|
#include "Core/DSP/Jit/DSPEmitter.h"
|
||||||
|
|
||||||
using namespace Gen;
|
using namespace Gen;
|
||||||
|
|
Loading…
Reference in New Issue