From 0d78f5926fed4a00e7ee124386ed057e00a23663 Mon Sep 17 00:00:00 2001 From: degasus Date: Thu, 27 Oct 2016 21:29:05 +0200 Subject: [PATCH] JitArm64: Keep carry in the host flag for all integer instructions. --- Source/Core/Core/PowerPC/JitArm64/Jit.cpp | 2 ++ Source/Core/Core/PowerPC/JitArm64/JitArm64_Integer.cpp | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Source/Core/Core/PowerPC/JitArm64/Jit.cpp b/Source/Core/Core/PowerPC/JitArm64/Jit.cpp index 4be9fb1a91..3aec0032ae 100644 --- a/Source/Core/Core/PowerPC/JitArm64/Jit.cpp +++ b/Source/Core/Core/PowerPC/JitArm64/Jit.cpp @@ -606,6 +606,8 @@ const u8* JitArm64::DoJit(u32 em_address, PPCAnalyst::CodeBuffer* code_buf, JitB } JitArm64Tables::CompileInstruction(ops[i]); + if (!MergeAllowedNextInstructions(1) || js.op[1].opinfo->type != OPTYPE_INTEGER) + FlushCarry(); // If we have a register that will never be used again, flush it. gpr.StoreRegisters(~ops[i].gprInUse); diff --git a/Source/Core/Core/PowerPC/JitArm64/JitArm64_Integer.cpp b/Source/Core/Core/PowerPC/JitArm64/JitArm64_Integer.cpp index 1dbf9c4cd3..3b667c525b 100644 --- a/Source/Core/Core/PowerPC/JitArm64/JitArm64_Integer.cpp +++ b/Source/Core/Core/PowerPC/JitArm64/JitArm64_Integer.cpp @@ -74,7 +74,7 @@ void JitArm64::ComputeCarry() return; js.carryFlagSet = true; - if (MergeAllowedNextInstructions(1) && js.op[1].wantsCAInFlags) + if (MergeAllowedNextInstructions(1) && js.op[1].opinfo->type == OPTYPE_INTEGER) { return; }