summaryrefslogtreecommitdiffstats
path: root/contrib/llvm/tools/clang/lib/Headers/altivec.h
blob: 1cd0db8e4b849226143ec554644732608254fcd3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
/*===---- altivec.h - Standard header for type generic math ---------------===*\
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 *
\*===----------------------------------------------------------------------===*/

#ifndef __ALTIVEC_H
#define __ALTIVEC_H

#ifndef __ALTIVEC__
#error "AltiVec support not enabled"
#endif

/* constants for mapping CR6 bits to predicate result. */

#define __CR6_EQ     0
#define __CR6_EQ_REV 1
#define __CR6_LT     2
#define __CR6_LT_REV 3

#define _ATTRS_o_ai __attribute__((__overloadable__, __always_inline__))

/* vec_abs */

#define __builtin_vec_abs vec_abs
#define __builtin_altivec_abs_v16qi vec_abs
#define __builtin_altivec_abs_v8hi  vec_abs
#define __builtin_altivec_abs_v4si  vec_abs

static vector signed char _ATTRS_o_ai
vec_abs(vector signed char a)
{
  return __builtin_altivec_vmaxsb(a, -a);
}

static vector signed short _ATTRS_o_ai
vec_abs(vector signed short a)
{
  return __builtin_altivec_vmaxsh(a, -a);
}

static vector signed int _ATTRS_o_ai
vec_abs(vector signed int a)
{
  return __builtin_altivec_vmaxsw(a, -a);
}

static vector float _ATTRS_o_ai
vec_abs(vector float a)
{
  vector unsigned int res = (vector unsigned int)a &
                            (vector unsigned int)(0x7FFFFFFF, 0x7FFFFFFF, 0x7FFFFFFF, 0x7FFFFFFF);
  return (vector float)res;
}

/* vec_abss */

#define __builtin_vec_abss vec_abss
#define __builtin_altivec_abss_v16qi vec_abss
#define __builtin_altivec_abss_v8hi  vec_abss
#define __builtin_altivec_abss_v4si  vec_abss

static vector signed char _ATTRS_o_ai
vec_abss(vector signed char a)
{
  return __builtin_altivec_vmaxsb(a, __builtin_altivec_vsubsbs(
    (vector signed char)(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), a));
}

static vector signed short _ATTRS_o_ai
vec_abss(vector signed short a)
{
  return __builtin_altivec_vmaxsh(a, __builtin_altivec_vsubshs(
    (vector signed short)(0, 0, 0, 0, 0, 0, 0, 0), a));
}

static vector signed int _ATTRS_o_ai
vec_abss(vector signed int a)
{
  return __builtin_altivec_vmaxsw(a, __builtin_altivec_vsubsws(
    (vector signed int)(0, 0, 0, 0), a));
}

/* vec_add */

#define __builtin_altivec_vaddubm vec_add
#define __builtin_altivec_vadduhm vec_add
#define __builtin_altivec_vadduwm vec_add
#define __builtin_altivec_vaddfp  vec_add
#define __builtin_vec_vaddubm vec_add
#define __builtin_vec_vadduhm vec_add
#define __builtin_vec_vadduwm vec_add
#define __builtin_vec_vaddfp  vec_add
#define vec_vaddubm vec_add
#define vec_vadduhm vec_add
#define vec_vadduwm vec_add
#define vec_vaddfp  vec_add

static vector signed char _ATTRS_o_ai
vec_add(vector signed char a, vector signed char b)
{
  return a + b;
}

static vector unsigned char _ATTRS_o_ai
vec_add(vector unsigned char a, vector unsigned char b)
{
  return a + b;
}

static vector short _ATTRS_o_ai
vec_add(vector short a, vector short b)
{
  return a + b;
}

static vector unsigned short _ATTRS_o_ai
vec_add(vector unsigned short a, vector unsigned short b)
{
  return a + b;
}

static vector int _ATTRS_o_ai
vec_add(vector int a, vector int b)
{
  return a + b;
}

static vector unsigned int _ATTRS_o_ai
vec_add(vector unsigned int a, vector unsigned int b)
{
  return a + b;
}

static vector float _ATTRS_o_ai
vec_add(vector float a, vector float b)
{
  return a + b;
}

/* vec_addc */

#define __builtin_vec_addc __builtin_altivec_vaddcuw
#define vec_vaddcuw        __builtin_altivec_vaddcuw
#define vec_addc           __builtin_altivec_vaddcuw

/* vec_adds */

#define __builtin_vec_vaddsbs __builtin_altivec_vaddsbs
#define __builtin_vec_vaddubs __builtin_altivec_vaddubs
#define __builtin_vec_vaddshs __builtin_altivec_vaddshs
#define __builtin_vec_vadduhs __builtin_altivec_vadduhs
#define __builtin_vec_vaddsws __builtin_altivec_vaddsws
#define __builtin_vec_vadduws __builtin_altivec_vadduws
#define vec_vaddsbs __builtin_altivec_vaddsbs
#define vec_vaddubs __builtin_altivec_vaddubs
#define vec_vaddshs __builtin_altivec_vaddshs
#define vec_vadduhs __builtin_altivec_vadduhs
#define vec_vaddsws __builtin_altivec_vaddsws
#define vec_vadduws __builtin_altivec_vadduws

static vector signed char _ATTRS_o_ai
vec_adds(vector signed char a, vector signed char b)
{
  return __builtin_altivec_vaddsbs(a, b);
}

static vector unsigned char _ATTRS_o_ai
vec_adds(vector unsigned char a, vector unsigned char b)
{
  return __builtin_altivec_vaddubs(a, b);
}

static vector short _ATTRS_o_ai
vec_adds(vector short a, vector short b)
{
  return __builtin_altivec_vaddshs(a, b);
}

