1 /* Copyright (C) 2011 Free Software Foundation, Inc.
3 This file is part of GCC.
5 GCC 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, or (at your option)
10 GCC 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 Under Section 7 of GPL version 3, you are granted additional
16 permissions described in the GCC Runtime Library Exception, version
17 3.1, as published by the Free Software Foundation.
19 You should have received a copy of the GNU General Public License and
20 a copy of the GCC Runtime Library Exception along with this program;
21 see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
22 <http://www.gnu.org/licenses/>. */
24 #ifndef _VISINTRIN_H_INCLUDED
25 #define _VISINTRIN_H_INCLUDED
27 typedef int __v2si
__attribute__ ((__vector_size__ (8)));
28 typedef short __v4hi
__attribute__ ((__vector_size__ (8)));
29 typedef short __v2hi
__attribute__ ((__vector_size__ (4)));
30 typedef unsigned char __v8qi
__attribute__ ((__vector_size__ (8)));
31 typedef unsigned char __v4qi
__attribute__ ((__vector_size__ (4)));
32 typedef int __i64
__attribute__ ((__mode__ (DI
)));
35 __attribute__ ((__gnu_inline__
, __always_inline__
, __artificial__
))
36 __vis_write_gsr (__i64 __A
)
38 __builtin_vis_write_gsr (__A
);
42 __attribute__ ((__gnu_inline__
, __always_inline__
, __artificial__
))
45 return __builtin_vis_read_gsr ();
48 extern __inline
void *
49 __attribute__ ((__gnu_inline__
, __always_inline__
, __artificial__
))
50 __vis_alignaddr (void *__A
, long __B
)
52 return __builtin_vis_alignaddr (__A
, __B
);
55 extern __inline
void *
56 __attribute__ ((__gnu_inline__
, __always_inline__
, __artificial__
))
57 __vis_alignaddrl (void *__A
, long __B
)
59 return __builtin_vis_alignaddrl (__A
, __B
);
63 __attribute__ ((__gnu_inline__
, __always_inline__
, __artificial__
))
64 __vis_faligndatadi (__i64 __A
, __i64 __B
)
66 return __builtin_vis_faligndatadi (__A
, __B
);
69 extern __inline __v2si
70 __attribute__ ((__gnu_inline__
, __always_inline__
, __artificial__
))
71 __vis_faligndatav2si (__v2si __A
, __v2si __B
)
73 return __builtin_vis_faligndatav2si (__A
, __B
);
76 extern __inline __v4hi
77 __attribute__ ((__gnu_inline__
, __always_inline__
, __artificial__
))
78 __vis_faligndatav4hi (__v4hi __A
, __v4hi __B
)
80 return __builtin_vis_faligndatav4hi (__A
, __B
);
83 extern __inline __v8qi
84 __attribute__ ((__gnu_inline__
, __always_inline__
, __artificial__
))
85 __vis_faligndatav8qi (__v8qi __A
, __v8qi __B
)
87 return __builtin_vis_faligndatav8qi (__A
, __B
);
90 extern __inline __v4hi
91 __attribute__ ((__gnu_inline__
, __always_inline__
, __artificial__
))
92 __vis_fexpand (__v4qi __A
)
94 return __builtin_vis_fexpand (__A
);
97 extern __inline __v4hi
98 __attribute__ ((__gnu_inline__
, __always_inline__
, __artificial__
))
99 __vis_fmul8x16 (__v4qi __A
, __v4hi __B
)
101 return __builtin_vis_fmul8x16 (__A
, __B
);
104 extern __inline __v4hi
105 __attribute__ ((__gnu_inline__
, __always_inline__
, __artificial__
))
106 __vis_fmul8x16au (__v4qi __A
, __v2hi __B
)
108 return __builtin_vis_fmul8x16au (__A
, __B
);
111 extern __inline __v4hi
112 __attribute__ ((__gnu_inline__
, __always_inline__
, __artificial__
))
113 __vis_fmul8x16al (__v4qi __A
, __v2hi __B
)
115 return __builtin_vis_fmul8x16al (__A
, __B
);
118 extern __inline __v4hi
119 __attribute__ ((__gnu_inline__
, __always_inline__
, __artificial__
))
120 __vis_fmul8sux16 (__v8qi __A
, __v4hi __B
)
122 return __builtin_vis_fmul8sux16 (__A
, __B
);
125 extern __inline __v4hi
126 __attribute__ ((__gnu_inline__
, __always_inline__
, __artificial__
))
127 __vis_fmul8ulx16 (__v8qi __A
, __v4hi __B
)
129 return __builtin_vis_fmul8ulx16 (__A
, __B
);
132 extern __inline __v2si
133 __attribute__ ((__gnu_inline__
, __always_inline__
, __artificial__
))
134 __vis_fmuld8sux16 (__v4qi __A
, __v2hi __B
)
136 return __builtin_vis_fmuld8sux16 (__A
, __B
);
139 extern __inline __v2si
140 __attribute__ ((__gnu_inline__
, __always_inline__
, __artificial__
))
141 __vis_fmuld8ulx16 (__v4qi __A
, __v2hi __B
)
143 return __builtin_vis_fmuld8ulx16 (__A
, __B
);
146 extern __inline __v4qi
147 __attribute__ ((__gnu_inline__
, __always_inline__
, __artificial__
))
148 __vis_fpack16 (__v4hi __A
)
150 return __builtin_vis_fpack16 (__A
);
153 extern __inline __v8qi
154 __attribute__ ((__gnu_inline__
, __always_inline__
, __artificial__
))
155 __vis_fpack32 (__v2si __A
, __v8qi __B
)
157 return __builtin_vis_fpack32 (__A
, __B
);
160 extern __inline __v2hi
161 __attribute__ ((__gnu_inline__
, __always_inline__
, __artificial__
))
162 __vis_fpackfix (__v2si __A
)
164 return __builtin_vis_fpackfix (__A
);
167 extern __inline __v8qi
168 __attribute__ ((__gnu_inline__
, __always_inline__
, __artificial__
))
169 __vis_fpmerge (__v4qi __A
, __v4qi __B
)
171 return __builtin_vis_fpmerge (__A
, __B
);
174 extern __inline __i64
175 __attribute__ ((__gnu_inline__
, __always_inline__
, __artificial__
))
176 __vis_pdist (__v8qi __A
, __v8qi __B
, __i64 __C
)
178 return __builtin_vis_pdist (__A
, __B
, __C
);
182 __attribute__ ((__gnu_inline__
, __always_inline__
, __artificial__
))
183 __vis_edge8 (void *__A
, void *__B
)
185 return __builtin_vis_edge8 (__A
, __B
);
189 __attribute__ ((__gnu_inline__
, __always_inline__
, __artificial__
))
190 __vis_edge8l (void *__A
, void *__B
)
192 return __builtin_vis_edge8l (__A
, __B
);
196 __attribute__ ((__gnu_inline__
, __always_inline__
, __artificial__
))
197 __vis_edge16 (void *__A
, void *__B
)
199 return __builtin_vis_edge16 (__A
, __B
);
203 __attribute__ ((__gnu_inline__
, __always_inline__
, __artificial__
))
204 __vis_edge16l (void *__A
, void *__B
)
206 return __builtin_vis_edge16l (__A
, __B
);
210 __attribute__ ((__gnu_inline__
, __always_inline__
, __artificial__
))
211 __vis_edge32 (void *__A
, void *__B
)
213 return __builtin_vis_edge32 (__A
, __B
);
217 __attribute__ ((__gnu_inline__
, __always_inline__
, __artificial__
))
218 __vis_edge32l (void *__A
, void *__B
)
220 return __builtin_vis_edge32l (__A
, __B
);
224 __attribute__ ((__gnu_inline__
, __always_inline__
, __artificial__
))
225 __vis_fcmple16 (__v4hi __A
, __v4hi __B
)
227 return __builtin_vis_fcmple16 (__A
, __B
);
231 __attribute__ ((__gnu_inline__
, __always_inline__
, __artificial__
))
232 __vis_fcmple32 (__v2si __A
, __v2si __B
)
234 return __builtin_vis_fcmple32 (__A
, __B
);
238 __attribute__ ((__gnu_inline__
, __always_inline__
, __artificial__
))
239 __vis_fcmpne16 (__v4hi __A
, __v4hi __B
)
241 return __builtin_vis_fcmpne16 (__A
, __B
);
245 __attribute__ ((__gnu_inline__
, __always_inline__
, __artificial__
))
246 __vis_fcmpne32 (__v2si __A
, __v2si __B
)
248 return __builtin_vis_fcmpne32 (__A
, __B
);
252 __attribute__ ((__gnu_inline__
, __always_inline__
, __artificial__
))
253 __vis_fcmpgt16 (__v4hi __A
, __v4hi __B
)
255 return __builtin_vis_fcmpgt16 (__A
, __B
);
259 __attribute__ ((__gnu_inline__
, __always_inline__
, __artificial__
))
260 __vis_fcmpgt32 (__v2si __A
, __v2si __B
)
262 return __builtin_vis_fcmpgt32 (__A
, __B
);
266 __attribute__ ((__gnu_inline__
, __always_inline__
, __artificial__
))
267 __vis_fcmpeq16 (__v4hi __A
, __v4hi __B
)
269 return __builtin_vis_fcmpeq16 (__A
, __B
);
273 __attribute__ ((__gnu_inline__
, __always_inline__
, __artificial__
))
274 __vis_fcmpeq32 (__v2si __A
, __v2si __B
)
276 return __builtin_vis_fcmpeq32 (__A
, __B
);
279 #endif /* _VISINTRIN_H_INCLUDED */