diff --git a/Source/Core/Core/PowerPC/Jit64/Jit.cpp b/Source/Core/Core/PowerPC/Jit64/Jit.cpp index 903bc826fbf2..f43d25855f84 100644 --- a/Source/Core/Core/PowerPC/Jit64/Jit.cpp +++ b/Source/Core/Core/PowerPC/Jit64/Jit.cpp @@ -1184,8 +1184,8 @@ bool Jit64::DoJit(u32 em_address, JitBlock* b, u32 nextPC) gpr.Discard(op.gprDiscardable); fpr.Discard(op.fprDiscardable); } - gpr.Flush(~op.gprInUse); - fpr.Flush(~op.fprInUse); + gpr.Flush(~op.gprInUse & (op.regsIn | op.regsOut)); + fpr.Flush(~op.fprInUse & (op.fregsIn | op.GetFregsOut())); if (opinfo->flags & FL_LOADSTORE) ++js.numLoadStoreInst; diff --git a/Source/Core/Core/PowerPC/JitArm64/Jit.cpp b/Source/Core/Core/PowerPC/JitArm64/Jit.cpp index 113c8e0043b0..3be81d2c713e 100644 --- a/Source/Core/Core/PowerPC/JitArm64/Jit.cpp +++ b/Source/Core/Core/PowerPC/JitArm64/Jit.cpp @@ -971,8 +971,8 @@ bool JitArm64::DoJit(u32 em_address, JitBlock* b, u32 nextPC) gpr.DiscardRegisters(op.gprDiscardable); fpr.DiscardRegisters(op.fprDiscardable); } - gpr.StoreRegisters(~op.gprInUse); - fpr.StoreRegisters(~op.fprInUse); + gpr.StoreRegisters(~op.gprInUse & (op.regsIn | op.regsOut)); + fpr.StoreRegisters(~op.fprInUse & (op.fregsIn | op.GetFregsOut())); if (opinfo->flags & FL_LOADSTORE) ++js.numLoadStoreInst;