[PATCH] D104909: [llvm-objdump] Prefix memory operand addresses with '0x'

Harald van Dijk via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jun 26 03:31:11 PDT 2021


hvdijk added a comment.

In D104909#2842182 <https://reviews.llvm.org/D104909#2842182>, @ikudrin wrote:

> In fact, this patch fixes some inconsistencies in printing instructions and their comments. Hexadecimal constants are already prefixed with `0x` (see, for example, `lld/test/ELF/x86-64-gotpc-relax-nopic.s`), as well as targets of branch instructions (`lld/test/ELF/symver.s`), etc.
>
> As for addresses of the instructions, personally, I do not believe they need to be prefixed. They are printed as a sequence, so there are for sure some "letter" digits among them, and thus the actual format is easily recognized. In any case, I guess that that is something unrelated to this patch, and should be done separately, if decided.

They are closer in meaning to the addresses at the start of the line, not just instructions but data as well, than to anything else though. When we want to see what e.g. `pushq 8346(%rip)  # 203280` actually refers to, we look for the line that starts with `203280`. Yes, I have actually looked things up this way, this isn't hypothetical.


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

https://reviews.llvm.org/D104909



More information about the llvm-commits mailing list