diff options
| author | Glenn Rice <glennricster@gmail.com> | 2010-12-15 02:17:19 +0000 |
|---|---|---|
| committer | Glenn Rice <glennricster@gmail.com> | 2010-12-15 02:17:19 +0000 |
| commit | 85ec8d268d323a72c87cf47559cf1e1a16dc757f (patch) | |
| tree | 94070b57023353feb76ee20da79ed53bdf72ca9e /Source/Core | |
| parent | f67afb4fca561c9da006721a2bb842b27b9371d9 (diff) | |
Linux build fix.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6583 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core')
| -rw-r--r-- | Source/Core/DSPCore/Src/Jit/DSPJitBranch.cpp | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/Source/Core/DSPCore/Src/Jit/DSPJitBranch.cpp b/Source/Core/DSPCore/Src/Jit/DSPJitBranch.cpp index 22aa10603b..a588189824 100644 --- a/Source/Core/DSPCore/Src/Jit/DSPJitBranch.cpp +++ b/Source/Core/DSPCore/Src/Jit/DSPJitBranch.cpp @@ -34,24 +34,6 @@ const int GetCodeSize(void(*jitCode)(const UDSPInstruction, DSPEmitter&), const return size;
}
-template <void(*jitCode)(const UDSPInstruction, DSPEmitter&)>
-void ReJitConditional(const UDSPInstruction opc, DSPEmitter& emitter)
-{
- static const int codeSize = GetCodeSize(jitCode, opc, emitter);
- //emitter.INT3();
- const u8* codePtr = CheckCondition(emitter, opc & 0xf, codeSize);
- const u8* afterSkip = emitter.GetCodePtr();
- if (codePtr != NULL)
- emitter.SetCodePtr((u8*)codePtr);
- jitCode(opc, emitter);
- //if (codePtr != NULL)
- //{
- // emitter.JMP(afterSkip + 4 + sizeof(void*));
- // emitter.SetCodePtr((u8*)afterSkip);
- // emitter.ADD(16, M(&g_dsp.pc), Imm8(1)); //4 bytes + pointer
- //}
-}
-
const u8* CheckCondition(DSPEmitter& emitter, u8 cond, u8 skipCodeSize)
{
if (cond == 0xf) // Always true.
@@ -134,6 +116,24 @@ const u8* CheckCondition(DSPEmitter& emitter, u8 cond, u8 skipCodeSize) return res;
}
+template <void(*jitCode)(const UDSPInstruction, DSPEmitter&)>
+void ReJitConditional(const UDSPInstruction opc, DSPEmitter& emitter)
+{
+ static const int codeSize = GetCodeSize(jitCode, opc, emitter);
+ //emitter.INT3();
+ const u8* codePtr = CheckCondition(emitter, opc & 0xf, codeSize);
+ //const u8* afterSkip = emitter.GetCodePtr();
+ if (codePtr != NULL)
+ emitter.SetCodePtr((u8*)codePtr);
+ jitCode(opc, emitter);
+ //if (codePtr != NULL)
+ //{
+ // emitter.JMP(afterSkip + 4 + sizeof(void*));
+ // emitter.SetCodePtr((u8*)afterSkip);
+ // emitter.ADD(16, M(&g_dsp.pc), Imm8(1)); //4 bytes + pointer
+ //}
+}
+
void r_jcc(const UDSPInstruction opc, DSPEmitter& emitter)
{
u16 dest = dsp_imem_read(emitter.compilePC + 1);
@@ -187,7 +187,7 @@ void DSPEmitter::jmprcc(const UDSPInstruction opc) void r_call(const UDSPInstruction opc, DSPEmitter& emitter)
{
u16 dest = dsp_imem_read(emitter.compilePC + 1);
- emitter.ABI_CallFunctionCC16(dsp_reg_store_stack, DSP_STACK_C, emitter.compilePC + 2);
+ emitter.ABI_CallFunctionCC16((void *)dsp_reg_store_stack, DSP_STACK_C, emitter.compilePC + 2);
#ifdef _M_IX86 // All32
emitter.MOV(16, M(&(g_dsp.pc)), Imm16(dest));
#else
@@ -216,7 +216,7 @@ void DSPEmitter::call(const UDSPInstruction opc) void r_callr(const UDSPInstruction opc, DSPEmitter& emitter)
{
u8 reg = (opc >> 5) & 0x7;
- emitter.ABI_CallFunctionCC16(dsp_reg_store_stack, DSP_STACK_C, emitter.compilePC + 1);
+ emitter.ABI_CallFunctionCC16((void *)dsp_reg_store_stack, DSP_STACK_C, emitter.compilePC + 1);
#ifdef _M_IX86 // All32
emitter.MOV(16, R(EAX), M(&g_dsp.r[reg]));
emitter.MOV(16, M(&g_dsp.pc), R(EAX));
|
