2009-07-17 Richard Guenther <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.target / mips / mips-ps-3.c
blobe9ed4c03f5f7dec3628aa96ad9d5ea0bda1bb682
1 /* { dg-do run } */
2 /* { dg-options "-O2 -mpaired-single" } */
4 /* Test MIPS paired-single conditional move */
5 #include <stdlib.h>
6 #include <stdio.h>
8 typedef float v2sf __attribute__((vector_size(8)));
10 NOMIPS16 v2sf test0 (v2sf a, v2sf b, v2sf c, v2sf d);
11 NOMIPS16 v2sf test1 (v2sf a, v2sf b, v2sf c, v2sf d);
12 NOMIPS16 v2sf test2 (v2sf a, v2sf b, v2sf c, v2sf d);
13 NOMIPS16 v2sf test3 (v2sf a, v2sf b, v2sf c, v2sf d);
14 NOMIPS16 v2sf test4 (v2sf a, v2sf b, v2sf c, v2sf d);
15 NOMIPS16 v2sf test5 (v2sf a, v2sf b, v2sf c, v2sf d);
16 NOMIPS16 v2sf test6 (v2sf a, v2sf b, v2sf c, v2sf d);
17 NOMIPS16 v2sf test7 (v2sf a, v2sf b, v2sf c, v2sf d);
18 NOMIPS16 v2sf test8 (v2sf a, v2sf b, v2sf c, v2sf d);
19 NOMIPS16 v2sf test9 (v2sf a, v2sf b, v2sf c, v2sf d);
20 NOMIPS16 v2sf test10 (v2sf a, v2sf b, v2sf c, v2sf d);
21 NOMIPS16 v2sf test11 (v2sf a, v2sf b, v2sf c, v2sf d);
22 NOMIPS16 v2sf test12 (v2sf a, v2sf b, v2sf c, v2sf d);
23 NOMIPS16 v2sf test13 (v2sf a, v2sf b, v2sf c, v2sf d);
24 NOMIPS16 v2sf test14 (v2sf a, v2sf b, v2sf c, v2sf d);
25 NOMIPS16 v2sf test15 (v2sf a, v2sf b, v2sf c, v2sf d);
26 NOMIPS16 v2sf test16 (v2sf a, v2sf b, v2sf c, v2sf d);
27 NOMIPS16 v2sf test17 (v2sf a, v2sf b, v2sf c, v2sf d);
28 NOMIPS16 v2sf test18 (v2sf a, v2sf b, v2sf c, v2sf d);
29 NOMIPS16 v2sf test19 (v2sf a, v2sf b, v2sf c, v2sf d);
30 NOMIPS16 v2sf test20 (v2sf a, v2sf b, v2sf c, v2sf d);
31 NOMIPS16 v2sf test21 (v2sf a, v2sf b, v2sf c, v2sf d);
32 NOMIPS16 v2sf test22 (v2sf a, v2sf b, v2sf c, v2sf d);
33 NOMIPS16 v2sf test23 (v2sf a, v2sf b, v2sf c, v2sf d);
34 NOMIPS16 v2sf test24 (v2sf a, v2sf b, v2sf c, v2sf d);
35 NOMIPS16 v2sf test25 (v2sf a, v2sf b, v2sf c, v2sf d);
36 NOMIPS16 v2sf test26 (v2sf a, v2sf b, v2sf c, v2sf d);
37 NOMIPS16 v2sf test27 (v2sf a, v2sf b, v2sf c, v2sf d);
38 NOMIPS16 v2sf test28 (v2sf a, v2sf b, v2sf c, v2sf d);
39 NOMIPS16 v2sf test29 (v2sf a, v2sf b, v2sf c, v2sf d);
40 NOMIPS16 v2sf test30 (v2sf a, v2sf b, v2sf c, v2sf d);
41 NOMIPS16 v2sf test31 (v2sf a, v2sf b, v2sf c, v2sf d);
43 float qnan = 1.0f/0.0f - 1.0f/0.0f;
45 NOMIPS16 int main ()
47 float f1;
48 v2sf a, b, c, d, e, f;
50 /* Case 1 {diff, diff} */
51 /* movt.ps */
52 a = (v2sf) {5, 12};
53 b = (v2sf) {9, 6};
54 c = (v2sf) {33, 123};
55 d = (v2sf) {8, 78};
56 e = __builtin_mips_movt_c_eq_ps (a, b, c, d);
57 f = (v2sf) {33, 123};
58 if (!__builtin_mips_upper_c_eq_ps (e, f) ||
59 !__builtin_mips_lower_c_eq_ps (e, f))
60 abort ();
62 /* movf.ps */
63 e = __builtin_mips_movf_c_eq_ps (a, b, c, d);
64 f = (v2sf) {8, 78};
65 if (!__builtin_mips_upper_c_eq_ps (e, f) ||
66 !__builtin_mips_lower_c_eq_ps (e, f))
67 abort ();
69 /* Case 2 {same, diff} */
70 /* movt.ps */
71 a = (v2sf) {5, 12};
72 b = (v2sf) {5, 6};
73 c = (v2sf) {33, 123};
74 d = (v2sf) {8, 78};
75 e = __builtin_mips_movt_c_eq_ps (a, b, c, d);
76 f = (v2sf) {8, 123};
77 if (!__builtin_mips_upper_c_eq_ps (e, f) ||
78 !__builtin_mips_lower_c_eq_ps (e, f))
79 abort ();
81 /* movf.ps */
82 e = __builtin_mips_movf_c_eq_ps (a, b, c, d);
83 f = (v2sf) {33, 78};
84 if (!__builtin_mips_upper_c_eq_ps (e, f) ||
85 !__builtin_mips_lower_c_eq_ps (e, f))
86 abort ();
88 /* Case 3 {diff, same} */
89 /* movt.ps */
90 a = (v2sf) {5, 12};
91 b = (v2sf) {9, 12};
92 c = (v2sf) {33, 123};
93 d = (v2sf) {8, 78};
94 e = __builtin_mips_movt_c_eq_ps (a, b, c, d);
95 f = (v2sf) {33, 78};
96 if (!__builtin_mips_upper_c_eq_ps (e, f) ||
97 !__builtin_mips_lower_c_eq_ps (e, f))
98 abort ();
100 /* movf.ps */
101 e = __builtin_mips_movf_c_eq_ps (a, b, c, d);
102 f = (v2sf) {8, 123};
103 if (!__builtin_mips_upper_c_eq_ps (e, f) ||
104 !__builtin_mips_lower_c_eq_ps (e, f))
105 abort ();
107 /* Case 4 {same, same} */
108 /* movt.ps */
109 a = (v2sf) {5, 12};
110 b = (v2sf) {5, 12};
111 c = (v2sf) {33, 123};
112 d = (v2sf) {8, 78};
113 e = __builtin_mips_movt_c_eq_ps (a, b, c, d);
114 f = (v2sf) {8, 78};
115 if (!__builtin_mips_upper_c_eq_ps (e, f) ||
116 !__builtin_mips_lower_c_eq_ps (e, f))
117 abort ();
119 /* movf.ps */
120 e = __builtin_mips_movf_c_eq_ps (a, b, c, d);
121 f = (v2sf) {33, 123};
122 if (!__builtin_mips_upper_c_eq_ps (e, f) ||
123 !__builtin_mips_lower_c_eq_ps (e, f))
124 abort ();
126 /* Test all 16 operators */
127 a = (v2sf) {123, 123};
128 b = (v2sf) {1000, 1000};
129 c = (v2sf) {33, 123};
130 d = (v2sf) {8, 78};
131 e = test0 (a, b, c, d);
132 if (!__builtin_mips_upper_c_eq_ps (e, c) ||
133 !__builtin_mips_lower_c_eq_ps (e, c))
134 abort ();
135 e = test1 (a, b, c, d);
136 if (!__builtin_mips_upper_c_eq_ps (e, d) ||
137 !__builtin_mips_lower_c_eq_ps (e, d))
138 abort ();
140 e = test2 (a, b, c, d);
141 if (!__builtin_mips_upper_c_eq_ps (e, c) ||
142 !__builtin_mips_lower_c_eq_ps (e, c))
143 abort ();
144 e = test3 (a, b, c, d);
145 if (!__builtin_mips_upper_c_eq_ps (e, d) ||
146 !__builtin_mips_lower_c_eq_ps (e, d))
147 abort ();
149 e = test4 (a, b, c, d);
150 if (!__builtin_mips_upper_c_eq_ps (e, c) ||
151 !__builtin_mips_lower_c_eq_ps (e, c))
152 abort ();
153 e = test5 (a, b, c, d);
154 if (!__builtin_mips_upper_c_eq_ps (e, d) ||
155 !__builtin_mips_lower_c_eq_ps (e, d))
156 abort ();
158 e = test6 (a, b, c, d);
159 if (!__builtin_mips_upper_c_eq_ps (e, c) ||
160 !__builtin_mips_lower_c_eq_ps (e, c))
161 abort ();
162 e = test7 (a, b, c, d);
163 if (!__builtin_mips_upper_c_eq_ps (e, d) ||
164 !__builtin_mips_lower_c_eq_ps (e, d))
165 abort ();
167 e = test8 (a, b, c, d);
168 if (!__builtin_mips_upper_c_eq_ps (e, d) ||
169 !__builtin_mips_lower_c_eq_ps (e, d))
170 abort ();
171 e = test9 (a, b, c, d);
172 if (!__builtin_mips_upper_c_eq_ps (e, c) ||
173 !__builtin_mips_lower_c_eq_ps (e, c))
174 abort ();
176 e = test10 (a, b, c, d);
177 if (!__builtin_mips_upper_c_eq_ps (e, d) ||
178 !__builtin_mips_lower_c_eq_ps (e, d))
179 abort ();
180 e = test11 (a, b, c, d);
181 if (!__builtin_mips_upper_c_eq_ps (e, c) ||
182 !__builtin_mips_lower_c_eq_ps (e, c))
183 abort ();
185 e = test12 (a, b, c, d);
186 if (!__builtin_mips_upper_c_eq_ps (e, d) ||
187 !__builtin_mips_lower_c_eq_ps (e, d))
188 abort ();
189 e = test13 (a, b, c, d);
190 if (!__builtin_mips_upper_c_eq_ps (e, c) ||
191 !__builtin_mips_lower_c_eq_ps (e, c))
192 abort ();
194 e = test14 (a, b, c, d);
195 if (!__builtin_mips_upper_c_eq_ps (e, d) ||
196 !__builtin_mips_lower_c_eq_ps (e, d))
197 abort ();
198 e = test15 (a, b, c, d);
199 if (!__builtin_mips_upper_c_eq_ps (e, c) ||
200 !__builtin_mips_lower_c_eq_ps (e, c))
201 abort ();
203 e = test16 (a, b, c, d);
204 if (!__builtin_mips_upper_c_eq_ps (e, c) ||
205 !__builtin_mips_lower_c_eq_ps (e, c))
206 abort ();
207 e = test17 (a, b, c, d);
208 if (!__builtin_mips_upper_c_eq_ps (e, d) ||
209 !__builtin_mips_lower_c_eq_ps (e, d))
210 abort ();
212 e = test18 (a, b, c, d);
213 if (!__builtin_mips_upper_c_eq_ps (e, c) ||
214 !__builtin_mips_lower_c_eq_ps (e, c))
215 abort ();
216 e = test19 (a, b, c, d);
217 if (!__builtin_mips_upper_c_eq_ps (e, d) ||
218 !__builtin_mips_lower_c_eq_ps (e, d))
219 abort ();
221 e = test20 (a, b, c, d);
222 if (!__builtin_mips_upper_c_eq_ps (e, c) ||
223 !__builtin_mips_lower_c_eq_ps (e, c))
224 abort ();
225 e = test21 (a, b, c, d);
226 if (!__builtin_mips_upper_c_eq_ps (e, d) ||
227 !__builtin_mips_lower_c_eq_ps (e, d))
228 abort ();
230 e = test22 (a, b, c, d);
231 if (!__builtin_mips_upper_c_eq_ps (e, c) ||
232 !__builtin_mips_lower_c_eq_ps (e, c))
233 abort ();
234 e = test23 (a, b, c, d);
235 if (!__builtin_mips_upper_c_eq_ps (e, d) ||
236 !__builtin_mips_lower_c_eq_ps (e, d))
237 abort ();
239 e = test24 (a, b, c, d);
240 if (!__builtin_mips_upper_c_eq_ps (e, d) ||
241 !__builtin_mips_lower_c_eq_ps (e, d))
242 abort ();
243 e = test25 (a, b, c, d);
244 if (!__builtin_mips_upper_c_eq_ps (e, c) ||
245 !__builtin_mips_lower_c_eq_ps (e, c))
246 abort ();
248 e = test26 (a, b, c, d);
249 if (!__builtin_mips_upper_c_eq_ps (e, d) ||
250 !__builtin_mips_lower_c_eq_ps (e, d))
251 abort ();
252 e = test27 (a, b, c, d);
253 if (!__builtin_mips_upper_c_eq_ps (e, c) ||
254 !__builtin_mips_lower_c_eq_ps (e, c))
255 abort ();
257 e = test28 (a, b, c, d);
258 if (!__builtin_mips_upper_c_eq_ps (e, d) ||
259 !__builtin_mips_lower_c_eq_ps (e, d))
260 abort ();
261 e = test29 (a, b, c, d);
262 if (!__builtin_mips_upper_c_eq_ps (e, c) ||
263 !__builtin_mips_lower_c_eq_ps (e, c))
264 abort ();
266 e = test30 (a, b, c, d);
267 if (!__builtin_mips_upper_c_eq_ps (e, d) ||
268 !__builtin_mips_lower_c_eq_ps (e, d))
269 abort ();
270 e = test31 (a, b, c, d);
271 if (!__builtin_mips_upper_c_eq_ps (e, c) ||
272 !__builtin_mips_lower_c_eq_ps (e, c))
273 abort ();
275 /* Test all 16 operators with (b, a) */
276 a = (v2sf) {123, 123};
277 b = (v2sf) {1000, 1000};
278 c = (v2sf) {33, 123};
279 d = (v2sf) {8, 78};
280 e = test0 (b, a, c, d);
281 if (!__builtin_mips_upper_c_eq_ps (e, c) ||
282 !__builtin_mips_lower_c_eq_ps (e, c))
283 abort ();
284 e = test1 (b, a, c, d);
285 if (!__builtin_mips_upper_c_eq_ps (e, d) ||
286 !__builtin_mips_lower_c_eq_ps (e, d))
287 abort ();
289 e = test2 (b, a, c, d);
290 if (!__builtin_mips_upper_c_eq_ps (e, c) ||
291 !__builtin_mips_lower_c_eq_ps (e, c))
292 abort ();
293 e = test3 (b, a, c, d);
294 if (!__builtin_mips_upper_c_eq_ps (e, d) ||
295 !__builtin_mips_lower_c_eq_ps (e, d))
296 abort ();
298 e = test4 (b, a, c, d);
299 if (!__builtin_mips_upper_c_eq_ps (e, c) ||
300 !__builtin_mips_lower_c_eq_ps (e, c))
301 abort ();
302 e = test5 (b, a, c, d);
303 if (!__builtin_mips_upper_c_eq_ps (e, d) ||
304 !__builtin_mips_lower_c_eq_ps (e, d))
305 abort ();
307 e = test6 (b, a, c, d);
308 if (!__builtin_mips_upper_c_eq_ps (e, c) ||
309 !__builtin_mips_lower_c_eq_ps (e, c))
310 abort ();
311 e = test7 (b, a, c, d);
312 if (!__builtin_mips_upper_c_eq_ps (e, d) ||
313 !__builtin_mips_lower_c_eq_ps (e, d))
314 abort ();
316 e = test8 (b, a, c, d);
317 if (!__builtin_mips_upper_c_eq_ps (e, c) ||
318 !__builtin_mips_lower_c_eq_ps (e, c))
319 abort ();
320 e = test9 (b, a, c, d);
321 if (!__builtin_mips_upper_c_eq_ps (e, d) ||
322 !__builtin_mips_lower_c_eq_ps (e, d))
323 abort ();
325 e = test10 (b, a, c, d);
326 if (!__builtin_mips_upper_c_eq_ps (e, c) ||
327 !__builtin_mips_lower_c_eq_ps (e, c))
328 abort ();
329 e = test11 (b, a, c, d);
330 if (!__builtin_mips_upper_c_eq_ps (e, d) ||
331 !__builtin_mips_lower_c_eq_ps (e, d))
332 abort ();
334 e = test12 (b, a, c, d);
335 if (!__builtin_mips_upper_c_eq_ps (e, c) ||
336 !__builtin_mips_lower_c_eq_ps (e, c))
337 abort ();
338 e = test13 (b, a, c, d);
339 if (!__builtin_mips_upper_c_eq_ps (e, d) ||
340 !__builtin_mips_lower_c_eq_ps (e, d))
341 abort ();
343 e = test14 (b, a, c, d);
344 if (!__builtin_mips_upper_c_eq_ps (e, c) ||
345 !__builtin_mips_lower_c_eq_ps (e, c))
346 abort ();
347 e = test15 (b, a, c, d);
348 if (!__builtin_mips_upper_c_eq_ps (e, d) ||
349 !__builtin_mips_lower_c_eq_ps (e, d))
350 abort ();
352 e = test16 (b, a, c, d);
353 if (!__builtin_mips_upper_c_eq_ps (e, c) ||
354 !__builtin_mips_lower_c_eq_ps (e, c))
355 abort ();
356 e = test17 (b, a, c, d);
357 if (!__builtin_mips_upper_c_eq_ps (e, d) ||
358 !__builtin_mips_lower_c_eq_ps (e, d))
359 abort ();
361 e = test18 (b, a, c, d);
362 if (!__builtin_mips_upper_c_eq_ps (e, c) ||
363 !__builtin_mips_lower_c_eq_ps (e, c))
364 abort ();
365 e = test19 (b, a, c, d);
366 if (!__builtin_mips_upper_c_eq_ps (e, d) ||
367 !__builtin_mips_lower_c_eq_ps (e, d))
368 abort ();
370 e = test20 (b, a, c, d);
371 if (!__builtin_mips_upper_c_eq_ps (e, c) ||
372 !__builtin_mips_lower_c_eq_ps (e, c))
373 abort ();
374 e = test21 (b, a, c, d);
375 if (!__builtin_mips_upper_c_eq_ps (e, d) ||
376 !__builtin_mips_lower_c_eq_ps (e, d))
377 abort ();
379 e = test22 (b, a, c, d);
380 if (!__builtin_mips_upper_c_eq_ps (e, c) ||
381 !__builtin_mips_lower_c_eq_ps (e, c))
382 abort ();
383 e = test23 (b, a, c, d);
384 if (!__builtin_mips_upper_c_eq_ps (e, d) ||
385 !__builtin_mips_lower_c_eq_ps (e, d))
386 abort ();
388 e = test24 (b, a, c, d);
389 if (!__builtin_mips_upper_c_eq_ps (e, c) ||
390 !__builtin_mips_lower_c_eq_ps (e, c))
391 abort ();
392 e = test25 (b, a, c, d);
393 if (!__builtin_mips_upper_c_eq_ps (e, d) ||
394 !__builtin_mips_lower_c_eq_ps (e, d))
395 abort ();
397 e = test26 (b, a, c, d);
398 if (!__builtin_mips_upper_c_eq_ps (e, c) ||
399 !__builtin_mips_lower_c_eq_ps (e, c))
400 abort ();
401 e = test27 (b, a, c, d);
402 if (!__builtin_mips_upper_c_eq_ps (e, d) ||
403 !__builtin_mips_lower_c_eq_ps (e, d))
404 abort ();
406 e = test28 (b, a, c, d);
407 if (!__builtin_mips_upper_c_eq_ps (e, c) ||
408 !__builtin_mips_lower_c_eq_ps (e, c))
409 abort ();
410 e = test29 (b, a, c, d);
411 if (!__builtin_mips_upper_c_eq_ps (e, d) ||
412 !__builtin_mips_lower_c_eq_ps (e, d))
413 abort ();
415 e = test30 (b, a, c, d);
416 if (!__builtin_mips_upper_c_eq_ps (e, c) ||
417 !__builtin_mips_lower_c_eq_ps (e, c))
418 abort ();
419 e = test31 (b, a, c, d);
420 if (!__builtin_mips_upper_c_eq_ps (e, d) ||
421 !__builtin_mips_lower_c_eq_ps (e, d))
422 abort ();
424 #ifndef __FAST_MATH__
425 /* Test with NaN */
426 a = (v2sf) {qnan, qnan};
427 b = (v2sf) {1000, 1000};
428 c = (v2sf) {33, 123};
429 d = (v2sf) {8, 78};
430 e = test0 (a, b, c, d);
431 if (!__builtin_mips_upper_c_eq_ps (e, c) ||
432 !__builtin_mips_lower_c_eq_ps (e, c))
433 abort ();
434 e = test1 (a, b, c, d);
435 if (!__builtin_mips_upper_c_eq_ps (e, d) ||
436 !__builtin_mips_lower_c_eq_ps (e, d))
437 abort ();
439 e = test2 (a, b, c, d);
440 if (!__builtin_mips_upper_c_eq_ps (e, d) ||
441 !__builtin_mips_lower_c_eq_ps (e, d))
442 abort ();
443 e = test3 (a, b, c, d);
444 if (!__builtin_mips_upper_c_eq_ps (e, c) ||
445 !__builtin_mips_lower_c_eq_ps (e, c))
446 abort ();
448 e = test4 (a, b, c, d);
449 if (!__builtin_mips_upper_c_eq_ps (e, c) ||
450 !__builtin_mips_lower_c_eq_ps (e, c))
451 abort ();
452 e = test5 (a, b, c, d);
453 if (!__builtin_mips_upper_c_eq_ps (e, d) ||
454 !__builtin_mips_lower_c_eq_ps (e, d))
455 abort ();
457 e = test6 (a, b, c, d);
458 if (!__builtin_mips_upper_c_eq_ps (e, d) ||
459 !__builtin_mips_lower_c_eq_ps (e, d))
460 abort ();
461 e = test7 (a, b, c, d);
462 if (!__builtin_mips_upper_c_eq_ps (e, c) ||
463 !__builtin_mips_lower_c_eq_ps (e, c))
464 abort ();
466 e = test8 (a, b, c, d);
467 if (!__builtin_mips_upper_c_eq_ps (e, c) ||
468 !__builtin_mips_lower_c_eq_ps (e, c))
469 abort ();
470 e = test9 (a, b, c, d);
471 if (!__builtin_mips_upper_c_eq_ps (e, d) ||
472 !__builtin_mips_lower_c_eq_ps (e, d))
473 abort ();
475 e = test10 (a, b, c, d);
476 if (!__builtin_mips_upper_c_eq_ps (e, d) ||
477 !__builtin_mips_lower_c_eq_ps (e, d))
478 abort ();
479 e = test11 (a, b, c, d);
480 if (!__builtin_mips_upper_c_eq_ps (e, c) ||
481 !__builtin_mips_lower_c_eq_ps (e, c))
482 abort ();
484 e = test12 (a, b, c, d);
485 if (!__builtin_mips_upper_c_eq_ps (e, c) ||
486 !__builtin_mips_lower_c_eq_ps (e, c))
487 abort ();
488 e = test13 (a, b, c, d);
489 if (!__builtin_mips_upper_c_eq_ps (e, d) ||
490 !__builtin_mips_lower_c_eq_ps (e, d))
491 abort ();
493 e = test14 (a, b, c, d);
494 if (!__builtin_mips_upper_c_eq_ps (e, d) ||
495 !__builtin_mips_lower_c_eq_ps (e, d))
496 abort ();
497 e = test15 (a, b, c, d);
498 if (!__builtin_mips_upper_c_eq_ps (e, c) ||
499 !__builtin_mips_lower_c_eq_ps (e, c))
500 abort ();
502 e = test16 (a, b, c, d);
503 if (!__builtin_mips_upper_c_eq_ps (e, c) ||
504 !__builtin_mips_lower_c_eq_ps (e, c))
505 abort ();
506 e = test17 (a, b, c, d);
507 if (!__builtin_mips_upper_c_eq_ps (e, d) ||
508 !__builtin_mips_lower_c_eq_ps (e, d))
509 abort ();
511 e = test18 (a, b, c, d);
512 if (!__builtin_mips_upper_c_eq_ps (e, d) ||
513 !__builtin_mips_lower_c_eq_ps (e, d))
514 abort ();
515 e = test19 (a, b, c, d);
516 if (!__builtin_mips_upper_c_eq_ps (e, c) ||
517 !__builtin_mips_lower_c_eq_ps (e, c))
518 abort ();
520 e = test20 (a, b, c, d);
521 if (!__builtin_mips_upper_c_eq_ps (e, c) ||
522 !__builtin_mips_lower_c_eq_ps (e, c))
523 abort ();
524 e = test21 (a, b, c, d);
525 if (!__builtin_mips_upper_c_eq_ps (e, d) ||
526 !__builtin_mips_lower_c_eq_ps (e, d))
527 abort ();
529 e = test22 (a, b, c, d);
530 if (!__builtin_mips_upper_c_eq_ps (e, d) ||
531 !__builtin_mips_lower_c_eq_ps (e, d))
532 abort ();
533 e = test23 (a, b, c, d);
534 if (!__builtin_mips_upper_c_eq_ps (e, c) ||
535 !__builtin_mips_lower_c_eq_ps (e, c))
536 abort ();
538 e = test24 (a, b, c, d);
539 if (!__builtin_mips_upper_c_eq_ps (e, c) ||
540 !__builtin_mips_lower_c_eq_ps (e, c))
541 abort ();
542 e = test25 (a, b, c, d);
543 if (!__builtin_mips_upper_c_eq_ps (e, d) ||
544 !__builtin_mips_lower_c_eq_ps (e, d))
545 abort ();
547 e = test26 (a, b, c, d);
548 if (!__builtin_mips_upper_c_eq_ps (e, d) ||
549 !__builtin_mips_lower_c_eq_ps (e, d))
550 abort ();
551 e = test27 (a, b, c, d);
552 if (!__builtin_mips_upper_c_eq_ps (e, c) ||
553 !__builtin_mips_lower_c_eq_ps (e, c))
554 abort ();
556 e = test28 (a, b, c, d);
557 if (!__builtin_mips_upper_c_eq_ps (e, c) ||
558 !__builtin_mips_lower_c_eq_ps (e, c))
559 abort ();
560 e = test29 (a, b, c, d);
561 if (!__builtin_mips_upper_c_eq_ps (e, d) ||
562 !__builtin_mips_lower_c_eq_ps (e, d))
563 abort ();
565 e = test30 (a, b, c, d);
566 if (!__builtin_mips_upper_c_eq_ps (e, d) ||
567 !__builtin_mips_lower_c_eq_ps (e, d))
568 abort ();
569 e = test31 (a, b, c, d);
570 if (!__builtin_mips_upper_c_eq_ps (e, c) ||
571 !__builtin_mips_lower_c_eq_ps (e, c))
572 abort ();
573 #endif
575 printf ("Test Passes\n");
576 exit (0);
579 NOMIPS16 v2sf test0 (v2sf a, v2sf b, v2sf c, v2sf d)
581 return __builtin_mips_movt_c_f_ps (a, b, c, d);
584 NOMIPS16 v2sf test1 (v2sf a, v2sf b, v2sf c, v2sf d)
586 return __builtin_mips_movf_c_f_ps (a, b, c, d);
589 NOMIPS16 v2sf test2 (v2sf a, v2sf b, v2sf c, v2sf d)
591 return __builtin_mips_movt_c_un_ps (a, b, c, d);
594 NOMIPS16 v2sf test3 (v2sf a, v2sf b, v2sf c, v2sf d)
596 return __builtin_mips_movf_c_un_ps (a, b, c, d);
599 NOMIPS16 v2sf test4 (v2sf a, v2sf b, v2sf c, v2sf d)
601 return __builtin_mips_movt_c_eq_ps (a, b, c, d);
604 NOMIPS16 v2sf test5 (v2sf a, v2sf b, v2sf c, v2sf d)
606 return __builtin_mips_movf_c_eq_ps (a, b, c, d);
609 NOMIPS16 v2sf test6 (v2sf a, v2sf b, v2sf c, v2sf d)
611 return __builtin_mips_movt_c_ueq_ps (a, b, c, d);
614 NOMIPS16 v2sf test7 (v2sf a, v2sf b, v2sf c, v2sf d)
616 return __builtin_mips_movf_c_ueq_ps (a, b, c, d);
619 NOMIPS16 v2sf test8 (v2sf a, v2sf b, v2sf c, v2sf d)
621 return __builtin_mips_movt_c_olt_ps (a, b, c, d);
624 NOMIPS16 v2sf test9 (v2sf a, v2sf b, v2sf c, v2sf d)
626 return __builtin_mips_movf_c_olt_ps (a, b, c, d);
629 NOMIPS16 v2sf test10 (v2sf a, v2sf b, v2sf c, v2sf d)
631 return __builtin_mips_movt_c_ult_ps (a, b, c, d);
634 NOMIPS16 v2sf test11 (v2sf a, v2sf b, v2sf c, v2sf d)
636 return __builtin_mips_movf_c_ult_ps (a, b, c, d);
639 NOMIPS16 v2sf test12 (v2sf a, v2sf b, v2sf c, v2sf d)
641 return __builtin_mips_movt_c_ole_ps (a, b, c, d);
644 NOMIPS16 v2sf test13 (v2sf a, v2sf b, v2sf c, v2sf d)
646 return __builtin_mips_movf_c_ole_ps (a, b, c, d);
649 NOMIPS16 v2sf test14 (v2sf a, v2sf b, v2sf c, v2sf d)
651 return __builtin_mips_movt_c_ule_ps (a, b, c, d);
654 NOMIPS16 v2sf test15 (v2sf a, v2sf b, v2sf c, v2sf d)
656 return __builtin_mips_movf_c_ule_ps (a, b, c, d);
659 NOMIPS16 v2sf test16 (v2sf a, v2sf b, v2sf c, v2sf d)
661 return __builtin_mips_movt_c_sf_ps (a, b, c, d);
664 NOMIPS16 v2sf test17 (v2sf a, v2sf b, v2sf c, v2sf d)
666 return __builtin_mips_movf_c_sf_ps (a, b, c, d);
669 NOMIPS16 v2sf test18 (v2sf a, v2sf b, v2sf c, v2sf d)
671 return __builtin_mips_movt_c_ngle_ps (a, b, c, d);
674 NOMIPS16 v2sf test19 (v2sf a, v2sf b, v2sf c, v2sf d)
676 return __builtin_mips_movf_c_ngle_ps (a, b, c, d);
679 NOMIPS16 v2sf test20 (v2sf a, v2sf b, v2sf c, v2sf d)
681 return __builtin_mips_movt_c_seq_ps (a, b, c, d);
684 NOMIPS16 v2sf test21 (v2sf a, v2sf b, v2sf c, v2sf d)
686 return __builtin_mips_movf_c_seq_ps (a, b, c, d);
689 NOMIPS16 v2sf test22 (v2sf a, v2sf b, v2sf c, v2sf d)
691 return __builtin_mips_movt_c_ngl_ps (a, b, c, d);
694 NOMIPS16 v2sf test23 (v2sf a, v2sf b, v2sf c, v2sf d)
696 return __builtin_mips_movf_c_ngl_ps (a, b, c, d);
699 NOMIPS16 v2sf test24 (v2sf a, v2sf b, v2sf c, v2sf d)
701 return __builtin_mips_movt_c_lt_ps (a, b, c, d);
704 NOMIPS16 v2sf test25 (v2sf a, v2sf b, v2sf c, v2sf d)
706 return __builtin_mips_movf_c_lt_ps (a, b, c, d);
709 NOMIPS16 v2sf test26 (v2sf a, v2sf b, v2sf c, v2sf d)
711 return __builtin_mips_movt_c_nge_ps (a, b, c, d);
714 NOMIPS16 v2sf test27 (v2sf a, v2sf b, v2sf c, v2sf d)
716 return __builtin_mips_movf_c_nge_ps (a, b, c, d);
719 NOMIPS16 v2sf test28 (v2sf a, v2sf b, v2sf c, v2sf d)
721 return __builtin_mips_movt_c_le_ps (a, b, c, d);
724 NOMIPS16 v2sf test29 (v2sf a, v2sf b, v2sf c, v2sf d)
726 return __builtin_mips_movf_c_le_ps (a, b, c, d);
729 NOMIPS16 v2sf test30 (v2sf a, v2sf b, v2sf c, v2sf d)
731 return __builtin_mips_movt_c_ngt_ps (a, b, c, d);
734 NOMIPS16 v2sf test31 (v2sf a, v2sf b, v2sf c, v2sf d)
736 return __builtin_mips_movf_c_ngt_ps (a, b, c, d);