static vector unsigned short _ATTRS_o_ai
vec_adds(vector unsigned short a, vector unsigned short b)
{
  return __builtin_altivec_vadduhs(a, b);
}

static vector int _ATTRS_o_ai
vec_adds(vector int a, vector int b)
{
  return __builtin_altivec_vaddsws(a, b);
}

static vector unsigned int _ATTRS_o_ai
vec_adds(vector unsigned int a, vector unsigned int b)
{
  return __builtin_altivec_vadduws(a, b);
}

/* vec_sub */

#define __builtin_altivec_vsububm vec_sub
#define __builtin_altivec_vsubuhm vec_sub
#define __builtin_altivec_vsubuwm vec_sub
#define __builtin_altivec_vsubfp  vec_sub
#define __builtin_vec_vsububm vec_sub
#define __builtin_vec_vsubuhm vec_sub
#define __builtin_vec_vsubuwm vec_sub
#define __builtin_vec_vsubfp  vec_sub
#define vec_vsububm vec_sub
#define vec_vsubuhm vec_sub
#define vec_vsubuwm vec_sub
#define vec_vsubfp  vec_sub

static vector signed char _ATTRS_o_ai
vec_sub(vector signed char a, vector signed char b)
{
  return a - b;
}

static vector unsigned char _ATTRS_o_ai
vec_sub(vector unsigned char a, vector unsigned char b)
{
  return a - b;
}

static vector short _ATTRS_o_ai
vec_sub(vector short a, vector short b)
{
  return a - b;
}

static vector unsigned short _ATTRS_o_ai
vec_sub(vector unsigned short a, vector unsigned short b)
{
  return a - b;
}

static vector int _ATTRS_o_ai
vec_sub(vector int a, vector int b)
{
  return a - b;
}

static vector unsigned int _ATTRS_o_ai
vec_sub(vector unsigned int a, vector unsigned int b)
{
  return a - b;
}

static vector float _ATTRS_o_ai
vec_sub(vector float a, vector float b)
{
  return a - b;
}

/* vec_subs */

#define __builtin_vec_vsubsbs __builtin_altivec_vsubsbs
#define __builtin_vec_vsububs __builtin_altivec_vsububs
#define __builtin_vec_vsubshs __builtin_altivec_vsubshs
#define __builtin_vec_vsubuhs __builtin_altivec_vsubuhs
#define __builtin_vec_vsubsws __builtin_altivec_vsubsws
#define __builtin_vec_vsubuws __builtin_altivec_vsubuws
#define vec_vsubsbs __builtin_altivec_vsubsbs
#define vec_vsububs __builtin_altivec_vsububs
#define vec_vsubshs __builtin_altivec_vsubshs
#define vec_vsubuhs __builtin_altivec_vsubuhs
#define vec_vsubsws __builtin_altivec_vsubsws
#define vec_vsubuws __builtin_altivec_vsubuws

static vector signed char _ATTRS_o_ai
vec_subs(vector signed char a, vector signed char b)
{
  return __builtin_altivec_vsubsbs(a, b);
}

static vector unsigned char _ATTRS_o_ai
vec_subs(vector unsigned char a, vector unsigned char b)
{
  return __builtin_altivec_vsububs(a, b);
}

static vector short _ATTRS_o_ai
vec_subs(vector short a, vector short b)
{
  return __builtin_altivec_vsubshs(a, b);
}

static vector unsigned short _ATTRS_o_ai
vec_subs(vector unsigned short a, vector unsigned short b)
{
  return __builtin_altivec_vsubuhs(a, b);
}

static vector int _ATTRS_o_ai
vec_subs(vector int a, vector int b)
{
  return __builtin_altivec_vsubsws(a, b);
}

static vector unsigned int _ATTRS_o_ai
vec_subs(vector unsigned int a, vector unsigned int b)
{
  return __builtin_altivec_vsubuws(a, b);
}

/* vec_avg */

#define __builtin_vec_vavgsb __builtin_altivec_vavgsb
#define __builtin_vec_vavgub __builtin_altivec_vavgub
#define __builtin_vec_vavgsh __builtin_altivec_vavgsh
#define __builtin_vec_vavguh __builtin_altivec_vavguh
#define __builtin_vec_vavgsw __builtin_altivec_vavgsw
#define __builtin_vec_vavguw __builtin_altivec_vavguw
#define vec_vavgsb __builtin_altivec_vavgsb
#define vec_vavgub __builtin_altivec_vavgub
#define vec_vavgsh __builtin_altivec_vavgsh
#define vec_vavguh __builtin_altivec_vavguh
#define vec_vavgsw __builtin_altivec_vavgsw
#define vec_vavguw __builtin_altivec_vavguw

static vector signed char _ATTRS_o_ai
vec_avg(vector signed char a, vector signed char b)
{
  return __builtin_altivec_vavgsb(a, b);
}

static vector unsigned char _ATTRS_o_ai
vec_avg(vector unsigned char a, vector unsigned char b)
{
  return __builtin_altivec_vavgub(a, b);
}

static vector short _ATTRS_o_ai
vec_avg(vector short a, vector short b)
{
  return __builtin_altivec_vavgsh(a, b);
}

static vector unsigned short _ATTRS_o_ai
vec_avg(vector unsigned short a, vector unsigned short b)
{
  return __builtin_altivec_vavguh(a, b);
}

static vector int _ATTRS_o_ai
vec_avg(vector int a, vector int b)
{
  return __builtin_altivec_vavgsw(a, b);
}

static vector unsigned int _ATTRS_o_ai
vec_avg(vector unsigned int a, vector unsigned int b)
{
  return __builtin_altivec_vavguw(a, b);
}

/* vec_st */

#define __builtin_vec_st vec_st
#define vec_stvx         vec_st

static void _ATTRS_o_ai
vec_st(vector signed char a, int b, vector signed char *c)
{
  __builtin_altivec_stvx((vector int)a, b, (void *)c);
}

static void _ATTRS_o_ai
vec_st(vector unsigned char a, int b, vector unsigned char *c)
{
  __builtin_altivec_stvx((vector int)a, b, (void *)c);
}

static void _ATTRS_o_ai
vec_st(vector short a, int b, vector short *c)
{
  __builtin_altivec_stvx((vector int)a, b, (void *)c);
}

static void _ATTRS_o_ai
vec_st(vector unsigned short a, int b, vector unsigned short *c)
{
  __builtin_altivec_stvx((vector int)a, b, (void *)c);
}

static void _ATTRS_o_ai
vec_st(vector int a, int b, vector int *c)
{
  __builtin_altivec_stvx(a, b, (void *)c);
}

static void _ATTRS_o_ai
vec_st(vector unsigned int a, int b, vector unsigned int *c)
{
  __builtin_altivec_stvx((vector int)a, b, (void *)c);
}

static void _ATTRS_o_ai
vec_st(vector float a, int b, vector float *c)
{
  __builtin_altivec_stvx((vector int)a, b, (void *)c);
}

/* vec_stl */

#define __builtin_vec_stl vec_stl
#define vec_stvxl         vec_stl

static void _ATTRS_o_ai
vec_stl(vector signed char a, int b, vector signed char *c)
{
  __builtin_altivec_stvxl((vector int)a, b, (void *)c);
}

static void _ATTRS_o_ai
vec_stl(vector unsigned char a, int b, vector unsigned char *c)
{
  __builtin_altivec_stvxl((vector int)a, b, (void *)c);
}

static void _ATTRS_o_ai
vec_stl(vector short a, int b, vector short *c)
{
  __builtin_altivec_stvxl((vector int)a, b, (void *)c);
}

static void _ATTRS_o_ai
vec_stl(vector unsigned short a, int b, vector unsigned short *c)
{
  __builtin_altivec_stvxl((vector int)a, b, (void *)c);
}

static void _ATTRS_o_ai
vec_stl(vector int a, int b, vector int *c)
{
  __builtin_altivec_stvxl(a, b, (void *)c);
}

static void _ATTRS_o_ai
vec_stl(vector unsigned int a, int b, vector unsigned int *c)
{
  __builtin_altivec_stvxl((vector int)a, b, (void *)c);
}

static void _ATTRS_o_ai
vec_stl(vector float a, int b, vector float *c)
{
  __builtin_altivec_stvxl((vector int)a, b, (void *)c);
}

/* vec_ste */

#define __builtin_vec_stvebx __builtin_altivec_stvebx
#define __builtin_vec_stvehx __builtin_altivec_stvehx
#define __builtin_vec_stvewx __builtin_altivec_stvewx
#define vec_stvebx __builtin_altivec_stvebx
#define vec_stvehx __builtin_altivec_stvehx
#define vec_stvewx __builtin_altivec_stvewx

static void _ATTRS_o_ai
vec_ste(vector signed char a, int b, vector signed char *c)
{
  __builtin_altivec_stvebx((vector char)a, b, (void *)c);
}

static void _ATTRS_o_ai
vec_ste(vector unsigned char a, int b, vector unsigned char *c)
{
  __builtin_altivec_stvebx((vector char)a, b, (void *)c);
}

static void _ATTRS_o_ai
vec_ste(vector short a, int b, vector short *c)
{
  __builtin_altivec_stvehx(a, b, (void *)c);
}

static void _ATTRS_o_ai
vec_ste(vector unsigned short a, int b, vector unsigned short *c)
{
  __builtin_altivec_stvehx((vector short)a, b, (void *)c);
}

static void _ATTRS_o_ai
vec_ste(vector int a, int b, vector int *c)
{
  __builtin_altivec_stvewx(a, b, (void *)c);
}

static void _ATTRS_o_ai
vec_ste(vector unsigned int a, int b, vector unsigned int *c)
{
  __builtin_altivec_stvewx((vector int)a, b, (void *)c);
}

static void _ATTRS_o_ai
vec_ste(vector float a, int b, vector float *c)
{
  __builtin_altivec_stvewx((vector int)a, b, (void *)c);
}

/* vec_cmpb */

#define vec_cmpb           __builtin_altivec_vcmpbfp
#define vec_vcmpbfp        __builtin_altivec_vcmpbfp
#define __builtin_vec_cmpb __builtin_altivec_vcmpbfp

/* vec_cmpeq */

#define __builtin_vec_cmpeq vec_cmpeq

static vector /*bool*/ char _ATTRS_o_ai
vec_cmpeq(vector signed char a, vector signed char b)
{
  return __builtin_altivec_vcmpequb((vector char)a, (vector char)b);
}

static vector /*bool*/ char _ATTRS_o_ai
vec_cmpeq(vector unsigned char a, vector unsigned char b)
{
  return __builtin_altivec_vcmpequb((vector char)a, (vector char)b);
}

static vector /*bool*/ short _ATTRS_o_ai
vec_cmpeq(vector short a, vector short b)
{
  return __builtin_altivec_vcmpequh(a, b);
}

static vector /*bool*/ short _ATTRS_o_ai
vec_cmpeq(vector unsigned short a, vector unsigned short b)
{
  return __builtin_altivec_vcmpequh((vector short)a, (vector short)b);
}

static vector /*bool*/ int _ATTRS_o_ai
vec_cmpeq(vector int a, vector int b)
{
  return __builtin_altivec_vcmpequw(a, b);
}

static vector /*bool*/ int _ATTRS_o_ai
vec_cmpeq(vector unsigned int a, vector unsigned int b)
{
  return __builtin_altivec_vcmpequw((vector int)a, (vector int)b);
}

static vector /*bool*/ int _ATTRS_o_ai
vec_cmpeq(vector float a, vector float b)
{
  return __builtin_altivec_vcmpeqfp(a, b);
}

