1
2
3# TEST-OPTIONS:  unwind_test_main.c unwind_test_x86_64.s -arch x86_64
4# TEST-OPTIONS:  unwind_test_main.c unwind_test_x86_64.s -arch x86_64 -Wl,-no_compact_unwind
5
6	.data
7.globl _unwind_tester_list
8_unwind_tester_list:
9	.quad	_test_no_reg
10	.quad	_test_rbx
11	.quad	_test_rbx_r12
12	.quad	_test_rbx_r12_r13
13	.quad	_test_rbx_r12_r13_r14
14	.quad	_test_rbx_r12_r13_r14_r15
15	.quad	_test_rbx_rbp
16	.quad	_test_rbx_rbp_r12
17	.quad	_test_rbx_rbp_r12_r13
18	.quad	_test_rbx_rbp_r12_r13_r14
19	.quad	_test_rbx_rbp_r12_r13_r14_r15
20	.quad	0
21
22
23	.text
24
25
26.globl _test_no_reg
27_test_no_reg:
28LFB13:
29	subq	$160008, %rsp
30LCFI0:
31	call	_uwind_to_main
32	addq	$160008, %rsp
33	ret
34LFE13:
35
36
37
38.globl _test_rbx
39_test_rbx:
40LFB10:
41	pushq	%rbx
42LCFI3:
43	subq	$160000, %rsp
44LCFI4:
45	movq	$0, %rbx
46	call	_uwind_to_main
47	addq	$160000, %rsp
48	popq	%rbx
49	ret
50LFE10:
51
52
53.globl _test_rbx_r12
54_test_rbx_r12:
55LFB8:
56	movq	%rbx, -16(%rsp)
57LCFI7:
58	movq	%r12, -8(%rsp)
59LCFI8:
60	subq	$160024, %rsp
61LCFI9:
62	movq	$0, %rbx
63	movq	$0, %r12
64	call	_uwind_to_main
65	movq	160008(%rsp), %rbx
66	movq	160016(%rsp), %r12
67	addq	$160024, %rsp
68	ret
69LFE8:
70
71
72.globl _test_rbx_rbp
73_test_rbx_rbp:
74LFB7:
75	movq	%rbx, -16(%rsp)
76LCFI10:
77	movq	%rbp, -8(%rsp)
78LCFI11:
79	subq	$160024, %rsp
80LCFI12:
81	movq	$0, %rbp
82	movq	$0, %rbx
83	call	_uwind_to_main
84	movq	160008(%rsp), %rbx
85	movq	160016(%rsp), %rbp
86	addq	$160024, %rsp
87	ret
88LFE7:
89
90
91.globl _test_rbx_r12_r13
92_test_rbx_r12_r13:
93LFB6:
94	movq	%rbx, -24(%rsp)
95LCFI13:
96	movq	%r12, -16(%rsp)
97LCFI14:
98	movq	%r13, -8(%rsp)
99LCFI15:
100	subq	$160024, %rsp
101LCFI16:
102	movq	$0, %rbx
103	movq	$0, %r12
104	movq	$0, %r13
105	call	_uwind_to_main
106	movq	160000(%rsp), %rbx
107	movq	160008(%rsp), %r12
108	movq	160016(%rsp), %r13
109	addq	$160024, %rsp
110	ret
111LFE6:
112
113
114.globl _test_rbx_rbp_r12
115_test_rbx_rbp_r12:
116LFB9:
117	movq	%rbx, -24(%rsp)
118	movq	%rbp, -16(%rsp)
119	movq	%r12, -8(%rsp)
120	subq	$160024, %rsp
121LCFI9a:
122	movq	$0, %rbx
123	movq	$0, %rbp
124	movq	$0, %r12
125	call	_uwind_to_main
126	movq	160000(%rsp), %rbx
127	movq	160008(%rsp), %rbp
128	movq	160016(%rsp), %r12
129	addq	$160024, %rsp
130	ret
131LFE9:
132
133
134
135
136.globl _test_rbx_r12_r13_r14
137_test_rbx_r12_r13_r14:
138LFB4:
139	movq	%rbx, -32(%rsp)
140LCFI21:
141	movq	%r12, -24(%rsp)
142LCFI22:
143	movq	%r13, -16(%rsp)
144LCFI23:
145	movq	%r14, -8(%rsp)
146LCFI24:
147	subq	$160040, %rsp
148LCFI25:
149	movq	$0, %rbx
150	movq	$0, %r12
151	movq	$0, %r13
152	movq	$0, %r14
153	call	_uwind_to_main
154	movq	160008(%rsp), %rbx
155	movq	160016(%rsp), %r12
156	movq	160024(%rsp), %r13
157	movq	160032(%rsp), %r14
158	addq	$160040, %rsp
159	ret
160LFE4:
161
162
163.globl _test_rbx_r12_r13_r14_r15
164_test_rbx_r12_r13_r14_r15:
165LFB3:
166	movq	%rbx, -40(%rsp)
167LCFI26:
168	movq	%r12, -32(%rsp)
169LCFI27:
170	movq	%r13, -24(%rsp)
171LCFI28:
172	movq	%r14, -16(%rsp)
173LCFI29:
174	movq	%r15, -8(%rsp)
175LCFI30:
176	subq	$160040, %rsp
177LCFI31:
178	movq	$0, %rbx
179	movq	$0, %r12
180	movq	$0, %r13
181	movq	$0, %r14
182	movq	$0, %r15
183	call	_uwind_to_main
184	movq	160000(%rsp), %rbx
185	movq	160008(%rsp), %r12
186	movq	160016(%rsp), %r13
187	movq	160024(%rsp), %r14
188	movq	160032(%rsp), %r15
189	addq	$160040, %rsp
190	ret
191LFE3:
192
193
194.globl _test_rbx_rbp_r12_r13_r14_r15
195_test_rbx_rbp_r12_r13_r14_r15:
196LFB2:
197	movq	%rbx, -48(%rsp)
198LCFI32:
199	movq	%rbp, -40(%rsp)
200LCFI33:
201	movq	%r12, -32(%rsp)
202LCFI34:
203	movq	%r13, -24(%rsp)
204LCFI35:
205	movq	%r14, -16(%rsp)
206LCFI36:
207	movq	%r15, -8(%rsp)
208LCFI37:
209	subq	$160072, %rsp
210LCFI38:
211	movq	$0, %rbx
212	movq	$0, %rbp
213	movq	$0, %r12
214	movq	$0, %r13
215	movq	$0, %r14
216	movq	$0, %r15
217	call	_uwind_to_main
218	movq	160024(%rsp), %rbx
219	movq	160032(%rsp), %rbp
220	movq	160040(%rsp), %r12
221	movq	160048(%rsp), %r13
222	movq	160056(%rsp), %r14
223	movq	160064(%rsp), %r15
224	addq	$160072, %rsp
225	ret
226LFE2:
227
228
229.globl _test_rbx_rbp_r12_r13
230_test_rbx_rbp_r12_r13:
231LFB457:
232	movq	%rbx, -32(%rsp)
233LCFI18:
234	movq	%rbp, -24(%rsp)
235LCFI19:
236	movq	%r12, -16(%rsp)
237	movq	%r13, -8(%rsp)
238	subq	$160040, %rsp
239LCFI20:
240	movq	$0, %rbx
241	movq	$0, %rbp
242	movq	$0, %r12
243	movq	$0, %r13
244	call	_uwind_to_main
245	movq	160008(%rsp), %rbx
246	movq	160016(%rsp), %rbp
247	movq	160024(%rsp), %r12
248	movq	160032(%rsp), %r13
249	addq	$160040, %rsp
250	ret
251LFE457:
252
253
254.globl _test_rbx_rbp_r12_r13_r14
255_test_rbx_rbp_r12_r13_r14:
256LFB17:
257	movq	%rbx, -40(%rsp)
258	movq	%rbp, -32(%rsp)
259	movq	%r12, -24(%rsp)
260	movq	%r13, -16(%rsp)
261	movq	%r14, -8(%rsp)
262	subq	$160040, %rsp
263LFB17a:
264	movq	$0, %rbx
265	movq	$0, %rbp
266	movq	$0, %r12
267	movq	$0, %r13
268	movq	$0, %r14
269	call	_uwind_to_main
270	movq	160000(%rsp), %rbx
271	movq	160008(%rsp), %rbp
272	movq	160016(%rsp), %r12
273	movq	160024(%rsp), %r13
274	movq	160032(%rsp), %r14
275	addq	$160040, %rsp
276	ret
277LFE17:
278
279
280	.section __TEXT,__eh_frame,coalesced,no_toc+strip_static_syms+live_support
281EH_frame1:
282	.set L$set$0,LECIE1-LSCIE1
283	.long L$set$0	# Length of Common Information Entry
284LSCIE1:
285	.long	0x0	# CIE Identifier Tag
286	.byte	0x1	# CIE Version
287	.ascii "zR\0"	# CIE Augmentation
288	.byte	0x1	# uleb128 0x1; CIE Code Alignment Factor
289	.byte	0x78	# sleb128 -8; CIE Data Alignment Factor
290	.byte	0x10	# CIE RA Column
291	.byte	0x1	# uleb128 0x1; Augmentation size
292	.byte	0x10	# FDE Encoding (pcrel)
293	.byte	0xc	# DW_CFA_def_cfa
294	.byte	0x7	# uleb128 0x7
295	.byte	0x8	# uleb128 0x8
296	.byte	0x90	# DW_CFA_offset, column 0x10
297	.byte	0x1	# uleb128 0x1
298	.align 3
299LECIE1:
300
301.globl _test_no_reg.eh
302_test_no_reg.eh:
303LSFDE3:
304	.set L$set$3,LEFDE3-LASFDE3
305	.long L$set$3	# FDE Length
306LASFDE3:
307	.long	LASFDE3-EH_frame1	# FDE CIE offset
308	.quad	LFB13-.	# FDE initial location
309	.set L$set$4,LFE13-LFB13
310	.quad L$set$4	# FDE address range
311	.byte	0x0	# uleb128 0x0; Augmentation size
312	.byte	0x4	# DW_CFA_advance_loc4
313	.set L$set$5,LCFI0-LFB13
314	.long L$set$5
315	.byte	0xe	# DW_CFA_def_cfa_offset
316	.byte	0x90,0xe2,0x9	# uleb128 0x27110
317	.align 3
318LEFDE3:
319
320
321.globl _test_rbx.eh
322_test_rbx.eh:
323LSFDE9:
324	.set L$set$12,LEFDE9-LASFDE9
325	.long L$set$12	# FDE Length
326LASFDE9:
327	.long	LASFDE9-EH_frame1	# FDE CIE offset
328	.quad	LFB10-.	# FDE initial location
329	.set L$set$13,LFE10-LFB10
330	.quad L$set$13	# FDE address range
331	.byte	0x0	# uleb128 0x0; Augmentation size
332	.byte	0x4	# DW_CFA_advance_loc4
333	.set L$set$14,LCFI3-LFB10
334	.long L$set$14
335	.byte	0xe	# DW_CFA_def_cfa_offset
336	.byte	0x10	# uleb128 0x10
337	.byte	0x4	# DW_CFA_advance_loc4
338	.set L$set$15,LCFI4-LCFI3
339	.long L$set$15
340	.byte	0xe	# DW_CFA_def_cfa_offset
341	.byte	0x90,0xe2,0x9	# uleb128 0x27110
342	.byte	0x83	# DW_CFA_offset, column 0x3
343	.byte	0x2	# uleb128 0x2
344	.align 3
345LEFDE9:
346
347
348.globl _test_rbx_r12.eh
349_test_rbx_r12.eh:
350LSFDE13:
351	.set L$set$20,LEFDE13-LASFDE13
352	.long L$set$20	# FDE Length
353LASFDE13:
354	.long	LASFDE13-EH_frame1	# FDE CIE offset
355	.quad	LFB8-.	# FDE initial location
356	.set L$set$21,LFE8-LFB8
357	.quad L$set$21	# FDE address range
358	.byte	0x0	# uleb128 0x0; Augmentation size
359	.byte	0x4	# DW_CFA_advance_loc4
360	.set L$set$22,LCFI9-LFB8
361	.long L$set$22
362	.byte	0xe	# DW_CFA_def_cfa_offset
363	.byte	0xa0,0xe2,0x9	# uleb128 0x27120
364	.byte	0x8c	# DW_CFA_offset, column 0xc
365	.byte	0x2	# uleb128 0x2
366	.byte	0x83	# DW_CFA_offset, column 0x3
367	.byte	0x3	# uleb128 0x3
368	.align 3
369LEFDE13:
370
371
372.globl _test_rbx_rbp.eh
373_test_rbx_rbp.eh:
374LSFDE14:
375	.set L$set$23,LEFDE14-LASFDE14
376	.long L$set$23	# FDE Length
377LASFDE14:
378	.long	LASFDE14-EH_frame1	# FDE CIE offset
379	.quad	LFB7-.	# FDE initial location
380	.set L$set$24,LFE7-LFB7
381	.quad L$set$24	# FDE address range
382	.byte	0x0	# uleb128 0x0; Augmentation size
383	.byte	0x4	# DW_CFA_advance_loc4
384	.set L$set$25,LCFI12-LFB7
385	.long L$set$25
386	.byte	0xe	# DW_CFA_def_cfa_offset
387	.byte	0xa0,0xe2,0x9	# uleb128 0x27120
388	.byte	0x86	# DW_CFA_offset, column 0x6
389	.byte	0x2	# uleb128 0x2
390	.byte	0x83	# DW_CFA_offset, column 0x3
391	.byte	0x3	# uleb128 0x3
392	.align 3
393LEFDE14:
394
395
396.globl _test_rbx_r12_r13.eh
397_test_rbx_r12_r13.eh:
398LSFDE17:
399	.set L$set$26,LEFDE17-LASFDE17
400	.long L$set$26	# FDE Length
401LASFDE17:
402	.long	LASFDE17-EH_frame1	# FDE CIE offset
403	.quad	LFB6-.	# FDE initial location
404	.set L$set$27,LFE6-LFB6
405	.quad L$set$27	# FDE address range
406	.byte	0x0	# uleb128 0x0; Augmentation size
407	.byte	0x4	# DW_CFA_advance_loc4
408	.set L$set$28,LCFI16-LFB6
409	.long L$set$28
410	.byte	0xe	# DW_CFA_def_cfa_offset
411	.byte	0xa0,0xe2,0x9	# uleb128 0x27120
412	.byte	0x8d	# DW_CFA_offset, column 0xd
413	.byte	0x2	# uleb128 0x2
414	.byte	0x8c	# DW_CFA_offset, column 0xc
415	.byte	0x3	# uleb128 0x3
416	.byte	0x83	# DW_CFA_offset, column 0x3
417	.byte	0x4	# uleb128 0x4
418	.align 3
419LEFDE17:
420
421
422
423.globl _test_rbx_r12_r13_r14.eh
424_test_rbx_r12_r13_r14.eh:
425LSFDE21:
426	.set L$set$32,LEFDE21-LASFDE21
427	.long L$set$32	# FDE Length
428LASFDE21:
429	.long	LASFDE21-EH_frame1	# FDE CIE offset
430	.quad	LFB4-.	# FDE initial location
431	.set L$set$33,LFE4-LFB4
432	.quad L$set$33	# FDE address range
433	.byte	0x0	# uleb128 0x0; Augmentation size
434	.byte	0x4	# DW_CFA_advance_loc4
435	.set L$set$34,LCFI25-LFB4
436	.long L$set$34
437	.byte	0xe	# DW_CFA_def_cfa_offset
438	.byte	0xb0,0xe2,0x9	# uleb128 0x27130
439	.byte	0x8e	# DW_CFA_offset, column 0xe
440	.byte	0x2	# uleb128 0x2
441	.byte	0x8d	# DW_CFA_offset, column 0xd
442	.byte	0x3	# uleb128 0x3
443	.byte	0x8c	# DW_CFA_offset, column 0xc
444	.byte	0x4	# uleb128 0x4
445	.byte	0x83	# DW_CFA_offset, column 0x3
446	.byte	0x5	# uleb128 0x5
447	.align 3
448LEFDE21:
449
450
451.globl _test_rbx_r12_r13_r14_r15.eh
452_test_rbx_r12_r13_r14_r15.eh:
453LSFDE23:
454	.set L$set$35,LEFDE23-LASFDE23
455	.long L$set$35	# FDE Length
456LASFDE23:
457	.long	LASFDE23-EH_frame1	# FDE CIE offset
458	.quad	LFB3-.	# FDE initial location
459	.set L$set$36,LFE3-LFB3
460	.quad L$set$36	# FDE address range
461	.byte	0x0	# uleb128 0x0; Augmentation size
462	.byte	0x4	# DW_CFA_advance_loc4
463	.set L$set$37,LCFI31-LFB3
464	.long L$set$37
465	.byte	0xe	# DW_CFA_def_cfa_offset
466	.byte	0xb0,0xe2,0x9	# uleb128 0x27130
467	.byte	0x8f	# DW_CFA_offset, column 0xf
468	.byte	0x2	# uleb128 0x2
469	.byte	0x8e	# DW_CFA_offset, column 0xe
470	.byte	0x3	# uleb128 0x3
471	.byte	0x8d	# DW_CFA_offset, column 0xd
472	.byte	0x4	# uleb128 0x4
473	.byte	0x8c	# DW_CFA_offset, column 0xc
474	.byte	0x5	# uleb128 0x5
475	.byte	0x83	# DW_CFA_offset, column 0x3
476	.byte	0x6	# uleb128 0x6
477	.align 3
478LEFDE23:
479
480
481.globl _test_rbx_rbp_r12_r13_r14_r15.eh
482_test_rbx_rbp_r12_r13_r14_r15.eh:
483LSFDE25:
484	.set L$set$38,LEFDE25-LASFDE25
485	.long L$set$38	# FDE Length
486LASFDE25:
487	.long	LASFDE25-EH_frame1	# FDE CIE offset
488	.quad	LFB2-.	# FDE initial location
489	.set L$set$39,LFE2-LFB2
490	.quad L$set$39	# FDE address range
491	.byte	0x0	# uleb128 0x0; Augmentation size
492	.byte	0x4	# DW_CFA_advance_loc4
493	.set L$set$40,LCFI38-LFB2
494	.long L$set$40
495	.byte	0xe	# DW_CFA_def_cfa_offset
496	.byte	0xd0,0xe2,0x9	# uleb128 0x27150
497	.byte	0x8f	# DW_CFA_offset, column 0xf
498	.byte	0x2	# uleb128 0x2
499	.byte	0x8e	# DW_CFA_offset, column 0xe
500	.byte	0x3	# uleb128 0x3
501	.byte	0x8d	# DW_CFA_offset, column 0xd
502	.byte	0x4	# uleb128 0x4
503	.byte	0x8c	# DW_CFA_offset, column 0xc
504	.byte	0x5	# uleb128 0x5
505	.byte	0x86	# DW_CFA_offset, column 0x6
506	.byte	0x6	# uleb128 0x6
507	.byte	0x83	# DW_CFA_offset, column 0x3
508	.byte	0x7	# uleb128 0x7
509	.align 3
510LEFDE25:
511
512
513.globl _test_rbx_rbp_r12_r13.eh
514_test_rbx_rbp_r12_r13.eh:
515LSFDE11:
516	.set L$set$17a,LEFDE11-LASFDE11
517	.long L$set$17a	# FDE Length
518LASFDE11:
519	.long	LASFDE11-EH_frame1	# FDE CIE offset
520	.quad	LFB457-.	# FDE initial location
521	.set L$set$18a,LFE457-LFB457
522	.quad L$set$18a	# FDE address range
523	.byte	0x0	# uleb128 0x0; Augmentation size
524	.byte	0x4	# DW_CFA_advance_loc4
525	.set L$set$19a,LCFI20-LFB457
526	.long L$set$19a
527	.byte	0xe	# DW_CFA_def_cfa_offset
528	.byte	0xb0,0xe2,0x9	# uleb128 0x27130
529	.byte	0x8d	# DW_CFA_offset, column 0xd
530	.byte	0x2	# uleb128 0x2
531	.byte	0x8c	# DW_CFA_offset, column 0xc
532	.byte	0x3	# uleb128 0x3
533	.byte	0x86	# DW_CFA_offset, column 0x6
534	.byte	0x4	# uleb128 0x4
535	.byte	0x83	# DW_CFA_offset, column 0x3
536	.byte	0x5	# uleb128 0x5
537	.align 3
538LEFDE11:
539
540
541.globl _test_rbx_rbp_r12_r13_r14.eh
542_test_rbx_rbp_r12_r13_r14.eh:
543LSFDE7:
544	.set L$set$35a,LEFDE7-LASFDE7
545	.long L$set$35a	# FDE Length
546LASFDE7:
547	.long	LASFDE7-EH_frame1	# FDE CIE offset
548	.quad	LFB17-.	# FDE initial location
549	.set L$set$36a,LFE17-LFB17
550	.quad L$set$36a	# FDE address range
551	.byte	0x0	# uleb128 0x0; Augmentation size
552	.byte	0x4	# DW_CFA_advance_loc4
553	.set L$set$37a,LFB17a-LFB17
554	.long L$set$37a
555	.byte	0xe	# DW_CFA_def_cfa_offset
556	.byte	0xb0,0xe2,0x9	# uleb128 0x27130
557	.byte	0x8e	# DW_CFA_offset, column 0xe
558	.byte	0x2	# uleb128 0x2
559	.byte	0x8d	# DW_CFA_offset, column 0xd
560	.byte	0x3	# uleb128 0x3
561	.byte	0x8c	# DW_CFA_offset, column 0xc
562	.byte	0x4	# uleb128 0x4
563	.byte	0x86	# DW_CFA_offset, column 0x6
564	.byte	0x5	# uleb128 0x5
565	.byte	0x83	# DW_CFA_offset, column 0x3
566	.byte	0x6	# uleb128 0x6
567	.align 3
568LEFDE7:
569
570
571.globl _test_rbx_rbp_r12.eh
572_test_rbx_rbp_r12.eh:
573LSFDE19:
574	.set L$set$26a,LEFDE19-LASFDE19
575	.long L$set$26a	# FDE Length
576LASFDE19:
577	.long	LASFDE19-EH_frame1	# FDE CIE offset
578	.quad	LFB9-.	# FDE initial location
579	.set L$set$27a,LFE9-LFB9
580	.quad L$set$27a	# FDE address range
581	.byte	0x0	# uleb128 0x0; Augmentation size
582	.byte	0x4	# DW_CFA_advance_loc4
583	.set L$set$28a,LCFI9a-LFB9
584	.long L$set$28a
585	.byte	0xe	# DW_CFA_def_cfa_offset
586	.byte	0xa0,0xe2,0x9	# uleb128 0x27120
587	.byte	0x8c	# DW_CFA_offset, column 0xc
588	.byte	0x2	# uleb128 0x2
589	.byte	0x86	# DW_CFA_offset, column 0x6
590	.byte	0x3	# uleb128 0x3
591	.byte	0x83	# DW_CFA_offset, column 0x3
592	.byte	0x4	# uleb128 0x4
593	.align 3
594LEFDE19:
595
596
597
598	.subsections_via_symbols
599