Merge pull request #1164 from FioraAeterna/bpcarry

JIT: fix carry merging across breakpoints
This commit is contained in:
skidau 2014-09-30 13:25:24 +10:00
commit f675b33640
3 changed files with 5 additions and 1 deletions

View File

@ -610,6 +610,7 @@ const u8* Jit64::DoJit(u32 em_address, PPCAnalyst::CodeBuffer *code_buf, JitBloc
// WARNING - cmp->branch merging will screw this up.
js.isLastInstruction = true;
js.next_inst = 0;
js.next_inst_bp = false;
if (Profiler::g_ProfileBlocks)
{
// CAUTION!!! push on stack regs you use, do your stuff, then pop
@ -627,6 +628,7 @@ const u8* Jit64::DoJit(u32 em_address, PPCAnalyst::CodeBuffer *code_buf, JitBloc
js.next_inst = ops[i + 1].inst;
js.next_compilerPC = ops[i + 1].address;
js.next_op = &ops[i + 1];
js.next_inst_bp = SConfig::GetInstance().m_LocalCoreStartupParameter.bEnableDebugging && breakpoints.IsAddressBreakPoint(ops[i + 1].address);
}
if (jo.optimizeGatherPipe && js.fifoBytesThisBlock >= 32)

View File

@ -52,7 +52,8 @@ void Jit64::FinalizeCarry(CCFlags cond)
js.carryFlagInverted = false;
if (js.op->wantsCA)
{
if (js.next_op->wantsCAInFlags)
// Be careful: a breakpoint kills flags in between instructions
if (js.next_op->wantsCAInFlags && !js.next_inst_bp)
{
if (cond == CC_C || cond == CC_NC)
{

View File

@ -84,6 +84,7 @@ protected:
bool skipnext;
bool carryFlagSet;
bool carryFlagInverted;
bool next_inst_bp;
int fifoBytesThisBlock;