Arm64Emitter: Allow specifying 21th bit of ADRP imm

This commit is contained in:
JosJuice 2021-01-13 11:04:13 +01:00
parent d226b8f825
commit 4e107935ac
2 changed files with 3 additions and 3 deletions

View File

@ -1998,9 +1998,9 @@ void ARM64XEmitter::ADR(ARM64Reg Rd, s32 imm)
{ {
EncodeAddressInst(0, Rd, 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<s32>(imm >> 12));
} }
// Wrapper around MOVZ+MOVK (and later MOVN) // Wrapper around MOVZ+MOVK (and later MOVN)

View File

@ -862,7 +862,7 @@ public:
// Address of label/page PC-relative // Address of label/page PC-relative
void ADR(ARM64Reg Rd, s32 imm); void ADR(ARM64Reg Rd, s32 imm);
void ADRP(ARM64Reg Rd, s32 imm); void ADRP(ARM64Reg Rd, s64 imm);
// Wrapper around MOVZ+MOVK // Wrapper around MOVZ+MOVK
void MOVI2R(ARM64Reg Rd, u64 imm); void MOVI2R(ARM64Reg Rd, u64 imm);