x86_64-tailcall-only.S revision 1.1.1.2
1/* This testcase is part of GDB, the GNU debugger.
2
3   Copyright 2016-2017 Free Software Foundation, Inc.
4
5   This program is free software; you can redistribute it and/or modify
6   it under the terms of the GNU General Public License as published by
7   the Free Software Foundation; either version 3 of the License, or
8   (at your option) any later version.
9
10   This program is distributed in the hope that it will be useful,
11   but WITHOUT ANY WARRANTY; without even the implied warranty of
12   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13   GNU General Public License for more details.
14
15   You should have received a copy of the GNU General Public License
16   along with this program.  If not, see <http://www.gnu.org/licenses/>.
17
18
19   This file has been generated using:
20   gcc -S -O2 -dA -g tailcall-only.c -o x86_64-tailcall-only.S  */
21
22	.file	"tailcall-only.c"
23	.text
24.Ltext0:
25	.p2align 4,,15
26	.type	bar_1, @function
27bar_1:
28.LFB0:
29	.file 1 "tailcall-only.c"
30	# tailcall-only.c:22
31	.loc 1 22 0
32	.cfi_startproc
33# BLOCK 2 freq:10000 seq:0
34# PRED: ENTRY [100.0%]  (FALLTHRU)
35	# tailcall-only.c:24
36	.loc 1 24 0
37	movl	$42, %eax
38# SUCC: EXIT [100.0%]
39	ret
40	.cfi_endproc
41.LFE0:
42	.size	bar_1, .-bar_1
43	.p2align 4,,15
44	.type	bar, @function
45bar:
46.LFB1:
47	# tailcall-only.c:28
48	.loc 1 28 0
49	.cfi_startproc
50# BLOCK 2 freq:10000 seq:0
51# PRED: ENTRY [100.0%]  (FALLTHRU)
52	# tailcall-only.c:29
53	.loc 1 29 0
54	jmp	bar_1
55# SUCC: EXIT [100.0%]  (ABNORMAL,SIBCALL)
56.LVL0:
57	.cfi_endproc
58.LFE1:
59	.size	bar, .-bar
60	.p2align 4,,15
61	.type	foo_1, @function
62foo_1:
63.LFB2:
64	# tailcall-only.c:34
65	.loc 1 34 0
66	.cfi_startproc
67# BLOCK 2 freq:10000 seq:0
68# PRED: ENTRY [100.0%]  (FALLTHRU)
69	# tailcall-only.c:35
70	.loc 1 35 0
71	jmp	bar
72# SUCC: EXIT [100.0%]  (ABNORMAL,SIBCALL)
73.LVL1:
74	.cfi_endproc
75.LFE2:
76	.size	foo_1, .-foo_1
77	.p2align 4,,15
78	.type	foo, @function
79foo:
80.LFB3:
81	# tailcall-only.c:40
82	.loc 1 40 0
83	.cfi_startproc
84# BLOCK 2 freq:10000 seq:0
85# PRED: ENTRY [100.0%]  (FALLTHRU)
86	# tailcall-only.c:41
87	.loc 1 41 0
88	jmp	foo_1
89# SUCC: EXIT [100.0%]  (ABNORMAL,SIBCALL)
90.LVL2:
91	.cfi_endproc
92.LFE3:
93	.size	foo, .-foo
94	.section	.text.startup,"ax",@progbits
95	.p2align 4,,15
96	.globl	main
97	.type	main, @function
98main:
99.LFB4:
100	# tailcall-only.c:46
101	.loc 1 46 0
102	.cfi_startproc
103# BLOCK 2 freq:10000 seq:0
104# PRED: ENTRY [100.0%]  (FALLTHRU)
105	# tailcall-only.c:49
106	.loc 1 49 0
107	call	foo
108.LVL3:
109	# tailcall-only.c:50
110	.loc 1 50 0
111	addl	$1, %eax
112.LVL4:
113# SUCC: EXIT [100.0%]
114	# tailcall-only.c:53
115	.loc 1 53 0
116	ret
117	.cfi_endproc
118.LFE4:
119	.size	main, .-main
120	.text
121.Letext0:
122	.section	.debug_info,"",@progbits
123.Ldebug_info0:
124	.long	0x111	# Length of Compilation Unit Info
125	.value	0x4	# DWARF version number
126	.long	.Ldebug_abbrev0	# Offset Into Abbrev. Section
127	.byte	0x8	# Pointer Size (in bytes)
128	.uleb128 0x1	# (DIE (0xb) DW_TAG_compile_unit)
129	.long	.LASF1	# DW_AT_producer: "GNU C 4.8.3 20140911 (Red Hat 4.8.3-9) -mtune=generic -march=x86-64 -g -O2"
130	.byte	0x1	# DW_AT_language
131	.long	.LASF2	# DW_AT_name: "tailcall-only.c"
132	.long	.LASF3	# DW_AT_comp_dir: ""
133	.long	.Ldebug_ranges0+0	# DW_AT_ranges
134	.quad	0	# DW_AT_low_pc
135	.long	.Ldebug_line0	# DW_AT_stmt_list
136	.uleb128 0x2	# (DIE (0x29) DW_TAG_subprogram)
137	.long	.LASF4	# DW_AT_name: "bar_1"
138	.byte	0x1	# DW_AT_decl_file (tailcall-only.c)
139	.byte	0x15	# DW_AT_decl_line
140			# DW_AT_prototyped
141	.long	0x46	# DW_AT_type
142	.quad	.LFB0	# DW_AT_low_pc
143	.quad	.LFE0-.LFB0	# DW_AT_high_pc
144	.uleb128 0x1	# DW_AT_frame_base
145	.byte	0x9c	# DW_OP_call_frame_cfa
146			# DW_AT_GNU_all_call_sites
147	.uleb128 0x3	# (DIE (0x46) DW_TAG_base_type)
148	.byte	0x4	# DW_AT_byte_size
149	.byte	0x5	# DW_AT_encoding
150	.ascii "int\0"	# DW_AT_name
151	.uleb128 0x4	# (DIE (0x4d) DW_TAG_subprogram)
152	.ascii "bar\0"	# DW_AT_name
153	.byte	0x1	# DW_AT_decl_file (tailcall-only.c)
154	.byte	0x1b	# DW_AT_decl_line
155			# DW_AT_prototyped
156	.long	0x46	# DW_AT_type
157	.quad	.LFB1	# DW_AT_low_pc
158	.quad	.LFE1-.LFB1	# DW_AT_high_pc
159	.uleb128 0x1	# DW_AT_frame_base
160	.byte	0x9c	# DW_OP_call_frame_cfa
161			# DW_AT_GNU_all_call_sites
162	.long	0x7c	# DW_AT_sibling
163	.uleb128 0x5	# (DIE (0x6e) DW_TAG_GNU_call_site)
164	.quad	.LVL0	# DW_AT_low_pc
165			# DW_AT_GNU_tail_call
166	.long	0x29	# DW_AT_abstract_origin
167	.byte	0	# end of children of DIE 0x4d
168	.uleb128 0x6	# (DIE (0x7c) DW_TAG_subprogram)
169	.long	.LASF0	# DW_AT_name: "foo_1"
170	.byte	0x1	# DW_AT_decl_file (tailcall-only.c)
171	.byte	0x21	# DW_AT_decl_line
172			# DW_AT_prototyped
173	.long	0x46	# DW_AT_type
174	.quad	.LFB2	# DW_AT_low_pc
175	.quad	.LFE2-.LFB2	# DW_AT_high_pc
176	.uleb128 0x1	# DW_AT_frame_base
177	.byte	0x9c	# DW_OP_call_frame_cfa
178			# DW_AT_GNU_all_call_sites
179	.long	0xab	# DW_AT_sibling
180	.uleb128 0x5	# (DIE (0x9d) DW_TAG_GNU_call_site)
181	.quad	.LVL1	# DW_AT_low_pc
182			# DW_AT_GNU_tail_call
183	.long	0x4d	# DW_AT_abstract_origin
184	.byte	0	# end of children of DIE 0x7c
185	.uleb128 0x4	# (DIE (0xab) DW_TAG_subprogram)
186	.ascii "foo\0"	# DW_AT_name
187	.byte	0x1	# DW_AT_decl_file (tailcall-only.c)
188	.byte	0x27	# DW_AT_decl_line
189			# DW_AT_prototyped
190	.long	0x46	# DW_AT_type
191	.quad	.LFB3	# DW_AT_low_pc
192	.quad	.LFE3-.LFB3	# DW_AT_high_pc
193	.uleb128 0x1	# DW_AT_frame_base
194	.byte	0x9c	# DW_OP_call_frame_cfa
195			# DW_AT_GNU_all_call_sites
196	.long	0xda	# DW_AT_sibling
197	.uleb128 0x5	# (DIE (0xcc) DW_TAG_GNU_call_site)
198	.quad	.LVL2	# DW_AT_low_pc
199			# DW_AT_GNU_tail_call
200	.long	0x7c	# DW_AT_abstract_origin
201	.byte	0	# end of children of DIE 0xab
202	.uleb128 0x7	# (DIE (0xda) DW_TAG_subprogram)
203			# DW_AT_external
204	.long	.LASF5	# DW_AT_name: "main"
205	.byte	0x1	# DW_AT_decl_file (tailcall-only.c)
206	.byte	0x2d	# DW_AT_decl_line
207			# DW_AT_prototyped
208	.long	0x46	# DW_AT_type
209	.quad	.LFB4	# DW_AT_low_pc
210	.quad	.LFE4-.LFB4	# DW_AT_high_pc
211	.uleb128 0x1	# DW_AT_frame_base
212	.byte	0x9c	# DW_OP_call_frame_cfa
213			# DW_AT_GNU_all_call_sites
214	.uleb128 0x8	# (DIE (0xf7) DW_TAG_variable)
215	.long	.LASF6	# DW_AT_name: "answer"
216	.byte	0x1	# DW_AT_decl_file (tailcall-only.c)
217	.byte	0x2f	# DW_AT_decl_line
218	.long	0x46	# DW_AT_type
219	.long	.LLST0	# DW_AT_location
220	.uleb128 0x9	# (DIE (0x106) DW_TAG_GNU_call_site)
221	.quad	.LVL3	# DW_AT_low_pc
222	.long	0xab	# DW_AT_abstract_origin
223	.byte	0	# end of children of DIE 0xda
224	.byte	0	# end of children of DIE 0xb
225	.section	.debug_abbrev,"",@progbits
226.Ldebug_abbrev0:
227	.uleb128 0x1	# (abbrev code)
228	.uleb128 0x11	# (TAG: DW_TAG_compile_unit)
229	.byte	0x1	# DW_children_yes
230	.uleb128 0x25	# (DW_AT_producer)
231	.uleb128 0xe	# (DW_FORM_strp)
232	.uleb128 0x13	# (DW_AT_language)
233	.uleb128 0xb	# (DW_FORM_data1)
234	.uleb128 0x3	# (DW_AT_name)
235	.uleb128 0xe	# (DW_FORM_strp)
236	.uleb128 0x1b	# (DW_AT_comp_dir)
237	.uleb128 0xe	# (DW_FORM_strp)
238	.uleb128 0x55	# (DW_AT_ranges)
239	.uleb128 0x17	# (DW_FORM_sec_offset)
240	.uleb128 0x11	# (DW_AT_low_pc)
241	.uleb128 0x1	# (DW_FORM_addr)
242	.uleb128 0x10	# (DW_AT_stmt_list)
243	.uleb128 0x17	# (DW_FORM_sec_offset)
244	.byte	0
245	.byte	0
246	.uleb128 0x2	# (abbrev code)
247	.uleb128 0x2e	# (TAG: DW_TAG_subprogram)
248	.byte	0	# DW_children_no
249	.uleb128 0x3	# (DW_AT_name)
250	.uleb128 0xe	# (DW_FORM_strp)
251	.uleb128 0x3a	# (DW_AT_decl_file)
252	.uleb128 0xb	# (DW_FORM_data1)
253	.uleb128 0x3b	# (DW_AT_decl_line)
254	.uleb128 0xb	# (DW_FORM_data1)
255	.uleb128 0x27	# (DW_AT_prototyped)
256	.uleb128 0x19	# (DW_FORM_flag_present)
257	.uleb128 0x49	# (DW_AT_type)
258	.uleb128 0x13	# (DW_FORM_ref4)
259	.uleb128 0x11	# (DW_AT_low_pc)
260	.uleb128 0x1	# (DW_FORM_addr)
261	.uleb128 0x12	# (DW_AT_high_pc)
262	.uleb128 0x7	# (DW_FORM_data8)
263	.uleb128 0x40	# (DW_AT_frame_base)
264	.uleb128 0x18	# (DW_FORM_exprloc)
265	.uleb128 0x2117	# (DW_AT_GNU_all_call_sites)
266	.uleb128 0x19	# (DW_FORM_flag_present)
267	.byte	0
268	.byte	0
269	.uleb128 0x3	# (abbrev code)
270	.uleb128 0x24	# (TAG: DW_TAG_base_type)
271	.byte	0	# DW_children_no
272	.uleb128 0xb	# (DW_AT_byte_size)
273	.uleb128 0xb	# (DW_FORM_data1)
274	.uleb128 0x3e	# (DW_AT_encoding)
275	.uleb128 0xb	# (DW_FORM_data1)
276	.uleb128 0x3	# (DW_AT_name)
277	.uleb128 0x8	# (DW_FORM_string)
278	.byte	0
279	.byte	0
280	.uleb128 0x4	# (abbrev code)
281	.uleb128 0x2e	# (TAG: DW_TAG_subprogram)
282	.byte	0x1	# DW_children_yes
283	.uleb128 0x3	# (DW_AT_name)
284	.uleb128 0x8	# (DW_FORM_string)
285	.uleb128 0x3a	# (DW_AT_decl_file)
286	.uleb128 0xb	# (DW_FORM_data1)
287	.uleb128 0x3b	# (DW_AT_decl_line)
288	.uleb128 0xb	# (DW_FORM_data1)
289	.uleb128 0x27	# (DW_AT_prototyped)
290	.uleb128 0x19	# (DW_FORM_flag_present)
291	.uleb128 0x49	# (DW_AT_type)
292	.uleb128 0x13	# (DW_FORM_ref4)
293	.uleb128 0x11	# (DW_AT_low_pc)
294	.uleb128 0x1	# (DW_FORM_addr)
295	.uleb128 0x12	# (DW_AT_high_pc)
296	.uleb128 0x7	# (DW_FORM_data8)
297	.uleb128 0x40	# (DW_AT_frame_base)
298	.uleb128 0x18	# (DW_FORM_exprloc)
299	.uleb128 0x2117	# (DW_AT_GNU_all_call_sites)
300	.uleb128 0x19	# (DW_FORM_flag_present)
301	.uleb128 0x1	# (DW_AT_sibling)
302	.uleb128 0x13	# (DW_FORM_ref4)
303	.byte	0
304	.byte	0
305	.uleb128 0x5	# (abbrev code)
306	.uleb128 0x4109	# (TAG: DW_TAG_GNU_call_site)
307	.byte	0	# DW_children_no
308	.uleb128 0x11	# (DW_AT_low_pc)
309	.uleb128 0x1	# (DW_FORM_addr)
310	.uleb128 0x2115	# (DW_AT_GNU_tail_call)
311	.uleb128 0x19	# (DW_FORM_flag_present)
312	.uleb128 0x31	# (DW_AT_abstract_origin)
313	.uleb128 0x13	# (DW_FORM_ref4)
314	.byte	0
315	.byte	0
316	.uleb128 0x6	# (abbrev code)
317	.uleb128 0x2e	# (TAG: DW_TAG_subprogram)
318	.byte	0x1	# DW_children_yes
319	.uleb128 0x3	# (DW_AT_name)
320	.uleb128 0xe	# (DW_FORM_strp)
321	.uleb128 0x3a	# (DW_AT_decl_file)
322	.uleb128 0xb	# (DW_FORM_data1)
323	.uleb128 0x3b	# (DW_AT_decl_line)
324	.uleb128 0xb	# (DW_FORM_data1)
325	.uleb128 0x27	# (DW_AT_prototyped)
326	.uleb128 0x19	# (DW_FORM_flag_present)
327	.uleb128 0x49	# (DW_AT_type)
328	.uleb128 0x13	# (DW_FORM_ref4)
329	.uleb128 0x11	# (DW_AT_low_pc)
330	.uleb128 0x1	# (DW_FORM_addr)
331	.uleb128 0x12	# (DW_AT_high_pc)
332	.uleb128 0x7	# (DW_FORM_data8)
333	.uleb128 0x40	# (DW_AT_frame_base)
334	.uleb128 0x18	# (DW_FORM_exprloc)
335	.uleb128 0x2117	# (DW_AT_GNU_all_call_sites)
336	.uleb128 0x19	# (DW_FORM_flag_present)
337	.uleb128 0x1	# (DW_AT_sibling)
338	.uleb128 0x13	# (DW_FORM_ref4)
339	.byte	0
340	.byte	0
341	.uleb128 0x7	# (abbrev code)
342	.uleb128 0x2e	# (TAG: DW_TAG_subprogram)
343	.byte	0x1	# DW_children_yes
344	.uleb128 0x3f	# (DW_AT_external)
345	.uleb128 0x19	# (DW_FORM_flag_present)
346	.uleb128 0x3	# (DW_AT_name)
347	.uleb128 0xe	# (DW_FORM_strp)
348	.uleb128 0x3a	# (DW_AT_decl_file)
349	.uleb128 0xb	# (DW_FORM_data1)
350	.uleb128 0x3b	# (DW_AT_decl_line)
351	.uleb128 0xb	# (DW_FORM_data1)
352	.uleb128 0x27	# (DW_AT_prototyped)
353	.uleb128 0x19	# (DW_FORM_flag_present)
354	.uleb128 0x49	# (DW_AT_type)
355	.uleb128 0x13	# (DW_FORM_ref4)
356	.uleb128 0x11	# (DW_AT_low_pc)
357	.uleb128 0x1	# (DW_FORM_addr)
358	.uleb128 0x12	# (DW_AT_high_pc)
359	.uleb128 0x7	# (DW_FORM_data8)
360	.uleb128 0x40	# (DW_AT_frame_base)
361	.uleb128 0x18	# (DW_FORM_exprloc)
362	.uleb128 0x2117	# (DW_AT_GNU_all_call_sites)
363	.uleb128 0x19	# (DW_FORM_flag_present)
364	.byte	0
365	.byte	0
366	.uleb128 0x8	# (abbrev code)
367	.uleb128 0x34	# (TAG: DW_TAG_variable)
368	.byte	0	# DW_children_no
369	.uleb128 0x3	# (DW_AT_name)
370	.uleb128 0xe	# (DW_FORM_strp)
371	.uleb128 0x3a	# (DW_AT_decl_file)
372	.uleb128 0xb	# (DW_FORM_data1)
373	.uleb128 0x3b	# (DW_AT_decl_line)
374	.uleb128 0xb	# (DW_FORM_data1)
375	.uleb128 0x49	# (DW_AT_type)
376	.uleb128 0x13	# (DW_FORM_ref4)
377	.uleb128 0x2	# (DW_AT_location)
378	.uleb128 0x17	# (DW_FORM_sec_offset)
379	.byte	0
380	.byte	0
381	.uleb128 0x9	# (abbrev code)
382	.uleb128 0x4109	# (TAG: DW_TAG_GNU_call_site)
383	.byte	0	# DW_children_no
384	.uleb128 0x11	# (DW_AT_low_pc)
385	.uleb128 0x1	# (DW_FORM_addr)
386	.uleb128 0x31	# (DW_AT_abstract_origin)
387	.uleb128 0x13	# (DW_FORM_ref4)
388	.byte	0
389	.byte	0
390	.byte	0
391	.section	.debug_loc,"",@progbits
392.Ldebug_loc0:
393.LLST0:
394	.quad	.LVL3	# Location list begin address (*.LLST0)
395	.quad	.LVL4	# Location list end address (*.LLST0)
396	.value	0x3	# Location expression size
397	.byte	0x70	# DW_OP_breg0
398	.sleb128 1
399	.byte	0x9f	# DW_OP_stack_value
400	.quad	.LVL4	# Location list begin address (*.LLST0)
401	.quad	.LFE4	# Location list end address (*.LLST0)
402	.value	0x1	# Location expression size
403	.byte	0x50	# DW_OP_reg0
404	.quad	0	# Location list terminator begin (*.LLST0)
405	.quad	0	# Location list terminator end (*.LLST0)
406	.section	.debug_aranges,"",@progbits
407	.long	0x3c	# Length of Address Ranges Info
408	.value	0x2	# DWARF Version
409	.long	.Ldebug_info0	# Offset of Compilation Unit Info
410	.byte	0x8	# Size of Address
411	.byte	0	# Size of Segment Descriptor
412	.value	0	# Pad to 16 byte boundary
413	.value	0
414	.quad	.Ltext0	# Address
415	.quad	.Letext0-.Ltext0	# Length
416	.quad	.LFB4	# Address
417	.quad	.LFE4-.LFB4	# Length
418	.quad	0
419	.quad	0
420	.section	.debug_ranges,"",@progbits
421.Ldebug_ranges0:
422	.quad	.Ltext0	# Offset 0
423	.quad	.Letext0
424	.quad	.LFB4	# Offset 0x10
425	.quad	.LFE4
426	.quad	0
427	.quad	0
428	.section	.debug_line,"",@progbits
429.Ldebug_line0:
430	.section	.debug_str,"MS",@progbits,1
431.LASF4:
432	.string	"bar_1"
433.LASF2:
434	.string	"tailcall-only.c"
435.LASF1:
436	.string	"GNU C 4.8.3 20140911 (Red Hat 4.8.3-9) -mtune=generic -march=x86-64 -g -O2"
437.LASF6:
438	.string	"answer"
439.LASF5:
440	.string	"main"
441.LASF3:
442	.string	""
443.LASF0:
444	.string	"foo_1"
445	.ident	"GCC: (GNU) 4.8.3 20140911 (Red Hat 4.8.3-9)"
446	.section	.note.GNU-stack,"",@progbits
447