annotate test/MC/MachO/gen-dwarf.s @ 121:803732b1fca8

LLVM 5.0
author kono
date Fri, 27 Oct 2017 17:07:41 +0900
parents 7d135dc70f03
children 3a76565eade5
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1 // RUN: llvm-mc -g -triple i386-apple-darwin10 %s -filetype=obj -o %t
121
803732b1fca8 LLVM 5.0
kono
parents: 100
diff changeset
2 // RUN: llvm-dwarfdump -all %t | FileCheck %s
0
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
3
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
4 .globl _bar
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
5 _bar:
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
6 movl $0, %eax
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
7 L1: leave
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
8 ret
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
9 _foo:
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
10 _baz:
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
11 nop
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
12 .data
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
13 _x: .long 1
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
14
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
15 // CHECK: file format Mach-O 32-bit i386
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
16
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
17 // CHECK: .debug_abbrev contents:
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
18 // CHECK: Abbrev table for offset: 0x00000000
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
19 // CHECK: [1] DW_TAG_compile_unit DW_CHILDREN_yes
100
7d135dc70f03 LLVM 3.9
Miyagi Mitsuki <e135756@ie.u-ryukyu.ac.jp>
parents: 83
diff changeset
20 // CHECK: DW_AT_stmt_list DW_FORM_sec_offset
0
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
21 // CHECK: DW_AT_low_pc DW_FORM_addr
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
22 // CHECK: DW_AT_high_pc DW_FORM_addr
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
23 // CHECK: DW_AT_name DW_FORM_string
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
24 // CHECK: DW_AT_comp_dir DW_FORM_string
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
25 // CHECK: DW_AT_producer DW_FORM_string
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
26 // CHECK: DW_AT_language DW_FORM_data2
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
27
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
28 // CHECK: [2] DW_TAG_label DW_CHILDREN_yes
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
29 // CHECK: DW_AT_name DW_FORM_string
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
30 // CHECK: DW_AT_decl_file DW_FORM_data4
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
31 // CHECK: DW_AT_decl_line DW_FORM_data4
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
32 // CHECK: DW_AT_low_pc DW_FORM_addr
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
33 // CHECK: DW_AT_prototyped DW_FORM_flag
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
34
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
35 // CHECK: [3] DW_TAG_unspecified_parameters DW_CHILDREN_no
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
36
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
37
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
38 // CHECK: .debug_info contents:
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
39
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
40 // We don't check the leading addresses these are at.
121
803732b1fca8 LLVM 5.0
kono
parents: 100
diff changeset
41 // CHECK: DW_TAG_compile_unit
803732b1fca8 LLVM 5.0
kono
parents: 100
diff changeset
42 // CHECK: DW_AT_stmt_list (0x00000000)
803732b1fca8 LLVM 5.0
kono
parents: 100
diff changeset
43 // CHECK: DW_AT_low_pc (0x0000000000000000)
803732b1fca8 LLVM 5.0
kono
parents: 100
diff changeset
44 // CHECK: DW_AT_high_pc (0x0000000000000008)
0
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
45 // We don't check the file name as it is a temp directory
121
803732b1fca8 LLVM 5.0
kono
parents: 100
diff changeset
46 // CHECK: DW_AT_name
0
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
47 // We don't check the DW_AT_comp_dir which is the current working directory
121
803732b1fca8 LLVM 5.0
kono
parents: 100
diff changeset
48 // CHECK: DW_AT_producer ("llvm-mc (based on {{.*}})")
803732b1fca8 LLVM 5.0
kono
parents: 100
diff changeset
49 // CHECK: DW_AT_language (DW_LANG_Mips_Assembler)
0
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
50
121
803732b1fca8 LLVM 5.0
kono
parents: 100
diff changeset
51 // CHECK: DW_TAG_label
803732b1fca8 LLVM 5.0
kono
parents: 100
diff changeset
52 // CHECK: DW_AT_name ("bar")
803732b1fca8 LLVM 5.0
kono
parents: 100
diff changeset
53 // CHECK: DW_AT_decl_file ([[FILE:".*gen-dwarf.s"]])
803732b1fca8 LLVM 5.0
kono
parents: 100
diff changeset
54 // CHECK: DW_AT_decl_line (5)
803732b1fca8 LLVM 5.0
kono
parents: 100
diff changeset
55 // CHECK: DW_AT_low_pc (0x0000000000000000)
803732b1fca8 LLVM 5.0
kono
parents: 100
diff changeset
56 // CHECK: DW_AT_prototyped (0x00)
0
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
57
121
803732b1fca8 LLVM 5.0
kono
parents: 100
diff changeset
58 // CHECK: DW_TAG_unspecified_parameters
0
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
59
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
60 // CHECK: NULL
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
61
121
803732b1fca8 LLVM 5.0
kono
parents: 100
diff changeset
62 // CHECK: DW_TAG_label
803732b1fca8 LLVM 5.0
kono
parents: 100
diff changeset
63 // CHECK: DW_AT_name ("foo")
803732b1fca8 LLVM 5.0
kono
parents: 100
diff changeset
64 // CHECK: DW_AT_decl_file ([[FILE]])
803732b1fca8 LLVM 5.0
kono
parents: 100
diff changeset
65 // CHECK: DW_AT_decl_line (9)
803732b1fca8 LLVM 5.0
kono
parents: 100
diff changeset
66 // CHECK: DW_AT_low_pc (0x0000000000000007)
803732b1fca8 LLVM 5.0
kono
parents: 100
diff changeset
67 // CHECK: DW_AT_prototyped (0x00)
0
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
68
121
803732b1fca8 LLVM 5.0
kono
parents: 100
diff changeset
69 // CHECK: DW_TAG_unspecified_parameters
0
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
70
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
71 // CHECK: NULL
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
72
121
803732b1fca8 LLVM 5.0
kono
parents: 100
diff changeset
73 // CHECK: DW_TAG_label
803732b1fca8 LLVM 5.0
kono
parents: 100
diff changeset
74 // CHECK: DW_AT_name ("baz")
803732b1fca8 LLVM 5.0
kono
parents: 100
diff changeset
75 // CHECK: DW_AT_decl_file ([[FILE]])
803732b1fca8 LLVM 5.0
kono
parents: 100
diff changeset
76 // CHECK: DW_AT_decl_line (10)
803732b1fca8 LLVM 5.0
kono
parents: 100
diff changeset
77 // CHECK: DW_AT_low_pc (0x0000000000000007)
803732b1fca8 LLVM 5.0
kono
parents: 100
diff changeset
78 // CHECK: DW_AT_prototyped (0x00)
0
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
79
121
803732b1fca8 LLVM 5.0
kono
parents: 100
diff changeset
80 // CHECK: DW_TAG_unspecified_parameters
0
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
81
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
82 // CHECK: NULL
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
83
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
84 // CHECK: NULL
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
85
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
86 // CHECK: .debug_aranges contents:
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
87 // CHECK: Address Range Header: length = 0x0000001c, version = 0x0002, cu_offset = 0x00000000, addr_size = 0x04, seg_size = 0x00
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
88
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
89 // CHECK: .debug_line contents:
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
90 // CHECK: Line table prologue:
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
91 // We don't check the total_length as it includes lengths of temp paths
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
92 // CHECK: version: 2
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
93 // We don't check the prologue_length as it too includes lengths of temp paths
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
94 // CHECK: min_inst_length: 1
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
95 // CHECK: default_is_stmt: 1
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
96 // CHECK: line_base: -5
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
97 // CHECK: line_range: 14
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
98 // CHECK: opcode_base: 13
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
99 // CHECK: standard_opcode_lengths[DW_LNS_copy] = 0
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
100 // CHECK: standard_opcode_lengths[DW_LNS_advance_pc] = 1
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
101 // CHECK: standard_opcode_lengths[DW_LNS_advance_line] = 1
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
102 // CHECK: standard_opcode_lengths[DW_LNS_set_file] = 1
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
103 // CHECK: standard_opcode_lengths[DW_LNS_set_column] = 1
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
104 // CHECK: standard_opcode_lengths[DW_LNS_negate_stmt] = 0
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
105 // CHECK: standard_opcode_lengths[DW_LNS_set_basic_block] = 0
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
106 // CHECK: standard_opcode_lengths[DW_LNS_const_add_pc] = 0
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
107 // CHECK: standard_opcode_lengths[DW_LNS_fixed_advance_pc] = 1
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
108 // CHECK: standard_opcode_lengths[DW_LNS_set_prologue_end] = 0
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
109 // CHECK: standard_opcode_lengths[DW_LNS_set_epilogue_begin] = 0
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
110 // CHECK: standard_opcode_lengths[DW_LNS_set_isa] = 1
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
111 // We don't check include_directories as it has a temp path
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
112 // CHECK: Dir Mod Time File Len File Name
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
113 // CHECK: ---- ---------- ---------- ---------------------------
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
114 // CHECK: file_names[ 1] 1 0x00000000 0x00000000 gen-dwarf.s
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
115
77
54457678186b LLVM 3.6
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
116 // CHECK: Address Line Column File ISA Discriminator Flags
54457678186b LLVM 3.6
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
117 // CHECK: ------------------ ------ ------ ------ --- ------------- -------------
54457678186b LLVM 3.6
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
118 // CHECK: 0x0000000000000000 6 0 1 0 0 is_stmt
54457678186b LLVM 3.6
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
119 // CHECK: 0x0000000000000005 7 0 1 0 0 is_stmt
54457678186b LLVM 3.6
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
120 // CHECK: 0x0000000000000006 8 0 1 0 0 is_stmt
54457678186b LLVM 3.6
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
121 // CHECK: 0x0000000000000007 11 0 1 0 0 is_stmt
54457678186b LLVM 3.6
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
122 // CHECK: 0x0000000000000008 11 0 1 0 0 is_stmt end_sequence