diff --git a/Source/Core/Core/PowerPC/PPCAnalyst.cpp b/Source/Core/Core/PowerPC/PPCAnalyst.cpp index 8e6a1eee00..00d1ab11ac 100644 --- a/Source/Core/Core/PowerPC/PPCAnalyst.cpp +++ b/Source/Core/Core/PowerPC/PPCAnalyst.cpp @@ -947,7 +947,7 @@ u32 PPCAnalyzer::Analyze(u32 address, CodeBlock* block, CodeBuffer* buffer, BitSet8 wantsCR = BitSet8(0xFF); bool wantsFPRF = true; bool wantsCA = true; - BitSet32 fprInUse, gprInUse, gprDiscardable, fprDiscardable, fprInXmm; + BitSet32 gprDefined, gprBlockInputs, gprInUse, fprInUse, gprDiscardable, fprDiscardable, fprInXmm; for (int i = block->m_num_instructions - 1; i >= 0; i--) { CodeOp& op = code[i]; @@ -969,6 +969,8 @@ u32 PPCAnalyzer::Analyze(u32 address, CodeBlock* block, CodeBuffer* buffer, op.gprDiscardable = gprDiscardable; op.fprDiscardable = fprDiscardable; op.fprInXmm = fprInXmm; + gprBlockInputs |= op.regsIn & ~gprDefined; + gprDefined |= op.regsOut; gprInUse |= op.regsIn | op.regsOut; fprInUse |= op.fregsIn | op.GetFregsOut(); if (op.canEndBlock || op.canCauseException) @@ -988,15 +990,12 @@ u32 PPCAnalyzer::Analyze(u32 address, CodeBlock* block, CodeBuffer* buffer, } // Forward scan, for flags that need the other direction for calculation. - BitSet32 fprIsSingle, fprIsDuplicated, fprIsStoreSafe, gprDefined, gprBlockInputs; + BitSet32 fprIsSingle, fprIsDuplicated, fprIsStoreSafe; BitSet8 gqrUsed, gqrModified; for (u32 i = 0; i < block->m_num_instructions; i++) { CodeOp& op = code[i]; - gprBlockInputs |= op.regsIn & ~gprDefined; - gprDefined |= op.regsOut; - op.fprIsSingle = fprIsSingle; op.fprIsDuplicated = fprIsDuplicated; op.fprIsStoreSafeBeforeInst = fprIsStoreSafe;