xref: /llvm-project/bolt/test/X86/Inputs/dwarf4-df-dualcu-helper.s (revision e51a6b7374ca2d11e07375843bf24ef51307308a)
1# clang++ -g -gdwarf-4 -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	1 "." "helper.cpp"
15	.globl	_Z6helperii                     # -- Begin function _Z6helperii
16	.p2align	4, 0x90
17	.type	_Z6helperii,@function
18_Z6helperii:                            # @_Z6helperii
19.Lfunc_begin0:
20	.loc	1 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	1 5 7 prologue_end              # helper.cpp:5:7
32	movl	-4(%rbp), %eax
33	.loc	1 5 4 is_stmt 0                 # helper.cpp:5:4
34	addl	z, %eax
35	movl	%eax, z
36	.loc	1 6 7 is_stmt 1                 # helper.cpp:6:7
37	movl	-8(%rbp), %eax
38	.loc	1 6 4 is_stmt 0                 # helper.cpp:6:4
39	addl	d, %eax
40	movl	%eax, d
41	.loc	1 7 9 is_stmt 1                 # helper.cpp:7:9
42	movl	z, %eax
43	.loc	1 7 11 is_stmt 0                # helper.cpp:7:11
44	imull	d, %eax
45	.loc	1 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	0                               # DW_CHILDREN_no
73	.byte	16                              # DW_AT_stmt_list
74	.byte	23                              # DW_FORM_sec_offset
75	.byte	27                              # DW_AT_comp_dir
76	.byte	14                              # DW_FORM_strp
77	.ascii	"\260B"                         # DW_AT_GNU_dwo_name
78	.byte	14                              # DW_FORM_strp
79	.ascii	"\261B"                         # DW_AT_GNU_dwo_id
80	.byte	7                               # DW_FORM_data8
81	.byte	17                              # DW_AT_low_pc
82	.byte	1                               # DW_FORM_addr
83	.byte	18                              # DW_AT_high_pc
84	.byte	6                               # DW_FORM_data4
85	.ascii	"\263B"                         # DW_AT_GNU_addr_base
86	.byte	23                              # DW_FORM_sec_offset
87	.byte	0                               # EOM(1)
88	.byte	0                               # EOM(2)
89	.byte	0                               # EOM(3)
90	.section	.debug_info,"",@progbits
91.Lcu_begin0:
92	.long	.Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit
93.Ldebug_info_start0:
94	.short	4                               # DWARF version number
95	.long	.debug_abbrev                   # Offset Into Abbrev. Section
96	.byte	8                               # Address Size (in bytes)
97	.byte	1                               # Abbrev [1] 0xb:0x25 DW_TAG_compile_unit
98	.long	.Lline_table_start0             # DW_AT_stmt_list
99	.long	.Lskel_string0                  # DW_AT_comp_dir
100	.long	.Lskel_string1                  # DW_AT_GNU_dwo_name
101	.quad	9133088002243470176             # DW_AT_GNU_dwo_id
102	.quad	.Lfunc_begin0                   # DW_AT_low_pc
103	.long	.Lfunc_end0-.Lfunc_begin0       # DW_AT_high_pc
104	.long	.Laddr_table_base0              # DW_AT_GNU_addr_base
105.Ldebug_info_end0:
106	.section	.debug_str,"MS",@progbits,1
107.Lskel_string0:
108	.asciz	"."                             # string offset=0
109.Lskel_string1:
110	.asciz	"helper.dwo"                    # string offset=2
111	.section	.debug_str.dwo,"eMS",@progbits,1
112.Linfo_string0:
113	.asciz	"z"                             # string offset=0
114.Linfo_string1:
115	.asciz	"int"                           # string offset=2
116.Linfo_string2:
117	.asciz	"d"                             # string offset=6
118.Linfo_string3:
119	.asciz	"_Z6helperii"                   # string offset=8
120.Linfo_string4:
121	.asciz	"helper"                        # string offset=20
122.Linfo_string5:
123	.asciz	"z_"                            # string offset=27
124.Linfo_string6:
125	.asciz	"d_"                            # string offset=30
126.Linfo_string7:
127	.asciz	"clang version 15.0.0"          # string offset=33
128.Linfo_string8:
129	.asciz	"helper.cpp"                    # string offset=54
130.Linfo_string9:
131	.asciz	"helper.dwo"                    # string offset=65
132	.section	.debug_str_offsets.dwo,"e",@progbits
133	.long	0
134	.long	2
135	.long	6
136	.long	8
137	.long	20
138	.long	27
139	.long	30
140	.long	33
141	.long	54
142	.long	65
143	.section	.debug_info.dwo,"e",@progbits
144	.long	.Ldebug_info_dwo_end0-.Ldebug_info_dwo_start0 # Length of Unit
145.Ldebug_info_dwo_start0:
146	.short	4                               # DWARF version number
147	.long	0                               # Offset Into Abbrev. Section
148	.byte	8                               # Address Size (in bytes)
149	.byte	1                               # Abbrev [1] 0xb:0x50 DW_TAG_compile_unit
150	.byte	7                               # DW_AT_producer
151	.short	33                              # DW_AT_language
152	.byte	8                               # DW_AT_name
153	.byte	9                               # DW_AT_GNU_dwo_name
154	.quad	9133088002243470176             # DW_AT_GNU_dwo_id
155	.byte	2                               # Abbrev [2] 0x19:0xb DW_TAG_variable
156	.byte	0                               # DW_AT_name
157	.long	36                              # DW_AT_type
158                                        # DW_AT_external
159	.byte	1                               # DW_AT_decl_file
160	.byte	1                               # DW_AT_decl_line
161	.byte	2                               # DW_AT_location
162	.byte	251
163	.byte	0
164	.byte	3                               # Abbrev [3] 0x24:0x4 DW_TAG_base_type
165	.byte	1                               # DW_AT_name
166	.byte	5                               # DW_AT_encoding
167	.byte	4                               # DW_AT_byte_size
168	.byte	2                               # Abbrev [2] 0x28:0xb DW_TAG_variable
169	.byte	2                               # DW_AT_name
170	.long	36                              # DW_AT_type
171                                        # DW_AT_external
172	.byte	1                               # DW_AT_decl_file
173	.byte	2                               # DW_AT_decl_line
174	.byte	2                               # DW_AT_location
175	.byte	251
176	.byte	1
177	.byte	4                               # Abbrev [4] 0x33:0x27 DW_TAG_subprogram
178	.byte	2                               # DW_AT_low_pc
179	.long	.Lfunc_end0-.Lfunc_begin0       # DW_AT_high_pc
180	.byte	1                               # DW_AT_frame_base
181	.byte	86
182	.byte	3                               # DW_AT_linkage_name
183	.byte	4                               # DW_AT_name
184	.byte	1                               # DW_AT_decl_file
185	.byte	4                               # DW_AT_decl_line
186	.long	36                              # DW_AT_type
187                                        # DW_AT_external
188	.byte	5                               # Abbrev [5] 0x43:0xb DW_TAG_formal_parameter
189	.byte	2                               # DW_AT_location
190	.byte	145
191	.byte	124
192	.byte	5                               # DW_AT_name
193	.byte	1                               # DW_AT_decl_file
194	.byte	4                               # DW_AT_decl_line
195	.long	36                              # DW_AT_type
196	.byte	5                               # Abbrev [5] 0x4e:0xb DW_TAG_formal_parameter
197	.byte	2                               # DW_AT_location
198	.byte	145
199	.byte	120
200	.byte	6                               # DW_AT_name
201	.byte	1                               # DW_AT_decl_file
202	.byte	4                               # DW_AT_decl_line
203	.long	36                              # DW_AT_type
204	.byte	0                               # End Of Children Mark
205	.byte	0                               # End Of Children Mark
206.Ldebug_info_dwo_end0:
207	.section	.debug_abbrev.dwo,"e",@progbits
208	.byte	1                               # Abbreviation Code
209	.byte	17                              # DW_TAG_compile_unit
210	.byte	1                               # DW_CHILDREN_yes
211	.byte	37                              # DW_AT_producer
212	.ascii	"\202>"                         # DW_FORM_GNU_str_index
213	.byte	19                              # DW_AT_language
214	.byte	5                               # DW_FORM_data2
215	.byte	3                               # DW_AT_name
216	.ascii	"\202>"                         # DW_FORM_GNU_str_index
217	.ascii	"\260B"                         # DW_AT_GNU_dwo_name
218	.ascii	"\202>"                         # DW_FORM_GNU_str_index
219	.ascii	"\261B"                         # DW_AT_GNU_dwo_id
220	.byte	7                               # DW_FORM_data8
221	.byte	0                               # EOM(1)
222	.byte	0                               # EOM(2)
223	.byte	2                               # Abbreviation Code
224	.byte	52                              # DW_TAG_variable
225	.byte	0                               # DW_CHILDREN_no
226	.byte	3                               # DW_AT_name
227	.ascii	"\202>"                         # DW_FORM_GNU_str_index
228	.byte	73                              # DW_AT_type
229	.byte	19                              # DW_FORM_ref4
230	.byte	63                              # DW_AT_external
231	.byte	25                              # DW_FORM_flag_present
232	.byte	58                              # DW_AT_decl_file
233	.byte	11                              # DW_FORM_data1
234	.byte	59                              # DW_AT_decl_line
235	.byte	11                              # DW_FORM_data1
236	.byte	2                               # DW_AT_location
237	.byte	24                              # DW_FORM_exprloc
238	.byte	0                               # EOM(1)
239	.byte	0                               # EOM(2)
240	.byte	3                               # Abbreviation Code
241	.byte	36                              # DW_TAG_base_type
242	.byte	0                               # DW_CHILDREN_no
243	.byte	3                               # DW_AT_name
244	.ascii	"\202>"                         # DW_FORM_GNU_str_index
245	.byte	62                              # DW_AT_encoding
246	.byte	11                              # DW_FORM_data1
247	.byte	11                              # DW_AT_byte_size
248	.byte	11                              # DW_FORM_data1
249	.byte	0                               # EOM(1)
250	.byte	0                               # EOM(2)
251	.byte	4                               # Abbreviation Code
252	.byte	46                              # DW_TAG_subprogram
253	.byte	1                               # DW_CHILDREN_yes
254	.byte	17                              # DW_AT_low_pc
255	.ascii	"\201>"                         # DW_FORM_GNU_addr_index
256	.byte	18                              # DW_AT_high_pc
257	.byte	6                               # DW_FORM_data4
258	.byte	64                              # DW_AT_frame_base
259	.byte	24                              # DW_FORM_exprloc
260	.byte	110                             # DW_AT_linkage_name
261	.ascii	"\202>"                         # DW_FORM_GNU_str_index
262	.byte	3                               # DW_AT_name
263	.ascii	"\202>"                         # DW_FORM_GNU_str_index
264	.byte	58                              # DW_AT_decl_file
265	.byte	11                              # DW_FORM_data1
266	.byte	59                              # DW_AT_decl_line
267	.byte	11                              # DW_FORM_data1
268	.byte	73                              # DW_AT_type
269	.byte	19                              # DW_FORM_ref4
270	.byte	63                              # DW_AT_external
271	.byte	25                              # DW_FORM_flag_present
272	.byte	0                               # EOM(1)
273	.byte	0                               # EOM(2)
274	.byte	5                               # Abbreviation Code
275	.byte	5                               # DW_TAG_formal_parameter
276	.byte	0                               # DW_CHILDREN_no
277	.byte	2                               # DW_AT_location
278	.byte	24                              # DW_FORM_exprloc
279	.byte	3                               # DW_AT_name
280	.ascii	"\202>"                         # DW_FORM_GNU_str_index
281	.byte	58                              # DW_AT_decl_file
282	.byte	11                              # DW_FORM_data1
283	.byte	59                              # DW_AT_decl_line
284	.byte	11                              # DW_FORM_data1
285	.byte	73                              # DW_AT_type
286	.byte	19                              # DW_FORM_ref4
287	.byte	0                               # EOM(1)
288	.byte	0                               # EOM(2)
289	.byte	0                               # EOM(3)
290	.section	.debug_addr,"",@progbits
291.Laddr_table_base0:
292	.quad	z
293	.quad	d
294	.quad	.Lfunc_begin0
295	.ident	"clang version 15.0.0"
296	.section	".note.GNU-stack","",@progbits
297	.section	.debug_line,"",@progbits
298.Lline_table_start0:
299