mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-15 05:47:56 -07:00
Core/DSP/Jit: Fix register cache state tracking in bloop and loop emitters
Fixes dsp lle jit crashes with dkcr. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7312 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
a734b3f057
commit
3151618cb3
@ -369,12 +369,14 @@ void DSPEmitter::loop(const UDSPInstruction opc)
|
||||
u16 loop_pc = compilePC + 1;
|
||||
|
||||
CMP(16, R(EDX), Imm16(0));
|
||||
DSPJitRegCache c(gpr);
|
||||
FixupBranch cnt = J_CC(CC_Z, true);
|
||||
dsp_reg_store_stack(3);
|
||||
MOV(16, R(RDX), Imm16(compilePC + 1));
|
||||
dsp_reg_store_stack(0);
|
||||
MOV(16, R(RDX), Imm16(loop_pc));
|
||||
dsp_reg_store_stack(2);
|
||||
gpr.flushRegs(c);
|
||||
|
||||
SetJumpTarget(cnt);
|
||||
MOV(16, M(&(g_dsp.pc)), Imm16(compilePC + 1));
|
||||
@ -424,6 +426,7 @@ void DSPEmitter::bloop(const UDSPInstruction opc)
|
||||
u16 loop_pc = dsp_imem_read(compilePC + 1);
|
||||
|
||||
CMP(16, R(EDX), Imm16(0));
|
||||
DSPJitRegCache c(gpr);
|
||||
FixupBranch cnt = J_CC(CC_Z, true);
|
||||
dsp_reg_store_stack(3);
|
||||
MOV(16, R(RDX), Imm16(compilePC + 2));
|
||||
@ -431,13 +434,13 @@ void DSPEmitter::bloop(const UDSPInstruction opc)
|
||||
MOV(16, R(RDX), Imm16(loop_pc));
|
||||
dsp_reg_store_stack(2);
|
||||
MOV(16, M(&(g_dsp.pc)), Imm16(compilePC + 2));
|
||||
gpr.flushRegs(c,true);
|
||||
FixupBranch exit = J(true);
|
||||
|
||||
SetJumpTarget(cnt);
|
||||
// g_dsp.pc = loop_pc;
|
||||
// dsp_skip_inst();
|
||||
MOV(16, M(&g_dsp.pc), Imm16(loop_pc + opTable[loop_pc]->size));
|
||||
DSPJitRegCache c(gpr);
|
||||
WriteBranchExit(*this);
|
||||
gpr.flushRegs(c,false);
|
||||
SetJumpTarget(exit);
|
||||
|
Loading…
Reference in New Issue
Block a user