[PATCH] D104701: [ARMInstPrinter] Print the target address of a branch instruction
Igor Kudrin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 22 04:34:31 PDT 2021
ikudrin created this revision.
ikudrin added reviewers: MaskRay, peter.smith, jhenderson, ostannard, simon_tatham.
ikudrin added a project: LLVM.
Herald added subscribers: pengfei, dmgreen, rupprecht, hiraditya, kristof.beyls, emaste.
ikudrin requested review of this revision.
This follows other patches that changed printing immediate values of branch instructions to target addresses, see D76580 <https://reviews.llvm.org/D76580> (x86), D76591 <https://reviews.llvm.org/D76591> (PPC), D77853 <https://reviews.llvm.org/D77853> (AArch64).
As observing immediate values might sometimes be useful, they are printed as comments for branch instructions.
// llvm-objdump -d output (before)
000200b4 <_start>:
200b4: ff ff ff fa blx #-4 <thumb>
000200b8 <thumb>:
200b8: ff f7 fc ef blx #-8 <_start>
// llvm-objdump -d output (after)
000200b4 <_start>:
200b4: ff ff ff fa blx 0x200b8 <thumb> @ imm = #-4
000200b8 <thumb>:
200b8: ff f7 fc ef blx 0x200b4 <_start> @ imm = #-8
// GNU objdump -d.
000200b4 <_start>:
200b4: faffffff blx 200b8 <thumb>
000200b8 <thumb>:
200b8: f7ff effc blx 200b4 <_start>
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D104701
Files:
lld/test/COFF/arm-thumb-thunks-multipass.s
lld/test/COFF/arm-thumb-thunks.s
lld/test/COFF/armnt-blx23t.test
lld/test/COFF/armnt-branch24t.test
lld/test/COFF/delayimports-armnt.yaml
lld/test/ELF/arm-bl-v6-inrange.s
lld/test/ELF/arm-bl-v6.s
lld/test/ELF/arm-blx.s
lld/test/ELF/arm-branch-rangethunk.s
lld/test/ELF/arm-branch-undef-weak-plt-thunk.s
lld/test/ELF/arm-branch.s
lld/test/ELF/arm-exidx-canunwind.s
lld/test/ELF/arm-exidx-gc.s
lld/test/ELF/arm-extreme-range-pi-thunk.s
lld/test/ELF/arm-fix-cortex-a8-blx.s
lld/test/ELF/arm-fix-cortex-a8-nopatch.s
lld/test/ELF/arm-fix-cortex-a8-plt.s
lld/test/ELF/arm-fix-cortex-a8-recognize.s
lld/test/ELF/arm-fix-cortex-a8-thunk-align.s
lld/test/ELF/arm-fix-cortex-a8-thunk.s
lld/test/ELF/arm-force-pi-thunk.s
lld/test/ELF/arm-gnu-ifunc-plt.s
lld/test/ELF/arm-gnu-ifunc.s
lld/test/ELF/arm-long-thunk-converge.s
lld/test/ELF/arm-plt-reloc.s
lld/test/ELF/arm-thumb-branch.s
lld/test/ELF/arm-thumb-condbranch-thunk.s
lld/test/ELF/arm-thumb-interwork-abs.s
lld/test/ELF/arm-thumb-interwork-ifunc.s
lld/test/ELF/arm-thumb-interwork-notfunc.s
lld/test/ELF/arm-thumb-interwork-shared.s
lld/test/ELF/arm-thumb-interwork-thunk-v5.s
lld/test/ELF/arm-thumb-interwork-thunk.s
lld/test/ELF/arm-thumb-mix-range-thunk-os.s
lld/test/ELF/arm-thumb-narrow-branch-check.s
lld/test/ELF/arm-thumb-no-undefined-thunk.s
lld/test/ELF/arm-thumb-plt-range-thunk-os.s
lld/test/ELF/arm-thumb-plt-reloc.s
lld/test/ELF/arm-thumb-range-thunk-os.s
lld/test/ELF/arm-thumb-thunk-empty-pass.s
lld/test/ELF/arm-thumb-thunk-v6m.s
lld/test/ELF/arm-thumb-undefined-weak-narrow.test
lld/test/ELF/arm-thumb-undefined-weak.s
lld/test/ELF/arm-thunk-arm-thumb-reuse.s
lld/test/ELF/arm-thunk-largesection.s
lld/test/ELF/arm-thunk-linkerscript-dotexpr.s
lld/test/ELF/arm-thunk-linkerscript-large.s
lld/test/ELF/arm-thunk-linkerscript-orphan.s
lld/test/ELF/arm-thunk-linkerscript-sort.s
lld/test/ELF/arm-thunk-linkerscript.s
lld/test/ELF/arm-thunk-many-passes.s
lld/test/ELF/arm-thunk-multipass-plt.s
lld/test/ELF/arm-thunk-multipass.s
lld/test/ELF/arm-thunk-nosuitable.s
lld/test/ELF/arm-thunk-re-add.s
lld/test/ELF/arm-undefined-weak.s
llvm/lib/Target/ARM/MCTargetDesc/ARMInstPrinter.cpp
llvm/lib/Target/ARM/MCTargetDesc/ARMInstPrinter.h
llvm/lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.cpp
llvm/lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.h
llvm/test/CodeGen/ARM/Windows/division-range.ll
llvm/test/MC/ARM/arm-macho-calls.s
llvm/test/MC/ARM/branch-disassemble.s
llvm/test/MC/ARM/coff-relocations.s
llvm/test/MC/ARM/thumb-cb-thumbfunc.s
llvm/test/MC/ARM/thumb1-relax-bcc.s
llvm/test/MC/ARM/thumb1-relax-br.s
llvm/test/MC/ARM/thumb2-b.w-target.s
llvm/test/MC/ARM/thumb2-cbn-to-next-inst.s
llvm/test/MC/Disassembler/ARM/mve-lol.txt
llvm/test/tools/llvm-objdump/ELF/ARM/branch-symbols.s
llvm/test/tools/llvm-objdump/ELF/ARM/invalid-instruction.s
llvm/test/tools/llvm-objdump/ELF/ARM/tblxi-target.s
llvm/test/tools/llvm-objdump/ELF/ARM/unknown-instr.test
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D104701.353604.patch
Type: text/x-patch
Size: 117515 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210622/da942491/attachment.bin>
More information about the llvm-commits
mailing list