Merge pull request #12699 from mitaclaw/cached-interpreter-perfmon-optimization

CachedInterpreter: Skip Updating Instruction PERFMON When There Are None
This commit is contained in:
Tilka 2024-04-11 16:19:42 +01:00 committed by GitHub
commit 1fa5c3485c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 8 additions and 4 deletions

View File

@ -364,7 +364,9 @@ void CachedInterpreter::Jit(u32 address)
if (endblock) if (endblock)
{ {
m_code.emplace_back(EndBlock, js.downcountAmount); m_code.emplace_back(EndBlock, js.downcountAmount);
if (js.numLoadStoreInst != 0)
m_code.emplace_back(UpdateNumLoadStoreInstructions, js.numLoadStoreInst); m_code.emplace_back(UpdateNumLoadStoreInstructions, js.numLoadStoreInst);
if (js.numFloatingPointInst != 0)
m_code.emplace_back(UpdateNumFloatingPointInstructions, js.numFloatingPointInst); m_code.emplace_back(UpdateNumFloatingPointInstructions, js.numFloatingPointInst);
} }
} }
@ -373,7 +375,9 @@ void CachedInterpreter::Jit(u32 address)
{ {
m_code.emplace_back(WriteBrokenBlockNPC, nextPC); m_code.emplace_back(WriteBrokenBlockNPC, nextPC);
m_code.emplace_back(EndBlock, js.downcountAmount); m_code.emplace_back(EndBlock, js.downcountAmount);
if (js.numLoadStoreInst != 0)
m_code.emplace_back(UpdateNumLoadStoreInstructions, js.numLoadStoreInst); m_code.emplace_back(UpdateNumLoadStoreInstructions, js.numLoadStoreInst);
if (js.numFloatingPointInst != 0)
m_code.emplace_back(UpdateNumFloatingPointInstructions, js.numFloatingPointInst); m_code.emplace_back(UpdateNumFloatingPointInstructions, js.numFloatingPointInst);
} }
m_code.emplace_back(); m_code.emplace_back();