mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-09-21 11:51:48 +02:00
Merge pull request #12075 from JosJuice/gpr-block-inputs
PPCAnalyst: Fix gprBlockInputs calculation
This commit is contained in:
commit
ac4da97159
1 changed files with 4 additions and 5 deletions
|
@ -958,7 +958,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 fprInUse, gprInUse, 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];
|
||||||
|
@ -991,6 +991,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.regsOut;
|
||||||
|
gprBlockInputs |= op.regsIn;
|
||||||
gprInUse |= op.regsIn | op.regsOut;
|
gprInUse |= op.regsIn | op.regsOut;
|
||||||
fprInUse |= op.fregsIn | op.GetFregsOut();
|
fprInUse |= op.fregsIn | op.GetFregsOut();
|
||||||
|
|
||||||
|
@ -1020,15 +1022,12 @@ u32 PPCAnalyzer::Analyze(u32 address, CodeBlock* block, CodeBuffer* buffer,
|
||||||
}
|
}
|
||||||
|
|
||||||
// Forward scan, for flags that need the other direction for calculation.
|
// Forward scan, for flags that need the other direction for calculation.
|
||||||
BitSet32 fprIsSingle, fprIsDuplicated, fprIsStoreSafe, gprDefined, gprBlockInputs;
|
BitSet32 fprIsSingle, fprIsDuplicated, fprIsStoreSafe;
|
||||||
BitSet8 gqrUsed, gqrModified;
|
BitSet8 gqrUsed, gqrModified;
|
||||||
for (u32 i = 0; i < block->m_num_instructions; i++)
|
for (u32 i = 0; i < block->m_num_instructions; i++)
|
||||||
{
|
{
|
||||||
CodeOp& op = code[i];
|
CodeOp& op = code[i];
|
||||||
|
|
||||||
gprBlockInputs |= op.regsIn & ~gprDefined;
|
|
||||||
gprDefined |= op.regsOut;
|
|
||||||
|
|
||||||
op.fprIsSingle = fprIsSingle;
|
op.fprIsSingle = fprIsSingle;
|
||||||
op.fprIsDuplicated = fprIsDuplicated;
|
op.fprIsDuplicated = fprIsDuplicated;
|
||||||
op.fprIsStoreSafeBeforeInst = fprIsStoreSafe;
|
op.fprIsStoreSafeBeforeInst = fprIsStoreSafe;
|
||||||
|
|
Loading…
Reference in a new issue