/* vec_cmpge */

#define vec_cmpge           __builtin_altivec_vcmpgefp
#define vec_vcmpgefp        __builtin_altivec_vcmpgefp
#define __builtin_vec_cmpge __builtin_altivec_vcmpgefp

/* vec_cmpgt */

#define vec_vcmpgtsb __builtin_altivec_vcmpgtsb
#define vec_vcmpgtub __builtin_altivec_vcmpgtub
#define vec_vcmpgtsh __builtin_altivec_vcmpgtsh
#define vec_vcmpgtuh __builtin_altivec_vcmpgtuh
#define vec_vcmpgtsw __builtin_altivec_vcmpgtsw
#define vec_vcmpgtuw __builtin_altivec_vcmpgtuw
#define vec_vcmpgtfp __builtin_altivec_vcmpgtfp
#define __builtin_vec_vcmpgtsb __builtin_altivec_vcmpgtsb
#define __builtin_vec_vcmpgtub __builtin_altivec_vcmpgtub
#define __builtin_vec_vcmpgtsh __builtin_altivec_vcmpgtsh
#define __builtin_vec_vcmpgtuh __builtin_altivec_vcmpgtuh
#define __builtin_vec_vcmpgtsw __builtin_altivec_vcmpgtsw
#define __builtin_vec_vcmpgtuw __builtin_altivec_vcmpgtuw
#define __builtin_vec_vcmpgtfp __builtin_altivec_vcmpgtfp

static vector /*bool*/ char _ATTRS_o_ai
vec_cmpgt(vector signed char a, vector signed char b)
{
  return __builtin_altivec_vcmpgtsb(a, b);
}

static vector /*bool*/ char _ATTRS_o_ai
vec_cmpgt(vector unsigned char a, vector unsigned char b)
{
  return __builtin_altivec_vcmpgtub(a, b);
}

static vector /*bool*/ short _ATTRS_o_ai
vec_cmpgt(vector short a, vector short b)
{
  return __builtin_altivec_vcmpgtsh(a, b);
}

static vector /*bool*/ short _ATTRS_o_ai
vec_cmpgt(vector unsigned short a, vector unsigned short b)
{
  return __builtin_altivec_vcmpgtuh(a, b);
}

static vector /*bool*/ int _ATTRS_o_ai
vec_cmpgt(vector int a, vector int b)
{
  return __builtin_altivec_vcmpgtsw(a, b);
}

static vector /*bool*/ int _ATTRS_o_ai
vec_cmpgt(vector unsigned int a, vector unsigned int b)
{
  return __builtin_altivec_vcmpgtuw(a, b);
}

static vector /*bool*/ int _ATTRS_o_ai
vec_cmpgt(vector float a, vector float b)
{
  return __builtin_altivec_vcmpgtfp(a, b);
}

/* vec_cmple */

#define __builtin_vec_cmple vec_cmple

static vector /*bool*/ int __attribute__((__always_inline__))
vec_cmple(vector float a, vector float b)
{
  return __builtin_altivec_vcmpgefp(b, a);
}

/* vec_cmplt */

#define __builtin_vec_cmplt vec_cmplt

static vector /*bool*/ char _ATTRS_o_ai
vec_cmplt(vector signed char a, vector signed char b)
{
  return __builtin_altivec_vcmpgtsb(b, a);
}

static vector /*bool*/ char _ATTRS_o_ai
vec_cmplt(vector unsigned char a, vector unsigned char b)
{
  return __builtin_altivec_vcmpgtub(b, a);
}

static vector /*bool*/ short _ATTRS_o_ai
vec_cmplt(vector short a, vector short b)
{
  return __builtin_altivec_vcmpgtsh(b, a);
}

static vector /*bool*/ short _ATTRS_o_ai
vec_cmplt(vector unsigned short a, vector unsigned short b)
{
  return __builtin_altivec_vcmpgtuh(b, a);
}

static vector /*bool*/ int _ATTRS_o_ai
vec_cmplt(vector int a, vector int b)
{
  return __builtin_altivec_vcmpgtsw(b, a);
}

static vector /*bool*/ int _ATTRS_o_ai
vec_cmplt(vector unsigned int a, vector unsigned int b)
{
  return __builtin_altivec_vcmpgtuw(b, a);
}

static vector /*bool*/ int _ATTRS_o_ai
vec_cmplt(vector float a, vector float b)
{
  return __builtin_altivec_vcmpgtfp(b, a);
}

/* vec_max */

#define __builtin_vec_vmaxsb __builtin_altivec_vmaxsb
#define __builtin_vec_vmaxub __builtin_altivec_vmaxub
#define __builtin_vec_vmaxsh __builtin_altivec_vmaxsh
#define __builtin_vec_vmaxuh __builtin_altivec_vmaxuh
#define __builtin_vec_vmaxsw __builtin_altivec_vmaxsw
#define __builtin_vec_vmaxuw __builtin_altivec_vmaxuw
#define __builtin_vec_vmaxfp __builtin_altivec_vmaxfp
#define vec_vmaxsb __builtin_altivec_vmaxsb
#define vec_vmaxub __builtin_altivec_vmaxub
#define vec_vmaxsh __builtin_altivec_vmaxsh
#define vec_vmaxuh __builtin_altivec_vmaxuh
#define vec_vmaxsw __builtin_altivec_vmaxsw
#define vec_vmaxuw __builtin_altivec_vmaxuw
#define vec_vmaxfp __builtin_altivec_vmaxfp
#define __builtin_vec_max vec_max

static vector signed char _ATTRS_o_ai
vec_max(vector signed  char a, vector signed char b)
{
  return __builtin_altivec_vmaxsb(a, b);
}

