[NFC][RemoveDIs] Prefer iterators over inst-pointers in InstCombine
[llvm-project.git] / llvm / test / tools / llvm-objdump / X86 / disassemble-print-comments.s
blobd8a71ae3b0515f9531c9e39f0cda938916b6d9a7
1 ## Check that 'llvm-objdump --no-print-imm-hex -d' prints comments generated by the disassembler.
3 # RUN: llvm-mc -filetype=obj -triple=x86_64 %s -o %t
4 # RUN: llvm-objdump --no-print-imm-hex -d --no-show-raw-insn %t | FileCheck %s
6 # CHECK: 0000000000000000 <foo>:
7 # CHECK-NEXT: 0: nop
8 # CHECK-NEXT: 1: cmpl $305419896, %eax # imm = 0x12345678
10 ## Check that comments and locations of variables can be printed together.
11 # RUN: llvm-objdump --no-print-imm-hex -d --debug-vars --no-show-raw-insn %t | \
12 # RUN: FileCheck %s --check-prefix=DBGVARS
14 # DBGVARS: 0000000000000000 <foo>:
15 # DBGVARS-NEXT: ┠─ bar = RDX
16 # DBGVARS-NEXT: 0: nop ┃
17 # DBGVARS-NEXT: 1: cmpl $305419896, %eax # imm = 0x12345678 ┻
19 .text
20 foo:
21 nop
22 cmpl $0x12345678, %eax
23 .LFooEnd:
25 .section .debug_abbrev,"",@progbits
26 .uleb128 1 # Abbreviation Code
27 .uleb128 0x11 # DW_TAG_compile_unit
28 .byte 1 # DW_CHILDREN_yes
29 .byte 0 # EOM(1)
30 .byte 0 # EOM(2)
31 .uleb128 2 # Abbreviation Code
32 .uleb128 0x2e # DW_TAG_subprogram
33 .byte 1 # DW_CHILDREN_yes
34 .uleb128 0x11 # DW_AT_low_pc
35 .uleb128 0x01 # DW_FORM_addr
36 .uleb128 0x12 # DW_AT_high_pc
37 .uleb128 0x06 # DW_FORM_data4
38 .byte 0 # EOM(1)
39 .byte 0 # EOM(2)
40 .uleb128 3 # Abbreviation Code
41 .uleb128 0x34 # DW_TAG_variable
42 .byte 0 # DW_CHILDREN_no
43 .uleb128 0x02 # DW_AT_location
44 .uleb128 0x18 # DW_FORM_exprloc
45 .uleb128 0x03 # DW_AT_name
46 .uleb128 0x08 # DW_FORM_string
47 .byte 0 # EOM(1)
48 .byte 0 # EOM(2)
49 .byte 0 # EOM(3)
51 .section .debug_info,"",@progbits
52 .long .LCuEnd-.LCuBegin # Length of Unit
53 .LCuBegin:
54 .short 4 # DWARF version number
55 .long .debug_abbrev # Offset Into Abbrev. Section
56 .byte 8 # Address Size
57 .uleb128 1 # Abbrev [1] DW_TAG_compile_unit
58 .uleb128 2 # Abbrev [2] DW_TAG_subprogram
59 .quad foo # DW_AT_low_pc
60 .long .LFooEnd-foo # DW_AT_high_pc
61 .uleb128 3 # Abbrev [3] DW_TAG_variable
62 .byte .LLocEnd-.LLocBegin # DW_AT_location
63 .LLocBegin:
64 .byte 0x51 # DW_OP_reg1
65 .LLocEnd:
66 .asciz "bar" # DW_FORM_string
67 .byte 0 # End Of Children Mark
68 .byte 0 # End Of Children Mark
69 .LCuEnd: