From 73542ce93ed43e374d56def7a2bbc36707963026 Mon Sep 17 00:00:00 2001 From: Ryan Houdek Date: Fri, 19 Dec 2014 21:46:44 -0600 Subject: [PATCH] [AArch64] Flush registers from register cache if they won't be used again. This requires PR #1705 and #1723 prior to merging. --- Source/Core/Core/PowerPC/JitArm64/Jit.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Source/Core/Core/PowerPC/JitArm64/Jit.cpp b/Source/Core/Core/PowerPC/JitArm64/Jit.cpp index 97f0b00336..30b6911785 100644 --- a/Source/Core/Core/PowerPC/JitArm64/Jit.cpp +++ b/Source/Core/Core/PowerPC/JitArm64/Jit.cpp @@ -271,6 +271,10 @@ const u8* JitArm64::DoJit(u32 em_address, PPCAnalyst::CodeBuffer *code_buf, JitB 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)) { // Don't do this yet