PPCAnalyst: Don't swap instruction which might cause interrupts.

fcmpo and fcmpu can be matched by the REORDER_CMP pass, as they set CR0
and they can cause interrupts if the fpu is disabled.
So we add an extra check to make sure op a is an integer op too.
This commit is contained in:
Scott Mansell 2015-07-07 22:11:21 +12:00
parent 48ac522b5c
commit a31ebb9bcd

View file

@ -250,6 +250,10 @@ static bool CanSwapAdjacentOps(const CodeOp &a, const CodeOp &b)
if (b_info->type != OPTYPE_INTEGER)
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.
// 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.