[all-commits] [llvm/llvm-project] 5ee571: [llvm-objdump] Decrease instruction indentation fo...

Fangrui Song via All-commits all-commits at lists.llvm.org
Thu Jun 11 09:11:12 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 5ee571735ddf1f81db3df5d7328c86432209e3b4
      https://github.com/llvm/llvm-project/commit/5ee571735ddf1f81db3df5d7328c86432209e3b4
  Author: Fangrui Song <maskray at google.com>
  Date:   2020-06-11 (Thu, 11 Jun 2020)

  Changed paths:
    A llvm/test/tools/llvm-objdump/ELF/AArch64/disassemble-align.s
    M llvm/tools/llvm-objdump/llvm-objdump.cpp

  Log Message:
  -----------
  [llvm-objdump] Decrease instruction indentation for non-x86

Place the instruction at the 24th column (0-based indexing), matching
GNU objdump ARM/AArch64/powerpc/etc when the address is low.

This is beneficial for non-x86 targets which have short instruction
lengths.

```
// GNU objdump AArch64
   0:   91001062        add     x2, x3, #0x4
  400078:       91001062        add     x2, x3, #0x4
// llvm-objdump, with this patch
       0: 62 10 00 91   add     x2, x3, #4
  400078: 62 10 00 91   add     x2, x3, #4
// llvm-objdump, if we change to print a word instead of bytes in the future
       0: 91001062      add     x2, x3, #4
  400078: 91001062      add     x2, x3, #4

// GNU objdump Thumb
   0:   bf00            nop

// GNU objdump Power ISA 3.1 64-bit instruction
// 0:   00 00 10 04     plwa    r3,0
// 4:   00 00 60 a4
```

Reviewed By: jhenderson

Differential Revision: https://reviews.llvm.org/D81590




More information about the All-commits mailing list