[PATCH] D76580: [X86InstPrinter] Change printPCRelImm to print the target address in hexadecimal form

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 24 09:39:26 PDT 2020


MaskRay marked an inline comment as done.
MaskRay added inline comments.


================
Comment at: llvm/tools/llvm-objdump/llvm-objdump.cpp:739-740
+    if (MI) {
+      uint64_t Addr =
+          Address.Address + (STI.getTargetTriple().isX86() ? Bytes.size() : 0);
+      IP.printInst(MI, Addr, "", STI, OS);
----------------
jhenderson wrote:
> This is the PC bias bit, right? I thought PC bias was a thing on other platforms too?
> 
> This is probably at least deserving of a comment.
I think AArch64/PPC/RISC-V do not have PC bias. Their PC relative immediate is relative to the current instruction.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D76580/new/

https://reviews.llvm.org/D76580





More information about the llvm-commits mailing list