mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 22:29:39 -06:00
LLE JIT: Changed the ASM dispatcher so that it jumps to the blocks instead of calling them. This removes the need to push and pop all of the registers at each block, speeding up the JIT. Changed the cycle counting to work off memory accesses instead of a register. Removed the C++ JIT dispatcher because it will no longer work with this new format.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6858 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -122,7 +122,6 @@ static void ReJitConditional(const UDSPInstruction opc, DSPEmitter& emitter)
|
||||
static void WriteBranchExit(DSPEmitter& emitter)
|
||||
{
|
||||
emitter.SaveDSPRegs();
|
||||
emitter.ABI_PopAllCalleeSavedRegsAndAdjustStack();
|
||||
if (DSPAnalyzer::code_flags[emitter.startAddr] & DSPAnalyzer::CODE_IDLE_SKIP)
|
||||
{
|
||||
emitter.MOV(16, R(EAX), Imm16(0x1000));
|
||||
@ -131,7 +130,7 @@ static void WriteBranchExit(DSPEmitter& emitter)
|
||||
{
|
||||
emitter.MOV(16, R(EAX), Imm16(emitter.blockSize[emitter.startAddr]));
|
||||
}
|
||||
emitter.RET();
|
||||
emitter.JMP(emitter.returnDispatcher, true);
|
||||
}
|
||||
|
||||
static void WriteBlockLink(DSPEmitter& emitter, u16 dest)
|
||||
@ -152,10 +151,11 @@ static void WriteBlockLink(DSPEmitter& emitter, u16 dest)
|
||||
emitter.MOV(16, M(&cyclesLeft), R(ESI));
|
||||
#else
|
||||
// Check if we have enough cycles to execute the next block
|
||||
emitter.CMP(16, R(R12), Imm16(emitter.blockSize[emitter.startAddr] + emitter.blockSize[dest]));
|
||||
emitter.MOV(64, R(R12), ImmPtr(&cyclesLeft));
|
||||
emitter.CMP(16, MatR(R12), Imm16(emitter.blockSize[emitter.startAddr] + emitter.blockSize[dest]));
|
||||
FixupBranch notEnoughCycles = emitter.J_CC(CC_BE);
|
||||
|
||||
emitter.SUB(16, R(R12), Imm16(emitter.blockSize[emitter.startAddr]));
|
||||
emitter.SUB(16, MatR(R12), Imm16(emitter.blockSize[emitter.startAddr]));
|
||||
#endif
|
||||
emitter.JMP(emitter.blockLinks[dest], true);
|
||||
emitter.SetJumpTarget(notEnoughCycles);
|
||||
|
Reference in New Issue
Block a user