mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-26 04:32:44 +01:00
[llvm-objdump] Prefix memory operand addresses with '0x'
This helps to avoid ambiguity when the address contains only digits 0..9. Differential Revision: https://reviews.llvm.org/D104909
This commit is contained in:
parent
21a491bfe1
commit
7fb2900382
@ -9,7 +9,7 @@
|
||||
|
||||
# SYM: TLS GLOBAL DEFAULT UND a
|
||||
|
||||
# CHECK: 0: leaq (%rip), %rax # 7 <{{.*}}>
|
||||
# CHECK: 0: leaq (%rip), %rax # 0x7 <{{.*}}>
|
||||
# CHECK-NEXT: 0000000000000003: R_X86_64_GOTPC32_TLSDESC a-0x4
|
||||
# CHECK-NEXT: 7: callq *(%rax)
|
||||
# CHECK-NEXT: 0000000000000007: R_X86_64_TLSDESC_CALL a
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
# SYM: TLS GLOBAL DEFAULT UND a
|
||||
|
||||
# CHECK: 0: 40 8d 05 00 00 00 00 leal (%rip), %eax # 7 <{{.*}}>
|
||||
# CHECK: 0: 40 8d 05 00 00 00 00 leal (%rip), %eax # 0x7 <{{.*}}>
|
||||
# CHECK-NEXT: 00000003: R_X86_64_GOTPC32_TLSDESC a-0x4
|
||||
# CHECK-NEXT: 7: 67 ff 10 callq *(%eax)
|
||||
# CHECK-NEXT: 00000007: R_X86_64_TLSDESC_CALL a
|
||||
|
@ -10,14 +10,14 @@
|
||||
# Instructions are expected to be aligned if the instruction in hex is not too long.
|
||||
|
||||
# CHECK: 0: c3 |retq
|
||||
# CHECK-NEXT: 1: 48 8b 05 56 34 12 00 |movq|0x123456(%rip), %rax # 12345e <.text+0x12345e>
|
||||
# CHECK-NEXT: 1: 48 8b 05 56 34 12 00 |movq|0x123456(%rip), %rax # 0x12345e <.text+0x12345e>
|
||||
# CHECK-NEXT: 8: 48 b8 54 55 55 55 55 55 55 55|movabsq|$0x5555555555555554, %rax # imm = 0x5555555555555554
|
||||
# CHECK-NEXT: 12: 8f ea 00 12 4c 02 40 00 00 00 00 |lwpval|$0x0, 0x40(%rdx,%rax), %r15d
|
||||
# CHECK-NEXT: 1d: 8f ea 00 12 04 25 f0 1c f0 1c 00 00 00 00 |lwpins|$0x0, 0x1cf01cf0, %r15d
|
||||
# CHECK-NEXT: 2b: ff ff |<unknown>
|
||||
|
||||
# NORAW: 0: |retq
|
||||
# NORAW-NEXT: 1: |movq|0x123456(%rip), %rax # 12345e <.text+0x12345e>
|
||||
# NORAW-NEXT: 1: |movq|0x123456(%rip), %rax # 0x12345e <.text+0x12345e>
|
||||
# NORAW-NEXT: 8: |movabsq|$0x5555555555555554, %rax # imm = 0x5555555555555554
|
||||
# NORAW-NEXT: 12: |lwpval|$0x0, 0x40(%rdx,%rax), %r15d
|
||||
# NORAW-NEXT: 1d: |lwpins|$0x0, 0x1cf01cf0, %r15d
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
# CHECK: <PR48901>:
|
||||
# TODO: Should display data16 prefixes.
|
||||
# CHECK-NEXT: 0: 66 48 8d 3d 00 00 00 00 leaq (%rip), %rdi # 8 <PR48901+0x8>
|
||||
# CHECK-NEXT: 0: 66 48 8d 3d 00 00 00 00 leaq (%rip), %rdi # 0x8 <PR48901+0x8>
|
||||
# CHECK-NEXT: 8: 66 66 48 e8 00 00 00 00 callq 0x10 <PR48901+0x10>
|
||||
# CHECK-EMPTY:
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
# EXEC-LABEL: <third>:
|
||||
# EXEC-NEXT: 4005: e8 12 34 56 78 callq 0x7856741c <data1+0x7856241c>
|
||||
# EXEC-LABEL: <fourth>:
|
||||
# EXEC-NEXT: 400a: 8b 05 f0 0f 00 00 movl 4080(%rip), %eax # 5000 <data1>
|
||||
# EXEC-NEXT: 400a: 8b 05 f0 0f 00 00 movl 4080(%rip), %eax # 0x5000 <data1>
|
||||
|
||||
--- !ELF
|
||||
FileHeader:
|
||||
|
@ -1444,7 +1444,7 @@ static void disassembleObject(const Target *TheTarget, const ObjectFile *Obj,
|
||||
PrintTarget = true;
|
||||
// Do not print real address when symbolizing.
|
||||
if (!SymbolizeOperands)
|
||||
FOS << " # " << Twine::utohexstr(Target);
|
||||
FOS << " # 0x" << Twine::utohexstr(Target);
|
||||
}
|
||||
if (PrintTarget) {
|
||||
// In a relocatable object, the target's section must reside in
|
||||
|
Loading…
Reference in New Issue
Block a user