1/* Copyright 2012-2020 Free Software Foundation, Inc.
2
3   This file is part of GDB.
4
5   This program is free software; you can redistribute it and/or modify
6   it under the terms of the GNU General Public License as published by
7   the Free Software Foundation; either version 3 of the License, or
8   (at your option) any later version.
9
10   This program is distributed in the hope that it will be useful,
11   but WITHOUT ANY WARRANTY; without even the implied warranty of
12   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13   GNU General Public License for more details.
14
15   You should have received a copy of the GNU General Public License
16   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
17
18/*
19   gcc -S -o gdb.arch/i386-sse-stack-align.{S,c} -Wall -m32 -msse
20 */
21
22	.file	"i386-sse-stack-align.c"
23	.text
24	.type	foo, @function
25foo:
26.LFB0:
27	.cfi_startproc
28	pushl	%ebp
29	.cfi_def_cfa_offset 8
30	.cfi_offset 5, -8
31	movl	%esp, %ebp
32	.cfi_def_cfa_register 5
33	subl	$40, %esp
34	movaps	%xmm0, -24(%ebp)
35	movaps	%xmm1, -40(%ebp)
36	movaps	-24(%ebp), %xmm0
37	movaps	-40(%ebp), %xmm1
38	mulps	%xmm1, %xmm0
39	addps	-24(%ebp), %xmm0
40	leave
41	.cfi_restore 5
42	.cfi_def_cfa 4, 4
43	ret
44	.cfi_endproc
45.LFE0:
46	.size	foo, .-foo
47	.type	f, @function
48f:
49.LFB1:
50	.cfi_startproc
51	pushl	%ebp
52	.cfi_def_cfa_offset 8
53	.cfi_offset 5, -8
54	movl	%esp, %ebp
55	.cfi_def_cfa_register 5
56	subl	$40, %esp
57	movaps	.LC0, %xmm0
58	movaps	%xmm0, -24(%ebp)
59	movaps	-24(%ebp), %xmm1
60	movaps	-24(%ebp), %xmm0
61	call	foo
62	movaps	%xmm0, -40(%ebp)
63	leal	-40(%ebp), %eax
64	movss	(%eax), %xmm0
65	cvttss2si	%xmm0, %eax
66	leave
67	.cfi_restore 5
68	.cfi_def_cfa 4, 4
69	ret
70	.cfi_endproc
71.LFE1:
72	.size	f, .-f
73	.type	g0, @function
74g0:
75.LFB2:
76	.cfi_startproc
77	pushl	%ebp
78	.cfi_def_cfa_offset 8
79	.cfi_offset 5, -8
80	movl	%esp, %ebp
81	.cfi_def_cfa_register 5
82	subl	$8, %esp
83	call	f
84	leave
85	.cfi_restore 5
86	.cfi_def_cfa 4, 4
87	ret
88	.cfi_endproc
89.LFE2:
90	.size	g0, .-g0
91	.type	g1, @function
92g1:
93.LFB3:
94	.cfi_startproc
95	pushl	%ebp
96	.cfi_def_cfa_offset 8
97	.cfi_offset 5, -8
98	movl	%esp, %ebp
99	.cfi_def_cfa_register 5
100	subl	$8, %esp
101	call	f
102	leave
103	.cfi_restore 5
104	.cfi_def_cfa 4, 4
105	ret
106	.cfi_endproc
107.LFE3:
108	.size	g1, .-g1
109	.type	g2, @function
110g2:
111.LFB4:
112	.cfi_startproc
113	pushl	%ebp
114	.cfi_def_cfa_offset 8
115	.cfi_offset 5, -8
116	movl	%esp, %ebp
117	.cfi_def_cfa_register 5
118	subl	$8, %esp
119	call	f
120	leave
121	.cfi_restore 5
122	.cfi_def_cfa 4, 4
123	ret
124	.cfi_endproc
125.LFE4:
126	.size	g2, .-g2
127	.type	g3, @function
128g3:
129.LFB5:
130	.cfi_startproc
131	pushl	%ebp
132	.cfi_def_cfa_offset 8
133	.cfi_offset 5, -8
134	movl	%esp, %ebp
135	.cfi_def_cfa_register 5
136	subl	$8, %esp
137	call	f
138	leave
139	.cfi_restore 5
140	.cfi_def_cfa 4, 4
141	ret
142	.cfi_endproc
143.LFE5:
144	.size	g3, .-g3
145	.type	g4, @function
146g4:
147.LFB6:
148	.cfi_startproc
149	pushl	%ebp
150	.cfi_def_cfa_offset 8
151	.cfi_offset 5, -8
152	movl	%esp, %ebp
153	.cfi_def_cfa_register 5
154	subl	$8, %esp
155	call	f
156	leave
157	.cfi_restore 5
158	.cfi_def_cfa 4, 4
159	ret
160	.cfi_endproc
161.LFE6:
162	.size	g4, .-g4
163	.globl	main
164	.type	main, @function
165main:
166.LFB7:
167	.cfi_startproc
168	pushl	%ebp
169	.cfi_def_cfa_offset 8
170	.cfi_offset 5, -8
171	movl	%esp, %ebp
172	.cfi_def_cfa_register 5
173	pushl	%ebx
174	andl	$-16, %esp
175	subl	$16, %esp
176	.cfi_offset 3, -12
177	call	g0
178	movl	%eax, %ebx
179	movl	$1, (%esp)
180	call	g1
181	addl	%eax, %ebx
182	movl	$2, 4(%esp)
183	movl	$1, (%esp)
184	call	g2
185	addl	%eax, %ebx
186	movl	$3, 8(%esp)
187	movl	$2, 4(%esp)
188	movl	$1, (%esp)
189	call	g3
190	addl	%eax, %ebx
191	movl	$4, 12(%esp)
192	movl	$3, 8(%esp)
193	movl	$2, 4(%esp)
194	movl	$1, (%esp)
195	call	g4
196	addl	%ebx, %eax
197	movl	-4(%ebp), %ebx
198	leave
199	.cfi_restore 5
200	.cfi_def_cfa 4, 4
201	.cfi_restore 3
202	ret
203	.cfi_endproc
204.LFE7:
205	.size	main, .-main
206	.section	.rodata
207	.align 16
208.LC0:
209	.long	1065353216
210	.long	1073741824
211	.long	1077936128
212	.long	1082130432
213	.ident	"GCC: (GNU) 4.6.4 20120612 (prerelease)"
214	.section	.note.GNU-stack,"",@progbits
215