Automatic Copyright Year update after running gdb/copyright.py
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.arch / i386-sse-stack-align.c
CommitLineData
88b9d363 1/* Copyright 2012-2022 Free Software Foundation, Inc.
f85e18ee
JK
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
18typedef float V __attribute__((vector_size(16)));
19
20static V
21foo (V a, V b)
22{
23 return a + b * a;
24}
25
26static __attribute__((noinline, noclone)) int
27f (void)
28{
29 volatile V a = { 1, 2, 3, 4 };
30 volatile V b;
31
32 b = foo (a, a);
33 return b[0];
34}
35
36static __attribute__((noinline, noclone)) int
c47b145e 37test_g0 (void)
f85e18ee
JK
38{
39 return f ();
40}
41
42static __attribute__((noinline, noclone)) int
c47b145e 43test_g1 (int p1)
f85e18ee
JK
44{
45 return f ();
46}
47
48static __attribute__((noinline, noclone)) int
c47b145e 49test_g2 (int p1, int p2)
f85e18ee
JK
50{
51 return f ();
52}
53
54static __attribute__((noinline, noclone)) int
c47b145e 55test_g3 (int p1, int p2, int p3)
f85e18ee
JK
56{
57 return f ();
58}
59
60static __attribute__((noinline, noclone)) int
c47b145e 61test_g4 (int p1, int p2, int p3, int p4)
f85e18ee
JK
62{
63 return f ();
64}
65
66int
67main (void)
68{
c47b145e
TV
69 return (test_g0 () + test_g1 (1) + test_g2 (1, 2) + test_g3 (1, 2, 3)
70 + test_g4 (1, 2, 3, 4);
f85e18ee 71}
This page took 1.10075 seconds and 4 git commands to generate.