xref: /llvm-project/bolt/test/X86/Inputs/dwarf5-df-mono-helper.s (revision e51a6b7374ca2d11e07375843bf24ef51307308a)
1# clang++ -g -gdwarf-5 -emit-llvm -S helper.cpp
2# llc -O0 -mtriple=x86_64-unknown-linux-gnu helper.ll
3# int z = 0;
4# int d = 0;
5#
6# int helper(int z_, int d_) {
7#  z += z_;
8#  d += d_;
9#  return z * d;
10# }
11
12	.text
13	.file	"helper.cpp"
14	.file	0 "." "helper.cpp" md5 0xe635924a35b65444173d0c76a54b866f
15	.globl	_Z6helperii                     # -- Begin function _Z6helperii
16	.p2align	4, 0x90
17	.type	_Z6helperii,@function
18_Z6helperii:                            # @_Z6helperii
19.Lfunc_begin0:
20	.loc	0 4 0                           # helper.cpp:4:0
21	.cfi_startproc
22# %bb.0:                                # %entry
23	pushq	%rbp
24	.cfi_def_cfa_offset 16
25	.cfi_offset %rbp, -16
26	movq	%rsp, %rbp
27	.cfi_def_cfa_register %rbp
28	movl	%edi, -4(%rbp)
29	movl	%esi, -8(%rbp)
30.Ltmp0:
31	.loc	0 5 7 prologue_end              # helper.cpp:5:7
32	movl	-4(%rbp), %eax
33	.loc	0 5 4 is_stmt 0                 # helper.cpp:5:4
34	addl	z, %eax
35	movl	%eax, z
36	.loc	0 6 7 is_stmt 1                 # helper.cpp:6:7
37	movl	-8(%rbp), %eax
38	.loc	0 6 4 is_stmt 0                 # helper.cpp:6:4
39	addl	d, %eax
40	movl	%eax, d
41	.loc	0 7 9 is_stmt 1                 # helper.cpp:7:9
42	movl	z, %eax
43	.loc	0 7 11 is_stmt 0                # helper.cpp:7:11
44	imull	d, %eax
45	.loc	0 7 2                           # helper.cpp:7:2
46	popq	%rbp
47	.cfi_def_cfa %rsp, 8
48	retq
49.Ltmp1:
50.Lfunc_end0:
51	.size	_Z6helperii, .Lfunc_end0-_Z6helperii
52	.cfi_endproc
53                                        # -- End function
54	.type	z,@object                       # @z
55	.bss
56	.globl	z
57	.p2align	2
58z:
59	.long	0                               # 0x0
60	.size	z, 4
61
62	.type	d,@object                       # @d
63	.globl	d
64	.p2align	2
65d:
66	.long	0                               # 0x0
67	.size	d, 4
68
69	.section	.debug_abbrev,"",@progbits
70	.byte	1                               # Abbreviation Code
71	.byte	17                              # DW_TAG_compile_unit
72	.byte	1                               # DW_CHILDREN_yes
73	.byte	37                              # DW_AT_producer
74	.byte	37                              # DW_FORM_strx1
75	.byte	19                              # DW_AT_language
76	.byte	5                               # DW_FORM_data2
77	.byte	3                               # DW_AT_name
78	.byte	37                              # DW_FORM_strx1
79	.byte	114                             # DW_AT_str_offsets_base
80	.byte	23                              # DW_FORM_sec_offset
81	.byte	16                              # DW_AT_stmt_list
82	.byte	23                              # DW_FORM_sec_offset
83	.byte	27                              # DW_AT_comp_dir
84	.byte	37                              # DW_FORM_strx1
85	.byte	17                              # DW_AT_low_pc
86	.byte	27                              # DW_FORM_addrx
87	.byte	18                              # DW_AT_high_pc
88	.byte	6                               # DW_FORM_data4
89	.byte	115                             # DW_AT_addr_base
90	.byte	23                              # DW_FORM_sec_offset
91	.byte	0                               # EOM(1)
92	.byte	0                               # EOM(2)
93	.byte	2                               # Abbreviation Code
94	.byte	52                              # DW_TAG_variable
95	.byte	0                               # DW_CHILDREN_no
96	.byte	3                               # DW_AT_name
97	.byte	37                              # DW_FORM_strx1
98	.byte	73                              # DW_AT_type
99	.byte	19                              # DW_FORM_ref4
100	.byte	63                              # DW_AT_external
101	.byte	25                              # DW_FORM_flag_present
102	.byte	58                              # DW_AT_decl_file
103	.byte	11                              # DW_FORM_data1
104	.byte	59                              # DW_AT_decl_line
105	.byte	11                              # DW_FORM_data1
106	.byte	2                               # DW_AT_location
107	.byte	24                              # DW_FORM_exprloc
108	.byte	0                               # EOM(1)
109	.byte	0                               # EOM(2)
110	.byte	3                               # Abbreviation Code
111	.byte	36                              # DW_TAG_base_type
112	.byte	0                               # DW_CHILDREN_no
113	.byte	3                               # DW_AT_name
114	.byte	37                              # DW_FORM_strx1
115	.byte	62                              # DW_AT_encoding
116	.byte	11                              # DW_FORM_data1
117	.byte	11                              # DW_AT_byte_size
118	.byte	11                              # DW_FORM_data1
119	.byte	0                               # EOM(1)
120	.byte	0                               # EOM(2)
121	.byte	4                               # Abbreviation Code
122	.byte	46                              # DW_TAG_subprogram
123	.byte	1                               # DW_CHILDREN_yes
124	.byte	17                              # DW_AT_low_pc
125	.byte	27                              # DW_FORM_addrx
126	.byte	18                              # DW_AT_high_pc
127	.byte	6                               # DW_FORM_data4
128	.byte	64                              # DW_AT_frame_base
129	.byte	24                              # DW_FORM_exprloc
130	.byte	110                             # DW_AT_linkage_name
131	.byte	37                              # DW_FORM_strx1
132	.byte	3                               # DW_AT_name
133	.byte	37                              # DW_FORM_strx1
134	.byte	58                              # DW_AT_decl_file
135	.byte	11                              # DW_FORM_data1
136	.byte	59                              # DW_AT_decl_line
137	.byte	11                              # DW_FORM_data1
138	.byte	73                              # DW_AT_type
139	.byte	19                              # DW_FORM_ref4
140	.byte	63                              # DW_AT_external
141	.byte	25                              # DW_FORM_flag_present
142	.byte	0                               # EOM(1)
143	.byte	0                               # EOM(2)
144	.byte	5                               # Abbreviation Code
145	.byte	5                               # DW_TAG_formal_parameter
146	.byte	0                               # DW_CHILDREN_no
147	.byte	2                               # DW_AT_location
148	.byte	24                              # DW_FORM_exprloc
149	.byte	3                               # DW_AT_name
150	.byte	37                              # DW_FORM_strx1
151	.byte	58                              # DW_AT_decl_file
152	.byte	11                              # DW_FORM_data1
153	.byte	59                              # DW_AT_decl_line
154	.byte	11                              # DW_FORM_data1
155	.byte	73                              # DW_AT_type
156	.byte	19                              # DW_FORM_ref4
157	.byte	0                               # EOM(1)
158	.byte	0                               # EOM(2)
159	.byte	0                               # EOM(3)
160	.section	.debug_info,"",@progbits
161.Lcu_begin0:
162	.long	.Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit
163.Ldebug_info_start0:
164	.short	5                               # DWARF version number
165	.byte	1                               # DWARF Unit Type
166	.byte	8                               # Address Size (in bytes)
167	.long	.debug_abbrev                   # Offset Into Abbrev. Section
168	.byte	1                               # Abbrev [1] 0xc:0x59 DW_TAG_compile_unit
169	.byte	0                               # DW_AT_producer
170	.short	33                              # DW_AT_language
171	.byte	1                               # DW_AT_name
172	.long	.Lstr_offsets_base0             # DW_AT_str_offsets_base
173	.long	.Lline_table_start0             # DW_AT_stmt_list
174	.byte	2                               # DW_AT_comp_dir
175	.byte	2                               # DW_AT_low_pc
176	.long	.Lfunc_end0-.Lfunc_begin0       # DW_AT_high_pc
177	.long	.Laddr_table_base0              # DW_AT_addr_base
178	.byte	2                               # Abbrev [2] 0x23:0xb DW_TAG_variable
179	.byte	3                               # DW_AT_name
180	.long	46                              # DW_AT_type
181                                        # DW_AT_external
182	.byte	0                               # DW_AT_decl_file
183	.byte	1                               # DW_AT_decl_line
184	.byte	2                               # DW_AT_location
185	.byte	161
186	.byte	0
187	.byte	3                               # Abbrev [3] 0x2e:0x4 DW_TAG_base_type
188	.byte	4                               # DW_AT_name
189	.byte	5                               # DW_AT_encoding
190	.byte	4                               # DW_AT_byte_size
191	.byte	2                               # Abbrev [2] 0x32:0xb DW_TAG_variable
192	.byte	5                               # DW_AT_name
193	.long	46                              # DW_AT_type
194                                        # DW_AT_external
195	.byte	0                               # DW_AT_decl_file
196	.byte	2                               # DW_AT_decl_line
197	.byte	2                               # DW_AT_location
198	.byte	161
199	.byte	1
200	.byte	4                               # Abbrev [4] 0x3d:0x27 DW_TAG_subprogram
201	.byte	2                               # DW_AT_low_pc
202	.long	.Lfunc_end0-.Lfunc_begin0       # DW_AT_high_pc
203	.byte	1                               # DW_AT_frame_base
204	.byte	86
205	.byte	6                               # DW_AT_linkage_name
206	.byte	7                               # DW_AT_name
207	.byte	0                               # DW_AT_decl_file
208	.byte	4                               # DW_AT_decl_line
209	.long	46                              # DW_AT_type
210                                        # DW_AT_external
211	.byte	5                               # Abbrev [5] 0x4d:0xb DW_TAG_formal_parameter
212	.byte	2                               # DW_AT_location
213	.byte	145
214	.byte	124
215	.byte	8                               # DW_AT_name
216	.byte	0                               # DW_AT_decl_file
217	.byte	4                               # DW_AT_decl_line
218	.long	46                              # DW_AT_type
219	.byte	5                               # Abbrev [5] 0x58:0xb DW_TAG_formal_parameter
220	.byte	2                               # DW_AT_location
221	.byte	145
222	.byte	120
223	.byte	9                               # DW_AT_name
224	.byte	0                               # DW_AT_decl_file
225	.byte	4                               # DW_AT_decl_line
226	.long	46                              # DW_AT_type
227	.byte	0                               # End Of Children Mark
228	.byte	0                               # End Of Children Mark
229.Ldebug_info_end0:
230	.section	.debug_str_offsets,"",@progbits
231	.long	44                              # Length of String Offsets Set
232	.short	5
233	.short	0
234.Lstr_offsets_base0:
235	.section	.debug_str,"MS",@progbits,1
236.Linfo_string0:
237	.asciz	"clang version 15.0.0"          # string offset=0
238.Linfo_string1:
239	.asciz	"helper.cpp"                    # string offset=21
240.Linfo_string2:
241	.asciz	"."                             # string offset=32
242.Linfo_string3:
243	.asciz	"z"                             # string offset=34
244.Linfo_string4:
245	.asciz	"int"                           # string offset=36
246.Linfo_string5:
247	.asciz	"d"                             # string offset=40
248.Linfo_string6:
249	.asciz	"_Z6helperii"                   # string offset=42
250.Linfo_string7:
251	.asciz	"helper"                        # string offset=54
252.Linfo_string8:
253	.asciz	"z_"                            # string offset=61
254.Linfo_string9:
255	.asciz	"d_"                            # string offset=64
256	.section	.debug_str_offsets,"",@progbits
257	.long	.Linfo_string0
258	.long	.Linfo_string1
259	.long	.Linfo_string2
260	.long	.Linfo_string3
261	.long	.Linfo_string4
262	.long	.Linfo_string5
263	.long	.Linfo_string6
264	.long	.Linfo_string7
265	.long	.Linfo_string8
266	.long	.Linfo_string9
267	.section	.debug_addr,"",@progbits
268	.long	.Ldebug_addr_end0-.Ldebug_addr_start0 # Length of contribution
269.Ldebug_addr_start0:
270	.short	5                               # DWARF version number
271	.byte	8                               # Address size
272	.byte	0                               # Segment selector size
273.Laddr_table_base0:
274	.quad	z
275	.quad	d
276	.quad	.Lfunc_begin0
277.Ldebug_addr_end0:
278	.ident	"clang version 15.0.0"
279	.section	".note.GNU-stack","",@progbits
280	.section	.debug_line,"",@progbits
281.Lline_table_start0:
282