static vector unsigned char _ATTRS_o_ai
vec_max(vector unsigned  char a, vector unsigned char b)
{
  return __builtin_altivec_vmaxub(a, b);
}

static vector short _ATTRS_o_ai
vec_max(vector short a, vector short b)
{
  return __builtin_altivec_vmaxsh(a, b);
}

static vector unsigned short _ATTRS_o_ai
vec_max(vector unsigned short a, vector unsigned short b)
{
  return __builtin_altivec_vmaxuh(a, b);
}

static vector int _ATTRS_o_ai
vec_max(vector int a, vector int b)
{
  return __builtin_altivec_vmaxsw(a, b);
}

static vector unsigned int _ATTRS_o_ai
vec_max(vector unsigned int a, vector unsigned int b)
{
  return __builtin_altivec_vmaxuw(a, b);
}

static vector float _ATTRS_o_ai
vec_max(vector float a, vector float b)
{
  return __builtin_altivec_vmaxfp(a, b);
}

/* vec_mfvscr */

#define __builtin_vec_mfvscr __builtin_altivec_mfvscr
#define vec_mfvscr           __builtin_altivec_mfvscr

/* vec_min */

#define __builtin_vec_vminsb __builtin_altivec_vminsb
#define __builtin_vec_vminub __builtin_altivec_vminub
#define __builtin_vec_vminsh __builtin_altivec_vminsh
#define __builtin_vec_vminuh __builtin_altivec_vminuh
#define __builtin_vec_vminsw __builtin_altivec_vminsw
#define __builtin_vec_vminuw __builtin_altivec_vminuw
#define __builtin_vec_vminfp __builtin_altivec_vminfp
#define vec_vminsb __builtin_altivec_vminsb
#define vec_vminub __builtin_altivec_vminub
#define vec_vminsh __builtin_altivec_vminsh
#define vec_vminuh __builtin_altivec_vminuh
#define vec_vminsw __builtin_altivec_vminsw
#define vec_vminuw __builtin_altivec_vminuw
#define vec_vminfp __builtin_altivec_vminfp
#define __builtin_vec_min vec_min

static vector signed char _ATTRS_o_ai
vec_min(vector signed  char a, vector signed char b)
{
  return __builtin_altivec_vminsb(a, b);
}

static vector unsigned char _ATTRS_o_ai
vec_min(vector unsigned  char a, vector unsigned char b)
{
  return __builtin_altivec_vminub(a, b);
}

static vector short _ATTRS_o_ai
vec_min(vector short a, vector short b)
{
  return __builtin_altivec_vminsh(a, b);
}

static vector unsigned short _ATTRS_o_ai
vec_min(vector unsigned short a, vector unsigned short b)
{
  return __builtin_altivec_vminuh(a, b);
}

static vector int _ATTRS_o_ai
vec_min(vector int a, vector int b)
{
  return __builtin_altivec_vminsw(a, b);
}

static vector unsigned int _ATTRS_o_ai
vec_min(vector unsigned int a, vector unsigned int b)
{
  return __builtin_altivec_vminuw(a, b);
}

static vector float _ATTRS_o_ai
vec_min(vector float a, vector float b)
{
  return __builtin_altivec_vminfp(a, b);
}

/* vec_mtvscr */

#define __builtin_vec_mtvscr __builtin_altivec_mtvscr
#define vec_mtvscr           __builtin_altivec_mtvscr

/* ------------------------------ predicates ------------------------------------ */

static int __attribute__((__always_inline__))
__builtin_vec_vcmpeq_p(char CR6_param, vector float a, vector float b)
{
  return __builtin_altivec_vcmpeqfp_p(CR6_param, a, b);
}

static int __attribute__((__always_inline__))
__builtin_vec_vcmpge_p(char CR6_param, vector float a, vector float b)
{
  return __builtin_altivec_vcmpgefp_p(CR6_param, a, b);
}

static int __attribute__((__always_inline__))
__builtin_vec_vcmpgt_p(char CR6_param, vector float a, vector float b)
{
  return __builtin_altivec_vcmpgtfp_p(CR6_param, a, b);
}

/* vec_all_eq */

static int _ATTRS_o_ai
vec_all_eq(vector signed char a, vector signed char b)
{
  return __builtin_altivec_vcmpequb_p(__CR6_LT, (vector char)a, (vector char)b);
}

static int _ATTRS_o_ai
vec_all_eq(vector unsigned char a, vector unsigned char b)
{
  return __builtin_altivec_vcmpequb_p(__CR6_LT, (vector char)a, (vector char)b);
}

static int _ATTRS_o_ai
vec_all_eq(vector short a, vector short b)
{
  return __builtin_altivec_vcmpequh_p(__CR6_LT, a, b);
}

static int _ATTRS_o_ai
vec_all_eq(vector unsigned short a, vector unsigned short b)
{
  return __builtin_altivec_vcmpequh_p(__CR6_LT, (vector short)a, (vector short)b);
}

static int _ATTRS_o_ai
vec_all_eq(vector int a, vector int b)
{
  return __builtin_altivec_vcmpequw_p(__CR6_LT, a, b);
}

static int _ATTRS_o_ai
vec_all_eq(vector unsigned int a, vector unsigned int b)
{
  return __builtin_altivec_vcmpequw_p(__CR6_LT, (vector int)a, (vector int)b);
}

static int _ATTRS_o_ai
vec_all_eq(vector float a, vector float b)
{
  return __builtin_altivec_vcmpeqfp_p(__CR6_LT, a, b);
}

/* vec_all_ge */

static int _ATTRS_o_ai
vec_all_ge(vector signed char a, vector signed char b)
{
  return __builtin_altivec_vcmpgtsb_p(__CR6_LT, b, a);
}

static int _ATTRS_o_ai
vec_all_ge(vector unsigned char a, vector unsigned char b)
{
  return __builtin_altivec_vcmpgtub_p(__CR6_LT, b, a);
}

