PPCAnalyst: Simplify gprBlockInputs calculation

No need for the gprDefined variable.
This commit is contained in:
JosJuice 2023-07-27 23:10:59 +02:00
parent 8c2d73e8c2
commit f3ad246fff
1 changed files with 3 additions and 3 deletions

View File

@ -947,7 +947,7 @@ u32 PPCAnalyzer::Analyze(u32 address, CodeBlock* block, CodeBuffer* buffer,
BitSet8 wantsCR = BitSet8(0xFF); BitSet8 wantsCR = BitSet8(0xFF);
bool wantsFPRF = true; bool wantsFPRF = true;
bool wantsCA = 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--) for (int i = block->m_num_instructions - 1; i >= 0; i--)
{ {
CodeOp& op = code[i]; CodeOp& op = code[i];
@ -969,8 +969,8 @@ u32 PPCAnalyzer::Analyze(u32 address, CodeBlock* block, CodeBuffer* buffer,
op.gprDiscardable = gprDiscardable; op.gprDiscardable = gprDiscardable;
op.fprDiscardable = fprDiscardable; op.fprDiscardable = fprDiscardable;
op.fprInXmm = fprInXmm; op.fprInXmm = fprInXmm;
gprBlockInputs |= op.regsIn & ~gprDefined; gprBlockInputs &= ~op.regsOut;
gprDefined |= op.regsOut; gprBlockInputs |= op.regsIn;
gprInUse |= op.regsIn | op.regsOut; gprInUse |= op.regsIn | op.regsOut;
fprInUse |= op.fregsIn | op.GetFregsOut(); fprInUse |= op.fregsIn | op.GetFregsOut();
if (op.canEndBlock || op.canCauseException) if (op.canEndBlock || op.canCauseException)