[all-commits] [llvm/llvm-project] 544181: [llvm-objdump][AArch64] Fix ADRP target label calc...
chbessonova via All-commits
all-commits at lists.llvm.org
Sun Dec 18 04:25:58 PST 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 54418125191ce83af65569348301a23a3dd892a5
https://github.com/llvm/llvm-project/commit/54418125191ce83af65569348301a23a3dd892a5
Author: Kristina Bessonova <kbessonova at accesssoftek.com>
Date: 2022-12-18 (Sun, 18 Dec 2022)
Changed paths:
M llvm/lib/Target/AArch64/MCTargetDesc/AArch64MCTargetDesc.cpp
M llvm/test/tools/llvm-objdump/ELF/AArch64/pcrel-address.yaml
Log Message:
-----------
[llvm-objdump][AArch64] Fix ADRP target label calculation
This patch makes ADRP target label address calculations the same as
label address calculations (see AArch64InstPrinter::printAdrpLabel()).
Otherwise the target label looks misleading as ADRP's immediate offset is,
actually, not an offset to this PC, but an offset to the current PC's
page address in pages.
See for example, `llvm-objdump/ELF/AArch64/pcrel-address.yaml`.
Before this patch the target label `<_start+0x80>` represents the
address `0x200100 + 0x80` while `0x220000` is expected.
Note that with this patch llvm-objdump output matches GNU objdump.
Reviewed By: simon_tatham
Differential Revision: https://reviews.llvm.org/D139407
More information about the All-commits
mailing list