static int _ATTRS_o_ai
vec_all_ge(vector short a, vector short b)
{
  return __builtin_altivec_vcmpgtsh_p(__CR6_LT, b, a);
}

static int _ATTRS_o_ai
vec_all_ge(vector unsigned short a, vector unsigned short b)
{
  return __builtin_altivec_vcmpgtuh_p(__CR6_LT, b, a);
}

static int _ATTRS_o_ai
vec_all_ge(vector int a, vector int b)
{
  return __builtin_altivec_vcmpgtsw_p(__CR6_LT, b, a);
}

static int _ATTRS_o_ai
vec_all_ge(vector unsigned int a, vector unsigned int b)
{
  return __builtin_altivec_vcmpgtuw_p(__CR6_LT, b, a);
}

static int _ATTRS_o_ai
vec_all_ge(vector float a, vector float b)
{
  return __builtin_altivec_vcmpgtfp_p(__CR6_LT, b, a);
}

/* vec_all_gt */

static int _ATTRS_o_ai
vec_all_gt(vector signed char a, vector signed char b)
{
  return __builtin_altivec_vcmpgtsb_p(__CR6_LT, a, b);
}

static int _ATTRS_o_ai
vec_all_gt(vector unsigned char a, vector unsigned char b)
{
  return __builtin_altivec_vcmpgtub_p(__CR6_LT, a, b);
}

static int _ATTRS_o_ai
vec_all_gt(vector short a, vector short b)
{
  return __builtin_altivec_vcmpgtsh_p(__CR6_LT, a, b);
}

static int _ATTRS_o_ai
vec_all_gt(vector unsigned short a, vector unsigned short b)
{
  return __builtin_altivec_vcmpgtuh_p(__CR6_LT, a, b);
}

static int _ATTRS_o_ai
vec_all_gt(vector int a, vector int b)
{
  return __builtin_altivec_vcmpgtsw_p(__CR6_LT, a, b);
}

static int _ATTRS_o_ai
vec_all_gt(vector unsigned int a, vector unsigned int b)
{
  return __builtin_altivec_vcmpgtuw_p(__CR6_LT, a, b);
}

static int _ATTRS_o_ai
vec_all_gt(vector float a, vector float b)
{
  return __builtin_altivec_vcmpgtfp_p(__CR6_LT, a, b);
}

/* vec_all_in */

static int __attribute__((__always_inline__))
vec_all_in(vector float a, vector float b)
{
  return __builtin_altivec_vcmpbfp_p(__CR6_EQ, a, b);
}

/* vec_all_le */

static int _ATTRS_o_ai
vec_all_le(vector signed char a, vector signed char b)
{
  return __builtin_altivec_vcmpgtsb_p(__CR6_EQ, a, b);
}

static int _ATTRS_o_ai
vec_all_le(vector unsigned char a, vector unsigned char b)
{
  return __builtin_altivec_vcmpgtub_p(__CR6_EQ, a, b);
}

static int _ATTRS_o_ai
vec_all_le(vector short a, vector short b)
{
  return __builtin_altivec_vcmpgtsh_p(__CR6_EQ, a, b);
}

static int _ATTRS_o_ai
vec_all_le(vector unsigned short a, vector unsigned short b)
{
  return __builtin_altivec_vcmpgtuh_p(__CR6_EQ, a, b);
}

static int _ATTRS_o_ai
vec_all_le(vector int a, vector int b)
{
  return __builtin_altivec_vcmpgtsw_p(__CR6_EQ, a, b);
}

static int _ATTRS_o_ai
vec_all_le(vector unsigned int a, vector unsigned int b)
{
  return __builtin_altivec_vcmpgtuw_p(__CR6_EQ, a, b);
}

static int _ATTRS_o_ai
vec_all_le(vector float a, vector float b)
{
  return __builtin_altivec_vcmpgtfp_p(__CR6_EQ, a, b);
}

/* vec_all_lt */

static int _ATTRS_o_ai
vec_all_lt(vector signed char a, vector signed char b)
{
  return __builtin_altivec_vcmpgtsb_p(__CR6_LT, b, a);
}

static int _ATTRS_o_ai
vec_all_lt(vector unsigned char a, vector unsigned char b)
{
  return __builtin_altivec_vcmpgtub_p(__CR6_LT, b, a);
}

static int _ATTRS_o_ai
vec_all_lt(vector short a, vector short b)
{
  return __builtin_altivec_vcmpgtsh_p(__CR6_LT, b, a);
}

static int _ATTRS_o_ai
vec_all_lt(vector unsigned short a, vector unsigned short b)
{
  return __builtin_altivec_vcmpgtuh_p(__CR6_LT, b, a);
}

static int _ATTRS_o_ai
vec_all_lt(vector int a, vector int b)
{
  return __builtin_altivec_vcmpgtsw_p(__CR6_LT, b, a);
}

static int _ATTRS_o_ai
vec_all_lt(vector unsigned int a, vector unsigned int b)
{
  return __builtin_altivec_vcmpgtuw_p(__CR6_LT, b, a);
}

static int _ATTRS_o_ai
vec_all_lt(vector float a, vector float b)
{
  return __builtin_altivec_vcmpgtfp_p(__CR6_LT, b, a);
}

/* vec_all_nan */

static int __attribute__((__always_inline__))
vec_all_nan(vector float a)
{
  return __builtin_altivec_vcmpeqfp_p(__CR6_EQ, a, a);
}

/* vec_all_ne */

static int _ATTRS_o_ai
vec_all_ne(vector signed char a, vector signed char b)
{
  return __builtin_altivec_vcmpequb_p(__CR6_EQ, (vector char)a, (vector char)b);
}

