OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.target/] [mips/] [mips-ps-3.c] - Blame information for rev 154

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
/* { dg-do run { target mipsisa64*-*-* } } */
2
/* { dg-mips-options "-mips64 -O2 -mpaired-single -mhard-float -mgp64" } */
3
 
4
/* Test MIPS paired-single conditional move */
5
#include <stdlib.h>
6
#include <stdio.h>
7
 
8
typedef float v2sf __attribute__((vector_size(8)));
9
 
10
v2sf test0 (v2sf a, v2sf b, v2sf c, v2sf d);
11
v2sf test1 (v2sf a, v2sf b, v2sf c, v2sf d);
12
v2sf test2 (v2sf a, v2sf b, v2sf c, v2sf d);
13
v2sf test3 (v2sf a, v2sf b, v2sf c, v2sf d);
14
v2sf test4 (v2sf a, v2sf b, v2sf c, v2sf d);
15
v2sf test5 (v2sf a, v2sf b, v2sf c, v2sf d);
16
v2sf test6 (v2sf a, v2sf b, v2sf c, v2sf d);
17
v2sf test7 (v2sf a, v2sf b, v2sf c, v2sf d);
18
v2sf test8 (v2sf a, v2sf b, v2sf c, v2sf d);
19
v2sf test9 (v2sf a, v2sf b, v2sf c, v2sf d);
20
v2sf test10 (v2sf a, v2sf b, v2sf c, v2sf d);
21
v2sf test11 (v2sf a, v2sf b, v2sf c, v2sf d);
22
v2sf test12 (v2sf a, v2sf b, v2sf c, v2sf d);
23
v2sf test13 (v2sf a, v2sf b, v2sf c, v2sf d);
24
v2sf test14 (v2sf a, v2sf b, v2sf c, v2sf d);
25
v2sf test15 (v2sf a, v2sf b, v2sf c, v2sf d);
26
v2sf test16 (v2sf a, v2sf b, v2sf c, v2sf d);
27
v2sf test17 (v2sf a, v2sf b, v2sf c, v2sf d);
28
v2sf test18 (v2sf a, v2sf b, v2sf c, v2sf d);
29
v2sf test19 (v2sf a, v2sf b, v2sf c, v2sf d);
30
v2sf test20 (v2sf a, v2sf b, v2sf c, v2sf d);
31
v2sf test21 (v2sf a, v2sf b, v2sf c, v2sf d);
32
v2sf test22 (v2sf a, v2sf b, v2sf c, v2sf d);
33
v2sf test23 (v2sf a, v2sf b, v2sf c, v2sf d);
34
v2sf test24 (v2sf a, v2sf b, v2sf c, v2sf d);
35
v2sf test25 (v2sf a, v2sf b, v2sf c, v2sf d);
36
v2sf test26 (v2sf a, v2sf b, v2sf c, v2sf d);
37
v2sf test27 (v2sf a, v2sf b, v2sf c, v2sf d);
38
v2sf test28 (v2sf a, v2sf b, v2sf c, v2sf d);
39
v2sf test29 (v2sf a, v2sf b, v2sf c, v2sf d);
40
v2sf test30 (v2sf a, v2sf b, v2sf c, v2sf d);
41
v2sf test31 (v2sf a, v2sf b, v2sf c, v2sf d);
42
 
43
float qnan = 1.0f/0.0f - 1.0f/0.0f;
44
 
45
int main ()
46
{
47
  float f1;
48
  v2sf a, b, c, d, e, f;
49
 
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 ();
61
 
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 ();
68
 
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 ();
80
 
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 ();
87
 
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 ();
99
 
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 ();
106
 
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 ();
118
 
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 ();
125
 
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 ();
139
 
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 ();
148
 
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 ();
157
 
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 ();
166
 
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 ();
175
 
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 ();
184
 
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 ();
193
 
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 ();
202
 
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 ();
211
 
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 ();
220
 
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 ();
229
 
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 ();
238
 
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 ();
247
 
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 ();
256
 
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 ();
265
 
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 ();
274
 
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 ();
288
 
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 ();
297
 
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 ();
306
 
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 ();
315
 
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 ();
324
 
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 ();
333
 
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 ();
342
 
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 ();
351
 
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 ();
360
 
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 ();
369
 
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 ();
378
 
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 ();
387
 
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 ();
396
 
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 ();
405
 
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 ();
414
 
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 ();
423
 
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 ();
438
 
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 ();
447
 
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 ();
456
 
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 ();
465
 
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 ();
474
 
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 ();
483
 
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 ();
492
 
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 ();
501
 
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 ();
510
 
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 ();
519
 
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 ();
528
 
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 ();
537
 
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 ();
546
 
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 ();
555
 
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 ();
564
 
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
574
 
575
  printf ("Test Passes\n");
576
  exit (0);
577
}
578
 
579
v2sf test0 (v2sf a, v2sf b, v2sf c, v2sf d)
580
{
581
  return __builtin_mips_movt_c_f_ps (a, b, c, d);
582
}
583
 
584
v2sf test1 (v2sf a, v2sf b, v2sf c, v2sf d)
585
{
586
  return __builtin_mips_movf_c_f_ps (a, b, c, d);
587
}
588
 
589
v2sf test2 (v2sf a, v2sf b, v2sf c, v2sf d)
590
{
591
  return __builtin_mips_movt_c_un_ps (a, b, c, d);
592
}
593
 
594
v2sf test3 (v2sf a, v2sf b, v2sf c, v2sf d)
595
{
596
  return __builtin_mips_movf_c_un_ps (a, b, c, d);
597
}
598
 
