forked from OSchip/llvm-project
[AArch64InstPrinter] Use * 4096 instead of << 12
Left shirting a negative integer is undefined before C++20.
This commit is contained in:
parent
46ae360452
commit
1bd928e50b
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue