[PATCH 7/57][Arm][GAS] Add support for MVE instructions: vstr/vldr
[binutils-gdb.git] / gdb / testsuite / gdb.arch / i386-sse-stack-align.c
blob206729783ccb1f91b708c94843e0f305fcb05699
1 /* Copyright 2012-2019 Free Software Foundation, Inc.
3 This file is part of GDB.
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.
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.
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/>. */
18 typedef float V __attribute__((vector_size(16)));
20 static V
21 foo (V a, V b)
23 return a + b * a;
26 static __attribute__((noinline, noclone)) int
27 f (void)
29 volatile V a = { 1, 2, 3, 4 };
30 volatile V b;
32 b = foo (a, a);
33 return b[0];
36 static __attribute__((noinline, noclone)) int
37 g0 (void)
39 return f ();
42 static __attribute__((noinline, noclone)) int
43 g1 (int p1)
45 return f ();
48 static __attribute__((noinline, noclone)) int
49 g2 (int p1, int p2)
51 return f ();
54 static __attribute__((noinline, noclone)) int
55 g3 (int p1, int p2, int p3)
57 return f ();
60 static __attribute__((noinline, noclone)) int
61 g4 (int p1, int p2, int p3, int p4)
63 return f ();
66 int
67 main (void)
69 return g0 () + g1 (1) + g2 (1, 2) + g3 (1, 2, 3) + g4 (1, 2, 3, 4);