static int _ATTRS_o_ai
vec_all_ne(vector unsigned char a, vector unsigned char b)
{
  return __builtin_altivec_vcmpequb_p(__CR6_EQ, (vector char)a, (vector char)b);
}

static int _ATTRS_o_ai
vec_all_ne(vector short a, vector short b)
{
  return __builtin_altivec_vcmpequh_p(__CR6_EQ, a, b);
}

static int _ATTRS_o_ai
vec_all_ne(vector unsigned short a, vector unsigned short b)
{
  return __builtin_altivec_vcmpequh_p(__CR6_EQ, (vector short)a, (vector short)b);
}

static int _ATTRS_o_ai
vec_all_ne(vector int a, vector int b)
{
  return __builtin_altivec_vcmpequw_p(__CR6_EQ, a, b);
}

static int _ATTRS_o_ai
vec_all_ne(vector unsigned int a, vector unsigned int b)
{
  return __builtin_altivec_vcmpequw_p(__CR6_EQ, (vector int)a, (vector int)b);
}

static int _ATTRS_o_ai
vec_all_ne(vector float a, vector float b)
{
  return __builtin_altivec_vcmpeqfp_p(__CR6_EQ, a, b);
}

/* vec_all_nge */

static int __attribute__((__always_inline__))
vec_all_nge(vector float a, vector float b)
{
  return __builtin_altivec_vcmpgefp_p(__CR6_EQ, a, b);
}

/* vec_all_ngt */

static int __attribute__((__always_inline__))
vec_all_ngt(vector float a, vector float b)
{
  return __builtin_altivec_vcmpgtfp_p(__CR6_EQ, a, b);
}

/* vec_all_nle */

static int __attribute__((__always_inline__))
vec_all_nle(vector float a, vector float b)
{
  return __builtin_altivec_vcmpgefp_p(__CR6_EQ, b, a);
}

/* vec_all_nlt */

static int __attribute__((__always_inline__))
vec_all_nlt(vector float a, vector float b)
{
  return __builtin_altivec_vcmpgtfp_p(__CR6_EQ, b, a);
}

/* vec_all_numeric */

static int __attribute__((__always_inline__))
vec_all_numeric(vector float a)
{
  return __builtin_altivec_vcmpeqfp_p(__CR6_LT, a, a);
}

/* vec_any_eq */

static int _ATTRS_o_ai
vec_any_eq(vector signed char a, vector signed char b)
{
  return __builtin_altivec_vcmpequb_p(__CR6_EQ_REV, (vector char)a, (vector char)b);
}

static int _ATTRS_o_ai
vec_any_eq(vector unsigned char a, vector unsigned char b)
{
  return __builtin_altivec_vcmpequb_p(__CR6_EQ_REV, (vector char)a, (vector char)b);
}

static int _ATTRS_o_ai
vec_any_eq(vector short a, vector short b)
{
  return __builtin_altivec_vcmpequh_p(__CR6_EQ_REV, a, b);
}

static int _ATTRS_o_ai
vec_any_eq(vector unsigned short a, vector unsigned short b)
{
  return __builtin_altivec_vcmpequh_p(__CR6_EQ_REV, (vector short)a, (vector short)b);
}

static int _ATTRS_o_ai
vec_any_eq(vector int a, vector int b)
{
  return __builtin_altivec_vcmpequw_p(__CR6_EQ_REV, a, b);
}

static int _ATTRS_o_ai
vec_any_eq(vector unsigned int a, vector unsigned int b)
{
  return __builtin_altivec_vcmpequw_p(__CR6_EQ_REV, (vector int)a, (vector int)b);
}

static int _ATTRS_o_ai
vec_any_eq(vector float a, vector float b)
{
  return __builtin_altivec_vcmpeqfp_p(__CR6_EQ_REV, a, b);
}

/* vec_any_ge */

static int _ATTRS_o_ai
vec_any_ge(vector signed char a, vector signed char b)
{
  return __builtin_altivec_vcmpgtsb_p(__CR6_LT_REV, b, a);
}

static int _ATTRS_o_ai
vec_any_ge(vector unsigned char a, vector unsigned char b)
{
  return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV, b, a);
}

static int _ATTRS_o_ai
vec_any_ge(vector short a, vector short b)
{
  return __builtin_altivec_vcmpgtsh_p(__CR6_LT_REV, b, a);
}

static int _ATTRS_o_ai
vec_any_ge(vector unsigned short a, vector unsigned short b)
{
  return __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV, b, a);
}

static int _ATTRS_o_ai
vec_any_ge(vector int a, vector int b)
{
  return __builtin_altivec_vcmpgtsw_p(__CR6_LT_REV, b, a);
}

static int _ATTRS_o_ai
vec_any_ge(vector unsigned int a, vector unsigned int b)
{
  return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV, b, a);
}

static int _ATTRS_o_ai
vec_any_ge(vector float a, vector float b)
{
  return __builtin_altivec_vcmpgtfp_p(__CR6_LT_REV, b, a);
}

/* vec_any_gt */

static int _ATTRS_o_ai
vec_any_gt(vector signed char a, vector signed char b)
{
  return __builtin_altivec_vcmpgtsb_p(__CR6_EQ_REV, a, b);
}

static int _ATTRS_o_ai
vec_any_gt(vector unsigned char a, vector unsigned char b)
{
  return __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV, a, b);
}

static int _ATTRS_o_ai
vec_any_gt(vector short a, vector short b)
{
  return __builtin_altivec_vcmpgtsh_p(__CR6_EQ_REV, a, b);
}

static int _ATTRS_o_ai
vec_any_gt(vector unsigned short a, vector unsigned short b)
{
  return __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV, a, b);
}

static int _ATTRS_o_ai
vec_any_gt(vector int a, vector int b)
{
  return __builtin_altivec_vcmpgtsw_p(__CR6_EQ_REV, a, b);
}

