1
2# TEST-OPTIONS:  unwind_test_main.c unwind_test_x86.s -arch i386 -fexceptions
3
4	.data
5.globl _unwind_tester_list
6_unwind_tester_list:
7	.long	_test_no_reg
8	.long	_test_ebx
9	.long	_test_esi
10	.long	_test_edi
11	.long	_test_ebx_esi
12	.long	_test_esi_edi
13	.long	_test_ebx_edi
14	.long	_test_ebx_esi_edi
15	.long	_test_edi_esi_ebx
16	.long	_test_pad_ebx_edi
17	.long	0
18
19
20	.text
21
22.globl _test_ebx
23_test_ebx:
24LFB13:
25	pushl	%ebp
26LCFI2:
27	movl	%esp, %ebp
28LCFI3:
29	pushl	%ebx
30LCFI4:
31	subl	$20, %esp
32LCFI5:
33	movl	$0, %ebx
34	call	_uwind_to_main
35	addl	$20, %esp
36	popl	%ebx
37	leave
38	ret
39LFE13:
40
41.globl _test_no_reg
42_test_no_reg:
43LFB12:
44	pushl	%ebp
45LCFI6:
46	movl	%esp, %ebp
47LCFI7:
48	subl	$24, %esp
49LCFI8:
50	call	_uwind_to_main
51	leave
52	ret
53LFE12:
54
55.globl _test_esi
56_test_esi:
57LFB10:
58	pushl	%ebp
59LCFI13:
60	movl	%esp, %ebp
61LCFI14:
62	pushl	%esi
63LCFI15:
64	subl	$20, %esp
65LCFI16:
66	movl	$0, %esi
67	call	_uwind_to_main
68	addl	$20, %esp
69	popl	%esi
70	leave
71	ret
72LFE10:
73
74.globl _test_edi
75_test_edi:
76LFB11:
77	pushl	%ebp
78LCFI9:
79	movl	%esp, %ebp
80LCFI10:
81	pushl	%edi
82LCFI11:
83	subl	$20, %esp
84LCFI12:
85	movl	$0, %edi
86	call	_uwind_to_main
87	addl	$20, %esp
88	popl	%edi
89	leave
90	ret
91LFE11:
92
93.globl _test_ebx_esi
94_test_ebx_esi:
95LFB9:
96	pushl	%ebp
97LCFI17:
98	movl	%esp, %ebp
99LCFI18:
100	subl	$24, %esp
101LCFI19:
102	movl	%ebx, -8(%ebp)
103LCFI20:
104	movl	%esi, -4(%ebp)
105LCFI21:
106	movl	$0, %ebx
107	movl	$0, %esi
108	call	_uwind_to_main
109	movl	-8(%ebp), %ebx
110	movl	-4(%ebp), %esi
111	leave
112	ret
113LFE9:
114
115
116.globl _test_esi_edi
117_test_esi_edi:
118LFB8:
119	pushl	%ebp
120LCFI22:
121	movl	%esp, %ebp
122LCFI23:
123	subl	$24, %esp
124LCFI24:
125	movl	%esi, -8(%ebp)
126LCFI25:
127	movl	%edi, -4(%ebp)
128LCFI26:
129	movl	$0, %edi
130	movl	$0, %esi
131	call	_uwind_to_main
132	movl	-8(%ebp), %esi
133	movl	-4(%ebp), %edi
134	leave
135	ret
136LFE8:
137
138.globl _test_ebx_edi
139_test_ebx_edi:
140LFB91:
141	pushl	%ebp
142LCFI171:
143	movl	%esp, %ebp
144LCFI181:
145	subl	$24, %esp
146LCFI191:
147	movl	%ebx, -8(%ebp)
148LCFI201:
149	movl	%edi, -4(%ebp)
150LCFI211:
151	movl	$0, %ebx
152	movl	$0, %edi
153	call	_uwind_to_main
154	movl	-8(%ebp), %ebx
155	movl	-4(%ebp), %edi
156	leave
157	ret
158LFE91:
159
160.globl _test_ebx_esi_edi
161_test_ebx_esi_edi:
162LFB7:
163	pushl	%ebp
164LCFI27:
165	movl	%esp, %ebp
166LCFI28:
167	subl	$40, %esp
168LCFI29:
169	movl	%ebx, -12(%ebp)
170LCFI30:
171	movl	%esi, -8(%ebp)
172LCFI31:
173	movl	%edi, -4(%ebp)
174LCFI32:
175	movl	$0, %ebx
176	movl	$0, %edi
177	movl	$0, %esi
178	call	_uwind_to_main
179	movl	-12(%ebp), %ebx
180	movl	-8(%ebp), %esi
181	movl	-4(%ebp), %edi
182	leave
183	ret
184LFE7:
185
186
187.globl _test_edi_esi_ebx
188_test_edi_esi_ebx:
189LFB7a:
190	pushl	%ebp
191LCFI27a:
192	movl	%esp, %ebp
193LCFI28a:
194	subl	$40, %esp
195LCFI29a:
196	movl	%edi, -12(%ebp)
197LCFI30a:
198	movl	%esi, -8(%ebp)
199LCFI31a:
200	movl	%ebx, -4(%ebp)
201LCFI32a:
202	movl	$0, %ebx
203	movl	$0, %esi
204	movl	$0, %edi
205	call	_uwind_to_main
206	movl	-12(%ebp), %edi
207	movl	-8(%ebp), %esi
208	movl	-4(%ebp), %ebx
209	leave
210	ret
211LFE7a:
212
213
214
215.globl _test_pad_ebx_edi
216_test_pad_ebx_edi:
217LFB91a:
218	pushl	%ebp
219LCFI171a:
220	movl	%esp, %ebp
221LCFI181a:
222	subl	$88, %esp
223LCFI191a:
224	movl	%ebx, -72(%ebp)
225LCFI201a:
226	movl	%edi, -68(%ebp)
227LCFI211a:
228	movl	$0, %ebx
229	movl	$0, %edi
230	call	_uwind_to_main
231	movl	-72(%ebp), %ebx
232	movl	-68(%ebp), %edi
233	leave
234	ret
235LFE91a:
236
237
238	.section __TEXT,__eh_frame,coalesced,no_toc+strip_static_syms+live_support
239EH_frame1:
240	.set L$set$0,LECIE1-LSCIE1
241	.long L$set$0	# Length of Common Information Entry
242LSCIE1:
243	.long	0x0	# CIE Identifier Tag
244	.byte	0x1	# CIE Version
245	.ascii "zR\0"	# CIE Augmentation
246	.byte	0x1	# uleb128 0x1; CIE Code Alignment Factor
247	.byte	0x7c	# sleb128 -4; CIE Data Alignment Factor
248	.byte	0x8	# CIE RA Column
249	.byte	0x1	# uleb128 0x1; Augmentation size
250	.byte	0x10	# FDE Encoding (pcrel)
251	.byte	0xc	# DW_CFA_def_cfa
252	.byte	0x5	# uleb128 0x5
253	.byte	0x4	# uleb128 0x4
254	.byte	0x88	# DW_CFA_offset, column 0x8
255	.byte	0x1	# uleb128 0x1
256	.byte	0x88	# DW_CFA_offset, column 0x8  // duplicate save in CIE means disable compact unwind encoding
257	.byte	0x1	# uleb128 0x1
258	.align 2
259LECIE1:
260
261
262.globl _test_no_reg.eh
263_test_no_reg.eh:
264LSFDE5:
265	.set L$set$6,LEFDE5-LASFDE5
266	.long L$set$6	# FDE Length
267LASFDE5:
268	.long	LASFDE5-EH_frame1	# FDE CIE offset
269	.long	LFB12-.	# FDE initial location
270	.set L$set$7,LFE12-LFB12
271	.long L$set$7	# FDE address range
272	.byte	0x0	# uleb128 0x0; Augmentation size
273	.byte	0x4	# DW_CFA_advance_loc4
274	.set L$set$8,LCFI6-LFB12
275	.long L$set$8
276	.byte	0xe	# DW_CFA_def_cfa_offset
277	.byte	0x8	# uleb128 0x8
278	.byte	0x84	# DW_CFA_offset, column 0x4
279	.byte	0x2	# uleb128 0x2
280	.byte	0x4	# DW_CFA_advance_loc4
281	.set L$set$9,LCFI7-LCFI6
282	.long L$set$9
283	.byte	0xd	# DW_CFA_def_cfa_register
284	.byte	0x4	# uleb128 0x4
285	.align 2
286LEFDE5:
287
288
289.globl _test_ebx.eh
290_test_ebx.eh:
291LSFDE3:
292	.set L$set$1,LEFDE3-LASFDE3
293	.long L$set$1	# FDE Length
294LASFDE3:
295	.long	LASFDE3-EH_frame1	# FDE CIE offset
296	.long	LFB13-.	# FDE initial location
297	.set L$set$2,LFE13-LFB13
298	.long L$set$2	# FDE address range
299	.byte	0x0	# uleb128 0x0; Augmentation size
300	.byte	0x4	# DW_CFA_advance_loc4
301	.set L$set$3,LCFI2-LFB13
302	.long L$set$3
303	.byte	0xe	# DW_CFA_def_cfa_offset
304	.byte	0x8	# uleb128 0x8
305	.byte	0x84	# DW_CFA_offset, column 0x4
306	.byte	0x2	# uleb128 0x2
307	.byte	0x4	# DW_CFA_advance_loc4
308	.set L$set$4,LCFI3-LCFI2
309	.long L$set$4
310	.byte	0xd	# DW_CFA_def_cfa_register
311	.byte	0x4	# uleb128 0x4
312	.byte	0x4	# DW_CFA_advance_loc4
313	.set L$set$5,LCFI5-LCFI3
314	.long L$set$5
315	.byte	0x83	# DW_CFA_offset, column 0x3
316	.byte	0x3	# uleb128 0x3
317	.align 2
318LEFDE3:
319
320
321.globl _test_esi.eh
322_test_esi.eh:
323LSFDE9:
324	.set L$set$15,LEFDE9-LASFDE9
325	.long L$set$15	# FDE Length
326LASFDE9:
327	.long	LASFDE9-EH_frame1	# FDE CIE offset
328	.long	LFB10-.	# FDE initial location
329	.set L$set$16,LFE10-LFB10
330	.long L$set$16	# FDE address range
331	.byte	0x0	# uleb128 0x0; Augmentation size
332	.byte	0x4	# DW_CFA_advance_loc4
333	.set L$set$17,LCFI13-LFB10
334	.long L$set$17
335	.byte	0xe	# DW_CFA_def_cfa_offset
336	.byte	0x8	# uleb128 0x8
337	.byte	0x84	# DW_CFA_offset, column 0x4
338	.byte	0x2	# uleb128 0x2
339	.byte	0x4	# DW_CFA_advance_loc4
340	.set L$set$18,LCFI14-LCFI13
341	.long L$set$18
342	.byte	0xd	# DW_CFA_def_cfa_register
343	.byte	0x4	# uleb128 0x4
344	.byte	0x4	# DW_CFA_advance_loc4
345	.set L$set$19,LCFI16-LCFI14
346	.long L$set$19
347	.byte	0x86	# DW_CFA_offset, column 0x6
348	.byte	0x3	# uleb128 0x3
349	.align 2
350LEFDE9:
351
352
353.globl _test_edi.eh
354_test_edi.eh:
355LSFDE10:
356	.set L$set$15a,LEFDE10-LASFDE10
357	.long L$set$15a	# FDE Length
358LASFDE10:
359	.long	LASFDE10-EH_frame1	# FDE CIE offset
360	.long	LFB11-.	# FDE initial location
361	.set L$set$16a,LFE11-LFB11
362	.long L$set$16a	# FDE address range
363	.byte	0x0	# uleb128 0x0; Augmentation size
364	.byte	0x4	# DW_CFA_advance_loc4
365	.set L$set$17a,LCFI9-LFB11
366	.long L$set$17a
367	.byte	0xe	# DW_CFA_def_cfa_offset
368	.byte	0x8	# uleb128 0x8
369	.byte	0x84	# DW_CFA_offset, column 0x4
370	.byte	0x2	# uleb128 0x2
371	.byte	0x4	# DW_CFA_advance_loc4
372	.set L$set$18a,LCFI10-LCFI9
373	.long L$set$18a
374	.byte	0xd	# DW_CFA_def_cfa_register
375	.byte	0x4	# uleb128 0x4
376	.byte	0x4	# DW_CFA_advance_loc4
377	.set L$set$19a,LCFI12-LCFI10
378	.long L$set$19a
379	.byte	0x87	# DW_CFA_offset, column 0x7
380	.byte	0x3	# uleb128 0x3
381	.align 2
382LEFDE10:
383
384.globl _test_ebx_esi.eh
385_test_ebx_esi.eh:
386LSFDE11:
387	.set L$set$20,LEFDE11-LASFDE11
388	.long L$set$20	# FDE Length
389LASFDE11:
390	.long	LASFDE11-EH_frame1	# FDE CIE offset
391	.long	LFB9-.	# FDE initial location
392	.set L$set$21,LFE9-LFB9
393	.long L$set$21	# FDE address range
394	.byte	0x0	# uleb128 0x0; Augmentation size
395	.byte	0x4	# DW_CFA_advance_loc4
396	.set L$set$22,LCFI17-LFB9
397	.long L$set$22
398	.byte	0xe	# DW_CFA_def_cfa_offset
399	.byte	0x8	# uleb128 0x8
400	.byte	0x84	# DW_CFA_offset, column 0x4
401	.byte	0x2	# uleb128 0x2
402	.byte	0x4	# DW_CFA_advance_loc4
403	.set L$set$23,LCFI18-LCFI17
404	.long L$set$23
405	.byte	0xd	# DW_CFA_def_cfa_register
406	.byte	0x4	# uleb128 0x4
407	.byte	0x4	# DW_CFA_advance_loc4
408	.set L$set$24,LCFI21-LCFI18
409	.long L$set$24
410	.byte	0x86	# DW_CFA_offset, column 0x6
411	.byte	0x3	# uleb128 0x3
412	.byte	0x83	# DW_CFA_offset, column 0x3
413	.byte	0x4	# uleb128 0x4
414	.align 2
415LEFDE11:
416
417.globl _test_esi_edi.eh
418_test_esi_edi.eh:
419LSFDE13:
420	.set L$set$25,LEFDE13-LASFDE13
421	.long L$set$25	# FDE Length
422LASFDE13:
423	.long	LASFDE13-EH_frame1	# FDE CIE offset
424	.long	LFB8-.	# FDE initial location
425	.set L$set$26,LFE8-LFB8
426	.long L$set$26	# FDE address range
427	.byte	0x0	# uleb128 0x0; Augmentation size
428	.byte	0x4	# DW_CFA_advance_loc4
429	.set L$set$27,LCFI22-LFB8
430	.long L$set$27
431	.byte	0xe	# DW_CFA_def_cfa_offset
432	.byte	0x8	# uleb128 0x8
433	.byte	0x84	# DW_CFA_offset, column 0x4
434	.byte	0x2	# uleb128 0x2
435	.byte	0x4	# DW_CFA_advance_loc4
436	.set L$set$28,LCFI23-LCFI22
437	.long L$set$28
438	.byte	0xd	# DW_CFA_def_cfa_register
439	.byte	0x4	# uleb128 0x4
440	.byte	0x4	# DW_CFA_advance_loc4
441	.set L$set$29,LCFI26-LCFI23
442	.long L$set$29
443	.byte	0x87	# DW_CFA_offset, column 0x7
444	.byte	0x3	# uleb128 0x3
445	.byte	0x86	# DW_CFA_offset, column 0x6
446	.byte	0x4	# uleb128 0x4
447	.align 2
448LEFDE13:
449
450.globl _test_ebx_edi.eh
451_test_ebx_edi.eh:
452LSFDE111:
453	.set L$set$20a,LEFDE11-LASFDE11
454	.long L$set$20a	# FDE Length
455LASFDE111:
456	.long	LASFDE111-EH_frame1	# FDE CIE offset
457	.long	LFB91-.	# FDE initial location
458	.set L$set$21a,LFE91-LFB91
459	.long L$set$21a	# FDE address range
460	.byte	0x0	# uleb128 0x0; Augmentation size
461	.byte	0x4	# DW_CFA_advance_loc4
462	.set L$set$22a,LCFI171-LFB91
463	.long L$set$22a
464	.byte	0xe	# DW_CFA_def_cfa_offset
465	.byte	0x8	# uleb128 0x8
466	.byte	0x84	# DW_CFA_offset, column 0x4
467	.byte	0x2	# uleb128 0x2
468	.byte	0x4	# DW_CFA_advance_loc4
469	.set L$set$23a,LCFI181-LCFI171
470	.long L$set$23a
471	.byte	0xd	# DW_CFA_def_cfa_register
472	.byte	0x4	# uleb128 0x4
473	.byte	0x4	# DW_CFA_advance_loc4
474	.set L$set$24a,LCFI211-LCFI181
475	.long L$set$24a
476	.byte	0x87	# DW_CFA_offset, column 0x7
477	.byte	0x3	# uleb128 0x3
478	.byte	0x83	# DW_CFA_offset, column 0x3
479	.byte	0x4	# uleb128 0x4
480	.align 2
481LEFDE111:
482
483.globl _test_ebx_esi_edi.eh
484_test_ebx_esi_edi.eh:
485LSFDE15:
486	.set L$set$30,LEFDE15-LASFDE15
487	.long L$set$30	# FDE Length
488LASFDE15:
489	.long	LASFDE15-EH_frame1	# FDE CIE offset
490	.long	LFB7-.	# FDE initial location
491	.set L$set$31,LFE7-LFB7
492	.long L$set$31	# FDE address range
493	.byte	0x0	# uleb128 0x0; Augmentation size
494	.byte	0x4	# DW_CFA_advance_loc4
495	.set L$set$32,LCFI27-LFB7
496	.long L$set$32
497	.byte	0xe	# DW_CFA_def_cfa_offset
498	.byte	0x8	# uleb128 0x8
499	.byte	0x84	# DW_CFA_offset, column 0x4
500	.byte	0x2	# uleb128 0x2
501	.byte	0x4	# DW_CFA_advance_loc4
502	.set L$set$33,LCFI28-LCFI27
503	.long L$set$33
504	.byte	0xd	# DW_CFA_def_cfa_register
505	.byte	0x4	# uleb128 0x4
506	.byte	0x4	# DW_CFA_advance_loc4
507	.set L$set$34,LCFI32-LCFI28
508	.long L$set$34
509	.byte	0x87	# DW_CFA_offset, column 0x7
510	.byte	0x3	# uleb128 0x3
511	.byte	0x86	# DW_CFA_offset, column 0x6
512	.byte	0x4	# uleb128 0x4
513	.byte	0x83	# DW_CFA_offset, column 0x3
514	.byte	0x5	# uleb128 0x5
515	.align 2
516LEFDE15:
517
518
519.globl _test_edi_esi_ebx.eh
520_test_edi_esi_ebx.eh:
521LSFDE15a:
522	.set L$set$30a,LEFDE15a-LASFDE15a
523	.long L$set$30a	# FDE Length
524LASFDE15a:
525	.long	LASFDE15a-EH_frame1	# FDE CIE offset
526	.long	LFB7a-.	# FDE initial location
527	.set L$set$31a,LFE7a-LFB7a
528	.long L$set$31a	# FDE address range
529	.byte	0x0	# uleb128 0x0; Augmentation size
530	.byte	0x4	# DW_CFA_advance_loc4
531	.set L$set$32a,LCFI27a-LFB7a
532	.long L$set$32a
533	.byte	0xe	# DW_CFA_def_cfa_offset
534	.byte	0x8	# uleb128 0x8
535	.byte	0x84	# DW_CFA_offset, column 0x4
536	.byte	0x2	# uleb128 0x2
537	.byte	0x4	# DW_CFA_advance_loc4
538	.set L$set$33a,LCFI28a-LCFI27a
539	.long L$set$33a
540	.byte	0xd	# DW_CFA_def_cfa_register
541	.byte	0x4	# uleb128 0x4
542	.byte	0x4	# DW_CFA_advance_loc4
543	.set L$set$34a,LCFI32a-LCFI28a
544	.long L$set$34a
545	.byte	0x83	# DW_CFA_offset, column 0x3
546	.byte	0x3	# uleb128 0x3
547	.byte	0x86	# DW_CFA_offset, column 0x6
548	.byte	0x4	# uleb128 0x4
549	.byte	0x87	# DW_CFA_offset, column 0x7
550	.byte	0x5	# uleb128 0x5
551	.align 2
552LEFDE15a:
553
554
555.globl _test_pad_ebx_edi.eh
556_test_pad_ebx_edi.eh:
557LSFDE111a:
558	.set L$set$20b,LEFDE111a-LASFDE111a
559	.long L$set$20b	# FDE Length
560LASFDE111a:
561	.long	LASFDE111a-EH_frame1	# FDE CIE offset
562	.long	LFB91a-.	# FDE initial location
563	.set L$set$21b,LFE91a-LFB91a
564	.long L$set$21b	# FDE address range
565	.byte	0x0	# uleb128 0x0; Augmentation size
566	.byte	0x4	# DW_CFA_advance_loc4
567	.set L$set$22b,LCFI171a-LFB91a
568	.long L$set$22b
569	.byte	0xe	# DW_CFA_def_cfa_offset
570	.byte	0x8	# uleb128 0x8
571	.byte	0x84	# DW_CFA_offset, column 0x4
572	.byte	0x2	# uleb128 0x2
573	.byte	0x4	# DW_CFA_advance_loc4
574	.set L$set$23b,LCFI181a-LCFI171a
575	.long L$set$23b
576	.byte	0xd	# DW_CFA_def_cfa_register
577	.byte	0x4	# uleb128 0x4
578	.byte	0x4	# DW_CFA_advance_loc4
579	.set L$set$24b,LCFI211a-LCFI181a
580	.long L$set$24b
581	.byte	0x87	# DW_CFA_offset, column 0x7
582	.byte	0x13	# uleb128 0x13
583	.byte	0x83	# DW_CFA_offset, column 0x3
584	.byte	0x14	# uleb128 0x14
585	.align 2
586LEFDE111a:
587
588
589	.subsections_via_symbols
590