Skip to content

Commit

Permalink
Disable swapping cmp with instructions potentially raising interrupts
Browse files Browse the repository at this point in the history
Workaround for issue 5864 disabling parts of an optimization in the JIT. This
is not the best solution to fix this issue, but at least it does not crash.
  • Loading branch information
delroth committed Jan 7, 2013
1 parent d0301ca commit 8cfceb1
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions Source/Core/Core/Src/PowerPC/PPCAnalyst.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -246,17 +246,13 @@ bool CanSwapAdjacentOps(const CodeOp &a, const CodeOp &b)
return false;
}

// For now, only integer ops acceptable.
switch (b_info->type) {
case OPTYPE_INTEGER:
case OPTYPE_LOAD:
case OPTYPE_STORE:
//case OPTYPE_LOADFP:
//case OPTYPE_STOREFP:
break;
default:
// For now, only integer ops acceptable. Any instruction which can raise an
// interrupt is *not* a possible swap candidate: see [1] for an example of
// a crash caused by this error.
//
// [1] https://code.google.com/p/dolphin-emu/issues/detail?id=5864#c7
if (b_info->type != OPTYPE_INTEGER)
return false;
}

// Check that we have no register collisions.
// That is, check that none of b's outputs matches any of a's inputs,
Expand Down

0 comments on commit 8cfceb1

Please sign in to comment.