mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-10 16:19:28 +01:00
Jit64: Treat branch-to-self instruction as an idle loop
This commit is contained in:
parent
017ab71fcf
commit
c657134c86
@ -7,6 +7,7 @@
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Common/x64Emitter.h"
|
||||
#include "Core/ConfigManager.h"
|
||||
#include "Core/CoreTiming.h"
|
||||
#include "Core/PowerPC/Gekko.h"
|
||||
#include "Core/PowerPC/Jit64/JitRegCache.h"
|
||||
#include "Core/PowerPC/PPCAnalyst.h"
|
||||
@ -90,11 +91,12 @@ void Jit64::bx(UGeckoInstruction inst)
|
||||
#endif
|
||||
if (destination == js.compilerPC)
|
||||
{
|
||||
// PanicAlert("Idle loop detected at %08x", destination);
|
||||
// CALL(ProtectFunction(&CoreTiming::Idle, 0));
|
||||
// JMP(Asm::testExceptions, true);
|
||||
// make idle loops go faster
|
||||
js.downcountAmount += 8;
|
||||
ABI_PushRegistersAndAdjustStack({}, 0);
|
||||
ABI_CallFunction(CoreTiming::Idle);
|
||||
ABI_PopRegistersAndAdjustStack({}, 0);
|
||||
MOV(32, PPCSTATE(pc), Imm32(destination));
|
||||
WriteExceptionExit();
|
||||
return;
|
||||
}
|
||||
WriteExit(destination, inst.LK, js.compilerPC + 4);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user