diff --git a/Source/Core/Core/PowerPC/JitArm64/JitArm64_Integer.cpp b/Source/Core/Core/PowerPC/JitArm64/JitArm64_Integer.cpp index 0b21cc2d9d58..3298ddfd4b92 100644 --- a/Source/Core/Core/PowerPC/JitArm64/JitArm64_Integer.cpp +++ b/Source/Core/Core/PowerPC/JitArm64/JitArm64_Integer.cpp @@ -1129,8 +1129,7 @@ void JitArm64::addzex(UGeckoInstruction inst) int a = inst.RA, d = inst.RD; - if (gpr.IsImm(a) && - (HasConstantCarry() || (js.carryFlag == CarryFlag::InPPCState && gpr.GetImm(a) == 0))) + if (gpr.IsImm(a) && (gpr.GetImm(a) == 0 || HasConstantCarry())) { const u32 imm = gpr.GetImm(a); const bool is_all_ones = imm == 0xFFFFFFFF; @@ -1144,6 +1143,13 @@ void JitArm64::addzex(UGeckoInstruction inst) ComputeCarry(false); break; } + case CarryFlag::InHostCarry: + { + gpr.BindToRegister(d, false); + CSET(gpr.R(d), CCFlags::CC_CS); + ComputeCarry(false); + break; + } case CarryFlag::ConstantTrue: { gpr.SetImmediate(d, imm + 1); @@ -1156,8 +1162,6 @@ void JitArm64::addzex(UGeckoInstruction inst) ComputeCarry(false); break; } - default: - Common::Unreachable(); } } else