1 |
149 |
jeremybenn |
/* { dg-do compile { target powerpc-*-eabispe } } */
|
2 |
|
|
/* { dg-options "-mcpu=8540 -mabi=spe -O0" } */
|
3 |
|
|
|
4 |
|
|
/* (Test with -O0 so we don't optimize any of them away). */
|
5 |
|
|
|
6 |
|
|
#include <spe.h>
|
7 |
|
|
|
8 |
|
|
/* Test PowerPC SPE extensions. */
|
9 |
|
|
|
10 |
|
|
#define vector __attribute__((vector_size(8)))
|
11 |
|
|
|
12 |
|
|
vector int a, b, c, *ap;
|
13 |
|
|
vector float f, g, h;
|
14 |
|
|
unsigned int *uip;
|
15 |
|
|
unsigned short *usp;
|
16 |
|
|
int i, j, *ip;
|
17 |
|
|
uint64_t ull;
|
18 |
|
|
int64_t sll;
|
19 |
|
|
unsigned ui;
|
20 |
|
|
float fl;
|
21 |
|
|
uint16_t u16;
|
22 |
|
|
int16_t s16;
|
23 |
|
|
|
24 |
|
|
/* These are the only documented/supported accesor functions for the
|
25 |
|
|
SPE builtins. */
|
26 |
|
|
void
|
27 |
|
|
test_api ()
|
28 |
|
|
{
|
29 |
|
|
c = __ev_addw (a, b);
|
30 |
|
|
c = __ev_addiw (a, 8);
|
31 |
|
|
c = __ev_subfw (a, b);
|
32 |
|
|
c = __ev_subifw (8, a);
|
33 |
|
|
c = __ev_abs (a);
|
34 |
|
|
c = __ev_neg (a);
|
35 |
|
|
c = __ev_extsb (a);
|
36 |
|
|
c = __ev_extsh (a);
|
37 |
|
|
c = __ev_and (a, b);
|
38 |
|
|
c = __ev_or (a, b);
|
39 |
|
|
c = __ev_xor (a, b);
|
40 |
|
|
c = __ev_nand (a, b);
|
41 |
|
|
c = __ev_nor (a, b);
|
42 |
|
|
c = __ev_eqv (a, b);
|
43 |
|
|
c = __ev_andc (a, b);
|
44 |
|
|
c = __ev_orc (a, b);
|
45 |
|
|
c = __ev_rlw (a, b);
|
46 |
|
|
c = __ev_rlwi (a, 8);
|
47 |
|
|
c = __ev_slw (a, b);
|
48 |
|
|
c = __ev_slwi (a, 8);
|
49 |
|
|
c = __ev_srws (a, b);
|
50 |
|
|
c = __ev_srwu (a, b);
|
51 |
|
|
c = __ev_srwis (a, 8);
|
52 |
|
|
c = __ev_srwiu (a, 8);
|
53 |
|
|
c = __ev_cntlzw (a);
|
54 |
|
|
c = __ev_cntlsw (a);
|
55 |
|
|
c = __ev_rndw (a);
|
56 |
|
|
c = __ev_mergehi (a, b);
|
57 |
|
|
c = __ev_mergelo (a, b);
|
58 |
|
|
c = __ev_mergelohi (a, b);
|
59 |
|
|
c = __ev_mergehilo (a, b);
|
60 |
|
|
c = __ev_splati (5);
|
61 |
|
|
c = __ev_splatfi (6);
|
62 |
|
|
c = __ev_divws (a, b);
|
63 |
|
|
c = __ev_divwu (a, b);
|
64 |
|
|
c = __ev_mra (a);
|
65 |
|
|
i = __brinc (5, 6);
|
66 |
|
|
|
67 |
|
|
/* Loads. */
|
68 |
|
|
c = __ev_lddx (ap, i);
|
69 |
|
|
c = __ev_ldwx (ap, i);
|
70 |
|
|
c = __ev_ldhx (ap, i);
|
71 |
|
|
|
72 |
|
|
c = __ev_lwhex (uip, i);
|
73 |
|
|
c = __ev_lwhoux (uip, i);
|
74 |
|
|
c = __ev_lwhosx (uip, i);
|
75 |
|
|
c = __ev_lwwsplatx (uip, i);
|
76 |
|
|
c = __ev_lwhsplatx (uip, i);
|
77 |
|
|
|
78 |
|
|
c = __ev_lhhesplatx (usp, i);
|
79 |
|
|
c = __ev_lhhousplatx (usp, i);
|
80 |
|
|
c = __ev_lhhossplatx (usp, i);
|
81 |
|
|
|
82 |
|
|
c = __ev_ldd (ap, 5);
|
83 |
|
|
c = __ev_ldw (ap, 6);
|
84 |
|
|
c = __ev_ldh (ap, 7);
|
85 |
|
|
c = __ev_lwhe (uip, 6);
|
86 |
|
|
c = __ev_lwhou (uip, 6);
|
87 |
|
|
c = __ev_lwhos (uip, 7);
|
88 |
|
|
c = __ev_lwwsplat (uip, 7);
|
89 |
|
|
c = __ev_lwhsplat (uip, 7);
|
90 |
|
|
c = __ev_lhhesplat (usp, 7);
|
91 |
|
|
c = __ev_lhhousplat (usp, 7);
|
92 |
|
|
c = __ev_lhhossplat (usp, 7);
|
93 |
|
|
|
94 |
|
|
/* Stores. */
|
95 |
|
|
__ev_stddx (a, ap, 9);
|
96 |
|
|
__ev_stdwx (a, ap, 9);
|
97 |
|
|
__ev_stdhx (a, ap, 9);
|
98 |
|
|
__ev_stwwex (a, uip, 9);
|
99 |
|
|
__ev_stwwox (a, uip, 9);
|
100 |
|
|
__ev_stwhex (a, uip, 9);
|
101 |
|
|
__ev_stwhox (a, uip, 9);
|
102 |
|
|
__ev_stdd (a, ap, 9);
|
103 |
|
|
__ev_stdw (a, ap, 9);
|
104 |
|
|
__ev_stdh (a, ap, 9);
|
105 |
|
|
__ev_stwwe (a, uip, 9);
|
106 |
|
|
__ev_stwwo (a, uip, 9);
|
107 |
|
|
__ev_stwhe (a, uip, 9);
|
108 |
|
|
__ev_stwho (a, uip, 9);
|
109 |
|
|
|
110 |
|
|
/* Fixed point complex. */
|
111 |
|
|
c = __ev_mhossf (a, b);
|
112 |
|
|
c = __ev_mhosmf (a, b);
|
113 |
|
|
c = __ev_mhosmi (a, b);
|
114 |
|
|
c = __ev_mhoumi (a, b);
|
115 |
|
|
c = __ev_mhessf (a, b);
|
116 |
|
|
c = __ev_mhesmf (a, b);
|
117 |
|
|
c = __ev_mhesmi (a, b);
|
118 |
|
|
c = __ev_mheumi (a, b);
|
119 |
|
|
c = __ev_mhossfa (a, b);
|
120 |
|
|
c = __ev_mhosmfa (a, b);
|
121 |
|
|
c = __ev_mhosmia (a, b);
|
122 |
|
|
c = __ev_mhoumia (a, b);
|
123 |
|
|
c = __ev_mhessfa (a, b);
|
124 |
|
|
c = __ev_mhesmfa (a, b);
|
125 |
|
|
c = __ev_mhesmia (a, b);
|
126 |
|
|
c = __ev_mheumia (a, b);
|
127 |
|
|
|
128 |
|
|
c = __ev_mhoumf (a, b);
|
129 |
|
|
c = __ev_mheumf (a, b);
|
130 |
|
|
c = __ev_mhoumfa (a, b);
|
131 |
|
|
c = __ev_mheumfa (a, b);
|
132 |
|
|
|
133 |
|
|
c = __ev_mhossfaaw (a, b);
|
134 |
|
|
c = __ev_mhossiaaw (a, b);
|
135 |
|
|
c = __ev_mhosmfaaw (a, b);
|
136 |
|
|
c = __ev_mhosmiaaw (a, b);
|
137 |
|
|
c = __ev_mhousiaaw (a, b);
|
138 |
|
|
c = __ev_mhoumiaaw (a, b);
|
139 |
|
|
c = __ev_mhessfaaw (a, b);
|
140 |
|
|
c = __ev_mhessiaaw (a, b);
|
141 |
|
|
c = __ev_mhesmfaaw (a, b);
|
142 |
|
|
c = __ev_mhesmiaaw (a, b);
|
143 |
|
|
c = __ev_mheusiaaw (a, b);
|
144 |
|
|
c = __ev_mheumiaaw (a, b);
|
145 |
|
|
|
146 |
|
|
c = __ev_mhousfaaw (a, b);
|
147 |
|
|
c = __ev_mhoumfaaw (a, b);
|
148 |
|
|
c = __ev_mheusfaaw (a, b);
|
149 |
|
|
c = __ev_mheumfaaw (a, b);
|
150 |
|
|
|
151 |
|
|
c = __ev_mhossfanw (a, b);
|
152 |
|
|
c = __ev_mhossianw (a, b);
|
153 |
|
|
c = __ev_mhosmfanw (a, b);
|
154 |
|
|
c = __ev_mhosmianw (a, b);
|
155 |
|
|
c = __ev_mhousianw (a, b);
|
156 |
|
|
c = __ev_mhoumianw (a, b);
|
157 |
|
|
c = __ev_mhessfanw (a, b);
|
158 |
|
|
c = __ev_mhessianw (a, b);
|
159 |
|
|
c = __ev_mhesmfanw (a, b);
|
160 |
|
|
c = __ev_mhesmianw (a, b);
|
161 |
|
|
c = __ev_mheusianw (a, b);
|
162 |
|
|
c = __ev_mheumianw (a, b);
|
163 |
|
|
|
164 |
|
|
c = __ev_mhousfanw (a, b);
|
165 |
|
|
c = __ev_mhoumfanw (a, b);
|
166 |
|
|
c = __ev_mheusfanw (a, b);
|
167 |
|
|
c = __ev_mheumfanw (a, b);
|
168 |
|
|
|
169 |
|
|
c = __ev_mhogsmfaa (a, b);
|
170 |
|
|
c = __ev_mhogsmiaa (a, b);
|
171 |
|
|
c = __ev_mhogumiaa (a, b);
|
172 |
|
|
c = __ev_mhegsmfaa (a, b);
|
173 |
|
|
c = __ev_mhegsmiaa (a, b);
|
174 |
|
|
c = __ev_mhegumiaa (a, b);
|
175 |
|
|
|
176 |
|
|
c = __ev_mhogumfaa (a, b);
|
177 |
|
|
c = __ev_mhegumfaa (a, b);
|
178 |
|
|
|
179 |
|
|
c = __ev_mhogsmfan (a, b);
|
180 |
|
|
c = __ev_mhogsmian (a, b);
|
181 |
|
|
c = __ev_mhogumian (a, b);
|
182 |
|
|
c = __ev_mhegsmfan (a, b);
|
183 |
|
|
c = __ev_mhegsmian (a, b);
|
184 |
|
|
c = __ev_mhegumian (a, b);
|
185 |
|
|
|
186 |
|
|
c = __ev_mhogumfan (a, b);
|
187 |
|
|
c = __ev_mhegumfan (a, b);
|
188 |
|
|
|
189 |
|
|
c = __ev_mwhssf (a, b);
|
190 |
|
|
c = __ev_mwhsmf (a, b);
|
191 |
|
|
c = __ev_mwhsmi (a, b);
|
192 |
|
|
c = __ev_mwhumi (a, b);
|
193 |
|
|
c = __ev_mwhssfa (a, b);
|
194 |
|
|
c = __ev_mwhsmfa (a, b);
|
195 |
|
|
c = __ev_mwhsmia (a, b);
|
196 |
|
|
c = __ev_mwhumia (a, b);
|
197 |
|
|
|
198 |
|
|
c = __ev_mwhumf (a, b);
|
199 |
|
|
c = __ev_mwhumfa (a, b);
|
200 |
|
|
|
201 |
|
|
c = __ev_mwlumi (a, b);
|
202 |
|
|
c = __ev_mwlumia (a, b);
|
203 |
|
|
c = __ev_mwlumiaaw (a, b);
|
204 |
|
|
|
205 |
|
|
c = __ev_mwlssiaaw (a, b);
|
206 |
|
|
c = __ev_mwlsmiaaw (a, b);
|
207 |
|
|
c = __ev_mwlusiaaw (a, b);
|
208 |
|
|
c = __ev_mwlusiaaw (a, b);
|
209 |
|
|
|
210 |
|
|
c = __ev_mwlssianw (a, b);
|
211 |
|
|
c = __ev_mwlsmianw (a, b);
|
212 |
|
|
c = __ev_mwlusianw (a, b);
|
213 |
|
|
c = __ev_mwlumianw (a, b);
|
214 |
|
|
|
215 |
|
|
c = __ev_mwssf (a, b);
|
216 |
|
|
c = __ev_mwsmf (a, b);
|
217 |
|
|
c = __ev_mwsmi (a, b);
|
218 |
|
|
c = __ev_mwumi (a, b);
|
219 |
|
|
c = __ev_mwssfa (a, b);
|
220 |
|
|
c = __ev_mwsmfa (a, b);
|
221 |
|
|
c = __ev_mwsmia (a, b);
|
222 |
|
|
c = __ev_mwumia (a, b);
|
223 |
|
|
c = __ev_mwumf (a, b);
|
224 |
|
|
c = __ev_mwumfa (a, b);
|
225 |
|
|
c = __ev_mwssfaa (a, b);
|
226 |
|
|
c = __ev_mwsmfaa (a, b);
|
227 |
|
|
c = __ev_mwsmiaa (a, b);
|
228 |
|
|
c = __ev_mwumiaa (a, b);
|
229 |
|
|
c = __ev_mwumfaa (a, b);
|
230 |
|
|
c = __ev_mwssfan (a, b);
|
231 |
|
|
c = __ev_mwsmfan (a, b);
|
232 |
|
|
c = __ev_mwsmian (a, b);
|
233 |
|
|
c = __ev_mwumian (a, b);
|
234 |
|
|
c = __ev_mwumfan (a, b);
|
235 |
|
|
c = __ev_addssiaaw (a);
|
236 |
|
|
c = __ev_addsmiaaw (a);
|
237 |
|
|
c = __ev_addusiaaw (a);
|
238 |
|
|
c = __ev_addumiaaw (a);
|
239 |
|
|
c = __ev_addusfaaw (a);
|
240 |
|
|
c = __ev_addumfaaw (a);
|
241 |
|
|
c = __ev_addsmfaaw (a);
|
242 |
|
|
c = __ev_addssfaaw (a);
|
243 |
|
|
c = __ev_subfssiaaw (a);
|
244 |
|
|
c = __ev_subfsmiaaw (a);
|
245 |
|
|
c = __ev_subfusiaaw (a);
|
246 |
|
|
c = __ev_subfumiaaw (a);
|
247 |
|
|
c = __ev_subfusfaaw (a);
|
248 |
|
|
c = __ev_subfumfaaw (a);
|
249 |
|
|
c = __ev_subfsmfaaw (a);
|
250 |
|
|
c = __ev_subfssfaaw (a);
|
251 |
|
|
|
252 |
|
|
/* Floating point SIMD instructions. */
|
253 |
|
|
c = __ev_fsabs (a);
|
254 |
|
|
c = __ev_fsnabs (a);
|
255 |
|
|
c = __ev_fsneg (a);
|
256 |
|
|
c = __ev_fsadd (a, b);
|
257 |
|
|
c = __ev_fssub (a, b);
|
258 |
|
|
c = __ev_fsmul (a, b);
|
259 |
|
|
c = __ev_fsdiv (a, b);
|
260 |
|
|
c = __ev_fscfui (a);
|
261 |
|
|
c = __ev_fscfsi (a);
|
262 |
|
|
c = __ev_fscfuf (a);
|
263 |
|
|
c = __ev_fscfsf (a);
|
264 |
|
|
c = __ev_fsctui (a);
|
265 |
|
|
c = __ev_fsctsi (a);
|
266 |
|
|
c = __ev_fsctuf (a);
|
267 |
|
|
c = __ev_fsctsf (a);
|
268 |
|
|
c = __ev_fsctuiz (a);
|
269 |
|
|
c = __ev_fsctsiz (a);
|
270 |
|
|
|
271 |
|
|
/* Non supported sythetic instructions made from two instructions. */
|
272 |
|
|
|
273 |
|
|
c = __ev_mwhssfaaw (a, b);
|
274 |
|
|
c = __ev_mwhssiaaw (a, b);
|
275 |
|
|
c = __ev_mwhsmfaaw (a, b);
|
276 |
|
|
c = __ev_mwhsmiaaw (a, b);
|
277 |
|
|
c = __ev_mwhusiaaw (a, b);
|
278 |
|
|
c = __ev_mwhumiaaw (a, b);
|
279 |
|
|
c = __ev_mwhusfaaw (a, b);
|
280 |
|
|
c = __ev_mwhumfaaw (a, b);
|
281 |
|
|
c = __ev_mwhssfanw (a, b);
|
282 |
|
|
c = __ev_mwhssianw (a, b);
|
283 |
|
|
c = __ev_mwhsmfanw (a, b);
|
284 |
|
|
c = __ev_mwhsmianw (a, b);
|
285 |
|
|
c = __ev_mwhusianw (a, b);
|
286 |
|
|
c = __ev_mwhumianw (a, b);
|
287 |
|
|
c = __ev_mwhusfanw (a, b);
|
288 |
|
|
c = __ev_mwhumfanw (a, b);
|
289 |
|
|
|
290 |
|
|
c = __ev_mwhgssfaa (a, b);
|
291 |
|
|
c = __ev_mwhgsmfaa (a, b);
|
292 |
|
|
c = __ev_mwhgsmiaa (a, b);
|
293 |
|
|
c = __ev_mwhgumiaa (a, b);
|
294 |
|
|
c = __ev_mwhgssfan (a, b);
|
295 |
|
|
c = __ev_mwhgsmfan (a, b);
|
296 |
|
|
c = __ev_mwhgsmian (a, b);
|
297 |
|
|
c = __ev_mwhgumian (a, b);
|
298 |
|
|
|
299 |
|
|
/* Creating, insertion, and extraction. */
|
300 |
|
|
|
301 |
|
|
a = __ev_create_u64 ((uint64_t) 55);
|
302 |
|
|
a = __ev_create_s64 ((int64_t) 66);
|
303 |
|
|
a = __ev_create_fs (3.14F, 2.18F);
|
304 |
|
|
a = __ev_create_u32 ((uint32_t) 5, (uint32_t) i);
|
305 |
|
|
a = __ev_create_s32 ((int32_t) 5, (int32_t) 6);
|
306 |
|
|
a = __ev_create_u16 ((uint16_t) 6, (uint16_t) 6, (uint16_t) 7, (uint16_t) 1);
|
307 |
|
|
a = __ev_create_s16 ((int16_t) 6, (int16_t) 6, (int16_t) 7, (int16_t) 9);
|
308 |
|
|
a = __ev_create_sfix32_fs (3.0F, 2.0F);
|
309 |
|
|
a = __ev_create_ufix32_fs (3.0F, 2.0F);
|
310 |
|
|
a = __ev_create_ufix32_u32 (3U, 5U);
|
311 |
|
|
a = __ev_create_sfix32_s32 (6, 9);
|
312 |
|
|
ull = __ev_convert_u64 (a);
|
313 |
|
|
sll = __ev_convert_s64 (a);
|
314 |
|
|
i = __ev_get_upper_u32 (a);
|
315 |
|
|
ui = __ev_get_lower_u32 (a);
|
316 |
|
|
i = __ev_get_upper_s32 (a);
|
317 |
|
|
i = __ev_get_lower_s32 (a);
|
318 |
|
|
fl = __ev_get_upper_fs (a);
|
319 |
|
|
fl = __ev_get_lower_fs (a);
|
320 |
|
|
u16 = __ev_get_u16 (a, 5U);
|
321 |
|
|
s16 = __ev_get_s16 (a, 5U);
|
322 |
|
|
ui = __ev_get_upper_ufix32_u32 (a);
|
323 |
|
|
ui = __ev_get_lower_ufix32_u32 (a);
|
324 |
|
|
i = __ev_get_upper_sfix32_s32 (a);
|
325 |
|
|
i = __ev_get_lower_sfix32_s32 (a);
|
326 |
|
|
fl = __ev_get_upper_sfix32_fs (a);
|
327 |
|
|
fl = __ev_get_lower_sfix32_fs (a);
|
328 |
|
|
fl = __ev_get_upper_ufix32_fs (a);
|
329 |
|
|
fl = __ev_get_lower_ufix32_fs (a);
|
330 |
|
|
a = __ev_set_upper_u32 (a, 5U);
|
331 |
|
|
a = __ev_set_lower_u32 (a, 5U);
|
332 |
|
|
a = __ev_set_upper_s32 (a, 5U);
|
333 |
|
|
a = __ev_set_lower_s32 (a, 6U);
|
334 |
|
|
a = __ev_set_upper_fs (a, 6U);
|
335 |
|
|
a = __ev_set_lower_fs (a, fl);
|
336 |
|
|
a = __ev_set_upper_ufix32_u32 (a, 5U);
|
337 |
|
|
a = __ev_set_lower_ufix32_u32 (a, 5U);
|
338 |
|
|
a = __ev_set_upper_sfix32_s32 (a, 5);
|
339 |
|
|
a = __ev_set_lower_sfix32_s32 (a, 5);
|
340 |
|
|
a = __ev_set_upper_sfix32_fs (a, fl);
|
341 |
|
|
a = __ev_set_lower_sfix32_fs (a, fl);
|
342 |
|
|
a = __ev_set_upper_ufix32_fs (a, fl);
|
343 |
|
|
a = __ev_set_lower_ufix32_fs (a, fl);
|
344 |
|
|
a = __ev_set_acc_u64 ((uint64_t) 640);
|
345 |
|
|
a = __ev_set_acc_s64 ((int64_t) 460);
|
346 |
|
|
a = __ev_set_acc_vec64 (b);
|
347 |
|
|
a = __ev_set_u32 (a, 5, 6);
|
348 |
|
|
a = __ev_set_s32 (a, 5, 6);
|
349 |
|
|
a = __ev_set_fs (a, fl, 5);
|
350 |
|
|
a = __ev_set_u16 (a, 5U, 3);
|
351 |
|
|
a = __ev_set_s16 (a, 5, 6);
|
352 |
|
|
a = __ev_set_ufix32_u32 (a, 5U, 6U);
|
353 |
|
|
a = __ev_set_sfix32_s32 (a, 3, 6);
|
354 |
|
|
a = __ev_set_ufix32_fs (a, fl, 5);
|
355 |
|
|
a = __ev_set_sfix32_fs (a, fl, 5);
|
356 |
|
|
ui = __ev_get_u32 (a, 1);
|
357 |
|
|
i = __ev_get_s32 (a, 0);
|
358 |
|
|
fl = __ev_get_fs (a, 1);
|
359 |
|
|
u16 = __ev_get_u16 (a, 2);
|
360 |
|
|
s16 = __ev_get_s16 (a, 2);
|
361 |
|
|
ui = __ev_get_ufix32_u32 (a, 1);
|
362 |
|
|
i = __ev_get_sfix32_s32 (a, 0);
|
363 |
|
|
fl = __ev_get_ufix32_fs (a, 1);
|
364 |
|
|
fl = __ev_get_sfix32_fs (a, 0);
|
365 |
|
|
|
366 |
|
|
/* Predicates. */
|
367 |
|
|
i = __ev_any_gts (a, b);
|
368 |
|
|
i = __ev_all_gts (a, b);
|
369 |
|
|
i = __ev_upper_gts (a, b);
|
370 |
|
|
i = __ev_lower_gts (a, b);
|
371 |
|
|
a = __ev_select_gts (a, b, c, c);
|
372 |
|
|
|
373 |
|
|
i = __ev_any_gtu (a, b);
|
374 |
|
|
i = __ev_all_gtu (a, b);
|
375 |
|
|
i = __ev_upper_gtu (a, b);
|
376 |
|
|
i = __ev_lower_gtu (a, b);
|
377 |
|
|
a = __ev_select_gtu (a, b, c, c);
|
378 |
|
|
|
379 |
|
|
i = __ev_any_lts (a, b);
|
380 |
|
|
i = __ev_all_lts (a, b);
|
381 |
|
|
i = __ev_upper_lts (a, b);
|
382 |
|
|
i = __ev_lower_lts (a, b);
|
383 |
|
|
a = __ev_select_lts (a, b, c, c);
|
384 |
|
|
|
385 |
|
|
i = __ev_any_ltu (a, b);
|
386 |
|
|
i = __ev_all_ltu (a, b);
|
387 |
|
|
i = __ev_upper_ltu (a, b);
|
388 |
|
|
i = __ev_lower_ltu (a, b);
|
389 |
|
|
a = __ev_select_ltu (a, b, c, c);
|
390 |
|
|
|
391 |
|
|
i = __ev_any_eq (a, b);
|
392 |
|
|
i = __ev_all_eq (a, b);
|
393 |
|
|
i = __ev_upper_eq (a, b);
|
394 |
|
|
i = __ev_lower_eq (a, b);
|
395 |
|
|
a = __ev_select_eq (a, b, c, c);
|
396 |
|
|
|
397 |
|
|
i = __ev_any_fs_gt (a, b);
|
398 |
|
|
i = __ev_all_fs_gt (a, b);
|
399 |
|
|
i = __ev_upper_fs_gt (a, b);
|
400 |
|
|
i = __ev_lower_fs_gt (a, b);
|
401 |
|
|
a = __ev_select_fs_gt (a, b, c, c);
|
402 |
|
|
|
403 |
|
|
i = __ev_any_fs_lt (a, b);
|
404 |
|
|
i = __ev_all_fs_lt (a, b);
|
405 |
|
|
i = __ev_upper_fs_lt (a, b);
|
406 |
|
|
i = __ev_lower_fs_lt (a, b);
|
407 |
|
|
a = __ev_select_fs_lt (a, b, c, b);
|
408 |
|
|
|
409 |
|
|
i = __ev_any_fs_eq (a, b);
|
410 |
|
|
i = __ev_all_fs_eq (a, b);
|
411 |
|
|
i = __ev_upper_fs_eq (a, b);
|
412 |
|
|
i = __ev_lower_fs_eq (a, b);
|
413 |
|
|
a = __ev_select_fs_eq (a, b, c, c);
|
414 |
|
|
|
415 |
|
|
i = __ev_any_fs_tst_gt (a, b);
|
416 |
|
|
i = __ev_all_fs_tst_gt (a, b);
|
417 |
|
|
i = __ev_upper_fs_tst_gt (a, b);
|
418 |
|
|
i = __ev_lower_fs_tst_gt (a, b);
|
419 |
|
|
a = __ev_select_fs_tst_gt (a, b, c, c);
|
420 |
|
|
|
421 |
|
|
i = __ev_any_fs_tst_lt (a, b);
|
422 |
|
|
i = __ev_all_fs_tst_lt (a, b);
|
423 |
|
|
i = __ev_upper_fs_tst_lt (a, b);
|
424 |
|
|
i = __ev_lower_fs_tst_lt (a, b);
|
425 |
|
|
a = __ev_select_fs_tst_lt (a, b, c, c);
|
426 |
|
|
|
427 |
|
|
i = __ev_any_fs_tst_eq (a, b);
|
428 |
|
|
i = __ev_all_fs_tst_eq (a, b);
|
429 |
|
|
i = __ev_upper_fs_tst_eq (a, b);
|
430 |
|
|
i = __ev_lower_fs_tst_eq (a, b);
|
431 |
|
|
a = __ev_select_fs_tst_eq (a, b, c, c);
|
432 |
|
|
}
|
433 |
|
|
|
434 |
|
|
int
|
435 |
|
|
main (void)
|
436 |
|
|
{
|
437 |
|
|
/* Generic binary operations. */
|
438 |
|
|
c = __builtin_spe_evaddw (a, b);
|
439 |
|
|
c = __builtin_spe_evand (a, b);
|
440 |
|
|
c = __builtin_spe_evandc (a, b);
|
441 |
|
|
c = __builtin_spe_evdivws (a, b);
|
442 |
|
|
c = __builtin_spe_evdivwu (a, b);
|
443 |
|
|
c = __builtin_spe_eveqv (a, b);
|
444 |
|
|
h = __builtin_spe_evfsadd (f, g);
|
445 |
|
|
h = __builtin_spe_evfsdiv (f, g);
|
446 |
|
|
h = __builtin_spe_evfsmul (f, g);
|
447 |
|
|
h = __builtin_spe_evfssub (f, g);
|
448 |
|
|
c = __builtin_spe_evlddx (ap, j);
|
449 |
|
|
c = __builtin_spe_evldhx (ap, j);
|
450 |
|
|
c = __builtin_spe_evldwx (ap, j);
|
451 |
|
|
c = __builtin_spe_evlhhesplatx (usp, j);
|
452 |
|
|
c = __builtin_spe_evlhhossplatx (usp, j);
|
453 |
|
|
c = __builtin_spe_evlhhousplatx (usp, j);
|
454 |
|
|
c = __builtin_spe_evlwhex (uip, j);
|
455 |
|
|
c = __builtin_spe_evlwhosx (uip, j);
|
456 |
|
|
c = __builtin_spe_evlwhoux (uip, j);
|
457 |
|
|
c = __builtin_spe_evlwhsplatx (uip, j);
|
458 |
|
|
c = __builtin_spe_evlwwsplatx (uip, j);
|
459 |
|
|
c = __builtin_spe_evmergehi (a, b);
|
460 |
|
|
c = __builtin_spe_evmergehilo (a, b);
|
461 |
|
|
c = __builtin_spe_evmergelo (a, b);
|
462 |
|
|
c = __builtin_spe_evmergelohi (a, b);
|
463 |
|
|
c = __builtin_spe_evmhegsmfaa (a, b);
|
464 |
|
|
c = __builtin_spe_evmhegsmfan (a, b);
|
465 |
|
|
c = __builtin_spe_evmhegsmiaa (a, b);
|
466 |
|
|
c = __builtin_spe_evmhegsmian (a, b);
|
467 |
|
|
c = __builtin_spe_evmhegumiaa (a, b);
|
468 |
|
|
c = __builtin_spe_evmhegumian (a, b);
|
469 |
|
|
c = __builtin_spe_evmhesmf (a, b);
|
470 |
|
|
c = __builtin_spe_evmhesmfa (a, b);
|
471 |
|
|
c = __builtin_spe_evmhesmfaaw (a, b);
|
472 |
|
|
c = __builtin_spe_evmhesmfanw (a, b);
|
473 |
|
|
c = __builtin_spe_evmhesmi (a, b);
|
474 |
|
|
c = __builtin_spe_evmhesmia (a, b);
|
475 |
|
|
c = __builtin_spe_evmhesmiaaw (a, b);
|
476 |
|
|
c = __builtin_spe_evmhesmianw (a, b);
|
477 |
|
|
c = __builtin_spe_evmhessf (a, b);
|
478 |
|
|
c = __builtin_spe_evmhessfa (a, b);
|
479 |
|
|
c = __builtin_spe_evmhessfaaw (a, b);
|
480 |
|
|
c = __builtin_spe_evmhessfanw (a, b);
|
481 |
|
|
c = __builtin_spe_evmhessiaaw (a, b);
|
482 |
|
|
c = __builtin_spe_evmhessianw (a, b);
|
483 |
|
|
c = __builtin_spe_evmheumi (a, b);
|
484 |
|
|
c = __builtin_spe_evmheumia (a, b);
|
485 |
|
|
c = __builtin_spe_evmheumiaaw (a, b);
|
486 |
|
|
c = __builtin_spe_evmheumianw (a, b);
|
487 |
|
|
c = __builtin_spe_evmheusiaaw (a, b);
|
488 |
|
|
c = __builtin_spe_evmheusianw (a, b);
|
489 |
|
|
c = __builtin_spe_evmhogsmfaa (a, b);
|
490 |
|
|
c = __builtin_spe_evmhogsmfan (a, b);
|
491 |
|
|
c = __builtin_spe_evmhogsmiaa (a, b);
|
492 |
|
|
c = __builtin_spe_evmhogsmian (a, b);
|
493 |
|
|
c = __builtin_spe_evmhogumiaa (a, b);
|
494 |
|
|
c = __builtin_spe_evmhogumian (a, b);
|
495 |
|
|
c = __builtin_spe_evmhosmf (a, b);
|
496 |
|
|
c = __builtin_spe_evmhosmfa (a, b);
|
497 |
|
|
c = __builtin_spe_evmhosmfaaw (a, b);
|
498 |
|
|
c = __builtin_spe_evmhosmfanw (a, b);
|
499 |
|
|
c = __builtin_spe_evmhosmi (a, b);
|
500 |
|
|
c = __builtin_spe_evmhosmia (a, b);
|
501 |
|
|
c = __builtin_spe_evmhosmiaaw (a, b);
|
502 |
|
|
c = __builtin_spe_evmhosmianw (a, b);
|
503 |
|
|
c = __builtin_spe_evmhossf (a, b);
|
504 |
|
|
c = __builtin_spe_evmhossfa (a, b);
|
505 |
|
|
c = __builtin_spe_evmhossfaaw (a, b);
|
506 |
|
|
c = __builtin_spe_evmhossfanw (a, b);
|
507 |
|
|
c = __builtin_spe_evmhossiaaw (a, b);
|
508 |
|
|
c = __builtin_spe_evmhossianw (a, b);
|
509 |
|
|
c = __builtin_spe_evmhoumi (a, b);
|
510 |
|
|
c = __builtin_spe_evmhoumia (a, b);
|
511 |
|
|
c = __builtin_spe_evmhoumiaaw (a, b);
|
512 |
|
|
c = __builtin_spe_evmhoumianw (a, b);
|
513 |
|
|
c = __builtin_spe_evmhousiaaw (a, b);
|
514 |
|
|
c = __builtin_spe_evmhousianw (a, b);
|
515 |
|
|
c = __builtin_spe_evmwhsmf (a, b);
|
516 |
|
|
c = __builtin_spe_evmwhsmfa (a, b);
|
517 |
|
|
c = __builtin_spe_evmwhsmi (a, b);
|
518 |
|
|
c = __builtin_spe_evmwhsmia (a, b);
|
519 |
|
|
c = __builtin_spe_evmwhssf (a, b);
|
520 |
|
|
c = __builtin_spe_evmwhssfa (a, b);
|
521 |
|
|
c = __builtin_spe_evmwhumi (a, b);
|
522 |
|
|
c = __builtin_spe_evmwhumia (a, b);
|
523 |
|
|
c = __builtin_spe_evmwlsmiaaw (a, b);
|
524 |
|
|
c = __builtin_spe_evmwlsmianw (a, b);
|
525 |
|
|
c = __builtin_spe_evmwlssiaaw (a, b);
|
526 |
|
|
c = __builtin_spe_evmwlssianw (a, b);
|
527 |
|
|
c = __builtin_spe_evmwlumi (a, b);
|
528 |
|
|
c = __builtin_spe_evmwlumia (a, b);
|
529 |
|
|
c = __builtin_spe_evmwlumiaaw (a, b);
|
530 |
|
|
c = __builtin_spe_evmwlumianw (a, b);
|
531 |
|
|
c = __builtin_spe_evmwlusiaaw (a, b);
|
532 |
|
|
c = __builtin_spe_evmwlusianw (a, b);
|
533 |
|
|
c = __builtin_spe_evmwsmf (a, b);
|
534 |
|
|
c = __builtin_spe_evmwsmfa (a, b);
|
535 |
|
|
c = __builtin_spe_evmwsmfaa (a, b);
|
536 |
|
|
c = __builtin_spe_evmwsmfan (a, b);
|
537 |
|
|
c = __builtin_spe_evmwsmi (a, b);
|
538 |
|
|
c = __builtin_spe_evmwsmia (a, b);
|
539 |
|
|
c = __builtin_spe_evmwsmiaa (a, b);
|
540 |
|
|
c = __builtin_spe_evmwsmian (a, b);
|
541 |
|
|
c = __builtin_spe_evmwssf (a, b);
|
542 |
|
|
c = __builtin_spe_evmwssfa (a, b);
|
543 |
|
|
c = __builtin_spe_evmwssfaa (a, b);
|
544 |
|
|
c = __builtin_spe_evmwssfan (a, b);
|
545 |
|
|
c = __builtin_spe_evmwumi (a, b);
|
546 |
|
|
c = __builtin_spe_evmwumia (a, b);
|
547 |
|
|
c = __builtin_spe_evmwumiaa (a, b);
|
548 |
|
|
c = __builtin_spe_evmwumian (a, b);
|
549 |
|
|
c = __builtin_spe_evnand (a, b);
|
550 |
|
|
c = __builtin_spe_evnor (a, b);
|
551 |
|
|
c = __builtin_spe_evor (a, b);
|
552 |
|
|
c = __builtin_spe_evorc (a, b);
|
553 |
|
|
c = __builtin_spe_evrlw (a, b);
|
554 |
|
|
c = __builtin_spe_evslw (a, b);
|
555 |
|
|
c = __builtin_spe_evsrws (a, b);
|
556 |
|
|
c = __builtin_spe_evsrwu (a, b);
|
557 |
|
|
c = __builtin_spe_evsubfw (a, b);
|
558 |
|
|
c = __builtin_spe_evxor (a, b);
|
559 |
|
|
|
560 |
|
|
c = __builtin_spe_evmwhssfaa (a, b);
|
561 |
|
|
c = __builtin_spe_evmwhssmaa (a, b);
|
562 |
|
|
c = __builtin_spe_evmwhsmfaa (a, b);
|
563 |
|
|
c = __builtin_spe_evmwhsmiaa (a, b);
|
564 |
|
|
c = __builtin_spe_evmwhusiaa (a, b);
|
565 |
|
|
c = __builtin_spe_evmwhumiaa (a, b);
|
566 |
|
|
c = __builtin_spe_evmwhssfan (a, b);
|
567 |
|
|
c = __builtin_spe_evmwhssian (a, b);
|
568 |
|
|
c = __builtin_spe_evmwhsmfan (a, b);
|
569 |
|
|
c = __builtin_spe_evmwhsmian (a, b);
|
570 |
|
|
c = __builtin_spe_evmwhusian (a, b);
|
571 |
|
|
c = __builtin_spe_evmwhumian (a, b);
|
572 |
|
|
c = __builtin_spe_evmwhgssfaa (a, b);
|
573 |
|
|
c = __builtin_spe_evmwhgsmfaa (a, b);
|
574 |
|
|
c = __builtin_spe_evmwhgsmiaa (a, b);
|
575 |
|
|
c = __builtin_spe_evmwhgumiaa (a, b);
|
576 |
|
|
c = __builtin_spe_evmwhgssfan (a, b);
|
577 |
|
|
c = __builtin_spe_evmwhgsmfan (a, b);
|
578 |
|
|
c = __builtin_spe_evmwhgsmian (a, b);
|
579 |
|
|
c = __builtin_spe_evmwhgumian (a, b);
|
580 |
|
|
i = __builtin_spe_brinc (i, j);
|
581 |
|
|
|
582 |
|
|
/* Generic unary operations. */
|
583 |
|
|
a = __builtin_spe_evabs (b);
|
584 |
|
|
a = __builtin_spe_evaddsmiaaw (b);
|
585 |
|
|
a = __builtin_spe_evaddssiaaw (b);
|
586 |
|
|
a = __builtin_spe_evaddumiaaw (b);
|
587 |
|
|
a = __builtin_spe_evaddusiaaw (b);
|
588 |
|
|
a = __builtin_spe_evcntlsw (b);
|
589 |
|
|
a = __builtin_spe_evcntlzw (b);
|
590 |
|
|
a = __builtin_spe_evextsb (b);
|
591 |
|
|
a = __builtin_spe_evextsh (b);
|
592 |
|
|
f = __builtin_spe_evfsabs (g);
|
593 |
|
|
f = __builtin_spe_evfscfsf (g);
|
594 |
|
|
a = __builtin_spe_evfscfsi (g);
|
595 |
|
|
f = __builtin_spe_evfscfuf (g);
|
596 |
|
|
f = __builtin_spe_evfscfui (a);
|
597 |
|
|
f = __builtin_spe_evfsctsf (g);
|
598 |
|
|
a = __builtin_spe_evfsctsi (g);
|
599 |
|
|
a = __builtin_spe_evfsctsiz (g);
|
600 |
|
|
f = __builtin_spe_evfsctuf (g);
|
601 |
|
|
a = __builtin_spe_evfsctui (g);
|
602 |
|
|
a = __builtin_spe_evfsctuiz (g);
|
603 |
|
|
f = __builtin_spe_evfsnabs (g);
|
604 |
|
|
f = __builtin_spe_evfsneg (g);
|
605 |
|
|
a = __builtin_spe_evmra (b);
|
606 |
|
|
a = __builtin_spe_evneg (b);
|
607 |
|
|
a = __builtin_spe_evrndw (b);
|
608 |
|
|
a = __builtin_spe_evsubfsmiaaw (b);
|
609 |
|
|
a = __builtin_spe_evsubfssiaaw (b);
|
610 |
|
|
a = __builtin_spe_evsubfumiaaw (b);
|
611 |
|
|
a = __builtin_spe_evsubfusiaaw (b);
|
612 |
|
|
|
613 |
|
|
/* Unary operations of the form: X = foo (5_bit_signed_immediate). */
|
614 |
|
|
a = __builtin_spe_evsplatfi (5);
|
615 |
|
|
a = __builtin_spe_evsplati (5);
|
616 |
|
|
|
617 |
|
|
/* Binary operations of the form: X = foo(Y, 5_bit_immediate). */
|
618 |
|
|
a = __builtin_spe_evaddiw (b, 13);
|
619 |
|
|
a = __builtin_spe_evldd (ap, 13);
|
620 |
|
|
a = __builtin_spe_evldh (ap, 13);
|
621 |
|
|
a = __builtin_spe_evldw (ap, 13);
|
622 |
|
|
a = __builtin_spe_evlhhesplat (usp, 13);
|
623 |
|
|
a = __builtin_spe_evlhhossplat (usp, 13);
|
624 |
|
|
a = __builtin_spe_evlhhousplat (usp, 13);
|
625 |
|
|
a = __builtin_spe_evlwhe (uip, 13);
|
626 |
|
|
a = __builtin_spe_evlwhos (uip, 13);
|
627 |
|
|
a = __builtin_spe_evlwhou (uip, 13);
|
628 |
|
|
a = __builtin_spe_evlwhsplat (uip, 13);
|
629 |
|
|
a = __builtin_spe_evlwwsplat (uip, 13);
|
630 |
|
|
|
631 |
|
|
a = __builtin_spe_evrlwi (b, 13);
|
632 |
|
|
a = __builtin_spe_evslwi (b, 13);
|
633 |
|
|
a = __builtin_spe_evsrwis (b, 13);
|
634 |
|
|
a = __builtin_spe_evsrwiu (b, 13);
|
635 |
|
|
a = __builtin_spe_evsubifw (b, 13);
|
636 |
|
|
|
637 |
|
|
/* Store indexed builtins. */
|
638 |
|
|
__builtin_spe_evstddx (b, ap, j);
|
639 |
|
|
__builtin_spe_evstdhx (b, ap, j);
|
640 |
|
|
__builtin_spe_evstdwx (b, ap, j);
|
641 |
|
|
__builtin_spe_evstwhex (b, uip, j);
|
642 |
|
|
__builtin_spe_evstwhox (b, uip, j);
|
643 |
|
|
__builtin_spe_evstwwex (b, uip, j);
|
644 |
|
|
__builtin_spe_evstwwox (b, uip, j);
|
645 |
|
|
|
646 |
|
|
/* Store indexed immediate builtins. */
|
647 |
|
|
__builtin_spe_evstdd (b, ap, 5);
|
648 |
|
|
__builtin_spe_evstdh (b, ap, 5);
|
649 |
|
|
__builtin_spe_evstdw (b, ap, 5);
|
650 |
|
|
__builtin_spe_evstwhe (b, uip, 5);
|
651 |
|
|
__builtin_spe_evstwho (b, uip, 5);
|
652 |
|
|
__builtin_spe_evstwwe (b, uip, 5);
|
653 |
|
|
__builtin_spe_evstwwo (b, uip, 5);
|
654 |
|
|
|
655 |
|
|
/* SPEFSCR builtins. */
|
656 |
|
|
i = __builtin_spe_mfspefscr ();
|
657 |
|
|
__builtin_spe_mtspefscr (j);
|
658 |
|
|
|
659 |
|
|
test_api ();
|
660 |
|
|
|
661 |
|
|
return 0;
|
662 |
|
|
}
|