Merge pull request #7654 from MerryMage/bkpt
Jit64: Fix instruction breakpoints
This commit is contained in:
commit
7ec5a3df7a
|
@ -446,6 +446,10 @@ void Jit64::JustWriteExit(u32 destination, bool bl, u32 after)
|
|||
|
||||
MOV(32, PPCSTATE(pc), Imm32(destination));
|
||||
|
||||
// Do not skip breakpoint check if debugging.
|
||||
const u8* dispatcher = SConfig::GetInstance().bEnableDebugging ? asm_routines.dispatcher :
|
||||
asm_routines.dispatcher_no_check;
|
||||
|
||||
// Perform downcount flag check, followed by the requested exit
|
||||
if (bl)
|
||||
{
|
||||
|
@ -457,7 +461,7 @@ void Jit64::JustWriteExit(u32 destination, bool bl, u32 after)
|
|||
SwitchToNearCode();
|
||||
|
||||
linkData.exitPtrs = GetWritableCodePtr();
|
||||
CALL(asm_routines.dispatcher_no_check);
|
||||
CALL(dispatcher);
|
||||
|
||||
SetJumpTarget(after_fixup);
|
||||
POP(RSCRATCH);
|
||||
|
@ -468,7 +472,7 @@ void Jit64::JustWriteExit(u32 destination, bool bl, u32 after)
|
|||
J_CC(CC_LE, asm_routines.do_timing);
|
||||
|
||||
linkData.exitPtrs = GetWritableCodePtr();
|
||||
JMP(asm_routines.dispatcher_no_check, true);
|
||||
JMP(dispatcher, true);
|
||||
}
|
||||
|
||||
b->linkData.push_back(linkData);
|
||||
|
|
|
@ -14,8 +14,13 @@ JitBlockCache::JitBlockCache(JitBase& jit) : JitBaseBlockCache{jit}
|
|||
|
||||
void JitBlockCache::WriteLinkBlock(const JitBlock::LinkData& source, const JitBlock* dest)
|
||||
{
|
||||
// Do not skip breakpoint check if debugging.
|
||||
const u8* dispatcher = SConfig::GetInstance().bEnableDebugging ?
|
||||
m_jit.GetAsmRoutines()->dispatcher :
|
||||
m_jit.GetAsmRoutines()->dispatcher_no_check;
|
||||
|
||||
u8* location = source.exitPtrs;
|
||||
const u8* address = dest ? dest->checkedEntry : m_jit.GetAsmRoutines()->dispatcher_no_check;
|
||||
const u8* address = dest ? dest->checkedEntry : dispatcher;
|
||||
Gen::XEmitter emit(location);
|
||||
if (source.call)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue