[Frontend] Remove unused includes (NFC) (#116927)
[llvm-project.git] / llvm / test / MC / ARM / seh-packed.s
blobe56abfbe66c01ecb99a07e80b9089f220ffdca3c
1 // This test checks various cases around generating packed unwind info.
3 // RUN: llvm-mc -triple thumbv7-pc-win32 -filetype=obj %s | llvm-readobj -u - | FileCheck %s
5 // CHECK: RuntimeFunction {
6 // CHECK-NEXT: Function: func6
7 // CHECK-NEXT: Fragment: No
8 // CHECK-NEXT: FunctionLength: 8
9 // CHECK-NEXT: ReturnType: bx <reg>
10 // CHECK-NEXT: HomedParameters: No
11 // CHECK-NEXT: Reg: 7
12 // CHECK-NEXT: R: 1
13 // CHECK-NEXT: LinkRegister: No
14 // CHECK-NEXT: Chaining: No
15 // CHECK-NEXT: StackAdjustment: 0
16 // CHECK-NEXT: Prologue [
17 // CHECK-NEXT: ]
18 // CHECK-NEXT: Epilogue [
19 // CHECK-NEXT: bx <reg>
20 // CHECK-NEXT: ]
21 // CHECK-NEXT: }
22 // CHECK-NEXT: RuntimeFunction {
23 // CHECK-NEXT: Function: func7
24 // CHECK-NEXT: Fragment: No
25 // CHECK-NEXT: FunctionLength: 8
26 // CHECK-NEXT: ReturnType: bx <reg>
27 // CHECK-NEXT: HomedParameters: No
28 // CHECK-NEXT: Reg: 0
29 // CHECK-NEXT: R: 0
30 // CHECK-NEXT: LinkRegister: No
31 // CHECK-NEXT: Chaining: No
32 // CHECK-NEXT: StackAdjustment: 0
33 // CHECK-NEXT: Prologue [
34 // CHECK-NEXT: push {r4}
35 // CHECK-NEXT: ]
36 // CHECK-NEXT: Epilogue [
37 // CHECK-NEXT: pop {r4}
38 // CHECK-NEXT: bx <reg>
39 // CHECK-NEXT: ]
40 // CHECK-NEXT: }
41 // CHECK-NEXT: RuntimeFunction {
42 // CHECK-NEXT: Function: func8
43 // CHECK-NEXT: Fragment: No
44 // CHECK-NEXT: FunctionLength: 10
45 // CHECK-NEXT: ReturnType: bx <reg>
46 // CHECK-NEXT: HomedParameters: No
47 // CHECK-NEXT: Reg: 0
48 // CHECK-NEXT: R: 0
49 // CHECK-NEXT: LinkRegister: Yes
50 // CHECK-NEXT: Chaining: No
51 // CHECK-NEXT: StackAdjustment: 0
52 // CHECK-NEXT: Prologue [
53 // CHECK-NEXT: push {r4, lr}
54 // CHECK-NEXT: ]
55 // CHECK-NEXT: Epilogue [
56 // CHECK-NEXT: pop {r4, lr}
57 // CHECK-NEXT: bx <reg>
58 // CHECK-NEXT: ]
59 // CHECK-NEXT: }
60 // CHECK-NEXT: RuntimeFunction {
61 // CHECK-NEXT: Function: func9
62 // CHECK-NEXT: Fragment: No
63 // CHECK-NEXT: FunctionLength: 24
64 // CHECK-NEXT: ReturnType: b.w <target>
65 // CHECK-NEXT: HomedParameters: No
66 // CHECK-NEXT: Reg: 0
67 // CHECK-NEXT: R: 1
68 // CHECK-NEXT: LinkRegister: Yes
69 // CHECK-NEXT: Chaining: No
70 // CHECK-NEXT: StackAdjustment: 32
71 // CHECK-NEXT: Prologue [
72 // CHECK-NEXT: sub sp, sp, #32
73 // CHECK-NEXT: vpush {d8}
74 // CHECK-NEXT: push {lr}
75 // CHECK-NEXT: ]
76 // CHECK-NEXT: Epilogue [
77 // CHECK-NEXT: add sp, sp, #32
78 // CHECK-NEXT: vpop {d8}
79 // CHECK-NEXT: pop {lr}
80 // CHECK-NEXT: b.w <target>
81 // CHECK-NEXT: ]
82 // CHECK-NEXT: }
83 // CHECK-NEXT: RuntimeFunction {
84 // CHECK-NEXT: Function: func10
85 // CHECK-NEXT: Fragment: No
86 // CHECK-NEXT: FunctionLength: 26
87 // CHECK-NEXT: ReturnType: bx <reg>
88 // CHECK-NEXT: HomedParameters: No
89 // CHECK-NEXT: Reg: 1
90 // CHECK-NEXT: R: 1
91 // CHECK-NEXT: LinkRegister: Yes
92 // CHECK-NEXT: Chaining: Yes
93 // CHECK-NEXT: StackAdjustment: 16
94 // CHECK-NEXT: Prologue [
95 // CHECK-NEXT: sub sp, sp, #16
96 // CHECK-NEXT: vpush {d8-d9}
97 // CHECK-NEXT: mov r11, sp
98 // CHECK-NEXT: push {r11, lr}
99 // CHECK-NEXT: ]
100 // CHECK-NEXT: Epilogue [
101 // CHECK-NEXT: add sp, sp, #16
102 // CHECK-NEXT: vpop {d8-d9}
103 // CHECK-NEXT: pop {r11, lr}
104 // CHECK-NEXT: bx <reg>
105 // CHECK-NEXT: ]
106 // CHECK-NEXT: }
107 // CHECK-NEXT: RuntimeFunction {
108 // CHECK-NEXT: Function: func11
109 // CHECK-NEXT: Fragment: No
110 // CHECK-NEXT: FunctionLength: 24
111 // CHECK-NEXT: ReturnType: pop {pc}
112 // CHECK-NEXT: HomedParameters: No
113 // CHECK-NEXT: Reg: 1
114 // CHECK-NEXT: R: 1
115 // CHECK-NEXT: LinkRegister: Yes
116 // CHECK-NEXT: Chaining: Yes
117 // CHECK-NEXT: StackAdjustment: 16
118 // CHECK-NEXT: Prologue [
119 // CHECK-NEXT: sub sp, sp, #16
120 // CHECK-NEXT: vpush {d8-d9}
121 // CHECK-NEXT: mov r11, sp
122 // CHECK-NEXT: push {r11, lr}
123 // CHECK-NEXT: ]
124 // CHECK-NEXT: Epilogue [
125 // CHECK-NEXT: add sp, sp, #16
126 // CHECK-NEXT: vpop {d8-d9}
127 // CHECK-NEXT: pop {r11, pc}
128 // CHECK-NEXT: ]
129 // CHECK-NEXT: }
130 // CHECK-NEXT: RuntimeFunction {
131 // CHECK-NEXT: Function: func12
132 // CHECK-NEXT: Fragment: No
133 // CHECK-NEXT: FunctionLength: 18
134 // CHECK-NEXT: ReturnType: b.w <target>
135 // CHECK-NEXT: HomedParameters: No
136 // CHECK-NEXT: Reg: 6
137 // CHECK-NEXT: R: 1
138 // CHECK-NEXT: LinkRegister: No
139 // CHECK-NEXT: Chaining: No
140 // CHECK-NEXT: StackAdjustment: 16
141 // CHECK-NEXT: Prologue [
142 // CHECK-NEXT: sub sp, sp, #16
143 // CHECK-NEXT: vpush {d8-d14}
144 // CHECK-NEXT: ]
145 // CHECK-NEXT: Epilogue [
146 // CHECK-NEXT: add sp, sp, #16
147 // CHECK-NEXT: vpop {d8-d14}
148 // CHECK-NEXT: b.w <target>
149 // CHECK-NEXT: ]
150 // CHECK-NEXT: }
151 // CHECK-NEXT: RuntimeFunction {
152 // CHECK-NEXT: Function: func13
153 // CHECK-NEXT: Fragment: No
154 // CHECK-NEXT: FunctionLength: 18
155 // CHECK-NEXT: ReturnType: pop {pc}
156 // CHECK-NEXT: HomedParameters: No
157 // CHECK-NEXT: Reg: 6
158 // CHECK-NEXT: R: 0
159 // CHECK-NEXT: LinkRegister: Yes
160 // CHECK-NEXT: Chaining: Yes
161 // CHECK-NEXT: StackAdjustment: 20
162 // CHECK-NEXT: Prologue [
163 // CHECK-NEXT: sub sp, sp, #20
164 // CHECK-NEXT: add.w r11, sp, #28
165 // CHECK-NEXT: push {r4-r11, lr}
166 // CHECK-NEXT: ]
167 // CHECK-NEXT: Epilogue [
168 // CHECK-NEXT: add sp, sp, #20
169 // CHECK-NEXT: pop {r4-r11, pc}
170 // CHECK-NEXT: ]
171 // CHECK-NEXT: }
172 // CHECK-NEXT: RuntimeFunction {
173 // CHECK-NEXT: Function: func14
174 // CHECK-NEXT: Fragment: No
175 // CHECK-NEXT: FunctionLength: 14
176 // CHECK-NEXT: ReturnType: pop {pc}
177 // CHECK-NEXT: HomedParameters: No
178 // CHECK-NEXT: Reg: 7
179 // CHECK-NEXT: R: 0
180 // CHECK-NEXT: LinkRegister: Yes
181 // CHECK-NEXT: Chaining: No
182 // CHECK-NEXT: StackAdjustment: 20
183 // CHECK-NEXT: Prologue [
184 // CHECK-NEXT: sub sp, sp, #20
185 // CHECK-NEXT: push {r4-r11, lr}
186 // CHECK-NEXT: ]
187 // CHECK-NEXT: Epilogue [
188 // CHECK-NEXT: add sp, sp, #20
189 // CHECK-NEXT: pop {r4-r11, pc}
190 // CHECK-NEXT: ]
191 // CHECK-NEXT: }
192 // CHECK-NEXT: RuntimeFunction {
193 // CHECK-NEXT: Function: func15
194 // CHECK-NEXT: Fragment: No
195 // CHECK-NEXT: FunctionLength: 20
196 // CHECK-NEXT: ReturnType: pop {pc}
197 // CHECK-NEXT: HomedParameters: Yes
198 // CHECK-NEXT: Reg: 0
199 // CHECK-NEXT: R: 0
200 // CHECK-NEXT: LinkRegister: Yes
201 // CHECK-NEXT: Chaining: No
202 // CHECK-NEXT: StackAdjustment: 512
203 // CHECK-NEXT: Prologue [
204 // CHECK-NEXT: sub sp, sp, #512
205 // CHECK-NEXT: push {r4, lr}
206 // CHECK-NEXT: push {r0-r3}
207 // CHECK-NEXT: ]
208 // CHECK-NEXT: Epilogue [
209 // CHECK-NEXT: add sp, sp, #512
210 // CHECK-NEXT: pop {r4}
211 // CHECK-NEXT: ldr pc, [sp], #20
212 // CHECK-NEXT: ]
213 // CHECK-NEXT: }
214 // CHECK-NEXT: RuntimeFunction {
215 // CHECK-NEXT: Function: func16
216 // CHECK-NEXT: Fragment: No
217 // CHECK-NEXT: FunctionLength: 20
218 // CHECK-NEXT: ReturnType: b.w <target>
219 // CHECK-NEXT: HomedParameters: Yes
220 // CHECK-NEXT: Reg: 7
221 // CHECK-NEXT: R: 1
222 // CHECK-NEXT: LinkRegister: Yes
223 // CHECK-NEXT: Chaining: Yes
224 // CHECK-NEXT: StackAdjustment: 0
225 // CHECK-NEXT: Prologue [
226 // CHECK-NEXT: mov r11, sp
227 // CHECK-NEXT: push {r11, lr}
228 // CHECK-NEXT: push {r0-r3}
229 // CHECK-NEXT: ]
230 // CHECK-NEXT: Epilogue [
231 // CHECK-NEXT: pop {r11, lr}
232 // CHECK-NEXT: add sp, sp, #16
233 // CHECK-NEXT: b.w <target>
234 // CHECK-NEXT: ]
235 // CHECK-NEXT: }
236 // CHECK-NEXT: RuntimeFunction {
237 // CHECK-NEXT: Function: func17
238 // CHECK-NEXT: Fragment: No
239 // CHECK-NEXT: FunctionLength: 20
240 // CHECK-NEXT: ReturnType: bx <reg>
241 // CHECK-NEXT: HomedParameters: Yes
242 // CHECK-NEXT: Reg: 0
243 // CHECK-NEXT: R: 0
244 // CHECK-NEXT: LinkRegister: No
245 // CHECK-NEXT: Chaining: No
246 // CHECK-NEXT: StackAdjustment: 512
247 // CHECK-NEXT: Prologue [
248 // CHECK-NEXT: sub sp, sp, #512
249 // CHECK-NEXT: push {r4}
250 // CHECK-NEXT: push {r0-r3}
251 // CHECK-NEXT: ]
252 // CHECK-NEXT: Epilogue [
253 // CHECK-NEXT: add sp, sp, #512
254 // CHECK-NEXT: pop {r4}
255 // CHECK-NEXT: add sp, sp, #16
256 // CHECK-NEXT: bx <reg>
257 // CHECK-NEXT: ]
258 // CHECK-NEXT: }
259 // CHECK-NEXT: RuntimeFunction {
260 // CHECK-NEXT: Function: func18
261 // CHECK-NEXT: Fragment: No
262 // CHECK-NEXT: FunctionLength: 6
263 // CHECK-NEXT: ReturnType: pop {pc}
264 // CHECK-NEXT: HomedParameters: No
265 // CHECK-NEXT: Reg: 7
266 // CHECK-NEXT: R: 1
267 // CHECK-NEXT: LinkRegister: Yes
268 // CHECK-NEXT: Chaining: No
269 // CHECK-NEXT: StackAdjustment: 4
270 // CHECK-NEXT: Prologue [
271 // CHECK-NEXT: push {r3, lr}
272 // CHECK-NEXT: ]
273 // CHECK-NEXT: Epilogue [
274 // CHECK-NEXT: pop {r3, pc}
275 // CHECK-NEXT: ]
276 // CHECK-NEXT: }
277 // CHECK-NEXT: RuntimeFunction {
278 // CHECK-NEXT: Function: func19
279 // CHECK-NEXT: Fragment: No
280 // CHECK-NEXT: FunctionLength: 12
281 // CHECK-NEXT: ReturnType: bx <reg>
282 // CHECK-NEXT: HomedParameters: Yes
283 // CHECK-NEXT: Reg: 0
284 // CHECK-NEXT: R: 0
285 // CHECK-NEXT: LinkRegister: No
286 // CHECK-NEXT: Chaining: No
287 // CHECK-NEXT: StackAdjustment: 16
288 // CHECK-NEXT: Prologue [
289 // CHECK-NEXT: push {r0-r4}
290 // CHECK-NEXT: push {r0-r3}
291 // CHECK-NEXT: ]
292 // CHECK-NEXT: Epilogue [
293 // CHECK-NEXT: pop {r0-r4}
294 // CHECK-NEXT: add sp, sp, #16
295 // CHECK-NEXT: bx <reg>
296 // CHECK-NEXT: ]
297 // CHECK-NEXT: }
298 // CHECK-NEXT: RuntimeFunction {
299 // CHECK-NEXT: Function: func20
300 // CHECK-NEXT: Fragment: No
301 // CHECK-NEXT: FunctionLength: 14
302 // CHECK-NEXT: ReturnType: bx <reg>
303 // CHECK-NEXT: HomedParameters: Yes
304 // CHECK-NEXT: Reg: 0
305 // CHECK-NEXT: R: 0
306 // CHECK-NEXT: LinkRegister: No
307 // CHECK-NEXT: Chaining: No
308 // CHECK-NEXT: StackAdjustment: 16
309 // CHECK-NEXT: Prologue [
310 // CHECK-NEXT: push {r0-r4}
311 // CHECK-NEXT: push {r0-r3}
312 // CHECK-NEXT: ]
313 // CHECK-NEXT: Epilogue [
314 // CHECK-NEXT: add sp, sp, #16
315 // CHECK-NEXT: pop {r4}
316 // CHECK-NEXT: add sp, sp, #16
317 // CHECK-NEXT: bx <reg>
318 // CHECK-NEXT: ]
319 // CHECK-NEXT: }
320 // CHECK-NEXT: RuntimeFunction {
321 // CHECK-NEXT: Function: func21
322 // CHECK-NEXT: Fragment: No
323 // CHECK-NEXT: FunctionLength: 14
324 // CHECK-NEXT: ReturnType: bx <reg>
325 // CHECK-NEXT: HomedParameters: Yes
326 // CHECK-NEXT: Reg: 0
327 // CHECK-NEXT: R: 0
328 // CHECK-NEXT: LinkRegister: No
329 // CHECK-NEXT: Chaining: No
330 // CHECK-NEXT: StackAdjustment: 16
331 // CHECK-NEXT: Prologue [
332 // CHECK-NEXT: sub sp, sp, #16
333 // CHECK-NEXT: push {r4}
334 // CHECK-NEXT: push {r0-r3}
335 // CHECK-NEXT: ]
336 // CHECK-NEXT: Epilogue [
337 // CHECK-NEXT: pop {r0-r4}
338 // CHECK-NEXT: add sp, sp, #16
339 // CHECK-NEXT: bx <reg>
340 // CHECK-NEXT: ]
341 // CHECK-NEXT: }
342 // CHECK-NEXT: RuntimeFunction {
343 // CHECK-NEXT: Function: func22
344 // CHECK-NEXT: Fragment: Yes
345 // CHECK-NEXT: FunctionLength: 14
346 // CHECK-NEXT: ReturnType: pop {pc}
347 // CHECK-NEXT: HomedParameters: Yes
348 // CHECK-NEXT: Reg: 0
349 // CHECK-NEXT: R: 0
350 // CHECK-NEXT: LinkRegister: Yes
351 // CHECK-NEXT: Chaining: No
352 // CHECK-NEXT: StackAdjustment: 512
353 // CHECK-NEXT: Prologue [
354 // CHECK-NEXT: sub sp, sp, #512
355 // CHECK-NEXT: push {r4, lr}
356 // CHECK-NEXT: push {r0-r3}
357 // CHECK-NEXT: ]
358 // CHECK-NEXT: Epilogue [
359 // CHECK-NEXT: add sp, sp, #512
360 // CHECK-NEXT: pop {r4}
361 // CHECK-NEXT: ldr pc, [sp], #20
362 // CHECK-NEXT: ]
363 // CHECK-NEXT: }
364 // CHECK-NEXT: RuntimeFunction {
365 // CHECK-NEXT: Function: func24
366 // CHECK-NEXT: Fragment: No
367 // CHECK-NEXT: FunctionLength: 16
368 // CHECK-NEXT: ReturnType: pop {pc}
369 // CHECK-NEXT: HomedParameters: No
370 // CHECK-NEXT: Reg: 3
371 // CHECK-NEXT: R: 0
372 // CHECK-NEXT: LinkRegister: Yes
373 // CHECK-NEXT: Chaining: Yes
374 // CHECK-NEXT: StackAdjustment: 8
375 // CHECK-NEXT: Prologue [
376 // CHECK-NEXT: add.w r11, sp, #24
377 // CHECK-NEXT: push {r2-r7, r11, lr}
378 // CHECK-NEXT: ]
379 // CHECK-NEXT: Epilogue [
380 // CHECK-NEXT: add sp, sp, #8
381 // CHECK-NEXT: pop {r4-r7, r11, pc}
382 // CHECK-NEXT: ]
383 // CHECK-NEXT: }
384 // CHECK-NEXT: RuntimeFunction {
385 // CHECK-NEXT: Function: func25
386 // CHECK-NEXT: Fragment: No
387 // CHECK-NEXT: FunctionLength: 16
388 // CHECK-NEXT: ReturnType: pop {pc}
389 // CHECK-NEXT: HomedParameters: No
390 // CHECK-NEXT: Reg: 3
391 // CHECK-NEXT: R: 0
392 // CHECK-NEXT: LinkRegister: Yes
393 // CHECK-NEXT: Chaining: Yes
394 // CHECK-NEXT: StackAdjustment: 8
395 // CHECK-NEXT: Prologue [
396 // CHECK-NEXT: sub sp, sp, #8
397 // CHECK-NEXT: add.w r11, sp, #16
398 // CHECK-NEXT: push {r4-r7, r11, lr}
399 // CHECK-NEXT: ]
400 // CHECK-NEXT: Epilogue [
401 // CHECK-NEXT: pop {r2-r7, r11, pc}
402 // CHECK-NEXT: ]
403 // CHECK-NEXT: }
404 // CHECK-NEXT: RuntimeFunction {
405 // CHECK-NEXT: Function: func26
406 // CHECK-NEXT: Fragment: No
407 // CHECK-NEXT: FunctionLength: 8
408 // CHECK-NEXT: ReturnType: bx <reg>
409 // CHECK-NEXT: HomedParameters: No
410 // CHECK-NEXT: Reg: 7
411 // CHECK-NEXT: R: 1
412 // CHECK-NEXT: LinkRegister: No
413 // CHECK-NEXT: Chaining: No
414 // CHECK-NEXT: StackAdjustment: 12
415 // CHECK-NEXT: Prologue [
416 // CHECK-NEXT: push {r1-r3}
417 // CHECK-NEXT: ]
418 // CHECK-NEXT: Epilogue [
419 // CHECK-NEXT: add sp, sp, #12
420 // CHECK-NEXT: bx <reg>
421 // CHECK-NEXT: ]
422 // CHECK-NEXT: }
423 // CHECK-NEXT: RuntimeFunction {
424 // CHECK-NEXT: Function: func27
425 // CHECK-NEXT: Fragment: No
426 // CHECK-NEXT: FunctionLength: 8
427 // CHECK-NEXT: ReturnType: bx <reg>
428 // CHECK-NEXT: HomedParameters: No
429 // CHECK-NEXT: Reg: 7
430 // CHECK-NEXT: R: 1
431 // CHECK-NEXT: LinkRegister: No
432 // CHECK-NEXT: Chaining: No
433 // CHECK-NEXT: StackAdjustment: 12
434 // CHECK-NEXT: Prologue [
435 // CHECK-NEXT: sub sp, sp, #12
436 // CHECK-NEXT: ]
437 // CHECK-NEXT: Epilogue [
438 // CHECK-NEXT: pop {r1-r3}
439 // CHECK-NEXT: bx <reg>
440 // CHECK-NEXT: ]
441 // CHECK-NEXT: }
442 // CHECK-NEXT: RuntimeFunction {
443 // CHECK-NEXT: Function: func28
444 // CHECK-NEXT: Fragment: No
445 // CHECK-NEXT: FunctionLength: 8
446 // CHECK-NEXT: ReturnType: bx <reg>
447 // CHECK-NEXT: HomedParameters: Yes
448 // CHECK-NEXT: Reg: 7
449 // CHECK-NEXT: R: 1
450 // CHECK-NEXT: LinkRegister: No
451 // CHECK-NEXT: Chaining: No
452 // CHECK-NEXT: StackAdjustment: 0
453 // CHECK-NEXT: Prologue [
454 // CHECK-NEXT: push {r0-r3}
455 // CHECK-NEXT: ]
456 // CHECK-NEXT: Epilogue [
457 // CHECK-NEXT: add sp, sp, #16
458 // CHECK-NEXT: bx <reg>
459 // CHECK-NEXT: ]
460 // CHECK-NEXT: }
461 // CHECK-NEXT: RuntimeFunction {
462 // CHECK-NEXT: Function: func29
463 // CHECK-NEXT: Fragment: No
464 // CHECK-NEXT: FunctionLength: 10
465 // CHECK-NEXT: ReturnType: pop {pc}
466 // CHECK-NEXT: HomedParameters: Yes
467 // CHECK-NEXT: Reg: 7
468 // CHECK-NEXT: R: 1
469 // CHECK-NEXT: LinkRegister: Yes
470 // CHECK-NEXT: Chaining: No
471 // CHECK-NEXT: StackAdjustment: 0
472 // CHECK-NEXT: Prologue [
473 // CHECK-NEXT: push {lr}
474 // CHECK-NEXT: push {r0-r3}
475 // CHECK-NEXT: ]
476 // CHECK-NEXT: Epilogue [
477 // CHECK-NEXT: ldr pc, [sp], #20
478 // CHECK-NEXT: ]
479 // CHECK-NEXT: }
480 // CHECK-NEXT: RuntimeFunction {
481 // CHECK-NEXT: Function: func30
482 // CHECK-NEXT: Fragment: No
483 // CHECK-NEXT: FunctionLength: 6
484 // CHECK-NEXT: ReturnType: pop {pc}
485 // CHECK-NEXT: HomedParameters: No
486 // CHECK-NEXT: Reg: 2
487 // CHECK-NEXT: R: 0
488 // CHECK-NEXT: LinkRegister: Yes
489 // CHECK-NEXT: Chaining: No
490 // CHECK-NEXT: StackAdjustment: 0
491 // CHECK-NEXT: Prologue [
492 // CHECK-NEXT: push {r4-r6, lr}
493 // CHECK-NEXT: ]
494 // CHECK-NEXT: Epilogue [
495 // CHECK-NEXT: pop {r4-r6, pc}
496 // CHECK-NEXT: ]
497 // CHECK-NEXT: }
498 // CHECK-NEXT: RuntimeFunction {
499 // CHECK-NEXT: Function: func31
500 // CHECK-NEXT: Fragment: No
501 // CHECK-NEXT: FunctionLength: 4
502 // CHECK-NEXT: ReturnType: (no epilogue)
503 // CHECK-NEXT: HomedParameters: No
504 // CHECK-NEXT: Reg: 2
505 // CHECK-NEXT: R: 0
506 // CHECK-NEXT: LinkRegister: Yes
507 // CHECK-NEXT: Chaining: No
508 // CHECK-NEXT: StackAdjustment: 0
509 // CHECK-NEXT: Prologue [
510 // CHECK-NEXT: push {r4-r6, lr}
511 // CHECK-NEXT: ]
512 // CHECK-NEXT: }
514 // CHECK: Function: notpacked1
515 // CHECK-NEXT: ExceptionRecord:
516 // CHECK: Function: notpacked2
517 // CHECK-NEXT: ExceptionRecord:
518 // CHECK: Function: notpacked3
519 // CHECK-NEXT: ExceptionRecord:
520 // CHECK: Function: notpacked4
521 // CHECK-NEXT: ExceptionRecord:
522 // CHECK: Function: notpacked5
523 // CHECK-NEXT: ExceptionRecord:
524 // CHECK: Function: notpacked6
525 // CHECK-NEXT: ExceptionRecord:
526 // CHECK: Function: notpacked7
527 // CHECK-NEXT: ExceptionRecord:
528 // CHECK: Function: notpacked8
529 // CHECK-NEXT: ExceptionRecord:
530 // CHECK: Function: notpacked9
531 // CHECK-NEXT: ExceptionRecord:
533 .text
534 .syntax unified
536 .seh_proc func6
537 func6:
538 .seh_endprologue
542 .seh_startepilogue
543 bx lr
544 .seh_nop
545 .seh_endepilogue
546 .seh_endproc
548 .seh_proc func7
549 func7:
550 push {r4}
551 .seh_save_regs {r4}
552 .seh_endprologue
554 .seh_startepilogue
555 pop {r4}
556 .seh_save_regs {r4}
557 bx lr
558 .seh_nop
559 .seh_endepilogue
560 .seh_endproc
562 .seh_proc func8
563 func8:
564 push {r4,lr}
565 .seh_save_regs {r4,lr}
566 .seh_endprologue
568 .seh_startepilogue
569 pop.w {r4,lr}
570 .seh_save_regs_w {r4,lr}
571 bx lr
572 .seh_nop
573 .seh_endepilogue
574 .seh_endproc
576 .seh_proc func9
577 func9:
578 push {lr}
579 .seh_save_regs {lr}
580 vpush {d8}
581 .seh_save_fregs {d8}
582 sub sp, sp, #32
583 .seh_stackalloc 32
584 .seh_endprologue
586 .seh_startepilogue
587 add sp, sp, #32
588 .seh_stackalloc 32
589 vpop {d8}
590 .seh_save_fregs {d8}
591 pop.w {lr}
592 .seh_save_regs_w {lr}
593 b.w tailcall
594 .seh_nop_w
595 .seh_endepilogue
596 .seh_endproc
598 .seh_proc func10
599 func10:
600 push.w {r11,lr}
601 .seh_save_regs_w {r11,lr}
602 mov r11, sp
603 .seh_nop
604 vpush {d8-d9}
605 .seh_save_fregs {d8-d9}
606 sub sp, sp, #16
607 .seh_stackalloc 16
608 .seh_endprologue
610 .seh_startepilogue
611 add sp, sp, #16
612 .seh_stackalloc 16
613 vpop {d8-d9}
614 .seh_save_fregs {d8-d9}
615 pop.w {r11,lr}
616 .seh_save_regs_w {r11,lr}
617 bx lr
618 .seh_nop
619 .seh_endepilogue
620 .seh_endproc
622 .seh_proc func11
623 func11:
624 push.w {r11,lr}
625 .seh_save_regs_w {r11,lr}
626 mov r11, sp
627 .seh_nop
628 vpush {d8-d9}
629 .seh_save_fregs {d8-d9}
630 sub sp, sp, #16
631 .seh_stackalloc 16
632 .seh_endprologue
634 .seh_startepilogue
635 add sp, sp, #16
636 .seh_stackalloc 16
637 vpop {d8-d9}
638 .seh_save_fregs {d8-d9}
639 pop.w {r11,pc}
640 .seh_save_regs_w {r11,pc}
641 .seh_endepilogue
642 .seh_endproc
644 .seh_proc func12
645 func12:
646 vpush {d8-d14}
647 .seh_save_fregs {d8-d14}
648 sub sp, sp, #16
649 .seh_stackalloc 16
650 .seh_endprologue
652 .seh_startepilogue
653 add sp, sp, #16
654 .seh_stackalloc 16
655 vpop {d8-d14}
656 .seh_save_fregs {d8-d14}
657 b.w tailcall
658 .seh_nop_w
659 .seh_endepilogue
660 .seh_endproc
662 .seh_proc func13
663 func13:
664 push.w {r4-r11,lr}
665 .seh_save_regs_w {r4-r11,lr}
666 add.w r11, sp, #0x1c
667 .seh_nop_w
668 sub sp, sp, #20
669 .seh_stackalloc 20
670 .seh_endprologue
672 .seh_startepilogue
673 add sp, sp, #20
674 .seh_stackalloc 20
675 pop.w {r4-r11,pc}
676 .seh_save_regs_w {r4-r11,lr}
677 .seh_endepilogue
678 .seh_endproc
680 .seh_proc func14
681 func14:
682 push.w {r4-r11,lr}
683 .seh_save_regs_w {r4-r11,lr}
684 sub sp, sp, #20
685 .seh_stackalloc 20
686 .seh_endprologue
688 .seh_startepilogue
689 add sp, sp, #20
690 .seh_stackalloc 20
691 pop.w {r4-r11,pc}
692 .seh_save_regs_w {r4-r11,lr}
693 .seh_endepilogue
694 .seh_endproc
696 .seh_proc func15
697 func15:
698 push {r0-r3}
699 .seh_save_regs {r0-r3}
700 push {r4,lr}
701 .seh_save_regs {r4,lr}
702 sub.w sp, sp, #512
703 .seh_stackalloc_w 512
704 .seh_endprologue
706 .seh_startepilogue
707 add.w sp, sp, #512
708 .seh_stackalloc_w 512
709 pop {r4}
710 .seh_save_regs {r4}
711 ldr pc, [sp], #20
712 .seh_save_lr 20
713 .seh_endepilogue
714 .seh_endproc
716 .seh_proc func16
717 func16:
718 push {r0-r3}
719 .seh_save_regs {r0-r3}
720 push.w {r11,lr}
721 .seh_save_regs_w {r11,lr}
722 mov r11, sp
723 .seh_nop
724 .seh_endprologue
726 .seh_startepilogue
727 pop.w {r11, lr}
728 .seh_save_regs_w {r11,lr}
729 add sp, sp, #16
730 .seh_stackalloc 16
731 b.w tailcall
732 .seh_nop_w
733 .seh_endepilogue
734 .seh_endproc
736 .seh_proc func17
737 func17:
738 push {r0-r3}
739 .seh_save_regs {r0-r3}
740 push {r4}
741 .seh_save_regs {r4}
742 sub.w sp, sp, #512
743 .seh_stackalloc_w 512
744 .seh_endprologue
746 .seh_startepilogue
747 add.w sp, sp, #512
748 .seh_stackalloc_w 512
749 pop {r4}
750 .seh_save_regs {r4}
751 add sp, sp, #16
752 .seh_stackalloc 16
753 bx lr
754 .seh_nop
755 .seh_endepilogue
756 .seh_endproc
758 .seh_proc func18
759 func18:
760 push {r3,lr}
761 .seh_save_regs {r3,lr}
762 .seh_endprologue
764 .seh_startepilogue
765 pop {r3,pc}
766 .seh_save_regs {r3,pc}
767 .seh_endepilogue
768 .seh_endproc
770 .seh_proc func19
771 func19:
772 push {r0-r3}
773 .seh_save_regs {r0-r3}
774 push {r0-r4}
775 .seh_save_regs {r0-r4}
776 .seh_endprologue
778 .seh_startepilogue
779 pop {r0-r4}
780 .seh_save_regs {r0-r4}
781 add sp, sp, #16
782 .seh_stackalloc 16
783 bx lr
784 .seh_nop
785 .seh_endepilogue
786 .seh_endproc
788 .seh_proc func20
789 func20:
790 push {r0-r3}
791 .seh_save_regs {r0-r3}
792 push {r0-r4}
793 .seh_save_regs {r0-r4}
794 .seh_endprologue
796 .seh_startepilogue
797 add sp, sp, #16
798 .seh_stackalloc 16
799 pop {r4}
800 .seh_save_regs {r4}
801 add sp, sp, #16
802 .seh_stackalloc 16
803 bx lr
804 .seh_nop
805 .seh_endepilogue
806 .seh_endproc
808 .seh_proc func21
809 func21:
810 push {r0-r3}
811 .seh_save_regs {r0-r3}
812 push {r4}
813 .seh_save_regs {r4}
814 sub sp, sp, #16
815 .seh_stackalloc 16
816 .seh_endprologue
818 .seh_startepilogue
819 pop {r0-r4}
820 .seh_save_regs {r0-r4}
821 add sp, sp, #16
822 .seh_stackalloc 16
823 bx lr
824 .seh_nop
825 .seh_endepilogue
826 .seh_endproc
828 .seh_proc func22
829 func22:
830 .seh_save_regs {r0-r3}
831 .seh_save_regs {r4,lr}
832 .seh_stackalloc_w 512
833 .seh_endprologue_fragment
836 .seh_startepilogue
837 add.w sp, sp, #512
838 .seh_stackalloc_w 512
839 pop {r4}
840 .seh_save_regs {r4}
841 ldr pc, [sp], #20
842 .seh_save_lr 20
843 .seh_endepilogue
844 .seh_endproc
846 .seh_proc func24
847 func24:
848 push.w {r2-r7,r11,lr}
849 .seh_save_regs_w {r2-r7,r11,lr}
850 add.w r11, sp, #24
851 .seh_nop_w
852 .seh_endprologue
854 .seh_startepilogue
855 add sp, sp, #8
856 .seh_stackalloc 8
857 pop.w {r4-r7,r11,pc}
858 .seh_save_regs_w {r4-r7,r11,pc}
859 .seh_endepilogue
860 .seh_endproc
862 .seh_proc func25
863 func25:
864 push.w {r4-r7,r11,lr}
865 .seh_save_regs_w {r4-r7,r11,lr}
866 add.w r11, sp, #16
867 .seh_nop_w
868 sub sp, sp, #8
869 .seh_stackalloc 8
870 .seh_endprologue
872 .seh_startepilogue
873 pop.w {r2-r7,r11,pc}
874 .seh_save_regs_w {r2-r7,r11,pc}
875 .seh_endepilogue
876 .seh_endproc
878 .seh_proc func26
879 func26:
880 push {r1-r3}
881 .seh_save_regs {r1-r3}
882 .seh_endprologue
884 .seh_startepilogue
885 add sp, sp, #12
886 .seh_stackalloc 12
887 bx lr
888 .seh_nop
889 .seh_endepilogue
890 .seh_endproc
892 .seh_proc func27
893 func27:
894 sub sp, sp, #12
895 .seh_stackalloc 12
896 .seh_endprologue
898 .seh_startepilogue
899 pop {r1-r3}
900 .seh_save_regs {r1-r3}
901 bx lr
902 .seh_nop
903 .seh_endepilogue
904 .seh_endproc
906 .seh_proc func28
907 func28:
908 push {r0-r3}
909 .seh_save_regs {r0-r3}
910 .seh_endprologue
912 .seh_startepilogue
913 add sp, sp, #16
914 .seh_stackalloc 16
915 bx lr
916 .seh_nop
917 .seh_endepilogue
918 .seh_endproc
920 .seh_proc func29
921 func29:
922 push {r0-r3}
923 .seh_save_regs {r0-r3}
924 push {lr}
925 .seh_save_regs {lr}
926 .seh_endprologue
928 .seh_startepilogue
929 ldr pc, [sp], #20
930 .seh_save_lr 20
931 .seh_endepilogue
932 .seh_endproc
934 .seh_proc func30
935 func30:
936 push {r4-r6,lr}
937 .seh_save_regs {r4-r6,lr}
938 .seh_endprologue
940 .seh_startepilogue
941 pop {r4-r6,pc}
942 .seh_save_regs {r4-r6,pc}
943 .seh_endepilogue
944 .seh_endproc
946 .seh_proc func31
947 func31:
948 push {r4-r6,lr}
949 .seh_save_regs {r4-r6,lr}
950 .seh_endprologue
952 .seh_endproc
954 .seh_proc notpacked1
955 notpacked1:
956 push {r1-r3}
957 .seh_save_regs {r1-r3}
958 .seh_endprologue
960 .seh_startepilogue
961 // Mismatch with the folded prologue
962 add sp, sp, #8
963 .seh_stackalloc 8
964 bx lr
965 .seh_nop
966 .seh_endepilogue
967 .seh_endproc
969 .seh_proc notpacked2
970 notpacked2:
971 sub sp, sp, #8
972 .seh_stackalloc 8
973 .seh_endprologue
975 .seh_startepilogue
976 // Folded epilogue is a mismatch to the regular stack adjust in the prologue
977 pop {r1-r3}
978 .seh_save_regs {r1-r3}
979 bx lr
980 .seh_nop
981 .seh_endepilogue
982 .seh_endproc
984 .seh_proc notpacked3
985 notpacked3:
986 // Can't represent d8-d15 in the packed form
987 vpush {d8-d15}
988 .seh_save_fregs {d8-d15}
989 .seh_endprologue
991 .seh_startepilogue
992 vpop {d8-d15}
993 .seh_save_fregs {d8-d15}
994 bx lr
995 .seh_nop
996 .seh_endepilogue
997 .seh_endproc
999 .seh_proc notpacked4
1000 notpacked4:
1001 push {r2-r7}
1002 .seh_save_regs {r2-r7}
1003 sub sp, sp, #16
1004 .seh_stackalloc 16
1005 // Can't have both a folded stack adjustment and a separate one
1006 .seh_endprologue
1008 .seh_startepilogue
1009 add sp, sp, #16
1010 .seh_stackalloc 16
1011 pop {r2-r7}
1012 .seh_save_regs {r2-r7}
1013 bx lr
1014 .seh_nop
1015 .seh_endepilogue
1016 .seh_endproc
1018 .seh_proc notpacked5
1019 notpacked5:
1020 // Can't represent r11 in packed form when it's not contiguous
1021 // with the rest and when it's not chained (missing "add.w r11, sp, #.."
1022 // and .seh_nop_w).
1023 push.w {r4-r7,r11,lr}
1024 .seh_save_regs_w {r4-r7,r11,lr}
1025 sub sp, sp, #8
1026 .seh_stackalloc 8
1027 .seh_endprologue
1029 .seh_startepilogue
1030 pop.w {r2-r7,r11,pc}
1031 .seh_save_regs_w {r2-r7,r11,pc}
1032 .seh_endepilogue
1033 .seh_endproc
1035 .seh_proc notpacked6
1036 notpacked6:
1037 // Can't pack non-contiguous registers
1038 push {r4,r7}
1039 .seh_save_regs {r4,r7}
1040 .seh_endprologue
1042 .seh_startepilogue
1043 pop {r4,r7}
1044 .seh_save_regs {r4,r7}
1045 bx lr
1046 .seh_nop
1047 .seh_endepilogue
1048 .seh_endproc
1050 .seh_proc notpacked7
1051 notpacked7:
1052 // Can't pack float registers ouside of d8-d14
1053 vpush {d0-d3}
1054 .seh_save_fregs {d0-d3}
1055 .seh_endprologue
1057 .seh_startepilogue
1058 vpop {d0-d3}
1059 .seh_save_fregs {d0-d3}
1060 bx lr
1061 .seh_nop
1062 .seh_endepilogue
1063 .seh_endproc
1065 .seh_proc notpacked8
1066 notpacked8:
1067 push {r4-r7,lr}
1068 .seh_save_regs {r4-r7,lr}
1069 .seh_endprologue
1071 .seh_startepilogue
1072 pop {r4-r7,pc}
1073 .seh_save_regs {r4-r7,pc}
1074 .seh_endepilogue
1075 // Epilogue isn't at the end of the function; can't be packed.
1077 .seh_endproc
1079 .seh_proc notpacked9
1080 notpacked9:
1081 push {r4-r7,lr}
1082 .seh_save_regs {r4-r7,lr}
1083 .seh_endprologue
1085 .seh_startepilogue
1086 pop {r4-r7,pc}
1087 .seh_save_regs {r4-r7,pc}
1088 .seh_endepilogue
1089 // Multiple epilogues, can't be packed
1091 .seh_startepilogue
1092 pop {r4-r7,pc}
1093 .seh_save_regs {r4-r7,pc}
1094 .seh_endepilogue
1095 .seh_endproc