diff --git a/Source/Core/Common/Arm64Emitter.cpp b/Source/Core/Common/Arm64Emitter.cpp index 4dd39c4357..f769edc2f3 100644 --- a/Source/Core/Common/Arm64Emitter.cpp +++ b/Source/Core/Common/Arm64Emitter.cpp @@ -4222,9 +4222,15 @@ void ARM64XEmitter::ADDI2R_internal(ARM64Reg Rd, ARM64Reg Rn, u64 imm, bool nega // Special path for zeroes if (imm == 0 && !flags) { - if (Rd != Rn) + if (Rd == Rn) + { + return; + } + else if (DecodeReg(Rd) != DecodeReg(ARM64Reg::SP) && DecodeReg(Rn) != DecodeReg(ARM64Reg::SP)) + { MOV(Rd, Rn); - return; + return; + } } // Regular fast paths, aarch64 immediate instructions