static int _ATTRS_o_ai
vec_any_gt(vector unsigned int a, vector unsigned int b)
{
  return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV, a, b);
}

static int _ATTRS_o_ai
vec_any_gt(vector float a, vector float b)
{
  return __builtin_altivec_vcmpgtfp_p(__CR6_EQ_REV, a, b);
}

/* vec_any_le */

static int _ATTRS_o_ai
vec_any_le(vector signed char a, vector signed char b)
{
  return __builtin_altivec_vcmpgtsb_p(__CR6_LT_REV, a, b);
}

static int _ATTRS_o_ai
vec_any_le(vector unsigned char a, vector unsigned char b)
{
  return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV, a, b);
}

static int _ATTRS_o_ai
vec_any_le(vector short a, vector short b)
{
  return __builtin_altivec_vcmpgtsh_p(__CR6_LT_REV, a, b);
}

static int _ATTRS_o_ai
vec_any_le(vector unsigned short a, vector unsigned short b)
{
  return __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV, a, b);
}

static int _ATTRS_o_ai
vec_any_le(vector int a, vector int b)
{
  return __builtin_altivec_vcmpgtsw_p(__CR6_LT_REV, a, b);
}

static int _ATTRS_o_ai
vec_any_le(vector unsigned int a, vector unsigned int b)
{
  return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV, a, b);
}

static int _ATTRS_o_ai
vec_any_le(vector float a, vector float b)
{
  return __builtin_altivec_vcmpgtfp_p(__CR6_LT_REV, a, b);
}

/* vec_any_lt */

static int _ATTRS_o_ai
vec_any_lt(vector signed char a, vector signed char b)
{
  return __builtin_altivec_vcmpgtsb_p(__CR6_EQ_REV, b, a);
}

static int _ATTRS_o_ai
vec_any_lt(vector unsigned char a, vector unsigned char b)
{
  return __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV, b, a);
}

static int _ATTRS_o_ai
vec_any_lt(vector short a, vector short b)
{
  return __builtin_altivec_vcmpgtsh_p(__CR6_EQ_REV, b, a);
}

static int _ATTRS_o_ai
vec_any_lt(vector unsigned short a, vector unsigned short b)
{
  return __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV, b, a);
}

static int _ATTRS_o_ai
vec_any_lt(vector int a, vector int b)
{
  return __builtin_altivec_vcmpgtsw_p(__CR6_EQ_REV, b, a);
}

static int _ATTRS_o_ai
vec_any_lt(vector unsigned int a, vector unsigned int b)
{
  return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV, b, a);
}

static int _ATTRS_o_ai
vec_any_lt(vector float a, vector float b)
{
  return __builtin_altivec_vcmpgtfp_p(__CR6_EQ_REV, b, a);
}

/* vec_any_nan */

static int __attribute__((__always_inline__))
vec_any_nan(vector float a)
{
  return __builtin_altivec_vcmpeqfp_p(__CR6_LT_REV, a, a);
}

/* vec_any_ne */

static int _ATTRS_o_ai
vec_any_ne(vector signed char a, vector signed char b)
{
  return __builtin_altivec_vcmpequb_p(__CR6_LT_REV, (vector char)a, (vector char)b);
}

static int _ATTRS_o_ai
vec_any_ne(vector unsigned char a, vector unsigned char b)
{
  return __builtin_altivec_vcmpequb_p(__CR6_LT_REV, (vector char)a, (vector char)b);
}

static int _ATTRS_o_ai
vec_any_ne(vector short a, vector short b)
{
  return __builtin_altivec_vcmpequh_p(__CR6_LT_REV, a, b);
}

static int _ATTRS_o_ai
vec_any_ne(vector unsigned short a, vector unsigned short b)
{
  return __builtin_altivec_vcmpequh_p(__CR6_LT_REV, (vector short)a, (vector short)b);
}

static int _ATTRS_o_ai
vec_any_ne(vector int a, vector int b)
{
  return __builtin_altivec_vcmpequw_p(__CR6_LT_REV, a, b);
}

static int _ATTRS_o_ai
vec_any_ne(vector unsigned int a, vector unsigned int b)
{
  return __builtin_altivec_vcmpequw_p(__CR6_LT_REV, (vector int)a, (vector int)b);
}

static int _ATTRS_o_ai
vec_any_ne(vector float a, vector float b)
{
  return __builtin_altivec_vcmpeqfp_p(__CR6_LT_REV, a, b);
}

/* vec_any_nge */

static int __attribute__((__always_inline__))
vec_any_nge(vector float a, vector float b)
{
  return __builtin_altivec_vcmpgefp_p(__CR6_LT_REV, a, b);
}

/* vec_any_ngt */

static int __attribute__((__always_inline__))
vec_any_ngt(vector float a, vector float b)
{
  return __builtin_altivec_vcmpgtfp_p(__CR6_LT_REV, a, b);
}

/* vec_any_nle */

static int __attribute__((__always_inline__))
vec_any_nle(vector float a, vector float b)
{
  return __builtin_altivec_vcmpgefp_p(__CR6_LT_REV, b, a);
}

/* vec_any_nlt */

static int __attribute__((__always_inline__))
vec_any_nlt(vector float a, vector float b)
{
  return __builtin_altivec_vcmpgtfp_p(__CR6_LT_REV, b, a);
}

/* vec_any_numeric */

static int __attribute__((__always_inline__))
vec_any_numeric(vector float a)
{
  return __builtin_altivec_vcmpeqfp_p(__CR6_EQ_REV, a, a);
}

/* vec_any_out */

static int __attribute__((__always_inline__))
vec_any_out(vector float a, vector float b)
{
  return __builtin_altivec_vcmpbfp_p(__CR6_EQ_REV, a, b);
}

#undef _ATTRS_o_ai

#endif /* __ALTIVEC_H */
OpenPOWER on IntegriCloud