From 77da164fe29bdbfdf9d7abf4a173e74fbfb6ae83 Mon Sep 17 00:00:00 2001 From: Ryan Houdek Date: Tue, 21 Oct 2014 12:53:59 +0000 Subject: [PATCH] Adds support for stepping in the ARMv7 JIT. --- Source/Core/Core/PowerPC/JitArm32/JitAsm.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Source/Core/Core/PowerPC/JitArm32/JitAsm.cpp b/Source/Core/Core/PowerPC/JitArm32/JitAsm.cpp index 60fa7199c2..6bbbefb744 100644 --- a/Source/Core/Core/PowerPC/JitArm32/JitAsm.cpp +++ b/Source/Core/Core/PowerPC/JitArm32/JitAsm.cpp @@ -106,6 +106,18 @@ void JitArmAsmRoutineManager::Generate() // IMPORTANT - We jump on negative, not carry!!! FixupBranch bail = B_CC(CC_MI); + FixupBranch dbg_exit; + if (SConfig::GetInstance().m_LocalCoreStartupParameter.bEnableDebugging) + { + MOVI2R(R0, (u32)PowerPC::GetStatePtr()); + LDR(R0, R0); + TST(R0, PowerPC::CPU_STEPPING); + FixupBranch not_stepping = B_CC(CC_EQ); + // XXX: Check for breakpoints + dbg_exit = B(); + SetJumpTarget(not_stepping); + } + SetJumpTarget(skipToRealDispatcher); dispatcherNoCheck = GetCodePtr(); @@ -163,6 +175,8 @@ void JitArmAsmRoutineManager::Generate() B(dispatcher); SetJumpTarget(Exit); + if (SConfig::GetInstance().m_LocalCoreStartupParameter.bEnableDebugging) + SetJumpTarget(dbg_exit); ADD(_SP, _SP, 4);