[InstCombine] Signed saturation patterns
[llvm-core.git] / test / MC / COFF / cv-fpo-csrs.s
blob1741143ce14b5f3b5d0aa773900ea4afddfd34e9
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 # Test without %
9 pushl %ebx
10 .cv_fpo_pushreg %ebx
11 pushl %edi
12 .cv_fpo_pushreg %edi
13 pushl %esi
14 .cv_fpo_pushreg esi
15 subl $20, %esp
16 .cv_fpo_stackalloc 20
17 .cv_fpo_endprologue
19 # ASM: .cv_fpo_proc _foo 4
20 # ASM: pushl %ebp
21 # ASM: .cv_fpo_pushreg %ebp
22 # ASM: pushl %ebx
23 # ASM: .cv_fpo_pushreg %ebx
24 # ASM: pushl %edi
25 # ASM: .cv_fpo_pushreg %edi
26 # ASM: pushl %esi
27 # ASM: .cv_fpo_pushreg %esi
28 # ASM: subl $20, %esp
29 # ASM: .cv_fpo_stackalloc 20
30 # ASM: .cv_fpo_endprologue
32 # Clobbers
33 xorl %ebp, %ebp
34 xorl %ebx, %ebx
35 xorl %edi, %edi
36 xorl %esi, %esi
37 # Use that stack memory
38 leal 4(%esp), %eax
39 movl %eax, (%esp)
40 calll _bar
42 # ASM: calll _bar
44 # Epilogue
45 # FIXME: Get FPO data for this once we get it for DWARF.
46 addl $20, %esp
47 popl %esi
48 popl %edi
49 popl %ebx
50 popl %ebp
51 retl
52 .cv_fpo_endproc
54 # ASM: .cv_fpo_endproc
56 .section .debug$S,"dr"
57 .p2align 2
58 .long 4 # Debug section magic
59 .cv_fpo_data _foo
60 .cv_stringtable
62 # ASM: .cv_fpo_data
64 # OBJ: Subsection [
65 # OBJ-NEXT: SubSectionType: FrameData (0xF5)
66 # OBJ-NEXT: SubSectionSize: 0xC4
67 # OBJ-NEXT: LinkageName: _foo
68 # OBJ-NEXT: FrameData {
69 # OBJ-NEXT: RvaStart: 0x0
70 # OBJ-NEXT: CodeSize: 0x23
71 # OBJ-NEXT: LocalSize: 0x0
72 # OBJ-NEXT: ParamsSize: 0x4
73 # OBJ-NEXT: MaxStackSize: 0x0
74 # OBJ-NEXT: PrologSize: 0x7
75 # OBJ-NEXT: SavedRegsSize: 0x0
76 # OBJ-NEXT: Flags [ (0x4)
77 # OBJ-NEXT: IsFunctionStart (0x4)
78 # OBJ-NEXT: ]
79 # OBJ-NEXT: FrameFunc [
80 # OBJ-NEXT: $T0 .raSearch =
81 # OBJ-NEXT: $eip $T0 ^ =
82 # OBJ-NEXT: $esp $T0 4 + =
83 # OBJ-NEXT: ]
84 # OBJ-NEXT: }
85 # OBJ-NEXT: FrameData {
86 # OBJ-NEXT: RvaStart: 0x1
87 # OBJ-NEXT: CodeSize: 0x22
88 # OBJ-NEXT: LocalSize: 0x0
89 # OBJ-NEXT: ParamsSize: 0x4
90 # OBJ-NEXT: MaxStackSize: 0x0
91 # OBJ-NEXT: PrologSize: 0x6
92 # OBJ-NEXT: SavedRegsSize: 0x4
93 # OBJ-NEXT: Flags [ (0x0)
94 # OBJ-NEXT: ]
95 # OBJ-NEXT: FrameFunc [
96 # OBJ-NEXT: $T0 .raSearch =
97 # OBJ-NEXT: $eip $T0 ^ =
98 # OBJ-NEXT: $esp $T0 4 + =
99 # OBJ-NEXT: $ebp $T0 4 - ^ =
100 # OBJ-NEXT: ]
101 # OBJ-NEXT: }
102 # OBJ-NEXT: FrameData {
103 # OBJ-NEXT: RvaStart: 0x2
104 # OBJ-NEXT: CodeSize: 0x21
105 # OBJ-NEXT: LocalSize: 0x0
106 # OBJ-NEXT: ParamsSize: 0x4
107 # OBJ-NEXT: MaxStackSize: 0x0
108 # OBJ-NEXT: PrologSize: 0x5
109 # OBJ-NEXT: SavedRegsSize: 0x8
110 # OBJ-NEXT: Flags [ (0x0)
111 # OBJ-NEXT: ]
112 # OBJ-NEXT: FrameFunc [
113 # OBJ-NEXT: $T0 .raSearch =
114 # OBJ-NEXT: $eip $T0 ^ =
115 # OBJ-NEXT: $esp $T0 4 + =
116 # OBJ-NEXT: $ebp $T0 4 - ^ =
117 # OBJ-NEXT: $ebx $T0 8 - ^ =
118 # OBJ-NEXT: ]
119 # OBJ-NEXT: }
120 # OBJ-NEXT: FrameData {
121 # OBJ-NEXT: RvaStart: 0x3
122 # OBJ-NEXT: CodeSize: 0x20
123 # OBJ-NEXT: LocalSize: 0x0
124 # OBJ-NEXT: ParamsSize: 0x4
125 # OBJ-NEXT: MaxStackSize: 0x0
126 # OBJ-NEXT: PrologSize: 0x4
127 # OBJ-NEXT: SavedRegsSize: 0xC
128 # OBJ-NEXT: Flags [ (0x0)
129 # OBJ-NEXT: ]
130 # OBJ-NEXT: FrameFunc [
131 # OBJ-NEXT: $T0 .raSearch =
132 # OBJ-NEXT: $eip $T0 ^ =
133 # OBJ-NEXT: $esp $T0 4 + =
134 # OBJ-NEXT: $ebp $T0 4 - ^ =
135 # OBJ-NEXT: $ebx $T0 8 - ^ =
136 # OBJ-NEXT: $edi $T0 12 - ^ =
137 # OBJ-NEXT: ]
138 # OBJ-NEXT: }
139 # OBJ-NEXT: FrameData {
140 # OBJ-NEXT: RvaStart: 0x4
141 # OBJ-NEXT: CodeSize: 0x1F
142 # OBJ-NEXT: LocalSize: 0x0
143 # OBJ-NEXT: ParamsSize: 0x4
144 # OBJ-NEXT: MaxStackSize: 0x0
145 # OBJ-NEXT: PrologSize: 0x3
146 # OBJ-NEXT: SavedRegsSize: 0x10
147 # OBJ-NEXT: Flags [ (0x0)
148 # OBJ-NEXT: ]
149 # OBJ-NEXT: FrameFunc [
150 # OBJ-NEXT: $T0 .raSearch =
151 # OBJ-NEXT: $eip $T0 ^ =
152 # OBJ-NEXT: $esp $T0 4 + =
153 # OBJ-NEXT: $ebp $T0 4 - ^ =
154 # OBJ-NEXT: $ebx $T0 8 - ^ =
155 # OBJ-NEXT: $edi $T0 12 - ^ =
156 # OBJ-NEXT: $esi $T0 16 - ^ =
157 # OBJ-NEXT: ]
158 # OBJ-NEXT: }
159 # OBJ-NEXT: FrameData {
160 # OBJ-NEXT: RvaStart: 0x7
161 # OBJ-NEXT: CodeSize: 0x1C
162 # OBJ-NEXT: LocalSize: 0x14
163 # OBJ-NEXT: ParamsSize: 0x4
164 # OBJ-NEXT: MaxStackSize: 0x0
165 # OBJ-NEXT: PrologSize: 0x0
166 # OBJ-NEXT: SavedRegsSize: 0x10
167 # OBJ-NEXT: Flags [ (0x0)
168 # OBJ-NEXT: ]
169 # OBJ-NEXT: FrameFunc [
170 # OBJ-NEXT: $T0 .raSearch =
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