Merge pull request #1164 from FioraAeterna/bpcarry
JIT: fix carry merging across breakpoints
This commit is contained in:
commit
f675b33640
|
@ -610,6 +610,7 @@ const u8* Jit64::DoJit(u32 em_address, PPCAnalyst::CodeBuffer *code_buf, JitBloc
|
||||||
// WARNING - cmp->branch merging will screw this up.
|
// WARNING - cmp->branch merging will screw this up.
|
||||||
js.isLastInstruction = true;
|
js.isLastInstruction = true;
|
||||||
js.next_inst = 0;
|
js.next_inst = 0;
|
||||||
|
js.next_inst_bp = false;
|
||||||
if (Profiler::g_ProfileBlocks)
|
if (Profiler::g_ProfileBlocks)
|
||||||
{
|
{
|
||||||
// CAUTION!!! push on stack regs you use, do your stuff, then pop
|
// 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_inst = ops[i + 1].inst;
|
||||||
js.next_compilerPC = ops[i + 1].address;
|
js.next_compilerPC = ops[i + 1].address;
|
||||||
js.next_op = &ops[i + 1];
|
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)
|
if (jo.optimizeGatherPipe && js.fifoBytesThisBlock >= 32)
|
||||||
|
|
|
@ -52,7 +52,8 @@ void Jit64::FinalizeCarry(CCFlags cond)
|
||||||
js.carryFlagInverted = false;
|
js.carryFlagInverted = false;
|
||||||
if (js.op->wantsCA)
|
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)
|
if (cond == CC_C || cond == CC_NC)
|
||||||
{
|
{
|
||||||
|
|
|
@ -84,6 +84,7 @@ protected:
|
||||||
bool skipnext;
|
bool skipnext;
|
||||||
bool carryFlagSet;
|
bool carryFlagSet;
|
||||||
bool carryFlagInverted;
|
bool carryFlagInverted;
|
||||||
|
bool next_inst_bp;
|
||||||
|
|
||||||
int fifoBytesThisBlock;
|
int fifoBytesThisBlock;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue