From f3ad246fff892bcfd6ecc00fccb7d9496bd31467 Mon Sep 17 00:00:00 2001 From: JosJuice Date: Thu, 27 Jul 2023 23:10:59 +0200 Subject: [PATCH] PPCAnalyst: Simplify gprBlockInputs calculation No need for the gprDefined variable. --- Source/Core/Core/PowerPC/PPCAnalyst.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Source/Core/Core/PowerPC/PPCAnalyst.cpp b/Source/Core/Core/PowerPC/PPCAnalyst.cpp index 00d1ab11ac..574f869504 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 gprDefined, gprBlockInputs, gprInUse, fprInUse, gprDiscardable, fprDiscardable, fprInXmm; + BitSet32 gprBlockInputs, gprInUse, fprInUse, gprDiscardable, fprDiscardable, fprInXmm; for (int i = block->m_num_instructions - 1; i >= 0; i--) { CodeOp& op = code[i]; @@ -969,8 +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; + gprBlockInputs &= ~op.regsOut; + gprBlockInputs |= op.regsIn; gprInUse |= op.regsIn | op.regsOut; fprInUse |= op.fregsIn | op.GetFregsOut(); if (op.canEndBlock || op.canCauseException)