1 # RUN: llc -o - %s -mtriple=aarch64-windows -start-after=prologepilog \
2 # RUN: -filetype=obj | llvm-readobj --unwind | FileCheck %s
3 # Check save_fplr_x, set_fp, alloc_s
5 # CHECK: ExceptionData {
6 # CHECK-NEXT: FunctionLength: 92
7 # CHECK-NEXT: Version: 0
8 # CHECK-NEXT: ExceptionData: No
9 # CHECK-NEXT: EpiloguePacked: No
10 # CHECK-NEXT: EpilogueScopes: 1
11 # CHECK-NEXT: ByteCodeLength: 8
12 # CHECK-NEXT: Prologue [
13 # CHECK-NEXT: 0x02 ; sub sp, #32
14 # CHECK-NEXT: 0xe1 ; mov fp, sp
15 # CHECK-NEXT: 0x81 ; stp x29, x30, [sp, #-16]!
16 # CHECK-NEXT: 0xe4 ; end
18 # CHECK-NEXT: EpilogueScopes [
19 # CHECK-NEXT: EpilogueScope {
20 # CHECK-NEXT: StartOffset: 20
21 # CHECK-NEXT: EpilogueStartIndex: 4
22 # CHECK-NEXT: Opcodes [
23 # CHECK-NEXT: 0xe1 ; mov fp, sp
24 # CHECK-NEXT: 0x81 ; ldp x29, x30, [sp], #16
25 # CHECK-NEXT: 0xe4 ; end
32 name: '?func@@YAHHHHH@Z'
34 exposesReturnsTwice: false
36 regBankSelected: false
39 tracksRegLiveness: true
43 - { reg: '$w0', virtual-reg: '' }
44 - { reg: '$w1', virtual-reg: '' }
45 - { reg: '$w2', virtual-reg: '' }
46 - { reg: '$w3', virtual-reg: '' }
48 isFrameAddressTaken: false
49 isReturnAddressTaken: false
59 hasOpaqueSPAdjustment: false
61 hasMustTailInVarArgFunc: false
67 - { id: 0, name: '', type: default, offset: -20, size: 4, alignment: 4,
68 stack-id: default, callee-saved-register: '', callee-saved-restored: true,
69 local-offset: -4, debug-info-variable: '', debug-info-expression: '',
70 debug-info-location: '' }
71 - { id: 1, name: '', type: default, offset: -24, size: 4, alignment: 4,
72 stack-id: default, callee-saved-register: '', callee-saved-restored: true,
73 local-offset: -8, debug-info-variable: '', debug-info-expression: '',
74 debug-info-location: '' }
75 - { id: 2, name: '', type: default, offset: -28, size: 4, alignment: 4,
76 stack-id: default, callee-saved-register: '', callee-saved-restored: true,
77 local-offset: -12, debug-info-variable: '', debug-info-expression: '',
78 debug-info-location: '' }
79 - { id: 3, name: '', type: default, offset: -32, size: 4, alignment: 4,
80 stack-id: default, callee-saved-register: '', callee-saved-restored: true,
81 local-offset: -16, debug-info-variable: '', debug-info-expression: '',
82 debug-info-location: '' }
83 - { id: 4, name: '', type: default, offset: -40, size: 8, alignment: 8,
84 stack-id: default, callee-saved-register: '', callee-saved-restored: true,
85 local-offset: -24, debug-info-variable: '', debug-info-expression: '',
86 debug-info-location: '' }
87 - { id: 5, name: '', type: variable-sized, offset: -40,
88 alignment: 1, stack-id: default, callee-saved-register: '', callee-saved-restored: true,
89 local-offset: -24, debug-info-variable: '', debug-info-expression: '',
90 debug-info-location: '' }
91 - { id: 6, name: '', type: spill-slot, offset: -48, size: 8, alignment: 8,
92 stack-id: default, callee-saved-register: '', callee-saved-restored: true,
93 debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }
94 - { id: 7, name: '', type: spill-slot, offset: -8, size: 8, alignment: 8,
95 stack-id: default, callee-saved-register: '$fp', callee-saved-restored: true,
96 debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }
97 - { id: 8, name: '', type: spill-slot, offset: -16, size: 8, alignment: 8,
98 stack-id: default, callee-saved-register: '$lr', callee-saved-restored: true,
99 debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }
103 liveins: $w0, $w1, $w2, $w3, $lr
105 early-clobber $sp = frame-setup STPXpre killed $fp, killed $lr, $sp, -2 :: (store 8 into %stack.7), (store 8 into %stack.8)
106 frame-setup SEH_SaveFPLR_X -16
107 $fp = frame-setup ADDXri $sp, 0, 0
108 frame-setup SEH_SetFP
109 $sp = frame-setup SUBXri $sp, 32, 0
110 frame-setup SEH_StackAlloc 32
111 frame-setup SEH_PrologEnd
112 STURWi killed renamable $w3, $fp, -4
113 STURWi killed renamable $w2, $fp, -8
114 STURWi killed renamable $w1, $fp, -12
115 STURWi killed renamable $w0, $fp, -16
116 renamable $x8 = LDURSWi $fp, -16
117 renamable $x8 = ADDXri killed renamable $x8, 15, 0
118 renamable $x8 = UBFMXri killed renamable $x8, 4, 63
119 $x15 = COPY renamable $x8
120 STURXi killed $x8, $fp, -32 :: (store 8 into %stack.6)
121 BL &__chkstk, csr_aarch64_stackprobe_windows, implicit-def dead $lr, implicit $sp, implicit killed $x15
122 renamable $x8 = COPY $sp
123 $x15 = LDURXi $fp, -32 :: (load 8 from %stack.6)
124 renamable $x8 = SUBSXrs killed renamable $x8, killed renamable $x15, 4, implicit-def dead $nzcv
125 $sp = COPY renamable $x8
126 STURXi killed renamable $x8, $fp, -24
127 renamable $x0 = LDURXi $fp, -24
128 renamable $w1 = COPY $wzr
129 $w0 = COPY killed renamable $w1
130 frame-destroy SEH_EpilogStart
131 $sp = frame-destroy ADDXri $fp, 0, 0
132 frame-destroy SEH_SetFP
133 early-clobber $sp, $fp, $lr = frame-destroy LDPXpost $sp, 2
134 frame-destroy SEH_SaveFPLR_X -16
135 frame-destroy SEH_EpilogEnd
136 RET_ReallyLR implicit killed $w0