xref: /llvm-project/bolt/test/X86/Inputs/dwarf5-locexpr-referrence-helper.s (revision c33536e9c3068ae45f34f6e1c562d51cb8aa702a)
1# Assembly generated from convert-linked.ll
2	.text
3	.file	"main.ll"
4	.globl	foo                             # -- Begin function foo
5	.p2align	4, 0x90
6	.type	foo,@function
7foo:                                    # @foo
8.Lfunc_begin0:
9	.file	1 "/tmp" "dbg-foo.c" md5 0xb35f80a032deb2a30bc187d564b5a775
10	.loc	1 8 0                           # dbg-foo.c:8:0
11	.cfi_startproc
12# %bb.0:                                # %entry
13	movb	%dil, %al
14.Ltmp0:
15	#DEBUG_VALUE: foo:x <- $al
16	#DEBUG_VALUE: foo:y <- [DW_OP_lit0, DW_OP_plus, DW_OP_LLVM_convert 8 5, DW_OP_LLVM_convert 32 5, DW_OP_stack_value] 32
17	.loc	1 10 3 prologue_end             # dbg-foo.c:10:3
18	movsbl	%al, %eax
19.Ltmp1:
20	retq
21.Ltmp2:
22.Lfunc_end0:
23	.size	foo, .Lfunc_end0-foo
24	.cfi_endproc
25                                        # -- End function
26	.globl	bar                             # -- Begin function bar
27	.p2align	4, 0x90
28	.type	bar,@function
29bar:                                    # @bar
30.Lfunc_begin1:
31	.file	2 "/tmp" "dbg-bar.c" md5 0x9836bb594260d883960455e7d8bc51ea
32	.loc	2 2 0                           # dbg-bar.c:2:0
33	.cfi_startproc
34# %bb.0:                                # %entry
35	movb	%dil, %al
36.Ltmp3:
37	#DEBUG_VALUE: bar:x <- $al
38	#DEBUG_VALUE: bar:z <- [DW_OP_lit0, DW_OP_plus, DW_OP_LLVM_convert 8 5, DW_OP_LLVM_convert 16 5, DW_OP_stack_value] 32
39	.loc	2 4 3 prologue_end              # dbg-bar.c:4:3
40	movsbl	%al, %eax
41.Ltmp4:
42	retq
43.Ltmp5:
44.Lfunc_end1:
45	.size	bar, .Lfunc_end1-bar
46	.cfi_endproc
47                                        # -- End function
48	.section	.debug_loclists,"",@progbits
49	.long	.Ldebug_list_header_end0-.Ldebug_list_header_start0 # Length
50.Ldebug_list_header_start0:
51	.short	5                               # Version
52	.byte	8                               # Address size
53	.byte	0                               # Segment selector size
54	.long	2                               # Offset entry count
55.Lloclists_table_base0:
56	.long	.Ldebug_loc0-.Lloclists_table_base0
57	.long	.Ldebug_loc1-.Lloclists_table_base0
58.Ldebug_loc0:
59	.byte	4                               # DW_LLE_offset_pair
60	.uleb128 .Ltmp0-.Lfunc_begin0           #   starting offset
61	.uleb128 .Ltmp1-.Lfunc_begin0           #   ending offset
62	.byte	1                               # Loc expr size
63	.byte	80                              # super-register DW_OP_reg0
64	.byte	0                               # DW_LLE_end_of_list
65.Ldebug_loc1:
66	.byte	4                               # DW_LLE_offset_pair
67	.uleb128 .Ltmp3-.Lfunc_begin1           #   starting offset
68	.uleb128 .Ltmp4-.Lfunc_begin1           #   ending offset
69	.byte	1                               # Loc expr size
70	.byte	80                              # super-register DW_OP_reg0
71	.byte	0                               # DW_LLE_end_of_list
72.Ldebug_list_header_end0:
73	.section	.debug_abbrev,"",@progbits
74	.byte	1                               # Abbreviation Code
75	.byte	17                              # DW_TAG_compile_unit
76	.byte	1                               # DW_CHILDREN_yes
77	.byte	37                              # DW_AT_producer
78	.byte	37                              # DW_FORM_strx1
79	.byte	19                              # DW_AT_language
80	.byte	5                               # DW_FORM_data2
81	.byte	3                               # DW_AT_name
82	.byte	37                              # DW_FORM_strx1
83	.byte	114                             # DW_AT_str_offsets_base
84	.byte	23                              # DW_FORM_sec_offset
85	.byte	16                              # DW_AT_stmt_list
86	.byte	23                              # DW_FORM_sec_offset
87	.byte	27                              # DW_AT_comp_dir
88	.byte	37                              # DW_FORM_strx1
89	.byte	17                              # DW_AT_low_pc
90	.byte	27                              # DW_FORM_addrx
91	.byte	18                              # DW_AT_high_pc
92	.byte	6                               # DW_FORM_data4
93	.byte	115                             # DW_AT_addr_base
94	.byte	23                              # DW_FORM_sec_offset
95	.ascii	"\214\001"                      # DW_AT_loclists_base
96	.byte	23                              # DW_FORM_sec_offset
97	.byte	0                               # EOM(1)
98	.byte	0                               # EOM(2)
99	.byte	2                               # Abbreviation Code
100	.byte	36                              # DW_TAG_base_type
101	.byte	0                               # DW_CHILDREN_no
102	.byte	3                               # DW_AT_name
103	.byte	37                              # DW_FORM_strx1
104	.byte	62                              # DW_AT_encoding
105	.byte	11                              # DW_FORM_data1
106	.byte	11                              # DW_AT_byte_size
107	.byte	11                              # DW_FORM_data1
108	.byte	0                               # EOM(1)
109	.byte	0                               # EOM(2)
110	.byte	3                               # Abbreviation Code
111	.byte	46                              # DW_TAG_subprogram
112	.byte	1                               # DW_CHILDREN_yes
113	.byte	17                              # DW_AT_low_pc
114	.byte	27                              # DW_FORM_addrx
115	.byte	18                              # DW_AT_high_pc
116	.byte	6                               # DW_FORM_data4
117	.byte	64                              # DW_AT_frame_base
118	.byte	24                              # DW_FORM_exprloc
119	.byte	3                               # DW_AT_name
120	.byte	37                              # DW_FORM_strx1
121	.byte	58                              # DW_AT_decl_file
122	.byte	11                              # DW_FORM_data1
123	.byte	59                              # DW_AT_decl_line
124	.byte	11                              # DW_FORM_data1
125	.byte	39                              # DW_AT_prototyped
126	.byte	25                              # DW_FORM_flag_present
127	.byte	73                              # DW_AT_type
128	.byte	19                              # DW_FORM_ref4
129	.byte	63                              # DW_AT_external
130	.byte	25                              # DW_FORM_flag_present
131	.byte	0                               # EOM(1)
132	.byte	0                               # EOM(2)
133	.byte	4                               # Abbreviation Code
134	.byte	5                               # DW_TAG_formal_parameter
135	.byte	0                               # DW_CHILDREN_no
136	.byte	2                               # DW_AT_location
137	.byte	34                              # DW_FORM_loclistx
138	.byte	3                               # DW_AT_name
139	.byte	37                              # DW_FORM_strx1
140	.byte	58                              # DW_AT_decl_file
141	.byte	11                              # DW_FORM_data1
142	.byte	59                              # DW_AT_decl_line
143	.byte	11                              # DW_FORM_data1
144	.byte	73                              # DW_AT_type
145	.byte	19                              # DW_FORM_ref4
146	.byte	0                               # EOM(1)
147	.byte	0                               # EOM(2)
148	.byte	5                               # Abbreviation Code
149	.byte	52                              # DW_TAG_variable
150	.byte	0                               # DW_CHILDREN_no
151	.byte	2                               # DW_AT_location
152	.byte	24                              # DW_FORM_exprloc
153	.byte	3                               # DW_AT_name
154	.byte	37                              # DW_FORM_strx1
155	.byte	58                              # DW_AT_decl_file
156	.byte	11                              # DW_FORM_data1
157	.byte	59                              # DW_AT_decl_line
158	.byte	11                              # DW_FORM_data1
159	.byte	73                              # DW_AT_type
160	.byte	19                              # DW_FORM_ref4
161	.byte	0                               # EOM(1)
162	.byte	0                               # EOM(2)
163	.byte	6                               # Abbreviation Code
164	.byte	46                              # DW_TAG_subprogram
165	.byte	1                               # DW_CHILDREN_yes
166	.byte	17                              # DW_AT_low_pc
167	.byte	27                              # DW_FORM_addrx
168	.byte	18                              # DW_AT_high_pc
169	.byte	6                               # DW_FORM_data4
170	.byte	64                              # DW_AT_frame_base
171	.byte	24                              # DW_FORM_exprloc
172	.byte	3                               # DW_AT_name
173	.byte	37                              # DW_FORM_strx1
174	.byte	58                              # DW_AT_decl_file
175	.byte	11                              # DW_FORM_data1
176	.byte	59                              # DW_AT_decl_line
177	.byte	11                              # DW_FORM_data1
178	.byte	39                              # DW_AT_prototyped
179	.byte	25                              # DW_FORM_flag_present
180	.byte	73                              # DW_AT_type
181	.byte	16                              # DW_FORM_ref_addr
182	.byte	63                              # DW_AT_external
183	.byte	25                              # DW_FORM_flag_present
184	.byte	0                               # EOM(1)
185	.byte	0                               # EOM(2)
186	.byte	7                               # Abbreviation Code
187	.byte	5                               # DW_TAG_formal_parameter
188	.byte	0                               # DW_CHILDREN_no
189	.byte	2                               # DW_AT_location
190	.byte	34                              # DW_FORM_loclistx
191	.byte	3                               # DW_AT_name
192	.byte	37                              # DW_FORM_strx1
193	.byte	58                              # DW_AT_decl_file
194	.byte	11                              # DW_FORM_data1
195	.byte	59                              # DW_AT_decl_line
196	.byte	11                              # DW_FORM_data1
197	.byte	73                              # DW_AT_type
198	.byte	16                              # DW_FORM_ref_addr
199	.byte	0                               # EOM(1)
200	.byte	0                               # EOM(2)
201	.byte	0                               # EOM(3)
202	.section	.debug_info,"",@progbits
203.Lcu_begin0:
204	.long	.Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit
205.Ldebug_info_start0:
206	.short	5                               # DWARF version number
207	.byte	1                               # DWARF Unit Type
208	.byte	8                               # Address Size (in bytes)
209	.long	.debug_abbrev                   # Offset Into Abbrev. Section
210	.byte	1                               # Abbrev [1] 0xc:0x5d DW_TAG_compile_unit
211	.byte	0                               # DW_AT_producer
212	.short	12                              # DW_AT_language
213	.byte	1                               # DW_AT_name
214	.long	.Lstr_offsets_base0             # DW_AT_str_offsets_base
215	.long	.Lline_table_start0             # DW_AT_stmt_list
216	.byte	2                               # DW_AT_comp_dir
217	.byte	0                               # DW_AT_low_pc
218	.long	.Lfunc_end0-.Lfunc_begin0       # DW_AT_high_pc
219	.long	.Laddr_table_base0              # DW_AT_addr_base
220	.long	.Lloclists_table_base0          # DW_AT_loclists_base
221	.byte	2                               # Abbrev [2] 0x27:0x4 DW_TAG_base_type
222	.byte	5                               # DW_AT_name
223	.byte	5                               # DW_AT_encoding
224	.byte	1                               # DW_AT_byte_size
225	.byte	2                               # Abbrev [2] 0x2b:0x4 DW_TAG_base_type
226	.byte	4                               # DW_AT_name
227	.byte	5                               # DW_AT_encoding
228	.byte	4                               # DW_AT_byte_size
229	.byte	3                               # Abbrev [3] 0x2f:0x31 DW_TAG_subprogram
230	.byte	0                               # DW_AT_low_pc
231	.long	.Lfunc_end0-.Lfunc_begin0       # DW_AT_high_pc
232	.byte	1                               # DW_AT_frame_base
233	.byte	87
234	.byte	7                               # DW_AT_name
235	.byte	1                               # DW_AT_decl_file
236	.byte	7                               # DW_AT_decl_line
237                                        # DW_AT_prototyped
238	.long	96                              # DW_AT_type
239                                        # DW_AT_external
240	.byte	4                               # Abbrev [4] 0x3e:0x9 DW_TAG_formal_parameter
241	.byte	0                               # DW_AT_location
242	.byte	10                              # DW_AT_name
243	.byte	1                               # DW_AT_decl_file
244	.byte	7                               # DW_AT_decl_line
245	.long	96                              # DW_AT_type
246	.byte	5                               # Abbrev [5] 0x47:0x18 DW_TAG_variable
247	.byte	15                              # DW_AT_location
248	.byte	16
249	.byte	32
250	.byte	48
251	.byte	34
252	.byte	168
253	.asciz	"\247\200\200"
254	.byte	168
255	.asciz	"\253\200\200"
256	.byte	159
257	.byte	11                              # DW_AT_name
258	.byte	1                               # DW_AT_decl_file
259	.byte	9                               # DW_AT_decl_line
260	.long	100                             # DW_AT_type
261	.byte	0                               # End Of Children Mark
262	.byte	2                               # Abbrev [2] 0x60:0x4 DW_TAG_base_type
263	.byte	8                               # DW_AT_name
264	.byte	6                               # DW_AT_encoding
265	.byte	1                               # DW_AT_byte_size
266	.byte	2                               # Abbrev [2] 0x64:0x4 DW_TAG_base_type
267	.byte	12                              # DW_AT_name
268	.byte	5                               # DW_AT_encoding
269	.byte	4                               # DW_AT_byte_size
270	.byte	0                               # End Of Children Mark
271.Ldebug_info_end0:
272.Lcu_begin1:
273	.long	.Ldebug_info_end1-.Ldebug_info_start1 # Length of Unit
274.Ldebug_info_start1:
275	.short	5                               # DWARF version number
276	.byte	1                               # DWARF Unit Type
277	.byte	8                               # Address Size (in bytes)
278	.long	.debug_abbrev                   # Offset Into Abbrev. Section
279	.byte	1                               # Abbrev [1] 0xc:0x59 DW_TAG_compile_unit
280	.byte	0                               # DW_AT_producer
281	.short	12                              # DW_AT_language
282	.byte	3                               # DW_AT_name
283	.long	.Lstr_offsets_base0             # DW_AT_str_offsets_base
284	.long	.Lline_table_start0             # DW_AT_stmt_list
285	.byte	2                               # DW_AT_comp_dir
286	.byte	1                               # DW_AT_low_pc
287	.long	.Lfunc_end1-.Lfunc_begin1       # DW_AT_high_pc
288	.long	.Laddr_table_base0              # DW_AT_addr_base
289	.long	.Lloclists_table_base0          # DW_AT_loclists_base
290	.byte	2                               # Abbrev [2] 0x27:0x4 DW_TAG_base_type
291	.byte	5                               # DW_AT_name
292	.byte	5                               # DW_AT_encoding
293	.byte	1                               # DW_AT_byte_size
294	.byte	2                               # Abbrev [2] 0x2b:0x4 DW_TAG_base_type
295	.byte	6                               # DW_AT_name
296	.byte	5                               # DW_AT_encoding
297	.byte	2                               # DW_AT_byte_size
298	.byte	6                               # Abbrev [6] 0x2f:0x31 DW_TAG_subprogram
299	.byte	1                               # DW_AT_low_pc
300	.long	.Lfunc_end1-.Lfunc_begin1       # DW_AT_high_pc
301	.byte	1                               # DW_AT_frame_base
302	.byte	87
303	.byte	9                               # DW_AT_name
304	.byte	2                               # DW_AT_decl_file
305	.byte	1                               # DW_AT_decl_line
306                                        # DW_AT_prototyped
307	.long	.debug_info+96                  # DW_AT_type
308                                        # DW_AT_external
309	.byte	7                               # Abbrev [7] 0x3e:0x9 DW_TAG_formal_parameter
310	.byte	1                               # DW_AT_location
311	.byte	10                              # DW_AT_name
312	.byte	2                               # DW_AT_decl_file
313	.byte	1                               # DW_AT_decl_line
314	.long	.debug_info+96                  # DW_AT_type
315	.byte	5                               # Abbrev [5] 0x47:0x18 DW_TAG_variable
316	.byte	15                              # DW_AT_location
317	.byte	16
318	.byte	32
319	.byte	48
320	.byte	34
321	.byte	168
322	.asciz	"\247\200\200"
323	.byte	168
324	.asciz	"\253\200\200"
325	.byte	159
326	.byte	13                              # DW_AT_name
327	.byte	2                               # DW_AT_decl_file
328	.byte	3                               # DW_AT_decl_line
329	.long	96                              # DW_AT_type
330	.byte	0                               # End Of Children Mark
331	.byte	2                               # Abbrev [2] 0x60:0x4 DW_TAG_base_type
332	.byte	14                              # DW_AT_name
333	.byte	5                               # DW_AT_encoding
334	.byte	2                               # DW_AT_byte_size
335	.byte	0                               # End Of Children Mark
336.Ldebug_info_end1:
337	.section	.debug_str_offsets,"",@progbits
338	.long	64                              # Length of String Offsets Set
339	.short	5
340	.short	0
341.Lstr_offsets_base0:
342	.section	.debug_str,"MS",@progbits,1
343.Linfo_string0:
344	.asciz	"clang version 9.0.0 "          # string offset=0
345.Linfo_string1:
346	.asciz	"dbg-foo.c"                     # string offset=21
347.Linfo_string2:
348	.asciz	"/tmp"                          # string offset=31
349.Linfo_string3:
350	.asciz	"dbg-bar.c"                     # string offset=36
351.Linfo_string4:
352	.asciz	"DW_ATE_signed_32"              # string offset=46
353.Linfo_string5:
354	.asciz	"DW_ATE_signed_8"               # string offset=63
355.Linfo_string6:
356	.asciz	"DW_ATE_signed_16"              # string offset=79
357.Linfo_string7:
358	.asciz	"foo"                           # string offset=96
359.Linfo_string8:
360	.asciz	"signed char"                   # string offset=100
361.Linfo_string9:
362	.asciz	"bar"                           # string offset=112
363.Linfo_string10:
364	.asciz	"x"                             # string offset=116
365.Linfo_string11:
366	.asciz	"y"                             # string offset=118
367.Linfo_string12:
368	.asciz	"int"                           # string offset=120
369.Linfo_string13:
370	.asciz	"z"                             # string offset=124
371.Linfo_string14:
372	.asciz	"short"                         # string offset=126
373	.section	.debug_str_offsets,"",@progbits
374	.long	.Linfo_string0
375	.long	.Linfo_string1
376	.long	.Linfo_string2
377	.long	.Linfo_string3
378	.long	.Linfo_string4
379	.long	.Linfo_string5
380	.long	.Linfo_string6
381	.long	.Linfo_string7
382	.long	.Linfo_string8
383	.long	.Linfo_string9
384	.long	.Linfo_string10
385	.long	.Linfo_string11
386	.long	.Linfo_string12
387	.long	.Linfo_string13
388	.long	.Linfo_string14
389	.section	.debug_addr,"",@progbits
390	.long	.Ldebug_addr_end0-.Ldebug_addr_start0 # Length of contribution
391.Ldebug_addr_start0:
392	.short	5                               # DWARF version number
393	.byte	8                               # Address size
394	.byte	0                               # Segment selector size
395.Laddr_table_base0:
396	.quad	.Lfunc_begin0
397	.quad	.Lfunc_begin1
398.Ldebug_addr_end0:
399	.ident	"clang version 9.0.0 "
400	.ident	"clang version 9.0.0 "
401	.section	".note.GNU-stack","",@progbits
402	.section	.debug_line,"",@progbits
403.Lline_table_start0:
404