diff --git a/Source/Core/Common/Arm64Emitter.cpp b/Source/Core/Common/Arm64Emitter.cpp index c3cb492a5f..29cd71a132 100644 --- a/Source/Core/Common/Arm64Emitter.cpp +++ b/Source/Core/Common/Arm64Emitter.cpp @@ -2004,7 +2004,7 @@ void ARM64XEmitter::ADRP(ARM64Reg Rd, s32 imm) } // Wrapper around MOVZ+MOVK (and later MOVN) -void ARM64XEmitter::MOVI2R(ARM64Reg Rd, u64 imm, bool optimize) +void ARM64XEmitter::MOVI2R(ARM64Reg Rd, u64 imm) { unsigned int parts = Is64Bit(Rd) ? 4 : 2; BitSet32 upload_part(0); @@ -2041,13 +2041,10 @@ void ARM64XEmitter::MOVI2R(ARM64Reg Rd, u64 imm, bool optimize) // XXX: Use MOVN when possible. // XXX: Optimize more // XXX: Support rotating immediates to save instructions - if (optimize) + for (unsigned int i = 0; i < parts; ++i) { - for (unsigned int i = 0; i < parts; ++i) - { - if ((imm >> (i * 16)) & 0xFFFF) - upload_part[i] = 1; - } + if ((imm >> (i * 16)) & 0xFFFF) + upload_part[i] = 1; } u64 aligned_pc = (u64)GetCodePtr() & ~0xFFF; @@ -2090,7 +2087,7 @@ void ARM64XEmitter::MOVI2R(ARM64Reg Rd, u64 imm, bool optimize) } else { - if (upload_part[i] || !optimize) + if (upload_part[i]) MOVK(Rd, (imm >> (i * 16)) & 0xFFFF, (ShiftAmount)i); } } diff --git a/Source/Core/Common/Arm64Emitter.h b/Source/Core/Common/Arm64Emitter.h index 7a43495aab..18d4c29c7f 100644 --- a/Source/Core/Common/Arm64Emitter.h +++ b/Source/Core/Common/Arm64Emitter.h @@ -865,7 +865,7 @@ public: void ADRP(ARM64Reg Rd, s32 imm); // Wrapper around MOVZ+MOVK - void MOVI2R(ARM64Reg Rd, u64 imm, bool optimize = true); + void MOVI2R(ARM64Reg Rd, u64 imm); bool MOVI2R2(ARM64Reg Rd, u64 imm1, u64 imm2); template void MOVP2R(ARM64Reg Rd, P* ptr) diff --git a/Source/Core/Core/PowerPC/JitArm64/JitArm64_Integer.cpp b/Source/Core/Core/PowerPC/JitArm64/JitArm64_Integer.cpp index dbcf424aa2..6a4600d67c 100644 --- a/Source/Core/Core/PowerPC/JitArm64/JitArm64_Integer.cpp +++ b/Source/Core/Core/PowerPC/JitArm64/JitArm64_Integer.cpp @@ -912,7 +912,7 @@ void JitArm64::subfex(UGeckoInstruction inst) ARM64Reg WA = gpr.GetReg(); if (js.carryFlagSet) { - MOVI2R(WA, ~i + j, gpr.R(d)); + MOVI2R(WA, ~i + j); ADC(gpr.R(d), WA, WZR); } else