[AArch64InstPrinter] Use * 4096 instead of << 12

Left shirting a negative integer is undefined before C++20.
This commit is contained in:
Fangrui Song 2020-12-16 14:02:25 -08:00
parent 46ae360452
commit 1bd928e50b
1 changed files with 1 additions and 1 deletions

View File

@ -1386,7 +1386,7 @@ void AArch64InstPrinter::printAdrpLabel(const MCInst *MI, uint64_t Address,
// If the label has already been resolved to an immediate offset (say, when
// we're running the disassembler), just print the immediate.
if (Op.isImm()) {
const int64_t Offset = Op.getImm() << 12;
const int64_t Offset = Op.getImm() * 4096;
if (PrintBranchImmAsAddress)
O << formatHex((Address & -4096) + Offset);
else