Merge pull request #1726 from Sonicadvance1/AArch64_flush_if_not_needed

[AArch64] Flush registers from register cache if they won't be used again.
This commit is contained in:
Ryan Houdek 2014-12-21 20:46:38 -06:00
commit bd4fa951a9
1 changed files with 4 additions and 0 deletions

View File

@ -290,6 +290,10 @@ const u8* JitArm64::DoJit(u32 em_address, PPCAnalyst::CodeBuffer *code_buf, JitB
JitArm64Tables::CompileInstruction(ops[i]); JitArm64Tables::CompileInstruction(ops[i]);
// If we have a register that will never be used again, flush it.
for (int j : ~ops[i].gprInUse)
gpr.StoreRegister(j);
if (js.memcheck && (opinfo->flags & FL_LOADSTORE)) if (js.memcheck && (opinfo->flags & FL_LOADSTORE))
{ {
// Don't do this yet // Don't do this yet