diff --git a/Source/Core/Common/Arm64Emitter.cpp b/Source/Core/Common/Arm64Emitter.cpp index 29cd71a132..5aae03ef08 100644 --- a/Source/Core/Common/Arm64Emitter.cpp +++ b/Source/Core/Common/Arm64Emitter.cpp @@ -1998,9 +1998,9 @@ void ARM64XEmitter::ADR(ARM64Reg Rd, s32 imm) { EncodeAddressInst(0, Rd, imm); } -void ARM64XEmitter::ADRP(ARM64Reg Rd, s32 imm) +void ARM64XEmitter::ADRP(ARM64Reg Rd, s64 imm) { - EncodeAddressInst(1, Rd, imm >> 12); + EncodeAddressInst(1, Rd, static_cast(imm >> 12)); } // Wrapper around MOVZ+MOVK (and later MOVN) diff --git a/Source/Core/Common/Arm64Emitter.h b/Source/Core/Common/Arm64Emitter.h index 18d4c29c7f..7d96fb836b 100644 --- a/Source/Core/Common/Arm64Emitter.h +++ b/Source/Core/Common/Arm64Emitter.h @@ -862,7 +862,7 @@ public: // Address of label/page PC-relative void ADR(ARM64Reg Rd, s32 imm); - void ADRP(ARM64Reg Rd, s32 imm); + void ADRP(ARM64Reg Rd, s64 imm); // Wrapper around MOVZ+MOVK void MOVI2R(ARM64Reg Rd, u64 imm);