]>
Commit | Line | Data |
---|---|---|
e7f799ce DM |
1 | /* Copyright (C) 2011 Free Software Foundation, Inc. |
2 | ||
3 | This file is part of GCC. | |
4 | ||
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) | |
8 | any later version. | |
9 | ||
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. | |
14 | ||
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. | |
18 | ||
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/>. */ | |
23 | ||
24 | #ifndef _VISINTRIN_H_INCLUDED | |
25 | #define _VISINTRIN_H_INCLUDED | |
26 | ||
27 | typedef int __v2si __attribute__ ((__vector_size__ (8))); | |
f14e0262 | 28 | typedef int __v1si __attribute__ ((__vector_size__ (4))); |
e7f799ce DM |
29 | typedef short __v4hi __attribute__ ((__vector_size__ (8))); |
30 | typedef short __v2hi __attribute__ ((__vector_size__ (4))); | |
b1e4f4dd DM |
31 | typedef unsigned char __v8qi __attribute__ ((__vector_size__ (8))); |
32 | typedef unsigned char __v4qi __attribute__ ((__vector_size__ (4))); | |
e7f799ce DM |
33 | typedef int __i64 __attribute__ ((__mode__ (DI))); |
34 | ||
10b859c0 DM |
35 | extern __inline void |
36 | __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) | |
37 | __vis_write_gsr (__i64 __A) | |
38 | { | |
39 | __builtin_vis_write_gsr (__A); | |
40 | } | |
41 | ||
42 | extern __inline __i64 | |
43 | __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) | |
44 | __vis_read_gsr (void) | |
45 | { | |
46 | return __builtin_vis_read_gsr (); | |
47 | } | |
48 | ||
e7f799ce DM |
49 | extern __inline void * |
50 | __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) | |
51 | __vis_alignaddr (void *__A, long __B) | |
52 | { | |
53 | return __builtin_vis_alignaddr (__A, __B); | |
54 | } | |
55 | ||
47640f40 DM |
56 | extern __inline void * |
57 | __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) | |
58 | __vis_alignaddrl (void *__A, long __B) | |
59 | { | |
60 | return __builtin_vis_alignaddrl (__A, __B); | |
61 | } | |
62 | ||
e7f799ce DM |
63 | extern __inline __i64 |
64 | __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) | |
b1e4f4dd | 65 | __vis_faligndatadi (__i64 __A, __i64 __B) |
e7f799ce | 66 | { |
b1e4f4dd | 67 | return __builtin_vis_faligndatadi (__A, __B); |
e7f799ce DM |
68 | } |
69 | ||
70 | extern __inline __v2si | |
71 | __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) | |
b1e4f4dd | 72 | __vis_faligndatav2si (__v2si __A, __v2si __B) |
e7f799ce | 73 | { |
b1e4f4dd | 74 | return __builtin_vis_faligndatav2si (__A, __B); |
e7f799ce DM |
75 | } |
76 | ||
77 | extern __inline __v4hi | |
78 | __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) | |
b1e4f4dd | 79 | __vis_faligndatav4hi (__v4hi __A, __v4hi __B) |
e7f799ce | 80 | { |
b1e4f4dd | 81 | return __builtin_vis_faligndatav4hi (__A, __B); |
e7f799ce DM |
82 | } |
83 | ||
84 | extern __inline __v8qi | |
85 | __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) | |
b1e4f4dd | 86 | __vis_faligndatav8qi (__v8qi __A, __v8qi __B) |
e7f799ce | 87 | { |
b1e4f4dd | 88 | return __builtin_vis_faligndatav8qi (__A, __B); |
e7f799ce DM |
89 | } |
90 | ||
91 | extern __inline __v4hi | |
92 | __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) | |
93 | __vis_fexpand (__v4qi __A) | |
94 | { | |
95 | return __builtin_vis_fexpand (__A); | |
96 | } | |
97 | ||
98 | extern __inline __v4hi | |
99 | __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) | |
100 | __vis_fmul8x16 (__v4qi __A, __v4hi __B) | |
101 | { | |
102 | return __builtin_vis_fmul8x16 (__A, __B); | |
103 | } | |
104 | ||
105 | extern __inline __v4hi | |
106 | __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) | |
b1e4f4dd | 107 | __vis_fmul8x16au (__v4qi __A, __v2hi __B) |
e7f799ce DM |
108 | { |
109 | return __builtin_vis_fmul8x16au (__A, __B); | |
110 | } | |
111 | ||
112 | extern __inline __v4hi | |
113 | __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) | |
b1e4f4dd | 114 | __vis_fmul8x16al (__v4qi __A, __v2hi __B) |
e7f799ce DM |
115 | { |
116 | return __builtin_vis_fmul8x16al (__A, __B); | |
117 | } | |
118 | ||
119 | extern __inline __v4hi | |
120 | __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) | |
121 | __vis_fmul8sux16 (__v8qi __A, __v4hi __B) | |
122 | { | |
123 | return __builtin_vis_fmul8sux16 (__A, __B); | |
124 | } | |
125 | ||
126 | extern __inline __v4hi | |
127 | __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) | |
128 | __vis_fmul8ulx16 (__v8qi __A, __v4hi __B) | |
129 | { | |
130 | return __builtin_vis_fmul8ulx16 (__A, __B); | |
131 | } | |
132 | ||
133 | extern __inline __v2si | |
134 | __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) | |
135 | __vis_fmuld8sux16 (__v4qi __A, __v2hi __B) | |
136 | { | |
137 | return __builtin_vis_fmuld8sux16 (__A, __B); | |
138 | } | |
139 | ||
140 | extern __inline __v2si | |
141 | __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) | |
142 | __vis_fmuld8ulx16 (__v4qi __A, __v2hi __B) | |
143 | { | |
144 | return __builtin_vis_fmuld8ulx16 (__A, __B); | |
145 | } | |
146 | ||
147 | extern __inline __v4qi | |
148 | __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) | |
149 | __vis_fpack16 (__v4hi __A) | |
150 | { | |
151 | return __builtin_vis_fpack16 (__A); | |
152 | } | |
153 | ||
154 | extern __inline __v8qi | |
155 | __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) | |
b1e4f4dd | 156 | __vis_fpack32 (__v2si __A, __v8qi __B) |
e7f799ce DM |
157 | { |
158 | return __builtin_vis_fpack32 (__A, __B); | |
159 | } | |
160 | ||
161 | extern __inline __v2hi | |
162 | __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) | |
163 | __vis_fpackfix (__v2si __A) | |
164 | { | |
165 | return __builtin_vis_fpackfix (__A); | |
166 | } | |
167 | ||
168 | extern __inline __v8qi | |
169 | __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) | |
170 | __vis_fpmerge (__v4qi __A, __v4qi __B) | |
171 | { | |
172 | return __builtin_vis_fpmerge (__A, __B); | |
173 | } | |
174 | ||
175 | extern __inline __i64 | |
176 | __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) | |
177 | __vis_pdist (__v8qi __A, __v8qi __B, __i64 __C) | |
178 | { | |
179 | return __builtin_vis_pdist (__A, __B, __C); | |
180 | } | |
181 | ||
cb8bbba8 | 182 | extern __inline long |
b1e4f4dd | 183 | __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) |
47640f40 | 184 | __vis_edge8 (void *__A, void *__B) |
b1e4f4dd DM |
185 | { |
186 | return __builtin_vis_edge8 (__A, __B); | |
187 | } | |
188 | ||
cb8bbba8 | 189 | extern __inline long |
b1e4f4dd | 190 | __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) |
47640f40 | 191 | __vis_edge8l (void *__A, void *__B) |
b1e4f4dd DM |
192 | { |
193 | return __builtin_vis_edge8l (__A, __B); | |
194 | } | |
195 | ||
cb8bbba8 | 196 | extern __inline long |
b1e4f4dd | 197 | __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) |
47640f40 | 198 | __vis_edge16 (void *__A, void *__B) |
b1e4f4dd DM |
199 | { |
200 | return __builtin_vis_edge16 (__A, __B); | |
201 | } | |
202 | ||
cb8bbba8 | 203 | extern __inline long |
b1e4f4dd | 204 | __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) |
47640f40 | 205 | __vis_edge16l (void *__A, void *__B) |
b1e4f4dd DM |
206 | { |
207 | return __builtin_vis_edge16l (__A, __B); | |
208 | } | |
209 | ||
cb8bbba8 | 210 | extern __inline long |
b1e4f4dd | 211 | __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) |
47640f40 | 212 | __vis_edge32 (void *__A, void *__B) |
b1e4f4dd DM |
213 | { |
214 | return __builtin_vis_edge32 (__A, __B); | |
215 | } | |
216 | ||
cb8bbba8 | 217 | extern __inline long |
b1e4f4dd | 218 | __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) |
47640f40 | 219 | __vis_edge32l (void *__A, void *__B) |
b1e4f4dd DM |
220 | { |
221 | return __builtin_vis_edge32l (__A, __B); | |
222 | } | |
223 | ||
cb8bbba8 | 224 | extern __inline long |
f4d7f828 DM |
225 | __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) |
226 | __vis_fcmple16 (__v4hi __A, __v4hi __B) | |
227 | { | |
228 | return __builtin_vis_fcmple16 (__A, __B); | |
229 | } | |
230 | ||
cb8bbba8 | 231 | extern __inline long |
f4d7f828 DM |
232 | __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) |
233 | __vis_fcmple32 (__v2si __A, __v2si __B) | |
234 | { | |
235 | return __builtin_vis_fcmple32 (__A, __B); | |
236 | } | |
237 | ||
cb8bbba8 | 238 | extern __inline long |
f4d7f828 DM |
239 | __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) |
240 | __vis_fcmpne16 (__v4hi __A, __v4hi __B) | |
241 | { | |
242 | return __builtin_vis_fcmpne16 (__A, __B); | |
243 | } | |
244 | ||
cb8bbba8 | 245 | extern __inline long |
f4d7f828 DM |
246 | __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) |
247 | __vis_fcmpne32 (__v2si __A, __v2si __B) | |
248 | { | |
249 | return __builtin_vis_fcmpne32 (__A, __B); | |
250 | } | |
251 | ||
cb8bbba8 | 252 | extern __inline long |
f4d7f828 DM |
253 | __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) |
254 | __vis_fcmpgt16 (__v4hi __A, __v4hi __B) | |
255 | { | |
256 | return __builtin_vis_fcmpgt16 (__A, __B); | |
257 | } | |
258 | ||
cb8bbba8 | 259 | extern __inline long |
f4d7f828 DM |
260 | __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) |
261 | __vis_fcmpgt32 (__v2si __A, __v2si __B) | |
262 | { | |
263 | return __builtin_vis_fcmpgt32 (__A, __B); | |
264 | } | |
265 | ||
cb8bbba8 | 266 | extern __inline long |
f4d7f828 DM |
267 | __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) |
268 | __vis_fcmpeq16 (__v4hi __A, __v4hi __B) | |
269 | { | |
270 | return __builtin_vis_fcmpeq16 (__A, __B); | |
271 | } | |
272 | ||
cb8bbba8 | 273 | extern __inline long |
f4d7f828 DM |
274 | __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) |
275 | __vis_fcmpeq32 (__v2si __A, __v2si __B) | |
276 | { | |
277 | return __builtin_vis_fcmpeq32 (__A, __B); | |
278 | } | |
279 | ||
f14e0262 DM |
280 | extern __inline __v4hi |
281 | __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) | |
282 | __vis_fpadd16 (__v4hi __A, __v4hi __B) | |
283 | { | |
284 | return __builtin_vis_fpadd16 (__A, __B); | |
285 | } | |
286 | ||
287 | extern __inline __v2hi | |
288 | __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) | |
289 | __vis_fpadd16s (__v2hi __A, __v2hi __B) | |
290 | { | |
291 | return __builtin_vis_fpadd16s (__A, __B); | |
292 | } | |
293 | ||
294 | extern __inline __v2si | |
295 | __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) | |
296 | __vis_fpadd32 (__v2si __A, __v2si __B) | |
297 | { | |
298 | return __builtin_vis_fpadd32 (__A, __B); | |
299 | } | |
300 | ||
301 | extern __inline __v1si | |
302 | __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) | |
303 | __vis_fpadd32s (__v1si __A, __v1si __B) | |
304 | { | |
305 | return __builtin_vis_fpadd32s (__A, __B); | |
306 | } | |
307 | ||
308 | extern __inline __v4hi | |
309 | __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) | |
310 | __vis_fpsub16 (__v4hi __A, __v4hi __B) | |
311 | { | |
312 | return __builtin_vis_fpsub16 (__A, __B); | |
313 | } | |
314 | ||
315 | extern __inline __v2hi | |
316 | __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) | |
317 | __vis_fpsub16s (__v2hi __A, __v2hi __B) | |
318 | { | |
319 | return __builtin_vis_fpsub16s (__A, __B); | |
320 | } | |
321 | ||
322 | extern __inline __v2si | |
323 | __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) | |
324 | __vis_fpsub32 (__v2si __A, __v2si __B) | |
325 | { | |
326 | return __builtin_vis_fpsub32 (__A, __B); | |
327 | } | |
328 | ||
329 | extern __inline __v1si | |
330 | __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) | |
331 | __vis_fpsub32s (__v1si __A, __v1si __B) | |
332 | { | |
333 | return __builtin_vis_fpsub32s (__A, __B); | |
334 | } | |
335 | ||
1ec01ab2 DM |
336 | extern __inline long |
337 | __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) | |
338 | __vis_array8 (long __A, long __B) | |
339 | { | |
340 | return __builtin_vis_array8 (__A, __B); | |
341 | } | |
342 | ||
343 | extern __inline long | |
344 | __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) | |
345 | __vis_array16 (long __A, long __B) | |
346 | { | |
347 | return __builtin_vis_array16 (__A, __B); | |
348 | } | |
349 | ||
350 | extern __inline long | |
351 | __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) | |
352 | __vis_array32 (long __A, long __B) | |
353 | { | |
354 | return __builtin_vis_array32 (__A, __B); | |
355 | } | |
356 | ||
c4728c6b DM |
357 | extern __inline long |
358 | __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) | |
359 | __vis_bmask (long __A, long __B) | |
360 | { | |
361 | return __builtin_vis_bmask (__A, __B); | |
362 | } | |
363 | ||
364 | extern __inline __i64 | |
365 | __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) | |
366 | __vis_bshuffledi (__i64 __A, __i64 __B) | |
367 | { | |
368 | return __builtin_vis_bshuffledi (__A, __B); | |
369 | } | |
370 | ||
371 | extern __inline __v2si | |
372 | __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) | |
373 | __vis_bshufflev2si (__v2si __A, __v2si __B) | |
374 | { | |
375 | return __builtin_vis_bshufflev2si (__A, __B); | |
376 | } | |
377 | ||
378 | extern __inline __v4hi | |
379 | __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) | |
380 | __vis_bshufflev4hi (__v4hi __A, __v4hi __B) | |
381 | { | |
382 | return __builtin_vis_bshufflev4hi (__A, __B); | |
383 | } | |
384 | ||
385 | extern __inline __v8qi | |
386 | __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) | |
387 | __vis_bshufflev8qi (__v8qi __A, __v8qi __B) | |
388 | { | |
389 | return __builtin_vis_bshufflev8qi (__A, __B); | |
390 | } | |
391 | ||
392 | extern __inline long | |
393 | __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) | |
394 | __vis_edge8n (void *__A, void *__B) | |
395 | { | |
396 | return __builtin_vis_edge8n (__A, __B); | |
397 | } | |
398 | ||
399 | extern __inline long | |
400 | __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) | |
401 | __vis_edge8ln (void *__A, void *__B) | |
402 | { | |
403 | return __builtin_vis_edge8ln (__A, __B); | |
404 | } | |
405 | ||
406 | extern __inline long | |
407 | __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) | |
408 | __vis_edge16n (void *__A, void *__B) | |
409 | { | |
410 | return __builtin_vis_edge16n (__A, __B); | |
411 | } | |
412 | ||
413 | extern __inline long | |
414 | __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) | |
415 | __vis_edge16ln (void *__A, void *__B) | |
416 | { | |
417 | return __builtin_vis_edge16ln (__A, __B); | |
418 | } | |
419 | ||
420 | extern __inline long | |
421 | __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) | |
422 | __vis_edge32n (void *__A, void *__B) | |
423 | { | |
424 | return __builtin_vis_edge32n (__A, __B); | |
425 | } | |
426 | ||
427 | extern __inline long | |
428 | __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) | |
429 | __vis_edge32ln (void *__A, void *__B) | |
430 | { | |
431 | return __builtin_vis_edge32ln (__A, __B); | |
432 | } | |
433 | ||
e7f799ce | 434 | #endif /* _VISINTRIN_H_INCLUDED */ |