PowerPC: Parametrize CTR macro.

This commit is contained in:
Admiral H. Curtiss
2023-01-10 01:19:56 +01:00
parent 0a343007cb
commit c13ca271d8
4 changed files with 10 additions and 9 deletions

View File

@ -471,7 +471,8 @@ static bool WillInstructionReturn(UGeckoInstruction inst)
// Is a rfi instruction
if (inst.hex == 0x4C000064u)
return true;
bool counter = (inst.BO_2 >> 2 & 1) != 0 || (CTR != 0) != ((inst.BO_2 >> 1 & 1) != 0);
bool counter =
(inst.BO_2 >> 2 & 1) != 0 || (CTR(PowerPC::ppcState) != 0) != ((inst.BO_2 >> 1 & 1) != 0);
bool condition =
inst.BO_2 >> 4 != 0 || PowerPC::ppcState.cr.GetBit(inst.BI_2) == (inst.BO_2 >> 3 & 1);
bool isBclr = inst.OPCD_7 == 0b010011 && (inst.hex >> 1 & 0b10000) != 0;