[obj2yaml] - Fix a comment. NFC.
[llvm-complete.git] / test / MC / COFF / cv-fpo-setframe.s
blob217248210ce5e8ce95a5726497722c445543798b
1 # RUN: llvm-mc -filetype=asm < %s -triple i686-windows-msvc | FileCheck %s --check-prefix=ASM
2 # RUN: llvm-mc -filetype=obj < %s -triple i686-windows-msvc | llvm-readobj --codeview | FileCheck %s --check-prefix=OBJ
4 .globl _foo
5 _foo:
6 .cv_fpo_proc _foo 4
7 pushl %ebp
8 .cv_fpo_pushreg %ebp
9 movl %ebp, %esp
10 .cv_fpo_setframe %ebp
11 pushl %ebx
12 .cv_fpo_pushreg %ebx
13 pushl %edi
14 .cv_fpo_pushreg %edi
15 pushl %esi
16 .cv_fpo_pushreg esi
17 subl $20, %esp
18 .cv_fpo_stackalloc 20
19 .cv_fpo_endprologue
21 # ASM: .cv_fpo_proc _foo 4
22 # ASM: pushl %ebp
23 # ASM: .cv_fpo_pushreg %ebp
24 # ASM: movl %ebp, %esp
25 # ASM: .cv_fpo_setframe %ebp
26 # ASM: pushl %ebx
27 # ASM: .cv_fpo_pushreg %ebx
28 # ASM: pushl %edi
29 # ASM: .cv_fpo_pushreg %edi
30 # ASM: pushl %esi
31 # ASM: .cv_fpo_pushreg %esi
32 # ASM: subl $20, %esp
33 # ASM: .cv_fpo_stackalloc 20
34 # ASM: .cv_fpo_endprologue
36 # Clobbers
37 xorl %ebx, %ebx
38 xorl %edi, %edi
39 xorl %esi, %esi
40 # Use that stack memory
41 leal 4(%esp), %eax
42 movl %eax, (%esp)
43 calll _bar
45 # ASM: calll _bar
47 # Epilogue
48 # FIXME: Get FPO data for this once we get it for DWARF.
49 addl $20, %esp
50 popl %esi
51 popl %edi
52 popl %ebx
53 popl %ebp
54 retl
55 .cv_fpo_endproc
57 # ASM: .cv_fpo_endproc
59 .section .debug$S,"dr"
60 .p2align 2
61 .long 4 # Debug section magic
62 .cv_fpo_data _foo
63 .cv_stringtable
65 # ASM: .cv_fpo_data
67 # OBJ: Subsection [
68 # OBJ-NEXT: SubSectionType: FrameData (0xF5)
69 # OBJ-NEXT: SubSectionSize:
70 # OBJ-NEXT: LinkageName: _foo
71 # OBJ-NEXT: FrameData {
72 # OBJ-NEXT: RvaStart: 0x0
73 # OBJ-NEXT: CodeSize: 0x23
74 # OBJ-NEXT: LocalSize: 0x0
75 # OBJ-NEXT: ParamsSize: 0x4
76 # OBJ-NEXT: MaxStackSize: 0x0
77 # OBJ-NEXT: PrologSize: 0x9
78 # OBJ-NEXT: SavedRegsSize: 0x0
79 # OBJ-NEXT: Flags [ (0x4)
80 # OBJ-NEXT: IsFunctionStart (0x4)
81 # OBJ-NEXT: ]
82 # OBJ-NEXT: FrameFunc [
83 # OBJ-NEXT: $T0 .raSearch =
84 # OBJ-NEXT: $eip $T0 ^ =
85 # OBJ-NEXT: $esp $T0 4 + =
86 # OBJ-NEXT: ]
87 # OBJ-NEXT: }
88 # OBJ-NEXT: FrameData {
89 # OBJ-NEXT: RvaStart: 0x1
90 # OBJ-NEXT: CodeSize: 0x22
91 # OBJ-NEXT: LocalSize: 0x0
92 # OBJ-NEXT: ParamsSize: 0x4
93 # OBJ-NEXT: MaxStackSize: 0x0
94 # OBJ-NEXT: PrologSize: 0x8
95 # OBJ-NEXT: SavedRegsSize: 0x4
96 # OBJ-NEXT: Flags [ (0x0)
97 # OBJ-NEXT: ]
98 # OBJ-NEXT: FrameFunc [
99 # OBJ-NEXT: $T0 .raSearch =
100 # OBJ-NEXT: $eip $T0 ^ =
101 # OBJ-NEXT: $esp $T0 4 + =
102 # OBJ-NEXT: $ebp $T0 4 - ^ =
103 # OBJ-NEXT: ]
104 # OBJ-NEXT: }
105 # OBJ-NEXT: FrameData {
106 # OBJ-NEXT: RvaStart: 0x3
107 # OBJ-NEXT: CodeSize: 0x20
108 # OBJ-NEXT: LocalSize: 0x0
109 # OBJ-NEXT: ParamsSize: 0x4
110 # OBJ-NEXT: MaxStackSize: 0x0
111 # OBJ-NEXT: PrologSize: 0x6
112 # OBJ-NEXT: SavedRegsSize: 0x4
113 # OBJ-NEXT: Flags [ (0x0)
114 # OBJ-NEXT: ]
115 # OBJ-NEXT: FrameFunc [
116 # OBJ-NEXT: $T0 $ebp 4 + =
117 # OBJ-NEXT: $eip $T0 ^ =
118 # OBJ-NEXT: $esp $T0 4 + =
119 # OBJ-NEXT: $ebp $T0 4 - ^ =
120 # OBJ-NEXT: ]
121 # OBJ-NEXT: }
122 # OBJ-NEXT: FrameData {
123 # OBJ-NEXT: RvaStart: 0x4
124 # OBJ-NEXT: CodeSize: 0x1F
125 # OBJ-NEXT: LocalSize: 0x0
126 # OBJ-NEXT: ParamsSize: 0x4
127 # OBJ-NEXT: MaxStackSize: 0x0
128 # OBJ-NEXT: PrologSize: 0x5
129 # OBJ-NEXT: SavedRegsSize: 0x8
130 # OBJ-NEXT: Flags [ (0x0)
131 # OBJ-NEXT: ]
132 # OBJ-NEXT: FrameFunc [
133 # OBJ-NEXT: $T0 $ebp 4 + =
134 # OBJ-NEXT: $eip $T0 ^ =
135 # OBJ-NEXT: $esp $T0 4 + =
136 # OBJ-NEXT: $ebp $T0 4 - ^ =
137 # OBJ-NEXT: $ebx $T0 8 - ^ =
138 # OBJ-NEXT: ]
139 # OBJ-NEXT: }
140 # OBJ-NEXT: FrameData {
141 # OBJ-NEXT: RvaStart: 0x5
142 # OBJ-NEXT: CodeSize: 0x1E
143 # OBJ-NEXT: LocalSize: 0x0
144 # OBJ-NEXT: ParamsSize: 0x4
145 # OBJ-NEXT: MaxStackSize: 0x0
146 # OBJ-NEXT: PrologSize: 0x4
147 # OBJ-NEXT: SavedRegsSize: 0xC
148 # OBJ-NEXT: Flags [ (0x0)
149 # OBJ-NEXT: ]
150 # OBJ-NEXT: FrameFunc [
151 # OBJ-NEXT: $T0 $ebp 4 + =
152 # OBJ-NEXT: $eip $T0 ^ =
153 # OBJ-NEXT: $esp $T0 4 + =
154 # OBJ-NEXT: $ebp $T0 4 - ^ =
155 # OBJ-NEXT: $ebx $T0 8 - ^ =
156 # OBJ-NEXT: $edi $T0 12 - ^ =
157 # OBJ-NEXT: ]
158 # OBJ-NEXT: }
159 # OBJ-NEXT: FrameData {
160 # OBJ-NEXT: RvaStart: 0x6
161 # OBJ-NEXT: CodeSize: 0x1D
162 # OBJ-NEXT: LocalSize: 0x0
163 # OBJ-NEXT: ParamsSize: 0x4
164 # OBJ-NEXT: MaxStackSize: 0x0
165 # OBJ-NEXT: PrologSize: 0x3
166 # OBJ-NEXT: SavedRegsSize: 0x10
167 # OBJ-NEXT: Flags [ (0x0)
168 # OBJ-NEXT: ]
169 # OBJ-NEXT: FrameFunc [
170 # OBJ-NEXT: $T0 $ebp 4 + =
171 # OBJ-NEXT: $eip $T0 ^ =
172 # OBJ-NEXT: $esp $T0 4 + =
173 # OBJ-NEXT: $ebp $T0 4 - ^ =
174 # OBJ-NEXT: $ebx $T0 8 - ^ =
175 # OBJ-NEXT: $edi $T0 12 - ^ =
176 # OBJ-NEXT: $esi $T0 16 - ^ =
177 # OBJ-NEXT: ]
178 # OBJ-NEXT: }
179 # OBJ-NOT: FrameData