599
v2sf test4 (v2sf a, v2sf b, v2sf c, v2sf d)
600
{
601
  return __builtin_mips_movt_c_eq_ps (a, b, c, d);
602
}
603
 
604
v2sf test5 (v2sf a, v2sf b, v2sf c, v2sf d)
605
{
606
  return __builtin_mips_movf_c_eq_ps (a, b, c, d);
607
}
608
 
609
v2sf test6 (v2sf a, v2sf b, v2sf c, v2sf d)
610
{
611
  return __builtin_mips_movt_c_ueq_ps (a, b, c, d);
612
}
613
 
614
v2sf test7 (v2sf a, v2sf b, v2sf c, v2sf d)
615
{
616
  return __builtin_mips_movf_c_ueq_ps (a, b, c, d);
617
}
618
 
619
v2sf test8 (v2sf a, v2sf b, v2sf c, v2sf d)
620
{
621
  return __builtin_mips_movt_c_olt_ps (a, b, c, d);
622
}
623
 
624
v2sf test9 (v2sf a, v2sf b, v2sf c, v2sf d)
625
{
626
  return __builtin_mips_movf_c_olt_ps (a, b, c, d);
627
}
628
 
629
v2sf test10 (v2sf a, v2sf b, v2sf c, v2sf d)
630
{
631
  return __builtin_mips_movt_c_ult_ps (a, b, c, d);
632
}
633
 
634
v2sf test11 (v2sf a, v2sf b, v2sf c, v2sf d)
635
{
636
  return __builtin_mips_movf_c_ult_ps (a, b, c, d);
637
}
638
 
639
v2sf test12 (v2sf a, v2sf b, v2sf c, v2sf d)
640
{
641
  return __builtin_mips_movt_c_ole_ps (a, b, c, d);
642
}
643
 
644
v2sf test13 (v2sf a, v2sf b, v2sf c, v2sf d)
645
{
646
  return __builtin_mips_movf_c_ole_ps (a, b, c, d);
647
}
648
 
649
v2sf test14 (v2sf a, v2sf b, v2sf c, v2sf d)
650
{
651
  return __builtin_mips_movt_c_ule_ps (a, b, c, d);
652
}
653
 
654
v2sf test15 (v2sf a, v2sf b, v2sf c, v2sf d)
655
{
656
  return __builtin_mips_movf_c_ule_ps (a, b, c, d);
657
}
658
 
659
v2sf test16 (v2sf a, v2sf b, v2sf c, v2sf d)
660
{
661
  return __builtin_mips_movt_c_sf_ps (a, b, c, d);
662
}
663
 
664
v2sf test17 (v2sf a, v2sf b, v2sf c, v2sf d)
665
{
666
  return __builtin_mips_movf_c_sf_ps (a, b, c, d);
667
}
668
 
669
v2sf test18 (v2sf a, v2sf b, v2sf c, v2sf d)
670
{
671
  return __builtin_mips_movt_c_ngle_ps (a, b, c, d);
672
}
673
 
674
v2sf test19 (v2sf a, v2sf b, v2sf c, v2sf d)
675
{
676
  return __builtin_mips_movf_c_ngle_ps (a, b, c, d);
677
}
678
 
679
v2sf test20 (v2sf a, v2sf b, v2sf c, v2sf d)
680
{
681
  return __builtin_mips_movt_c_seq_ps (a, b, c, d);
682
}
683
 
684
v2sf test21 (v2sf a, v2sf b, v2sf c, v2sf d)
685
{
686
  return __builtin_mips_movf_c_seq_ps (a, b, c, d);
687
}
688
 
689
v2sf test22 (v2sf a, v2sf b, v2sf c, v2sf d)
690
{
691
  return __builtin_mips_movt_c_ngl_ps (a, b, c, d);
692
}
693
 
694
v2sf test23 (v2sf a, v2sf b, v2sf c, v2sf d)
695
{
696
  return __builtin_mips_movf_c_ngl_ps (a, b, c, d);
697
}
698
 
699
v2sf test24 (v2sf a, v2sf b, v2sf c, v2sf d)
700
{
701
  return __builtin_mips_movt_c_lt_ps (a, b, c, d);
702
}
703
 
704
v2sf test25 (v2sf a, v2sf b, v2sf c, v2sf d)
705
{
706
  return __builtin_mips_movf_c_lt_ps (a, b, c, d);
707
}
708
 
709
v2sf test26 (v2sf a, v2sf b, v2sf c, v2sf d)
710
{
711
  return __builtin_mips_movt_c_nge_ps (a, b, c, d);
712
}
713
 
714
v2sf test27 (v2sf a, v2sf b, v2sf c, v2sf d)
715
{
716
  return __builtin_mips_movf_c_nge_ps (a, b, c, d);
717
}
718
 
719
v2sf test28 (v2sf a, v2sf b, v2sf c, v2sf d)
720
{
721
  return __builtin_mips_movt_c_le_ps (a, b, c, d);
722
}
723
 
724
v2sf test29 (v2sf a, v2sf b, v2sf c, v2sf d)
725
{
726
  return __builtin_mips_movf_c_le_ps (a, b, c, d);
727
}
728
 
729
v2sf test30 (v2sf a, v2sf b, v2sf c, v2sf d)
730
{
731
  return __builtin_mips_movt_c_ngt_ps (a, b, c, d);
732
}
733
 
734
v2sf test31 (v2sf a, v2sf b, v2sf c, v2sf d)
735
{
736
  return __builtin_mips_movf_c_ngt_ps (a, b, c, d);
737
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.