Update concepts branch to revision 131834
[official-gcc.git] / gcc / testsuite / gcc.dg / compat / vector-defs.h
blob7574e28c53d530ebf4cb7cc4158d4849e00bf6f9
1 /* This includes all of the vector modes that are recognized by
2 c_common_type_for_mode. */
4 typedef int __attribute__((mode(QI))) qi;
5 typedef int __attribute__((mode(HI))) hi;
6 typedef int __attribute__((mode(SI))) si;
7 typedef int __attribute__((mode(DI))) di;
8 typedef float __attribute__((mode(SF))) sf;
9 #if ((__SIZEOF_DOUBLE__ >= 8) || (__SIZEOF_LONG_DOUBLE__ >= 8))
10 typedef float __attribute__((mode(DF))) df;
11 #else
12 typedef float __attribute__((mode(SF))) df;
13 #endif
15 #if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 5)
17 typedef qi __attribute__((vector_size (8))) v8qi;
18 typedef qi __attribute__((vector_size (16))) v16qi;
20 typedef hi __attribute__((vector_size (4))) v2hi;
21 typedef hi __attribute__((vector_size (8))) v4hi;
22 typedef hi __attribute__((vector_size (16))) v8hi;
24 typedef si __attribute__((vector_size (8))) v2si;
25 typedef si __attribute__((vector_size (16))) v4si;
27 typedef di __attribute__((vector_size (8))) v1di;
28 typedef di __attribute__((vector_size (16))) v2di;
30 typedef sf __attribute__((vector_size (8))) v2sf;
31 typedef sf __attribute__((vector_size (16))) v4sf;
32 typedef sf __attribute__((vector_size (64))) v16sf;
34 typedef df __attribute__((vector_size (16))) v2df;
36 #else
38 typedef int __attribute__((mode(V8QI))) v8qi;
39 typedef int __attribute__((mode(V16QI))) v16qi;
41 typedef int __attribute__((mode(V2HI))) v2hi;
42 typedef int __attribute__((mode(V4HI))) v4hi;
43 typedef int __attribute__((mode(V8HI))) v8hi;
45 typedef int __attribute__((mode(V2SI))) v2si;
46 typedef int __attribute__((mode(V4SI))) v4si;
48 typedef int __attribute__((mode(V1DI))) v1di;
49 typedef int __attribute__((mode(V2DI))) v2di;
51 typedef float __attribute__((mode(V2SF))) v2sf;
52 typedef float __attribute__((mode(V4SF))) v4sf;
53 typedef float __attribute__((mode(V16SF))) v16sf;
55 typedef float __attribute__((mode(V2DF))) v2df;
57 #endif
59 typedef union U8QI { v8qi v; qi a[8]; } u8qi;
60 typedef union U16QI { v16qi v; qi a[16]; } u16qi;
62 typedef union U2HI { v2hi v; hi a[2]; } u2hi;
63 typedef union U4HI { v4hi v; hi a[4]; } u4hi;
64 typedef union U8HI { v8hi v; hi a[8]; } u8hi;
66 typedef union U2SI { v2si v; si a[2]; } u2si;
67 typedef union U4SI { v4si v; si a[4]; } u4si;
69 typedef union U1DI { v1di v; di a[1]; } u1di;
70 typedef union U2DI { v2di v; di a[2]; } u2di;
72 typedef union U2SF { v2sf v; sf a[2]; } u2sf;
73 typedef union U4SF { v4sf v; sf a[4]; } u4sf;
74 typedef union U16SF { v16sf v; sf a[16]; } u16sf;
76 typedef union U2DF { v2df v; df a[2]; } u2df;