Merge pull request #2717 from phire/fix-reordering

PPCAnalyst: Don't swap instruction which might cause interrupts.
This commit is contained in:
Scott Mansell 2015-07-22 05:16:51 +12:00 committed by Jules Blok
parent bfd5c6c69d
commit 452a0f8042

View File

@ -250,6 +250,10 @@ static bool CanSwapAdjacentOps(const CodeOp &a, const CodeOp &b)
if (b_info->type != OPTYPE_INTEGER) if (b_info->type != OPTYPE_INTEGER)
return false; return false;
// And it's possible a might raise an interrupt too (fcmpo/fcmpu)
if (a_info->type != OPTYPE_INTEGER)
return false;
// Check that we have no register collisions. // Check that we have no register collisions.
// That is, check that none of b's outputs matches any of a's inputs, // That is, check that none of b's outputs matches any of a's inputs,
// and that none of a's outputs matches any of b's inputs. // and that none of a's outputs matches any of b's inputs.