• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
4
5# CHECK: 	ExceptionData {
6# CHECK-NEXT:      FunctionLength: 92
7# CHECK-NEXT:      Version: 0
8# CHECK-NEXT:      ExceptionData: No
9# CHECK-NEXT:      EpiloguePacked: Yes
10# CHECK-NEXT:      EpilogueOffset: 1
11# CHECK-NEXT:      ByteCodeLength: 4
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
17# CHECK-NEXT:      ]
18# CHECK-NEXT:      Epilogue [
19# CHECK-NEXT:        0xe1                ; mov sp, fp
20# CHECK-NEXT:        0x81                ; ldp x29, x30, [sp], #16
21# CHECK-NEXT:        0xe4                ; end
22# CHECK-NEXT:      ]
23# CHECK-NEXT:    }
24...
25---
26name:            '?func@@YAHHHHH@Z'
27alignment:       8
28exposesReturnsTwice: false
29legalized:       false
30regBankSelected: false
31selected:        false
32failedISel:      false
33tracksRegLiveness: true
34hasWinCFI: true
35registers:
36liveins:
37  - { reg: '$w0', virtual-reg: '' }
38  - { reg: '$w1', virtual-reg: '' }
39  - { reg: '$w2', virtual-reg: '' }
40  - { reg: '$w3', virtual-reg: '' }
41frameInfo:
42  isFrameAddressTaken: false
43  isReturnAddressTaken: false
44  hasStackMap:     false
45  hasPatchPoint:   false
46  stackSize:       48
47  offsetAdjustment: 0
48  maxAlignment:    8
49  adjustsStack:    true
50  hasCalls:        true
51  stackProtector:  ''
52  maxCallFrameSize: 0
53  hasOpaqueSPAdjustment: false
54  hasVAStart:      false
55  hasMustTailInVarArgFunc: false
56  localFrameSize:  24
57  savePoint:       ''
58  restorePoint:    ''
59fixedStack:
60stack:
61  - { id: 0, name: '', type: default, offset: -20, size: 4, alignment: 4,
62      stack-id: default, callee-saved-register: '', callee-saved-restored: true,
63      local-offset: -4, debug-info-variable: '', debug-info-expression: '',
64      debug-info-location: '' }
65  - { id: 1, name: '', type: default, offset: -24, size: 4, alignment: 4,
66      stack-id: default, callee-saved-register: '', callee-saved-restored: true,
67      local-offset: -8, debug-info-variable: '', debug-info-expression: '',
68      debug-info-location: '' }
69  - { id: 2, name: '', type: default, offset: -28, size: 4, alignment: 4,
70      stack-id: default, callee-saved-register: '', callee-saved-restored: true,
71      local-offset: -12, debug-info-variable: '', debug-info-expression: '',
72      debug-info-location: '' }
73  - { id: 3, name: '', type: default, offset: -32, size: 4, alignment: 4,
74      stack-id: default, callee-saved-register: '', callee-saved-restored: true,
75      local-offset: -16, debug-info-variable: '', debug-info-expression: '',
76      debug-info-location: '' }
77  - { id: 4, name: '', type: default, offset: -40, size: 8, alignment: 8,
78      stack-id: default, callee-saved-register: '', callee-saved-restored: true,
79      local-offset: -24, debug-info-variable: '', debug-info-expression: '',
80      debug-info-location: '' }
81  - { id: 5, name: '', type: variable-sized, offset: -40,
82      alignment: 1, stack-id: default, callee-saved-register: '', callee-saved-restored: true,
83      local-offset: -24, debug-info-variable: '', debug-info-expression: '',
84      debug-info-location: '' }
85  - { id: 6, name: '', type: spill-slot, offset: -48, size: 8, alignment: 8,
86      stack-id: default, callee-saved-register: '', callee-saved-restored: true,
87      debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }
88  - { id: 7, name: '', type: spill-slot, offset: -8, size: 8, alignment: 8,
89      stack-id: default, callee-saved-register: '$fp', callee-saved-restored: true,
90      debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }
91  - { id: 8, name: '', type: spill-slot, offset: -16, size: 8, alignment: 8,
92      stack-id: default, callee-saved-register: '$lr', callee-saved-restored: true,
93      debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }
94constants:
95body:             |
96  bb.0.entry:
97    liveins: $w0, $w1, $w2, $w3, $lr
98
99    early-clobber $sp = frame-setup STPXpre killed $fp, killed $lr, $sp, -2 :: (store 8 into %stack.7), (store 8 into %stack.8)
100    frame-setup SEH_SaveFPLR_X -16
101    $fp = frame-setup ADDXri $sp, 0, 0
102    frame-setup SEH_SetFP
103    $sp = frame-setup SUBXri $sp, 32, 0
104    frame-setup SEH_StackAlloc 32
105    frame-setup SEH_PrologEnd
106    STURWi killed renamable $w3, $fp, -4
107    STURWi killed renamable $w2, $fp, -8
108    STURWi killed renamable $w1, $fp, -12
109    STURWi killed renamable $w0, $fp, -16
110    renamable $x8 = LDURSWi $fp, -16
111    renamable $x8 = ADDXri killed renamable $x8, 15, 0
112    renamable $x8 = UBFMXri killed renamable $x8, 4, 63
113    $x15 = COPY renamable $x8
114    STURXi killed $x8, $fp, -32 :: (store 8 into %stack.6)
115    BL &__chkstk, csr_aarch64_stackprobe_windows, implicit-def dead $lr, implicit $sp, implicit killed $x15
116    renamable $x8 = COPY $sp
117    $x15 = LDURXi $fp, -32 :: (load 8 from %stack.6)
118    renamable $x8 = SUBSXrs killed renamable $x8, killed renamable $x15, 4, implicit-def dead $nzcv
119    $sp = COPY renamable $x8
120    STURXi killed renamable $x8, $fp, -24
121    renamable $x0 = LDURXi $fp, -24
122    renamable $w1 = COPY $wzr
123    $w0 = COPY killed renamable $w1
124    frame-destroy SEH_EpilogStart
125    $sp = frame-destroy ADDXri $fp, 0, 0
126    frame-destroy SEH_SetFP
127    early-clobber $sp, $fp, $lr = frame-destroy LDPXpost $sp, 2
128    frame-destroy SEH_SaveFPLR_X -16
129    frame-destroy SEH_EpilogEnd
130    RET_ReallyLR implicit killed $w0
131
132...
133