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