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>:
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 ┻
22 cmpl $
0x12345678, %eax
25 .section .debug_abbrev,"",@progbits
26 .uleb128 1 # Abbreviation Code
27 .uleb128 0x11 # DW_TAG_compile_unit
28 .byte 1 # DW_CHILDREN_yes
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
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
51 .section .debug_info,"",@progbits
52 .long .LCuEnd-.LCuBegin # Length of Unit
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
64 .byte 0x51 # DW_OP_reg1
66 .asciz "bar" # DW_FORM_string
67 .byte 0 # End Of Children Mark
68 .byte 0 # End Of Children Mark