xref: /llvm-project/bolt/test/X86/Inputs/dwarf4-two-entries-loclist.s (revision bce5743e2190841973e8e0830d4fff73210f2815)
1# clang++ helper2.cpp -O2 -g2 -gdwarf-4 -S -o helper2.s
2# int z1 = 0;
3# int d1 = 0;
4#
5# int helper31(int z_, int d_) {
6#  z1 += z_;
7#  d1 += d_;
8#  return z1 * d1;
9# }
10#
11#
12# int z = 0;
13# int d = 0;
14#
15# int helper3(int z_, int d_) {
16#  z += z_;
17#  d += d_;
18#  return z * d;
19# }
20
21	.text
22	.file	"helper2.cpp"
23	.file	1 "/dwarf4CrossCULocList" "helper2.cpp"
24	.globl	_Z8helper31ii                   # -- Begin function _Z8helper31ii
25	.p2align	4, 0x90
26	.type	_Z8helper31ii,@function
27_Z8helper31ii:                          # @_Z8helper31ii
28.Lfunc_begin0:
29	.loc	1 4 0                           # helper2.cpp:4:0
30	.cfi_startproc
31# %bb.0:                                # %entry
32	#DEBUG_VALUE: helper31:z_ <- $edi
33	#DEBUG_VALUE: helper31:d_ <- $esi
34	movl	%esi, %eax
35.Ltmp0:
36	.loc	1 5 5 prologue_end              # helper2.cpp:5:5
37	addl	z1(%rip), %edi
38.Ltmp1:
39	#DEBUG_VALUE: helper31:z_ <- [DW_OP_LLVM_entry_value 1] $edi
40	.loc	1 6 5                           # helper2.cpp:6:5
41	addl	d1(%rip), %eax
42	.loc	1 5 5                           # helper2.cpp:5:5
43	movl	%edi, z1(%rip)
44	.loc	1 6 5                           # helper2.cpp:6:5
45	movl	%eax, d1(%rip)
46	.loc	1 7 12                          # helper2.cpp:7:12
47	imull	%edi, %eax
48	.loc	1 7 2 is_stmt 0                 # helper2.cpp:7:2
49	retq
50.Ltmp2:
51.Lfunc_end0:
52	.size	_Z8helper31ii, .Lfunc_end0-_Z8helper31ii
53	.cfi_endproc
54                                        # -- End function
55	.globl	_Z7helper3ii                    # -- Begin function _Z7helper3ii
56	.p2align	4, 0x90
57	.type	_Z7helper3ii,@function
58_Z7helper3ii:                           # @_Z7helper3ii
59.Lfunc_begin1:
60	.loc	1 14 0 is_stmt 1                # helper2.cpp:14:0
61	.cfi_startproc
62# %bb.0:                                # %entry
63	#DEBUG_VALUE: helper3:z_ <- $edi
64	#DEBUG_VALUE: helper3:d_ <- $esi
65	movl	%esi, %eax
66.Ltmp3:
67	.loc	1 15 4 prologue_end             # helper2.cpp:15:4
68	addl	z(%rip), %edi
69.Ltmp4:
70	#DEBUG_VALUE: helper3:z_ <- [DW_OP_LLVM_entry_value 1] $edi
71	.loc	1 16 4                          # helper2.cpp:16:4
72	addl	d(%rip), %eax
73	.loc	1 15 4                          # helper2.cpp:15:4
74	movl	%edi, z(%rip)
75	.loc	1 16 4                          # helper2.cpp:16:4
76	movl	%eax, d(%rip)
77	.loc	1 17 11                         # helper2.cpp:17:11
78	imull	%edi, %eax
79	.loc	1 17 2 is_stmt 0                # helper2.cpp:17:2
80	retq
81.Ltmp5:
82.Lfunc_end1:
83	.size	_Z7helper3ii, .Lfunc_end1-_Z7helper3ii
84	.cfi_endproc
85                                        # -- End function
86	.type	z1,@object                      # @z1
87	.bss
88	.globl	z1
89	.p2align	2, 0x0
90z1:
91	.long	0                               # 0x0
92	.size	z1, 4
93
94	.type	d1,@object                      # @d1
95	.globl	d1
96	.p2align	2, 0x0
97d1:
98	.long	0                               # 0x0
99	.size	d1, 4
100
101	.type	z,@object                       # @z
102	.globl	z
103	.p2align	2, 0x0
104z:
105	.long	0                               # 0x0
106	.size	z, 4
107
108	.type	d,@object                       # @d
109	.globl	d
110	.p2align	2, 0x0
111d:
112	.long	0                               # 0x0
113	.size	d, 4
114
115	.section	.debug_loc,"",@progbits
116.Ldebug_loc0:
117	.quad	.Lfunc_begin0-.Lfunc_begin0
118	.quad	.Ltmp1-.Lfunc_begin0
119	.short	1                               # Loc expr size
120	.byte	85                              # super-register DW_OP_reg5
121	.quad	.Ltmp1-.Lfunc_begin0
122	.quad	.Lfunc_end0-.Lfunc_begin0
123	.short	4                               # Loc expr size
124	.byte	243                             # DW_OP_GNU_entry_value
125	.byte	1                               # 1
126	.byte	85                              # super-register DW_OP_reg5
127	.byte	159                             # DW_OP_stack_value
128	.quad	0
129	.quad	0
130.Ldebug_loc1:
131	.quad	.Lfunc_begin1-.Lfunc_begin0
132	.quad	.Ltmp4-.Lfunc_begin0
133	.short	1                               # Loc expr size
134	.byte	85                              # super-register DW_OP_reg5
135	.quad	.Ltmp4-.Lfunc_begin0
136	.quad	.Lfunc_end1-.Lfunc_begin0
137	.short	4                               # Loc expr size
138	.byte	243                             # DW_OP_GNU_entry_value
139	.byte	1                               # 1
140	.byte	85                              # super-register DW_OP_reg5
141	.byte	159                             # DW_OP_stack_value
142	.quad	0
143	.quad	0
144	.section	.debug_abbrev,"",@progbits
145	.byte	1                               # Abbreviation Code
146	.byte	17                              # DW_TAG_compile_unit
147	.byte	1                               # DW_CHILDREN_yes
148	.byte	37                              # DW_AT_producer
149	.byte	14                              # DW_FORM_strp
150	.byte	19                              # DW_AT_language
151	.byte	5                               # DW_FORM_data2
152	.byte	3                               # DW_AT_name
153	.byte	14                              # DW_FORM_strp
154	.byte	16                              # DW_AT_stmt_list
155	.byte	23                              # DW_FORM_sec_offset
156	.byte	27                              # DW_AT_comp_dir
157	.byte	14                              # DW_FORM_strp
158	.byte	17                              # DW_AT_low_pc
159	.byte	1                               # DW_FORM_addr
160	.byte	18                              # DW_AT_high_pc
161	.byte	6                               # DW_FORM_data4
162	.byte	0                               # EOM(1)
163	.byte	0                               # EOM(2)
164	.byte	2                               # Abbreviation Code
165	.byte	52                              # DW_TAG_variable
166	.byte	0                               # DW_CHILDREN_no
167	.byte	3                               # DW_AT_name
168	.byte	14                              # DW_FORM_strp
169	.byte	73                              # DW_AT_type
170	.byte	19                              # DW_FORM_ref4
171	.byte	63                              # DW_AT_external
172	.byte	25                              # DW_FORM_flag_present
173	.byte	58                              # DW_AT_decl_file
174	.byte	11                              # DW_FORM_data1
175	.byte	59                              # DW_AT_decl_line
176	.byte	11                              # DW_FORM_data1
177	.byte	2                               # DW_AT_location
178	.byte	24                              # DW_FORM_exprloc
179	.byte	0                               # EOM(1)
180	.byte	0                               # EOM(2)
181	.byte	3                               # Abbreviation Code
182	.byte	36                              # DW_TAG_base_type
183	.byte	0                               # DW_CHILDREN_no
184	.byte	3                               # DW_AT_name
185	.byte	14                              # DW_FORM_strp
186	.byte	62                              # DW_AT_encoding
187	.byte	11                              # DW_FORM_data1
188	.byte	11                              # DW_AT_byte_size
189	.byte	11                              # DW_FORM_data1
190	.byte	0                               # EOM(1)
191	.byte	0                               # EOM(2)
192	.byte	4                               # Abbreviation Code
193	.byte	46                              # DW_TAG_subprogram
194	.byte	1                               # DW_CHILDREN_yes
195	.byte	17                              # DW_AT_low_pc
196	.byte	1                               # DW_FORM_addr
197	.byte	18                              # DW_AT_high_pc
198	.byte	6                               # DW_FORM_data4
199	.byte	64                              # DW_AT_frame_base
200	.byte	24                              # DW_FORM_exprloc
201	.ascii	"\227B"                         # DW_AT_GNU_all_call_sites
202	.byte	25                              # DW_FORM_flag_present
203	.byte	110                             # DW_AT_linkage_name
204	.byte	14                              # DW_FORM_strp
205	.byte	3                               # DW_AT_name
206	.byte	14                              # DW_FORM_strp
207	.byte	58                              # DW_AT_decl_file
208	.byte	11                              # DW_FORM_data1
209	.byte	59                              # DW_AT_decl_line
210	.byte	11                              # DW_FORM_data1
211	.byte	73                              # DW_AT_type
212	.byte	19                              # DW_FORM_ref4
213	.byte	63                              # DW_AT_external
214	.byte	25                              # DW_FORM_flag_present
215	.byte	0                               # EOM(1)
216	.byte	0                               # EOM(2)
217	.byte	5                               # Abbreviation Code
218	.byte	5                               # DW_TAG_formal_parameter
219	.byte	0                               # DW_CHILDREN_no
220	.byte	2                               # DW_AT_location
221	.byte	23                              # DW_FORM_sec_offset
222	.byte	3                               # DW_AT_name
223	.byte	14                              # DW_FORM_strp
224	.byte	58                              # DW_AT_decl_file
225	.byte	11                              # DW_FORM_data1
226	.byte	59                              # DW_AT_decl_line
227	.byte	11                              # DW_FORM_data1
228	.byte	73                              # DW_AT_type
229	.byte	19                              # DW_FORM_ref4
230	.byte	0                               # EOM(1)
231	.byte	0                               # EOM(2)
232	.byte	6                               # Abbreviation Code
233	.byte	5                               # DW_TAG_formal_parameter
234	.byte	0                               # DW_CHILDREN_no
235	.byte	2                               # DW_AT_location
236	.byte	24                              # DW_FORM_exprloc
237	.byte	3                               # DW_AT_name
238	.byte	14                              # DW_FORM_strp
239	.byte	58                              # DW_AT_decl_file
240	.byte	11                              # DW_FORM_data1
241	.byte	59                              # DW_AT_decl_line
242	.byte	11                              # DW_FORM_data1
243	.byte	73                              # DW_AT_type
244	.byte	19                              # DW_FORM_ref4
245	.byte	0                               # EOM(1)
246	.byte	0                               # EOM(2)
247	.byte	0                               # EOM(3)
248	.section	.debug_info,"",@progbits
249.Lcu_begin0:
250	.long	.Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit
251.Ldebug_info_start0:
252	.short	4                               # DWARF version number
253	.long	.debug_abbrev                   # Offset Into Abbrev. Section
254	.byte	8                               # Address Size (in bytes)
255	.byte	1                               # Abbrev [1] 0xb:0xef DW_TAG_compile_unit
256	.long	.Linfo_string0                  # DW_AT_producer
257	.short	33                              # DW_AT_language
258	.long	.Linfo_string1                  # DW_AT_name
259	.long	.Lline_table_start0             # DW_AT_stmt_list
260	.long	.Linfo_string2                  # DW_AT_comp_dir
261	.quad	.Lfunc_begin0                   # DW_AT_low_pc
262	.long	.Lfunc_end1-.Lfunc_begin0       # DW_AT_high_pc
263	.byte	2                               # Abbrev [2] 0x2a:0x15 DW_TAG_variable
264	.long	.Linfo_string3                  # DW_AT_name
265	.long	63                              # DW_AT_type
266                                        # DW_AT_external
267	.byte	1                               # DW_AT_decl_file
268	.byte	1                               # DW_AT_decl_line
269	.byte	9                               # DW_AT_location
270	.byte	3
271	.quad	z1
272	.byte	3                               # Abbrev [3] 0x3f:0x7 DW_TAG_base_type
273	.long	.Linfo_string4                  # DW_AT_name
274	.byte	5                               # DW_AT_encoding
275	.byte	4                               # DW_AT_byte_size
276	.byte	2                               # Abbrev [2] 0x46:0x15 DW_TAG_variable
277	.long	.Linfo_string5                  # DW_AT_name
278	.long	63                              # DW_AT_type
279                                        # DW_AT_external
280	.byte	1                               # DW_AT_decl_file
281	.byte	2                               # DW_AT_decl_line
282	.byte	9                               # DW_AT_location
283	.byte	3
284	.quad	d1
285	.byte	2                               # Abbrev [2] 0x5b:0x15 DW_TAG_variable
286	.long	.Linfo_string6                  # DW_AT_name
287	.long	63                              # DW_AT_type
288                                        # DW_AT_external
289	.byte	1                               # DW_AT_decl_file
290	.byte	11                              # DW_AT_decl_line
291	.byte	9                               # DW_AT_location
292	.byte	3
293	.quad	z
294	.byte	2                               # Abbrev [2] 0x70:0x15 DW_TAG_variable
295	.long	.Linfo_string7                  # DW_AT_name
296	.long	63                              # DW_AT_type
297                                        # DW_AT_external
298	.byte	1                               # DW_AT_decl_file
299	.byte	12                              # DW_AT_decl_line
300	.byte	9                               # DW_AT_location
301	.byte	3
302	.quad	d
303	.byte	4                               # Abbrev [4] 0x85:0x3a DW_TAG_subprogram
304	.quad	.Lfunc_begin0                   # DW_AT_low_pc
305	.long	.Lfunc_end0-.Lfunc_begin0       # DW_AT_high_pc
306	.byte	1                               # DW_AT_frame_base
307	.byte	87
308                                        # DW_AT_GNU_all_call_sites
309	.long	.Linfo_string8                  # DW_AT_linkage_name
310	.long	.Linfo_string9                  # DW_AT_name
311	.byte	1                               # DW_AT_decl_file
312	.byte	4                               # DW_AT_decl_line
313	.long	63                              # DW_AT_type
314                                        # DW_AT_external
315	.byte	5                               # Abbrev [5] 0xa2:0xf DW_TAG_formal_parameter
316	.long	.Ldebug_loc0                    # DW_AT_location
317	.long	.Linfo_string12                 # DW_AT_name
318	.byte	1                               # DW_AT_decl_file
319	.byte	4                               # DW_AT_decl_line
320	.long	63                              # DW_AT_type
321	.byte	6                               # Abbrev [6] 0xb1:0xd DW_TAG_formal_parameter
322	.byte	1                               # DW_AT_location
323	.byte	84
324	.long	.Linfo_string13                 # DW_AT_name
325	.byte	1                               # DW_AT_decl_file
326	.byte	4                               # DW_AT_decl_line
327	.long	63                              # DW_AT_type
328	.byte	0                               # End Of Children Mark
329	.byte	4                               # Abbrev [4] 0xbf:0x3a DW_TAG_subprogram
330	.quad	.Lfunc_begin1                   # DW_AT_low_pc
331	.long	.Lfunc_end1-.Lfunc_begin1       # DW_AT_high_pc
332	.byte	1                               # DW_AT_frame_base
333	.byte	87
334                                        # DW_AT_GNU_all_call_sites
335	.long	.Linfo_string10                 # DW_AT_linkage_name
336	.long	.Linfo_string11                 # DW_AT_name
337	.byte	1                               # DW_AT_decl_file
338	.byte	14                              # DW_AT_decl_line
339	.long	63                              # DW_AT_type
340                                        # DW_AT_external
341	.byte	5                               # Abbrev [5] 0xdc:0xf DW_TAG_formal_parameter
342	.long	.Ldebug_loc1                    # DW_AT_location
343	.long	.Linfo_string12                 # DW_AT_name
344	.byte	1                               # DW_AT_decl_file
345	.byte	14                              # DW_AT_decl_line
346	.long	63                              # DW_AT_type
347	.byte	6                               # Abbrev [6] 0xeb:0xd DW_TAG_formal_parameter
348	.byte	1                               # DW_AT_location
349	.byte	84
350	.long	.Linfo_string13                 # DW_AT_name
351	.byte	1                               # DW_AT_decl_file
352	.byte	14                              # DW_AT_decl_line
353	.long	63                              # DW_AT_type
354	.byte	0                               # End Of Children Mark
355	.byte	0                               # End Of Children Mark
356.Ldebug_info_end0:
357	.section	.debug_str,"MS",@progbits,1
358.Linfo_string0:
359	.asciz	"clang version 18.0.0 (git@github.com:llvm/llvm-project.git 37d6c1cc7d4dd3a8a47ba62254bc88521bd50d66)" # string offset=0
360.Linfo_string1:
361	.asciz	"helper2.cpp"                   # string offset=101
362.Linfo_string2:
363	.asciz	"/dwarf4CrossCULocList" # string offset=113
364.Linfo_string3:
365	.asciz	"z1"                            # string offset=172
366.Linfo_string4:
367	.asciz	"int"                           # string offset=175
368.Linfo_string5:
369	.asciz	"d1"                            # string offset=179
370.Linfo_string6:
371	.asciz	"z"                             # string offset=182
372.Linfo_string7:
373	.asciz	"d"                             # string offset=184
374.Linfo_string8:
375	.asciz	"_Z8helper31ii"                 # string offset=186
376.Linfo_string9:
377	.asciz	"helper31"                      # string offset=200
378.Linfo_string10:
379	.asciz	"_Z7helper3ii"                  # string offset=209
380.Linfo_string11:
381	.asciz	"helper3"                       # string offset=222
382.Linfo_string12:
383	.asciz	"z_"                            # string offset=230
384.Linfo_string13:
385	.asciz	"d_"                            # string offset=233
386	.ident	"clang version 18.0.0 (git@github.com:llvm/llvm-project.git 37d6c1cc7d4dd3a8a47ba62254bc88521bd50d66)"
387	.section	".note.GNU-stack","",@progbits
388	.addrsig
389	.section	.debug_line,"",@progbits
390.Lline_table_start0:
391