clang API Documentation
00001 /*===---- altivec.h - Standard header for type generic math ---------------===*\ 00002 * 00003 * Permission is hereby granted, free of charge, to any person obtaining a copy 00004 * of this software and associated documentation files (the "Software"), to deal 00005 * in the Software without restriction, including without limitation the rights 00006 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 00007 * copies of the Software, and to permit persons to whom the Software is 00008 * furnished to do so, subject to the following conditions: 00009 * 00010 * The above copyright notice and this permission notice shall be included in 00011 * all copies or substantial portions of the Software. 00012 * 00013 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 00014 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 00015 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 00016 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 00017 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 00018 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 00019 * THE SOFTWARE. 00020 * 00021 \*===----------------------------------------------------------------------===*/ 00022 00023 #ifndef __ALTIVEC_H 00024 #define __ALTIVEC_H 00025 00026 #ifndef __ALTIVEC__ 00027 #error "AltiVec support not enabled" 00028 #endif 00029 00030 /* constants for mapping CR6 bits to predicate result. */ 00031 00032 #define __CR6_EQ 0 00033 #define __CR6_EQ_REV 1 00034 #define __CR6_LT 2 00035 #define __CR6_LT_REV 3 00036 00037 #define __ATTRS_o_ai __attribute__((__overloadable__, __always_inline__)) 00038 00039 static vector signed char __ATTRS_o_ai 00040 vec_perm(vector signed char a, vector signed char b, vector unsigned char c); 00041 00042 static vector unsigned char __ATTRS_o_ai 00043 vec_perm(vector unsigned char a, 00044 vector unsigned char b, 00045 vector unsigned char c); 00046 00047 static vector bool char __ATTRS_o_ai 00048 vec_perm(vector bool char a, vector bool char b, vector unsigned char c); 00049 00050 static vector short __ATTRS_o_ai 00051 vec_perm(vector short a, vector short b, vector unsigned char c); 00052 00053 static vector unsigned short __ATTRS_o_ai 00054 vec_perm(vector unsigned short a, 00055 vector unsigned short b, 00056 vector unsigned char c); 00057 00058 static vector bool short __ATTRS_o_ai 00059 vec_perm(vector bool short a, vector bool short b, vector unsigned char c); 00060 00061 static vector pixel __ATTRS_o_ai 00062 vec_perm(vector pixel a, vector pixel b, vector unsigned char c); 00063 00064 static vector int __ATTRS_o_ai 00065 vec_perm(vector int a, vector int b, vector unsigned char c); 00066 00067 static vector unsigned int __ATTRS_o_ai 00068 vec_perm(vector unsigned int a, vector unsigned int b, vector unsigned char c); 00069 00070 static vector bool int __ATTRS_o_ai 00071 vec_perm(vector bool int a, vector bool int b, vector unsigned char c); 00072 00073 static vector float __ATTRS_o_ai 00074 vec_perm(vector float a, vector float b, vector unsigned char c); 00075 00076 /* vec_abs */ 00077 00078 #define __builtin_altivec_abs_v16qi vec_abs 00079 #define __builtin_altivec_abs_v8hi vec_abs 00080 #define __builtin_altivec_abs_v4si vec_abs 00081 00082 static vector signed char __ATTRS_o_ai 00083 vec_abs(vector signed char a) 00084 { 00085 return __builtin_altivec_vmaxsb(a, -a); 00086 } 00087 00088 static vector signed short __ATTRS_o_ai 00089 vec_abs(vector signed short a) 00090 { 00091 return __builtin_altivec_vmaxsh(a, -a); 00092 } 00093 00094 static vector signed int __ATTRS_o_ai 00095 vec_abs(vector signed int a) 00096 { 00097 return __builtin_altivec_vmaxsw(a, -a); 00098 } 00099 00100 static vector float __ATTRS_o_ai 00101 vec_abs(vector float a) 00102 { 00103 vector unsigned int res = (vector unsigned int)a 00104 & (vector unsigned int)(0x7FFFFFFF); 00105 return (vector float)res; 00106 } 00107 00108 /* vec_abss */ 00109 00110 #define __builtin_altivec_abss_v16qi vec_abss 00111 #define __builtin_altivec_abss_v8hi vec_abss 00112 #define __builtin_altivec_abss_v4si vec_abss 00113 00114 static vector signed char __ATTRS_o_ai 00115 vec_abss(vector signed char a) 00116 { 00117 return __builtin_altivec_vmaxsb 00118 (a, __builtin_altivec_vsubsbs((vector signed char)(0), a)); 00119 } 00120 00121 static vector signed short __ATTRS_o_ai 00122 vec_abss(vector signed short a) 00123 { 00124 return __builtin_altivec_vmaxsh 00125 (a, __builtin_altivec_vsubshs((vector signed short)(0), a)); 00126 } 00127 00128 static vector signed int __ATTRS_o_ai 00129 vec_abss(vector signed int a) 00130 { 00131 return __builtin_altivec_vmaxsw 00132 (a, __builtin_altivec_vsubsws((vector signed int)(0), a)); 00133 } 00134 00135 /* vec_add */ 00136 00137 static vector signed char __ATTRS_o_ai 00138 vec_add(vector signed char a, vector signed char b) 00139 { 00140 return a + b; 00141 } 00142 00143 static vector signed char __ATTRS_o_ai 00144 vec_add(vector bool char a, vector signed char b) 00145 { 00146 return (vector signed char)a + b; 00147 } 00148 00149 static vector signed char __ATTRS_o_ai 00150 vec_add(vector signed char a, vector bool char b) 00151 { 00152 return a + (vector signed char)b; 00153 } 00154 00155 static vector unsigned char __ATTRS_o_ai 00156 vec_add(vector unsigned char a, vector unsigned char b) 00157 { 00158 return a + b; 00159 } 00160 00161 static vector unsigned char __ATTRS_o_ai 00162 vec_add(vector bool char a, vector unsigned char b) 00163 { 00164 return (vector unsigned char)a + b; 00165 } 00166 00167 static vector unsigned char __ATTRS_o_ai 00168 vec_add(vector unsigned char a, vector bool char b) 00169 { 00170 return a + (vector unsigned char)b; 00171 } 00172 00173 static vector short __ATTRS_o_ai 00174 vec_add(vector short a, vector short b) 00175 { 00176 return a + b; 00177 } 00178 00179 static vector short __ATTRS_o_ai 00180 vec_add(vector bool short a, vector short b) 00181 { 00182 return (vector short)a + b; 00183 } 00184 00185 static vector short __ATTRS_o_ai 00186 vec_add(vector short a, vector bool short b) 00187 { 00188 return a + (vector short)b; 00189 } 00190 00191 static vector unsigned short __ATTRS_o_ai 00192 vec_add(vector unsigned short a, vector unsigned short b) 00193 { 00194 return a + b; 00195 } 00196 00197 static vector unsigned short __ATTRS_o_ai 00198 vec_add(vector bool short a, vector unsigned short b) 00199 { 00200 return (vector unsigned short)a + b; 00201 } 00202 00203 static vector unsigned short __ATTRS_o_ai 00204 vec_add(vector unsigned short a, vector bool short b) 00205 { 00206 return a + (vector unsigned short)b; 00207 } 00208 00209 static vector int __ATTRS_o_ai 00210 vec_add(vector int a, vector int b) 00211 { 00212 return a + b; 00213 } 00214 00215 static vector int __ATTRS_o_ai 00216 vec_add(vector bool int a, vector int b) 00217 { 00218 return (vector int)a + b; 00219 } 00220 00221 static vector int __ATTRS_o_ai 00222 vec_add(vector int a, vector bool int b) 00223 { 00224 return a + (vector int)b; 00225 } 00226 00227 static vector unsigned int __ATTRS_o_ai 00228 vec_add(vector unsigned int a, vector unsigned int b) 00229 { 00230 return a + b; 00231 } 00232 00233 static vector unsigned int __ATTRS_o_ai 00234 vec_add(vector bool int a, vector unsigned int b) 00235 { 00236 return (vector unsigned int)a + b; 00237 } 00238 00239 static vector unsigned int __ATTRS_o_ai 00240 vec_add(vector unsigned int a, vector bool int b) 00241 { 00242 return a + (vector unsigned int)b; 00243 } 00244 00245 static vector float __ATTRS_o_ai 00246 vec_add(vector float a, vector float b) 00247 { 00248 return a + b; 00249 } 00250 00251 /* vec_vaddubm */ 00252 00253 #define __builtin_altivec_vaddubm vec_vaddubm 00254 00255 static vector signed char __ATTRS_o_ai 00256 vec_vaddubm(vector signed char a, vector signed char b) 00257 { 00258 return a + b; 00259 } 00260 00261 static vector signed char __ATTRS_o_ai 00262 vec_vaddubm(vector bool char a, vector signed char b) 00263 { 00264 return (vector signed char)a + b; 00265 } 00266 00267 static vector signed char __ATTRS_o_ai 00268 vec_vaddubm(vector signed char a, vector bool char b) 00269 { 00270 return a + (vector signed char)b; 00271 } 00272 00273 static vector unsigned char __ATTRS_o_ai 00274 vec_vaddubm(vector unsigned char a, vector unsigned char b) 00275 { 00276 return a + b; 00277 } 00278 00279 static vector unsigned char __ATTRS_o_ai 00280 vec_vaddubm(vector bool char a, vector unsigned char b) 00281 { 00282 return (vector unsigned char)a + b; 00283 } 00284 00285 static vector unsigned char __ATTRS_o_ai 00286 vec_vaddubm(vector unsigned char a, vector bool char b) 00287 { 00288 return a + (vector unsigned char)b; 00289 } 00290 00291 /* vec_vadduhm */ 00292 00293 #define __builtin_altivec_vadduhm vec_vadduhm 00294 00295 static vector short __ATTRS_o_ai 00296 vec_vadduhm(vector short a, vector short b) 00297 { 00298 return a + b; 00299 } 00300 00301 static vector short __ATTRS_o_ai 00302 vec_vadduhm(vector bool short a, vector short b) 00303 { 00304 return (vector short)a + b; 00305 } 00306 00307 static vector short __ATTRS_o_ai 00308 vec_vadduhm(vector short a, vector bool short b) 00309 { 00310 return a + (vector short)b; 00311 } 00312 00313 static vector unsigned short __ATTRS_o_ai 00314 vec_vadduhm(vector unsigned short a, vector unsigned short b) 00315 { 00316 return a + b; 00317 } 00318 00319 static vector unsigned short __ATTRS_o_ai 00320 vec_vadduhm(vector bool short a, vector unsigned short b) 00321 { 00322 return (vector unsigned short)a + b; 00323 } 00324 00325 static vector unsigned short __ATTRS_o_ai 00326 vec_vadduhm(vector unsigned short a, vector bool short b) 00327 { 00328 return a + (vector unsigned short)b; 00329 } 00330 00331 /* vec_vadduwm */ 00332 00333 #define __builtin_altivec_vadduwm vec_vadduwm 00334 00335 static vector int __ATTRS_o_ai 00336 vec_vadduwm(vector int a, vector int b) 00337 { 00338 return a + b; 00339 } 00340 00341 static vector int __ATTRS_o_ai 00342 vec_vadduwm(vector bool int a, vector int b) 00343 { 00344 return (vector int)a + b; 00345 } 00346 00347 static vector int __ATTRS_o_ai 00348 vec_vadduwm(vector int a, vector bool int b) 00349 { 00350 return a + (vector int)b; 00351 } 00352 00353 static vector unsigned int __ATTRS_o_ai 00354 vec_vadduwm(vector unsigned int a, vector unsigned int b) 00355 { 00356 return a + b; 00357 } 00358 00359 static vector unsigned int __ATTRS_o_ai 00360 vec_vadduwm(vector bool int a, vector unsigned int b) 00361 { 00362 return (vector unsigned int)a + b; 00363 } 00364 00365 static vector unsigned int __ATTRS_o_ai 00366 vec_vadduwm(vector unsigned int a, vector bool int b) 00367 { 00368 return a + (vector unsigned int)b; 00369 } 00370 00371 /* vec_vaddfp */ 00372 00373 #define __builtin_altivec_vaddfp vec_vaddfp 00374 00375 static vector float __attribute__((__always_inline__)) 00376 vec_vaddfp(vector float a, vector float b) 00377 { 00378 return a + b; 00379 } 00380 00381 /* vec_addc */ 00382 00383 static vector unsigned int __attribute__((__always_inline__)) 00384 vec_addc(vector unsigned int a, vector unsigned int b) 00385 { 00386 return __builtin_altivec_vaddcuw(a, b); 00387 } 00388 00389 /* vec_vaddcuw */ 00390 00391 static vector unsigned int __attribute__((__always_inline__)) 00392 vec_vaddcuw(vector unsigned int a, vector unsigned int b) 00393 { 00394 return __builtin_altivec_vaddcuw(a, b); 00395 } 00396 00397 /* vec_adds */ 00398 00399 static vector signed char __ATTRS_o_ai 00400 vec_adds(vector signed char a, vector signed char b) 00401 { 00402 return __builtin_altivec_vaddsbs(a, b); 00403 } 00404 00405 static vector signed char __ATTRS_o_ai 00406 vec_adds(vector bool char a, vector signed char b) 00407 { 00408 return __builtin_altivec_vaddsbs((vector signed char)a, b); 00409 } 00410 00411 static vector signed char __ATTRS_o_ai 00412 vec_adds(vector signed char a, vector bool char b) 00413 { 00414 return __builtin_altivec_vaddsbs(a, (vector signed char)b); 00415 } 00416 00417 static vector unsigned char __ATTRS_o_ai 00418 vec_adds(vector unsigned char a, vector unsigned char b) 00419 { 00420 return __builtin_altivec_vaddubs(a, b); 00421 } 00422 00423 static vector unsigned char __ATTRS_o_ai 00424 vec_adds(vector bool char a, vector unsigned char b) 00425 { 00426 return __builtin_altivec_vaddubs((vector unsigned char)a, b); 00427 } 00428 00429 static vector unsigned char __ATTRS_o_ai 00430 vec_adds(vector unsigned char a, vector bool char b) 00431 { 00432 return __builtin_altivec_vaddubs(a, (vector unsigned char)b); 00433 } 00434 00435 static vector short __ATTRS_o_ai 00436 vec_adds(vector short a, vector short b) 00437 { 00438 return __builtin_altivec_vaddshs(a, b); 00439 } 00440 00441 static vector short __ATTRS_o_ai 00442 vec_adds(vector bool short a, vector short b) 00443 { 00444 return __builtin_altivec_vaddshs((vector short)a, b); 00445 } 00446 00447 static vector short __ATTRS_o_ai 00448 vec_adds(vector short a, vector bool short b) 00449 { 00450 return __builtin_altivec_vaddshs(a, (vector short)b); 00451 } 00452 00453 static vector unsigned short __ATTRS_o_ai 00454 vec_adds(vector unsigned short a, vector unsigned short b) 00455 { 00456 return __builtin_altivec_vadduhs(a, b); 00457 } 00458 00459 static vector unsigned short __ATTRS_o_ai 00460 vec_adds(vector bool short a, vector unsigned short b) 00461 { 00462 return __builtin_altivec_vadduhs((vector unsigned short)a, b); 00463 } 00464 00465 static vector unsigned short __ATTRS_o_ai 00466 vec_adds(vector unsigned short a, vector bool short b) 00467 { 00468 return __builtin_altivec_vadduhs(a, (vector unsigned short)b); 00469 } 00470 00471 static vector int __ATTRS_o_ai 00472 vec_adds(vector int a, vector int b) 00473 { 00474 return __builtin_altivec_vaddsws(a, b); 00475 } 00476 00477 static vector int __ATTRS_o_ai 00478 vec_adds(vector bool int a, vector int b) 00479 { 00480 return __builtin_altivec_vaddsws((vector int)a, b); 00481 } 00482 00483 static vector int __ATTRS_o_ai 00484 vec_adds(vector int a, vector bool int b) 00485 { 00486 return __builtin_altivec_vaddsws(a, (vector int)b); 00487 } 00488 00489 static vector unsigned int __ATTRS_o_ai 00490 vec_adds(vector unsigned int a, vector unsigned int b) 00491 { 00492 return __builtin_altivec_vadduws(a, b); 00493 } 00494 00495 static vector unsigned int __ATTRS_o_ai 00496 vec_adds(vector bool int a, vector unsigned int b) 00497 { 00498 return __builtin_altivec_vadduws((vector unsigned int)a, b); 00499 } 00500 00501 static vector unsigned int __ATTRS_o_ai 00502 vec_adds(vector unsigned int a, vector bool int b) 00503 { 00504 return __builtin_altivec_vadduws(a, (vector unsigned int)b); 00505 } 00506 00507 /* vec_vaddsbs */ 00508 00509 static vector signed char __ATTRS_o_ai 00510 vec_vaddsbs(vector signed char a, vector signed char b) 00511 { 00512 return __builtin_altivec_vaddsbs(a, b); 00513 } 00514 00515 static vector signed char __ATTRS_o_ai 00516 vec_vaddsbs(vector bool char a, vector signed char b) 00517 { 00518 return __builtin_altivec_vaddsbs((vector signed char)a, b); 00519 } 00520 00521 static vector signed char __ATTRS_o_ai 00522 vec_vaddsbs(vector signed char a, vector bool char b) 00523 { 00524 return __builtin_altivec_vaddsbs(a, (vector signed char)b); 00525 } 00526 00527 /* vec_vaddubs */ 00528 00529 static vector unsigned char __ATTRS_o_ai 00530 vec_vaddubs(vector unsigned char a, vector unsigned char b) 00531 { 00532 return __builtin_altivec_vaddubs(a, b); 00533 } 00534 00535 static vector unsigned char __ATTRS_o_ai 00536 vec_vaddubs(vector bool char a, vector unsigned char b) 00537 { 00538 return __builtin_altivec_vaddubs((vector unsigned char)a, b); 00539 } 00540 00541 static vector unsigned char __ATTRS_o_ai 00542 vec_vaddubs(vector unsigned char a, vector bool char b) 00543 { 00544 return __builtin_altivec_vaddubs(a, (vector unsigned char)b); 00545 } 00546 00547 /* vec_vaddshs */ 00548 00549 static vector short __ATTRS_o_ai 00550 vec_vaddshs(vector short a, vector short b) 00551 { 00552 return __builtin_altivec_vaddshs(a, b); 00553 } 00554 00555 static vector short __ATTRS_o_ai 00556 vec_vaddshs(vector bool short a, vector short b) 00557 { 00558 return __builtin_altivec_vaddshs((vector short)a, b); 00559 } 00560 00561 static vector short __ATTRS_o_ai 00562 vec_vaddshs(vector short a, vector bool short b) 00563 { 00564 return __builtin_altivec_vaddshs(a, (vector short)b); 00565 } 00566 00567 /* vec_vadduhs */ 00568 00569 static vector unsigned short __ATTRS_o_ai 00570 vec_vadduhs(vector unsigned short a, vector unsigned short b) 00571 { 00572 return __builtin_altivec_vadduhs(a, b); 00573 } 00574 00575 static vector unsigned short __ATTRS_o_ai 00576 vec_vadduhs(vector bool short a, vector unsigned short b) 00577 { 00578 return __builtin_altivec_vadduhs((vector unsigned short)a, b); 00579 } 00580 00581 static vector unsigned short __ATTRS_o_ai 00582 vec_vadduhs(vector unsigned short a, vector bool short b) 00583 { 00584 return __builtin_altivec_vadduhs(a, (vector unsigned short)b); 00585 } 00586 00587 /* vec_vaddsws */ 00588 00589 static vector int __ATTRS_o_ai 00590 vec_vaddsws(vector int a, vector int b) 00591 { 00592 return __builtin_altivec_vaddsws(a, b); 00593 } 00594 00595 static vector int __ATTRS_o_ai 00596 vec_vaddsws(vector bool int a, vector int b) 00597 { 00598 return __builtin_altivec_vaddsws((vector int)a, b); 00599 } 00600 00601 static vector int __ATTRS_o_ai 00602 vec_vaddsws(vector int a, vector bool int b) 00603 { 00604 return __builtin_altivec_vaddsws(a, (vector int)b); 00605 } 00606 00607 /* vec_vadduws */ 00608 00609 static vector unsigned int __ATTRS_o_ai 00610 vec_vadduws(vector unsigned int a, vector unsigned int b) 00611 { 00612 return __builtin_altivec_vadduws(a, b); 00613 } 00614 00615 static vector unsigned int __ATTRS_o_ai 00616 vec_vadduws(vector bool int a, vector unsigned int b) 00617 { 00618 return __builtin_altivec_vadduws((vector unsigned int)a, b); 00619 } 00620 00621 static vector unsigned int __ATTRS_o_ai 00622 vec_vadduws(vector unsigned int a, vector bool int b) 00623 { 00624 return __builtin_altivec_vadduws(a, (vector unsigned int)b); 00625 } 00626 00627 /* vec_and */ 00628 00629 #define __builtin_altivec_vand vec_and 00630 00631 static vector signed char __ATTRS_o_ai 00632 vec_and(vector signed char a, vector signed char b) 00633 { 00634 return a & b; 00635 } 00636 00637 static vector signed char __ATTRS_o_ai 00638 vec_and(vector bool char a, vector signed char b) 00639 { 00640 return (vector signed char)a & b; 00641 } 00642 00643 static vector signed char __ATTRS_o_ai 00644 vec_and(vector signed char a, vector bool char b) 00645 { 00646 return a & (vector signed char)b; 00647 } 00648 00649 static vector unsigned char __ATTRS_o_ai 00650 vec_and(vector unsigned char a, vector unsigned char b) 00651 { 00652 return a & b; 00653 } 00654 00655 static vector unsigned char __ATTRS_o_ai 00656 vec_and(vector bool char a, vector unsigned char b) 00657 { 00658 return (vector unsigned char)a & b; 00659 } 00660 00661 static vector unsigned char __ATTRS_o_ai 00662 vec_and(vector unsigned char a, vector bool char b) 00663 { 00664 return a & (vector unsigned char)b; 00665 } 00666 00667 static vector bool char __ATTRS_o_ai 00668 vec_and(vector bool char a, vector bool char b) 00669 { 00670 return a & b; 00671 } 00672 00673 static vector short __ATTRS_o_ai 00674 vec_and(vector short a, vector short b) 00675 { 00676 return a & b; 00677 } 00678 00679 static vector short __ATTRS_o_ai 00680 vec_and(vector bool short a, vector short b) 00681 { 00682 return (vector short)a & b; 00683 } 00684 00685 static vector short __ATTRS_o_ai 00686 vec_and(vector short a, vector bool short b) 00687 { 00688 return a & (vector short)b; 00689 } 00690 00691 static vector unsigned short __ATTRS_o_ai 00692 vec_and(vector unsigned short a, vector unsigned short b) 00693 { 00694 return a & b; 00695 } 00696 00697 static vector unsigned short __ATTRS_o_ai 00698 vec_and(vector bool short a, vector unsigned short b) 00699 { 00700 return (vector unsigned short)a & b; 00701 } 00702 00703 static vector unsigned short __ATTRS_o_ai 00704 vec_and(vector unsigned short a, vector bool short b) 00705 { 00706 return a & (vector unsigned short)b; 00707 } 00708 00709 static vector bool short __ATTRS_o_ai 00710 vec_and(vector bool short a, vector bool short b) 00711 { 00712 return a & b; 00713 } 00714 00715 static vector int __ATTRS_o_ai 00716 vec_and(vector int a, vector int b) 00717 { 00718 return a & b; 00719 } 00720 00721 static vector int __ATTRS_o_ai 00722 vec_and(vector bool int a, vector int b) 00723 { 00724 return (vector int)a & b; 00725 } 00726 00727 static vector int __ATTRS_o_ai 00728 vec_and(vector int a, vector bool int b) 00729 { 00730 return a & (vector int)b; 00731 } 00732 00733 static vector unsigned int __ATTRS_o_ai 00734 vec_and(vector unsigned int a, vector unsigned int b) 00735 { 00736 return a & b; 00737 } 00738 00739 static vector unsigned int __ATTRS_o_ai 00740 vec_and(vector bool int a, vector unsigned int b) 00741 { 00742 return (vector unsigned int)a & b; 00743 } 00744 00745 static vector unsigned int __ATTRS_o_ai 00746 vec_and(vector unsigned int a, vector bool int b) 00747 { 00748 return a & (vector unsigned int)b; 00749 } 00750 00751 static vector bool int __ATTRS_o_ai 00752 vec_and(vector bool int a, vector bool int b) 00753 { 00754 return a & b; 00755 } 00756 00757 static vector float __ATTRS_o_ai 00758 vec_and(vector float a, vector float b) 00759 { 00760 vector unsigned int res = (vector unsigned int)a & (vector unsigned int)b; 00761 return (vector float)res; 00762 } 00763 00764 static vector float __ATTRS_o_ai 00765 vec_and(vector bool int a, vector float b) 00766 { 00767 vector unsigned int res = (vector unsigned int)a & (vector unsigned int)b; 00768 return (vector float)res; 00769 } 00770 00771 static vector float __ATTRS_o_ai 00772 vec_and(vector float a, vector bool int b) 00773 { 00774 vector unsigned int res = (vector unsigned int)a & (vector unsigned int)b; 00775 return (vector float)res; 00776 } 00777 00778 /* vec_vand */ 00779 00780 static vector signed char __ATTRS_o_ai 00781 vec_vand(vector signed char a, vector signed char b) 00782 { 00783 return a & b; 00784 } 00785 00786 static vector signed char __ATTRS_o_ai 00787 vec_vand(vector bool char a, vector signed char b) 00788 { 00789 return (vector signed char)a & b; 00790 } 00791 00792 static vector signed char __ATTRS_o_ai 00793 vec_vand(vector signed char a, vector bool char b) 00794 { 00795 return a & (vector signed char)b; 00796 } 00797 00798 static vector unsigned char __ATTRS_o_ai 00799 vec_vand(vector unsigned char a, vector unsigned char b) 00800 { 00801 return a & b; 00802 } 00803 00804 static vector unsigned char __ATTRS_o_ai 00805 vec_vand(vector bool char a, vector unsigned char b) 00806 { 00807 return (vector unsigned char)a & b; 00808 } 00809 00810 static vector unsigned char __ATTRS_o_ai 00811 vec_vand(vector unsigned char a, vector bool char b) 00812 { 00813 return a & (vector unsigned char)b; 00814 } 00815 00816 static vector bool char __ATTRS_o_ai 00817 vec_vand(vector bool char a, vector bool char b) 00818 { 00819 return a & b; 00820 } 00821 00822 static vector short __ATTRS_o_ai 00823 vec_vand(vector short a, vector short b) 00824 { 00825 return a & b; 00826 } 00827 00828 static vector short __ATTRS_o_ai 00829 vec_vand(vector bool short a, vector short b) 00830 { 00831 return (vector short)a & b; 00832 } 00833 00834 static vector short __ATTRS_o_ai 00835 vec_vand(vector short a, vector bool short b) 00836 { 00837 return a & (vector short)b; 00838 } 00839 00840 static vector unsigned short __ATTRS_o_ai 00841 vec_vand(vector unsigned short a, vector unsigned short b) 00842 { 00843 return a & b; 00844 } 00845 00846 static vector unsigned short __ATTRS_o_ai 00847 vec_vand(vector bool short a, vector unsigned short b) 00848 { 00849 return (vector unsigned short)a & b; 00850 } 00851 00852 static vector unsigned short __ATTRS_o_ai 00853 vec_vand(vector unsigned short a, vector bool short b) 00854 { 00855 return a & (vector unsigned short)b; 00856 } 00857 00858 static vector bool short __ATTRS_o_ai 00859 vec_vand(vector bool short a, vector bool short b) 00860 { 00861 return a & b; 00862 } 00863 00864 static vector int __ATTRS_o_ai 00865 vec_vand(vector int a, vector int b) 00866 { 00867 return a & b; 00868 } 00869 00870 static vector int __ATTRS_o_ai 00871 vec_vand(vector bool int a, vector int b) 00872 { 00873 return (vector int)a & b; 00874 } 00875 00876 static vector int __ATTRS_o_ai 00877 vec_vand(vector int a, vector bool int b) 00878 { 00879 return a & (vector int)b; 00880 } 00881 00882 static vector unsigned int __ATTRS_o_ai 00883 vec_vand(vector unsigned int a, vector unsigned int b) 00884 { 00885 return a & b; 00886 } 00887 00888 static vector unsigned int __ATTRS_o_ai 00889 vec_vand(vector bool int a, vector unsigned int b) 00890 { 00891 return (vector unsigned int)a & b; 00892 } 00893 00894 static vector unsigned int __ATTRS_o_ai 00895 vec_vand(vector unsigned int a, vector bool int b) 00896 { 00897 return a & (vector unsigned int)b; 00898 } 00899 00900 static vector bool int __ATTRS_o_ai 00901 vec_vand(vector bool int a, vector bool int b) 00902 { 00903 return a & b; 00904 } 00905 00906 static vector float __ATTRS_o_ai 00907 vec_vand(vector float a, vector float b) 00908 { 00909 vector unsigned int res = (vector unsigned int)a & (vector unsigned int)b; 00910 return (vector float)res; 00911 } 00912 00913 static vector float __ATTRS_o_ai 00914 vec_vand(vector bool int a, vector float b) 00915 { 00916 vector unsigned int res = (vector unsigned int)a & (vector unsigned int)b; 00917 return (vector float)res; 00918 } 00919 00920 static vector float __ATTRS_o_ai 00921 vec_vand(vector float a, vector bool int b) 00922 { 00923 vector unsigned int res = (vector unsigned int)a & (vector unsigned int)b; 00924 return (vector float)res; 00925 } 00926 00927 /* vec_andc */ 00928 00929 #define __builtin_altivec_vandc vec_andc 00930 00931 static vector signed char __ATTRS_o_ai 00932 vec_andc(vector signed char a, vector signed char b) 00933 { 00934 return a & ~b; 00935 } 00936 00937 static vector signed char __ATTRS_o_ai 00938 vec_andc(vector bool char a, vector signed char b) 00939 { 00940 return (vector signed char)a & ~b; 00941 } 00942 00943 static vector signed char __ATTRS_o_ai 00944 vec_andc(vector signed char a, vector bool char b) 00945 { 00946 return a & ~(vector signed char)b; 00947 } 00948 00949 static vector unsigned char __ATTRS_o_ai 00950 vec_andc(vector unsigned char a, vector unsigned char b) 00951 { 00952 return a & ~b; 00953 } 00954 00955 static vector unsigned char __ATTRS_o_ai 00956 vec_andc(vector bool char a, vector unsigned char b) 00957 { 00958 return (vector unsigned char)a & ~b; 00959 } 00960 00961 static vector unsigned char __ATTRS_o_ai 00962 vec_andc(vector unsigned char a, vector bool char b) 00963 { 00964 return a & ~(vector unsigned char)b; 00965 } 00966 00967 static vector bool char __ATTRS_o_ai 00968 vec_andc(vector bool char a, vector bool char b) 00969 { 00970 return a & ~b; 00971 } 00972 00973 static vector short __ATTRS_o_ai 00974 vec_andc(vector short a, vector short b) 00975 { 00976 return a & ~b; 00977 } 00978 00979 static vector short __ATTRS_o_ai 00980 vec_andc(vector bool short a, vector short b) 00981 { 00982 return (vector short)a & ~b; 00983 } 00984 00985 static vector short __ATTRS_o_ai 00986 vec_andc(vector short a, vector bool short b) 00987 { 00988 return a & ~(vector short)b; 00989 } 00990 00991 static vector unsigned short __ATTRS_o_ai 00992 vec_andc(vector unsigned short a, vector unsigned short b) 00993 { 00994 return a & ~b; 00995 } 00996 00997 static vector unsigned short __ATTRS_o_ai 00998 vec_andc(vector bool short a, vector unsigned short b) 00999 { 01000 return (vector unsigned short)a & ~b; 01001 } 01002 01003 static vector unsigned short __ATTRS_o_ai 01004 vec_andc(vector unsigned short a, vector bool short b) 01005 { 01006 return a & ~(vector unsigned short)b; 01007 } 01008 01009 static vector bool short __ATTRS_o_ai 01010 vec_andc(vector bool short a, vector bool short b) 01011 { 01012 return a & ~b; 01013 } 01014 01015 static vector int __ATTRS_o_ai 01016 vec_andc(vector int a, vector int b) 01017 { 01018 return a & ~b; 01019 } 01020 01021 static vector int __ATTRS_o_ai 01022 vec_andc(vector bool int a, vector int b) 01023 { 01024 return (vector int)a & ~b; 01025 } 01026 01027 static vector int __ATTRS_o_ai 01028 vec_andc(vector int a, vector bool int b) 01029 { 01030 return a & ~(vector int)b; 01031 } 01032 01033 static vector unsigned int __ATTRS_o_ai 01034 vec_andc(vector unsigned int a, vector unsigned int b) 01035 { 01036 return a & ~b; 01037 } 01038 01039 static vector unsigned int __ATTRS_o_ai 01040 vec_andc(vector bool int a, vector unsigned int b) 01041 { 01042 return (vector unsigned int)a & ~b; 01043 } 01044 01045 static vector unsigned int __ATTRS_o_ai 01046 vec_andc(vector unsigned int a, vector bool int b) 01047 { 01048 return a & ~(vector unsigned int)b; 01049 } 01050 01051 static vector bool int __ATTRS_o_ai 01052 vec_andc(vector bool int a, vector bool int b) 01053 { 01054 return a & ~b; 01055 } 01056 01057 static vector float __ATTRS_o_ai 01058 vec_andc(vector float a, vector float b) 01059 { 01060 vector unsigned int res = (vector unsigned int)a & ~(vector unsigned int)b; 01061 return (vector float)res; 01062 } 01063 01064 static vector float __ATTRS_o_ai 01065 vec_andc(vector bool int a, vector float b) 01066 { 01067 vector unsigned int res = (vector unsigned int)a & ~(vector unsigned int)b; 01068 return (vector float)res; 01069 } 01070 01071 static vector float __ATTRS_o_ai 01072 vec_andc(vector float a, vector bool int b) 01073 { 01074 vector unsigned int res = (vector unsigned int)a & ~(vector unsigned int)b; 01075 return (vector float)res; 01076 } 01077 01078 /* vec_vandc */ 01079 01080 static vector signed char __ATTRS_o_ai 01081 vec_vandc(vector signed char a, vector signed char b) 01082 { 01083 return a & ~b; 01084 } 01085 01086 static vector signed char __ATTRS_o_ai 01087 vec_vandc(vector bool char a, vector signed char b) 01088 { 01089 return (vector signed char)a & ~b; 01090 } 01091 01092 static vector signed char __ATTRS_o_ai 01093 vec_vandc(vector signed char a, vector bool char b) 01094 { 01095 return a & ~(vector signed char)b; 01096 } 01097 01098 static vector unsigned char __ATTRS_o_ai 01099 vec_vandc(vector unsigned char a, vector unsigned char b) 01100 { 01101 return a & ~b; 01102 } 01103 01104 static vector unsigned char __ATTRS_o_ai 01105 vec_vandc(vector bool char a, vector unsigned char b) 01106 { 01107 return (vector unsigned char)a & ~b; 01108 } 01109 01110 static vector unsigned char __ATTRS_o_ai 01111 vec_vandc(vector unsigned char a, vector bool char b) 01112 { 01113 return a & ~(vector unsigned char)b; 01114 } 01115 01116 static vector bool char __ATTRS_o_ai 01117 vec_vandc(vector bool char a, vector bool char b) 01118 { 01119 return a & ~b; 01120 } 01121 01122 static vector short __ATTRS_o_ai 01123 vec_vandc(vector short a, vector short b) 01124 { 01125 return a & ~b; 01126 } 01127 01128 static vector short __ATTRS_o_ai 01129 vec_vandc(vector bool short a, vector short b) 01130 { 01131 return (vector short)a & ~b; 01132 } 01133 01134 static vector short __ATTRS_o_ai 01135 vec_vandc(vector short a, vector bool short b) 01136 { 01137 return a & ~(vector short)b; 01138 } 01139 01140 static vector unsigned short __ATTRS_o_ai 01141 vec_vandc(vector unsigned short a, vector unsigned short b) 01142 { 01143 return a & ~b; 01144 } 01145 01146 static vector unsigned short __ATTRS_o_ai 01147 vec_vandc(vector bool short a, vector unsigned short b) 01148 { 01149 return (vector unsigned short)a & ~b; 01150 } 01151 01152 static vector unsigned short __ATTRS_o_ai 01153 vec_vandc(vector unsigned short a, vector bool short b) 01154 { 01155 return a & ~(vector unsigned short)b; 01156 } 01157 01158 static vector bool short __ATTRS_o_ai 01159 vec_vandc(vector bool short a, vector bool short b) 01160 { 01161 return a & ~b; 01162 } 01163 01164 static vector int __ATTRS_o_ai 01165 vec_vandc(vector int a, vector int b) 01166 { 01167 return a & ~b; 01168 } 01169 01170 static vector int __ATTRS_o_ai 01171 vec_vandc(vector bool int a, vector int b) 01172 { 01173 return (vector int)a & ~b; 01174 } 01175 01176 static vector int __ATTRS_o_ai 01177 vec_vandc(vector int a, vector bool int b) 01178 { 01179 return a & ~(vector int)b; 01180 } 01181 01182 static vector unsigned int __ATTRS_o_ai 01183 vec_vandc(vector unsigned int a, vector unsigned int b) 01184 { 01185 return a & ~b; 01186 } 01187 01188 static vector unsigned int __ATTRS_o_ai 01189 vec_vandc(vector bool int a, vector unsigned int b) 01190 { 01191 return (vector unsigned int)a & ~b; 01192 } 01193 01194 static vector unsigned int __ATTRS_o_ai 01195 vec_vandc(vector unsigned int a, vector bool int b) 01196 { 01197 return a & ~(vector unsigned int)b; 01198 } 01199 01200 static vector bool int __ATTRS_o_ai 01201 vec_vandc(vector bool int a, vector bool int b) 01202 { 01203 return a & ~b; 01204 } 01205 01206 static vector float __ATTRS_o_ai 01207 vec_vandc(vector float a, vector float b) 01208 { 01209 vector unsigned int res = (vector unsigned int)a & ~(vector unsigned int)b; 01210 return (vector float)res; 01211 } 01212 01213 static vector float __ATTRS_o_ai 01214 vec_vandc(vector bool int a, vector float b) 01215 { 01216 vector unsigned int res = (vector unsigned int)a & ~(vector unsigned int)b; 01217 return (vector float)res; 01218 } 01219 01220 static vector float __ATTRS_o_ai 01221 vec_vandc(vector float a, vector bool int b) 01222 { 01223 vector unsigned int res = (vector unsigned int)a & ~(vector unsigned int)b; 01224 return (vector float)res; 01225 } 01226 01227 /* vec_avg */ 01228 01229 static vector signed char __ATTRS_o_ai 01230 vec_avg(vector signed char a, vector signed char b) 01231 { 01232 return __builtin_altivec_vavgsb(a, b); 01233 } 01234 01235 static vector unsigned char __ATTRS_o_ai 01236 vec_avg(vector unsigned char a, vector unsigned char b) 01237 { 01238 return __builtin_altivec_vavgub(a, b); 01239 } 01240 01241 static vector short __ATTRS_o_ai 01242 vec_avg(vector short a, vector short b) 01243 { 01244 return __builtin_altivec_vavgsh(a, b); 01245 } 01246 01247 static vector unsigned short __ATTRS_o_ai 01248 vec_avg(vector unsigned short a, vector unsigned short b) 01249 { 01250 return __builtin_altivec_vavguh(a, b); 01251 } 01252 01253 static vector int __ATTRS_o_ai 01254 vec_avg(vector int a, vector int b) 01255 { 01256 return __builtin_altivec_vavgsw(a, b); 01257 } 01258 01259 static vector unsigned int __ATTRS_o_ai 01260 vec_avg(vector unsigned int a, vector unsigned int b) 01261 { 01262 return __builtin_altivec_vavguw(a, b); 01263 } 01264 01265 /* vec_vavgsb */ 01266 01267 static vector signed char __attribute__((__always_inline__)) 01268 vec_vavgsb(vector signed char a, vector signed char b) 01269 { 01270 return __builtin_altivec_vavgsb(a, b); 01271 } 01272 01273 /* vec_vavgub */ 01274 01275 static vector unsigned char __attribute__((__always_inline__)) 01276 vec_vavgub(vector unsigned char a, vector unsigned char b) 01277 { 01278 return __builtin_altivec_vavgub(a, b); 01279 } 01280 01281 /* vec_vavgsh */ 01282 01283 static vector short __attribute__((__always_inline__)) 01284 vec_vavgsh(vector short a, vector short b) 01285 { 01286 return __builtin_altivec_vavgsh(a, b); 01287 } 01288 01289 /* vec_vavguh */ 01290 01291 static vector unsigned short __attribute__((__always_inline__)) 01292 vec_vavguh(vector unsigned short a, vector unsigned short b) 01293 { 01294 return __builtin_altivec_vavguh(a, b); 01295 } 01296 01297 /* vec_vavgsw */ 01298 01299 static vector int __attribute__((__always_inline__)) 01300 vec_vavgsw(vector int a, vector int b) 01301 { 01302 return __builtin_altivec_vavgsw(a, b); 01303 } 01304 01305 /* vec_vavguw */ 01306 01307 static vector unsigned int __attribute__((__always_inline__)) 01308 vec_vavguw(vector unsigned int a, vector unsigned int b) 01309 { 01310 return __builtin_altivec_vavguw(a, b); 01311 } 01312 01313 /* vec_ceil */ 01314 01315 static vector float __attribute__((__always_inline__)) 01316 vec_ceil(vector float a) 01317 { 01318 return __builtin_altivec_vrfip(a); 01319 } 01320 01321 /* vec_vrfip */ 01322 01323 static vector float __attribute__((__always_inline__)) 01324 vec_vrfip(vector float a) 01325 { 01326 return __builtin_altivec_vrfip(a); 01327 } 01328 01329 /* vec_cmpb */ 01330 01331 static vector int __attribute__((__always_inline__)) 01332 vec_cmpb(vector float a, vector float b) 01333 { 01334 return __builtin_altivec_vcmpbfp(a, b); 01335 } 01336 01337 /* vec_vcmpbfp */ 01338 01339 static vector int __attribute__((__always_inline__)) 01340 vec_vcmpbfp(vector float a, vector float b) 01341 { 01342 return __builtin_altivec_vcmpbfp(a, b); 01343 } 01344 01345 /* vec_cmpeq */ 01346 01347 static vector bool char __ATTRS_o_ai 01348 vec_cmpeq(vector signed char a, vector signed char b) 01349 { 01350 return (vector bool char) 01351 __builtin_altivec_vcmpequb((vector char)a, (vector char)b); 01352 } 01353 01354 static vector bool char __ATTRS_o_ai 01355 vec_cmpeq(vector unsigned char a, vector unsigned char b) 01356 { 01357 return (vector bool char) 01358 __builtin_altivec_vcmpequb((vector char)a, (vector char)b); 01359 } 01360 01361 static vector bool short __ATTRS_o_ai 01362 vec_cmpeq(vector short a, vector short b) 01363 { 01364 return (vector bool short)__builtin_altivec_vcmpequh(a, b); 01365 } 01366 01367 static vector bool short __ATTRS_o_ai 01368 vec_cmpeq(vector unsigned short a, vector unsigned short b) 01369 { 01370 return (vector bool short) 01371 __builtin_altivec_vcmpequh((vector short)a, (vector short)b); 01372 } 01373 01374 static vector bool int __ATTRS_o_ai 01375 vec_cmpeq(vector int a, vector int b) 01376 { 01377 return (vector bool int)__builtin_altivec_vcmpequw(a, b); 01378 } 01379 01380 static vector bool int __ATTRS_o_ai 01381 vec_cmpeq(vector unsigned int a, vector unsigned int b) 01382 { 01383 return (vector bool int) 01384 __builtin_altivec_vcmpequw((vector int)a, (vector int)b); 01385 } 01386 01387 static vector bool int __ATTRS_o_ai 01388 vec_cmpeq(vector float a, vector float b) 01389 { 01390 return (vector bool int)__builtin_altivec_vcmpeqfp(a, b); 01391 } 01392 01393 /* vec_cmpge */ 01394 01395 static vector bool int __attribute__((__always_inline__)) 01396 vec_cmpge(vector float a, vector float b) 01397 { 01398 return (vector bool int)__builtin_altivec_vcmpgefp(a, b); 01399 } 01400 01401 /* vec_vcmpgefp */ 01402 01403 static vector bool int __attribute__((__always_inline__)) 01404 vec_vcmpgefp(vector float a, vector float b) 01405 { 01406 return (vector bool int)__builtin_altivec_vcmpgefp(a, b); 01407 } 01408 01409 /* vec_cmpgt */ 01410 01411 static vector bool char __ATTRS_o_ai 01412 vec_cmpgt(vector signed char a, vector signed char b) 01413 { 01414 return (vector bool char)__builtin_altivec_vcmpgtsb(a, b); 01415 } 01416 01417 static vector bool char __ATTRS_o_ai 01418 vec_cmpgt(vector unsigned char a, vector unsigned char b) 01419 { 01420 return (vector bool char)__builtin_altivec_vcmpgtub(a, b); 01421 } 01422 01423 static vector bool short __ATTRS_o_ai 01424 vec_cmpgt(vector short a, vector short b) 01425 { 01426 return (vector bool short)__builtin_altivec_vcmpgtsh(a, b); 01427 } 01428 01429 static vector bool short __ATTRS_o_ai 01430 vec_cmpgt(vector unsigned short a, vector unsigned short b) 01431 { 01432 return (vector bool short)__builtin_altivec_vcmpgtuh(a, b); 01433 } 01434 01435 static vector bool int __ATTRS_o_ai 01436 vec_cmpgt(vector int a, vector int b) 01437 { 01438 return (vector bool int)__builtin_altivec_vcmpgtsw(a, b); 01439 } 01440 01441 static vector bool int __ATTRS_o_ai 01442 vec_cmpgt(vector unsigned int a, vector unsigned int b) 01443 { 01444 return (vector bool int)__builtin_altivec_vcmpgtuw(a, b); 01445 } 01446 01447 static vector bool int __ATTRS_o_ai 01448 vec_cmpgt(vector float a, vector float b) 01449 { 01450 return (vector bool int)__builtin_altivec_vcmpgtfp(a, b); 01451 } 01452 01453 /* vec_vcmpgtsb */ 01454 01455 static vector bool char __attribute__((__always_inline__)) 01456 vec_vcmpgtsb(vector signed char a, vector signed char b) 01457 { 01458 return (vector bool char)__builtin_altivec_vcmpgtsb(a, b); 01459 } 01460 01461 /* vec_vcmpgtub */ 01462 01463 static vector bool char __attribute__((__always_inline__)) 01464 vec_vcmpgtub(vector unsigned char a, vector unsigned char b) 01465 { 01466 return (vector bool char)__builtin_altivec_vcmpgtub(a, b); 01467 } 01468 01469 /* vec_vcmpgtsh */ 01470 01471 static vector bool short __attribute__((__always_inline__)) 01472 vec_vcmpgtsh(vector short a, vector short b) 01473 { 01474 return (vector bool short)__builtin_altivec_vcmpgtsh(a, b); 01475 } 01476 01477 /* vec_vcmpgtuh */ 01478 01479 static vector bool short __attribute__((__always_inline__)) 01480 vec_vcmpgtuh(vector unsigned short a, vector unsigned short b) 01481 { 01482 return (vector bool short)__builtin_altivec_vcmpgtuh(a, b); 01483 } 01484 01485 /* vec_vcmpgtsw */ 01486 01487 static vector bool int __attribute__((__always_inline__)) 01488 vec_vcmpgtsw(vector int a, vector int b) 01489 { 01490 return (vector bool int)__builtin_altivec_vcmpgtsw(a, b); 01491 } 01492 01493 /* vec_vcmpgtuw */ 01494 01495 static vector bool int __attribute__((__always_inline__)) 01496 vec_vcmpgtuw(vector unsigned int a, vector unsigned int b) 01497 { 01498 return (vector bool int)__builtin_altivec_vcmpgtuw(a, b); 01499 } 01500 01501 /* vec_vcmpgtfp */ 01502 01503 static vector bool int __attribute__((__always_inline__)) 01504 vec_vcmpgtfp(vector float a, vector float b) 01505 { 01506 return (vector bool int)__builtin_altivec_vcmpgtfp(a, b); 01507 } 01508 01509 /* vec_cmple */ 01510 01511 static vector bool int __attribute__((__always_inline__)) 01512 vec_cmple(vector float a, vector float b) 01513 { 01514 return (vector bool int)__builtin_altivec_vcmpgefp(b, a); 01515 } 01516 01517 /* vec_cmplt */ 01518 01519 static vector bool char __ATTRS_o_ai 01520 vec_cmplt(vector signed char a, vector signed char b) 01521 { 01522 return (vector bool char)__builtin_altivec_vcmpgtsb(b, a); 01523 } 01524 01525 static vector bool char __ATTRS_o_ai 01526 vec_cmplt(vector unsigned char a, vector unsigned char b) 01527 { 01528 return (vector bool char)__builtin_altivec_vcmpgtub(b, a); 01529 } 01530 01531 static vector bool short __ATTRS_o_ai 01532 vec_cmplt(vector short a, vector short b) 01533 { 01534 return (vector bool short)__builtin_altivec_vcmpgtsh(b, a); 01535 } 01536 01537 static vector bool short __ATTRS_o_ai 01538 vec_cmplt(vector unsigned short a, vector unsigned short b) 01539 { 01540 return (vector bool short)__builtin_altivec_vcmpgtuh(b, a); 01541 } 01542 01543 static vector bool int __ATTRS_o_ai 01544 vec_cmplt(vector int a, vector int b) 01545 { 01546 return (vector bool int)__builtin_altivec_vcmpgtsw(b, a); 01547 } 01548 01549 static vector bool int __ATTRS_o_ai 01550 vec_cmplt(vector unsigned int a, vector unsigned int b) 01551 { 01552 return (vector bool int)__builtin_altivec_vcmpgtuw(b, a); 01553 } 01554 01555 static vector bool int __ATTRS_o_ai 01556 vec_cmplt(vector float a, vector float b) 01557 { 01558 return (vector bool int)__builtin_altivec_vcmpgtfp(b, a); 01559 } 01560 01561 /* vec_ctf */ 01562 01563 static vector float __ATTRS_o_ai 01564 vec_ctf(vector int a, int b) 01565 { 01566 return __builtin_altivec_vcfsx(a, b); 01567 } 01568 01569 static vector float __ATTRS_o_ai 01570 vec_ctf(vector unsigned int a, int b) 01571 { 01572 return __builtin_altivec_vcfux((vector int)a, b); 01573 } 01574 01575 /* vec_vcfsx */ 01576 01577 static vector float __attribute__((__always_inline__)) 01578 vec_vcfsx(vector int a, int b) 01579 { 01580 return __builtin_altivec_vcfsx(a, b); 01581 } 01582 01583 /* vec_vcfux */ 01584 01585 static vector float __attribute__((__always_inline__)) 01586 vec_vcfux(vector unsigned int a, int b) 01587 { 01588 return __builtin_altivec_vcfux((vector int)a, b); 01589 } 01590 01591 /* vec_cts */ 01592 01593 static vector int __attribute__((__always_inline__)) 01594 vec_cts(vector float a, int b) 01595 { 01596 return __builtin_altivec_vctsxs(a, b); 01597 } 01598 01599 /* vec_vctsxs */ 01600 01601 static vector int __attribute__((__always_inline__)) 01602 vec_vctsxs(vector float a, int b) 01603 { 01604 return __builtin_altivec_vctsxs(a, b); 01605 } 01606 01607 /* vec_ctu */ 01608 01609 static vector unsigned int __attribute__((__always_inline__)) 01610 vec_ctu(vector float a, int b) 01611 { 01612 return __builtin_altivec_vctuxs(a, b); 01613 } 01614 01615 /* vec_vctuxs */ 01616 01617 static vector unsigned int __attribute__((__always_inline__)) 01618 vec_vctuxs(vector float a, int b) 01619 { 01620 return __builtin_altivec_vctuxs(a, b); 01621 } 01622 01623 /* vec_dss */ 01624 01625 static void __attribute__((__always_inline__)) 01626 vec_dss(int a) 01627 { 01628 __builtin_altivec_dss(a); 01629 } 01630 01631 /* vec_dssall */ 01632 01633 static void __attribute__((__always_inline__)) 01634 vec_dssall(void) 01635 { 01636 __builtin_altivec_dssall(); 01637 } 01638 01639 /* vec_dst */ 01640 01641 static void __attribute__((__always_inline__)) 01642 vec_dst(const void *a, int b, int c) 01643 { 01644 __builtin_altivec_dst(a, b, c); 01645 } 01646 01647 /* vec_dstst */ 01648 01649 static void __attribute__((__always_inline__)) 01650 vec_dstst(const void *a, int b, int c) 01651 { 01652 __builtin_altivec_dstst(a, b, c); 01653 } 01654 01655 /* vec_dststt */ 01656 01657 static void __attribute__((__always_inline__)) 01658 vec_dststt(const void *a, int b, int c) 01659 { 01660 __builtin_altivec_dststt(a, b, c); 01661 } 01662 01663 /* vec_dstt */ 01664 01665 static void __attribute__((__always_inline__)) 01666 vec_dstt(const void *a, int b, int c) 01667 { 01668 __builtin_altivec_dstt(a, b, c); 01669 } 01670 01671 /* vec_expte */ 01672 01673 static vector float __attribute__((__always_inline__)) 01674 vec_expte(vector float a) 01675 { 01676 return __builtin_altivec_vexptefp(a); 01677 } 01678 01679 /* vec_vexptefp */ 01680 01681 static vector float __attribute__((__always_inline__)) 01682 vec_vexptefp(vector float a) 01683 { 01684 return __builtin_altivec_vexptefp(a); 01685 } 01686 01687 /* vec_floor */ 01688 01689 static vector float __attribute__((__always_inline__)) 01690 vec_floor(vector float a) 01691 { 01692 return __builtin_altivec_vrfim(a); 01693 } 01694 01695 /* vec_vrfim */ 01696 01697 static vector float __attribute__((__always_inline__)) 01698 vec_vrfim(vector float a) 01699 { 01700 return __builtin_altivec_vrfim(a); 01701 } 01702 01703 /* vec_ld */ 01704 01705 static vector signed char __ATTRS_o_ai 01706 vec_ld(int a, const vector signed char *b) 01707 { 01708 return (vector signed char)__builtin_altivec_lvx(a, b); 01709 } 01710 01711 static vector signed char __ATTRS_o_ai 01712 vec_ld(int a, const signed char *b) 01713 { 01714 return (vector signed char)__builtin_altivec_lvx(a, b); 01715 } 01716 01717 static vector unsigned char __ATTRS_o_ai 01718 vec_ld(int a, const vector unsigned char *b) 01719 { 01720 return (vector unsigned char)__builtin_altivec_lvx(a, b); 01721 } 01722 01723 static vector unsigned char __ATTRS_o_ai 01724 vec_ld(int a, const unsigned char *b) 01725 { 01726 return (vector unsigned char)__builtin_altivec_lvx(a, b); 01727 } 01728 01729 static vector bool char __ATTRS_o_ai 01730 vec_ld(int a, const vector bool char *b) 01731 { 01732 return (vector bool char)__builtin_altivec_lvx(a, b); 01733 } 01734 01735 static vector short __ATTRS_o_ai 01736 vec_ld(int a, const vector short *b) 01737 { 01738 return (vector short)__builtin_altivec_lvx(a, b); 01739 } 01740 01741 static vector short __ATTRS_o_ai 01742 vec_ld(int a, const short *b) 01743 { 01744 return (vector short)__builtin_altivec_lvx(a, b); 01745 } 01746 01747 static vector unsigned short __ATTRS_o_ai 01748 vec_ld(int a, const vector unsigned short *b) 01749 { 01750 return (vector unsigned short)__builtin_altivec_lvx(a, b); 01751 } 01752 01753 static vector unsigned short __ATTRS_o_ai 01754 vec_ld(int a, const unsigned short *b) 01755 { 01756 return (vector unsigned short)__builtin_altivec_lvx(a, b); 01757 } 01758 01759 static vector bool short __ATTRS_o_ai 01760 vec_ld(int a, const vector bool short *b) 01761 { 01762 return (vector bool short)__builtin_altivec_lvx(a, b); 01763 } 01764 01765 static vector pixel __ATTRS_o_ai 01766 vec_ld(int a, const vector pixel *b) 01767 { 01768 return (vector pixel)__builtin_altivec_lvx(a, b); 01769 } 01770 01771 static vector int __ATTRS_o_ai 01772 vec_ld(int a, const vector int *b) 01773 { 01774 return (vector int)__builtin_altivec_lvx(a, b); 01775 } 01776 01777 static vector int __ATTRS_o_ai 01778 vec_ld(int a, const int *b) 01779 { 01780 return (vector int)__builtin_altivec_lvx(a, b); 01781 } 01782 01783 static vector unsigned int __ATTRS_o_ai 01784 vec_ld(int a, const vector unsigned int *b) 01785 { 01786 return (vector unsigned int)__builtin_altivec_lvx(a, b); 01787 } 01788 01789 static vector unsigned int __ATTRS_o_ai 01790 vec_ld(int a, const unsigned int *b) 01791 { 01792 return (vector unsigned int)__builtin_altivec_lvx(a, b); 01793 } 01794 01795 static vector bool int __ATTRS_o_ai 01796 vec_ld(int a, const vector bool int *b) 01797 { 01798 return (vector bool int)__builtin_altivec_lvx(a, b); 01799 } 01800 01801 static vector float __ATTRS_o_ai 01802 vec_ld(int a, const vector float *b) 01803 { 01804 return (vector float)__builtin_altivec_lvx(a, b); 01805 } 01806 01807 static vector float __ATTRS_o_ai 01808 vec_ld(int a, const float *b) 01809 { 01810 return (vector float)__builtin_altivec_lvx(a, b); 01811 } 01812 01813 /* vec_lvx */ 01814 01815 static vector signed char __ATTRS_o_ai 01816 vec_lvx(int a, const vector signed char *b) 01817 { 01818 return (vector signed char)__builtin_altivec_lvx(a, b); 01819 } 01820 01821 static vector signed char __ATTRS_o_ai 01822 vec_lvx(int a, const signed char *b) 01823 { 01824 return (vector signed char)__builtin_altivec_lvx(a, b); 01825 } 01826 01827 static vector unsigned char __ATTRS_o_ai 01828 vec_lvx(int a, const vector unsigned char *b) 01829 { 01830 return (vector unsigned char)__builtin_altivec_lvx(a, b); 01831 } 01832 01833 static vector unsigned char __ATTRS_o_ai 01834 vec_lvx(int a, const unsigned char *b) 01835 { 01836 return (vector unsigned char)__builtin_altivec_lvx(a, b); 01837 } 01838 01839 static vector bool char __ATTRS_o_ai 01840 vec_lvx(int a, const vector bool char *b) 01841 { 01842 return (vector bool char)__builtin_altivec_lvx(a, b); 01843 } 01844 01845 static vector short __ATTRS_o_ai 01846 vec_lvx(int a, const vector short *b) 01847 { 01848 return (vector short)__builtin_altivec_lvx(a, b); 01849 } 01850 01851 static vector short __ATTRS_o_ai 01852 vec_lvx(int a, const short *b) 01853 { 01854 return (vector short)__builtin_altivec_lvx(a, b); 01855 } 01856 01857 static vector unsigned short __ATTRS_o_ai 01858 vec_lvx(int a, const vector unsigned short *b) 01859 { 01860 return (vector unsigned short)__builtin_altivec_lvx(a, b); 01861 } 01862 01863 static vector unsigned short __ATTRS_o_ai 01864 vec_lvx(int a, const unsigned short *b) 01865 { 01866 return (vector unsigned short)__builtin_altivec_lvx(a, b); 01867 } 01868 01869 static vector bool short __ATTRS_o_ai 01870 vec_lvx(int a, const vector bool short *b) 01871 { 01872 return (vector bool short)__builtin_altivec_lvx(a, b); 01873 } 01874 01875 static vector pixel __ATTRS_o_ai 01876 vec_lvx(int a, const vector pixel *b) 01877 { 01878 return (vector pixel)__builtin_altivec_lvx(a, b); 01879 } 01880 01881 static vector int __ATTRS_o_ai 01882 vec_lvx(int a, const vector int *b) 01883 { 01884 return (vector int)__builtin_altivec_lvx(a, b); 01885 } 01886 01887 static vector int __ATTRS_o_ai 01888 vec_lvx(int a, const int *b) 01889 { 01890 return (vector int)__builtin_altivec_lvx(a, b); 01891 } 01892 01893 static vector unsigned int __ATTRS_o_ai 01894 vec_lvx(int a, const vector unsigned int *b) 01895 { 01896 return (vector unsigned int)__builtin_altivec_lvx(a, b); 01897 } 01898 01899 static vector unsigned int __ATTRS_o_ai 01900 vec_lvx(int a, const unsigned int *b) 01901 { 01902 return (vector unsigned int)__builtin_altivec_lvx(a, b); 01903 } 01904 01905 static vector bool int __ATTRS_o_ai 01906 vec_lvx(int a, const vector bool int *b) 01907 { 01908 return (vector bool int)__builtin_altivec_lvx(a, b); 01909 } 01910 01911 static vector float __ATTRS_o_ai 01912 vec_lvx(int a, const vector float *b) 01913 { 01914 return (vector float)__builtin_altivec_lvx(a, b); 01915 } 01916 01917 static vector float __ATTRS_o_ai 01918 vec_lvx(int a, const float *b) 01919 { 01920 return (vector float)__builtin_altivec_lvx(a, b); 01921 } 01922 01923 /* vec_lde */ 01924 01925 static vector signed char __ATTRS_o_ai 01926 vec_lde(int a, const vector signed char *b) 01927 { 01928 return (vector signed char)__builtin_altivec_lvebx(a, b); 01929 } 01930 01931 static vector unsigned char __ATTRS_o_ai 01932 vec_lde(int a, const vector unsigned char *b) 01933 { 01934 return (vector unsigned char)__builtin_altivec_lvebx(a, b); 01935 } 01936 01937 static vector short __ATTRS_o_ai 01938 vec_lde(int a, const vector short *b) 01939 { 01940 return (vector short)__builtin_altivec_lvehx(a, b); 01941 } 01942 01943 static vector unsigned short __ATTRS_o_ai 01944 vec_lde(int a, const vector unsigned short *b) 01945 { 01946 return (vector unsigned short)__builtin_altivec_lvehx(a, b); 01947 } 01948 01949 static vector int __ATTRS_o_ai 01950 vec_lde(int a, const vector int *b) 01951 { 01952 return (vector int)__builtin_altivec_lvewx(a, b); 01953 } 01954 01955 static vector unsigned int __ATTRS_o_ai 01956 vec_lde(int a, const vector unsigned int *b) 01957 { 01958 return (vector unsigned int)__builtin_altivec_lvewx(a, b); 01959 } 01960 01961 static vector float __ATTRS_o_ai 01962 vec_lde(int a, const vector float *b) 01963 { 01964 return (vector float)__builtin_altivec_lvewx(a, b); 01965 } 01966 01967 /* vec_lvebx */ 01968 01969 static vector signed char __ATTRS_o_ai 01970 vec_lvebx(int a, const vector signed char *b) 01971 { 01972 return (vector signed char)__builtin_altivec_lvebx(a, b); 01973 } 01974 01975 static vector unsigned char __ATTRS_o_ai 01976 vec_lvebx(int a, const vector unsigned char *b) 01977 { 01978 return (vector unsigned char)__builtin_altivec_lvebx(a, b); 01979 } 01980 01981 /* vec_lvehx */ 01982 01983 static vector short __ATTRS_o_ai 01984 vec_lvehx(int a, const vector short *b) 01985 { 01986 return (vector short)__builtin_altivec_lvehx(a, b); 01987 } 01988 01989 static vector unsigned short __ATTRS_o_ai 01990 vec_lvehx(int a, const vector unsigned short *b) 01991 { 01992 return (vector unsigned short)__builtin_altivec_lvehx(a, b); 01993 } 01994 01995 /* vec_lvewx */ 01996 01997 static vector int __ATTRS_o_ai 01998 vec_lvewx(int a, const vector int *b) 01999 { 02000 return (vector int)__builtin_altivec_lvewx(a, b); 02001 } 02002 02003 static vector unsigned int __ATTRS_o_ai 02004 vec_lvewx(int a, const vector unsigned int *b) 02005 { 02006 return (vector unsigned int)__builtin_altivec_lvewx(a, b); 02007 } 02008 02009 static vector float __ATTRS_o_ai 02010 vec_lvewx(int a, const vector float *b) 02011 { 02012 return (vector float)__builtin_altivec_lvewx(a, b); 02013 } 02014 02015 /* vec_ldl */ 02016 02017 static vector signed char __ATTRS_o_ai 02018 vec_ldl(int a, const vector signed char *b) 02019 { 02020 return (vector signed char)__builtin_altivec_lvxl(a, b); 02021 } 02022 02023 static vector signed char __ATTRS_o_ai 02024 vec_ldl(int a, const signed char *b) 02025 { 02026 return (vector signed char)__builtin_altivec_lvxl(a, b); 02027 } 02028 02029 static vector unsigned char __ATTRS_o_ai 02030 vec_ldl(int a, const vector unsigned char *b) 02031 { 02032 return (vector unsigned char)__builtin_altivec_lvxl(a, b); 02033 } 02034 02035 static vector unsigned char __ATTRS_o_ai 02036 vec_ldl(int a, const unsigned char *b) 02037 { 02038 return (vector unsigned char)__builtin_altivec_lvxl(a, b); 02039 } 02040 02041 static vector bool char __ATTRS_o_ai 02042 vec_ldl(int a, const vector bool char *b) 02043 { 02044 return (vector bool char)__builtin_altivec_lvxl(a, b); 02045 } 02046 02047 static vector short __ATTRS_o_ai 02048 vec_ldl(int a, const vector short *b) 02049 { 02050 return (vector short)__builtin_altivec_lvxl(a, b); 02051 } 02052 02053 static vector short __ATTRS_o_ai 02054 vec_ldl(int a, const short *b) 02055 { 02056 return (vector short)__builtin_altivec_lvxl(a, b); 02057 } 02058 02059 static vector unsigned short __ATTRS_o_ai 02060 vec_ldl(int a, const vector unsigned short *b) 02061 { 02062 return (vector unsigned short)__builtin_altivec_lvxl(a, b); 02063 } 02064 02065 static vector unsigned short __ATTRS_o_ai 02066 vec_ldl(int a, const unsigned short *b) 02067 { 02068 return (vector unsigned short)__builtin_altivec_lvxl(a, b); 02069 } 02070 02071 static vector bool short __ATTRS_o_ai 02072 vec_ldl(int a, const vector bool short *b) 02073 { 02074 return (vector bool short)__builtin_altivec_lvxl(a, b); 02075 } 02076 02077 static vector pixel __ATTRS_o_ai 02078 vec_ldl(int a, const vector pixel *b) 02079 { 02080 return (vector pixel short)__builtin_altivec_lvxl(a, b); 02081 } 02082 02083 static vector int __ATTRS_o_ai 02084 vec_ldl(int a, const vector int *b) 02085 { 02086 return (vector int)__builtin_altivec_lvxl(a, b); 02087 } 02088 02089 static vector int __ATTRS_o_ai 02090 vec_ldl(int a, const int *b) 02091 { 02092 return (vector int)__builtin_altivec_lvxl(a, b); 02093 } 02094 02095 static vector unsigned int __ATTRS_o_ai 02096 vec_ldl(int a, const vector unsigned int *b) 02097 { 02098 return (vector unsigned int)__builtin_altivec_lvxl(a, b); 02099 } 02100 02101 static vector unsigned int __ATTRS_o_ai 02102 vec_ldl(int a, const unsigned int *b) 02103 { 02104 return (vector unsigned int)__builtin_altivec_lvxl(a, b); 02105 } 02106 02107 static vector bool int __ATTRS_o_ai 02108 vec_ldl(int a, const vector bool int *b) 02109 { 02110 return (vector bool int)__builtin_altivec_lvxl(a, b); 02111 } 02112 02113 static vector float __ATTRS_o_ai 02114 vec_ldl(int a, const vector float *b) 02115 { 02116 return (vector float)__builtin_altivec_lvxl(a, b); 02117 } 02118 02119 static vector float __ATTRS_o_ai 02120 vec_ldl(int a, const float *b) 02121 { 02122 return (vector float)__builtin_altivec_lvxl(a, b); 02123 } 02124 02125 /* vec_lvxl */ 02126 02127 static vector signed char __ATTRS_o_ai 02128 vec_lvxl(int a, const vector signed char *b) 02129 { 02130 return (vector signed char)__builtin_altivec_lvxl(a, b); 02131 } 02132 02133 static vector signed char __ATTRS_o_ai 02134 vec_lvxl(int a, const signed char *b) 02135 { 02136 return (vector signed char)__builtin_altivec_lvxl(a, b); 02137 } 02138 02139 static vector unsigned char __ATTRS_o_ai 02140 vec_lvxl(int a, const vector unsigned char *b) 02141 { 02142 return (vector unsigned char)__builtin_altivec_lvxl(a, b); 02143 } 02144 02145 static vector unsigned char __ATTRS_o_ai 02146 vec_lvxl(int a, const unsigned char *b) 02147 { 02148 return (vector unsigned char)__builtin_altivec_lvxl(a, b); 02149 } 02150 02151 static vector bool char __ATTRS_o_ai 02152 vec_lvxl(int a, const vector bool char *b) 02153 { 02154 return (vector bool char)__builtin_altivec_lvxl(a, b); 02155 } 02156 02157 static vector short __ATTRS_o_ai 02158 vec_lvxl(int a, const vector short *b) 02159 { 02160 return (vector short)__builtin_altivec_lvxl(a, b); 02161 } 02162 02163 static vector short __ATTRS_o_ai 02164 vec_lvxl(int a, const short *b) 02165 { 02166 return (vector short)__builtin_altivec_lvxl(a, b); 02167 } 02168 02169 static vector unsigned short __ATTRS_o_ai 02170 vec_lvxl(int a, const vector unsigned short *b) 02171 { 02172 return (vector unsigned short)__builtin_altivec_lvxl(a, b); 02173 } 02174 02175 static vector unsigned short __ATTRS_o_ai 02176 vec_lvxl(int a, const unsigned short *b) 02177 { 02178 return (vector unsigned short)__builtin_altivec_lvxl(a, b); 02179 } 02180 02181 static vector bool short __ATTRS_o_ai 02182 vec_lvxl(int a, const vector bool short *b) 02183 { 02184 return (vector bool short)__builtin_altivec_lvxl(a, b); 02185 } 02186 02187 static vector pixel __ATTRS_o_ai 02188 vec_lvxl(int a, const vector pixel *b) 02189 { 02190 return (vector pixel)__builtin_altivec_lvxl(a, b); 02191 } 02192 02193 static vector int __ATTRS_o_ai 02194 vec_lvxl(int a, const vector int *b) 02195 { 02196 return (vector int)__builtin_altivec_lvxl(a, b); 02197 } 02198 02199 static vector int __ATTRS_o_ai 02200 vec_lvxl(int a, const int *b) 02201 { 02202 return (vector int)__builtin_altivec_lvxl(a, b); 02203 } 02204 02205 static vector unsigned int __ATTRS_o_ai 02206 vec_lvxl(int a, const vector unsigned int *b) 02207 { 02208 return (vector unsigned int)__builtin_altivec_lvxl(a, b); 02209 } 02210 02211 static vector unsigned int __ATTRS_o_ai 02212 vec_lvxl(int a, const unsigned int *b) 02213 { 02214 return (vector unsigned int)__builtin_altivec_lvxl(a, b); 02215 } 02216 02217 static vector bool int __ATTRS_o_ai 02218 vec_lvxl(int a, const vector bool int *b) 02219 { 02220 return (vector bool int)__builtin_altivec_lvxl(a, b); 02221 } 02222 02223 static vector float __ATTRS_o_ai 02224 vec_lvxl(int a, const vector float *b) 02225 { 02226 return (vector float)__builtin_altivec_lvxl(a, b); 02227 } 02228 02229 static vector float __ATTRS_o_ai 02230 vec_lvxl(int a, const float *b) 02231 { 02232 return (vector float)__builtin_altivec_lvxl(a, b); 02233 } 02234 02235 /* vec_loge */ 02236 02237 static vector float __attribute__((__always_inline__)) 02238 vec_loge(vector float a) 02239 { 02240 return __builtin_altivec_vlogefp(a); 02241 } 02242 02243 /* vec_vlogefp */ 02244 02245 static vector float __attribute__((__always_inline__)) 02246 vec_vlogefp(vector float a) 02247 { 02248 return __builtin_altivec_vlogefp(a); 02249 } 02250 02251 /* vec_lvsl */ 02252 02253 static vector unsigned char __ATTRS_o_ai 02254 vec_lvsl(int a, const signed char *b) 02255 { 02256 return (vector unsigned char)__builtin_altivec_lvsl(a, b); 02257 } 02258 02259 static vector unsigned char __ATTRS_o_ai 02260 vec_lvsl(int a, const unsigned char *b) 02261 { 02262 return (vector unsigned char)__builtin_altivec_lvsl(a, b); 02263 } 02264 02265 static vector unsigned char __ATTRS_o_ai 02266 vec_lvsl(int a, const short *b) 02267 { 02268 return (vector unsigned char)__builtin_altivec_lvsl(a, b); 02269 } 02270 02271 static vector unsigned char __ATTRS_o_ai 02272 vec_lvsl(int a, const unsigned short *b) 02273 { 02274 return (vector unsigned char)__builtin_altivec_lvsl(a, b); 02275 } 02276 02277 static vector unsigned char __ATTRS_o_ai 02278 vec_lvsl(int a, const int *b) 02279 { 02280 return (vector unsigned char)__builtin_altivec_lvsl(a, b); 02281 } 02282 02283 static vector unsigned char __ATTRS_o_ai 02284 vec_lvsl(int a, const unsigned int *b) 02285 { 02286 return (vector unsigned char)__builtin_altivec_lvsl(a, b); 02287 } 02288 02289 static vector unsigned char __ATTRS_o_ai 02290 vec_lvsl(int a, const float *b) 02291 { 02292 return (vector unsigned char)__builtin_altivec_lvsl(a, b); 02293 } 02294 02295 /* vec_lvsr */ 02296 02297 static vector unsigned char __ATTRS_o_ai 02298 vec_lvsr(int a, const signed char *b) 02299 { 02300 return (vector unsigned char)__builtin_altivec_lvsr(a, b); 02301 } 02302 02303 static vector unsigned char __ATTRS_o_ai 02304 vec_lvsr(int a, const unsigned char *b) 02305 { 02306 return (vector unsigned char)__builtin_altivec_lvsr(a, b); 02307 } 02308 02309 static vector unsigned char __ATTRS_o_ai 02310 vec_lvsr(int a, const short *b) 02311 { 02312 return (vector unsigned char)__builtin_altivec_lvsr(a, b); 02313 } 02314 02315 static vector unsigned char __ATTRS_o_ai 02316 vec_lvsr(int a, const unsigned short *b) 02317 { 02318 return (vector unsigned char)__builtin_altivec_lvsr(a, b); 02319 } 02320 02321 static vector unsigned char __ATTRS_o_ai 02322 vec_lvsr(int a, const int *b) 02323 { 02324 return (vector unsigned char)__builtin_altivec_lvsr(a, b); 02325 } 02326 02327 static vector unsigned char __ATTRS_o_ai 02328 vec_lvsr(int a, const unsigned int *b) 02329 { 02330 return (vector unsigned char)__builtin_altivec_lvsr(a, b); 02331 } 02332 02333 static vector unsigned char __ATTRS_o_ai 02334 vec_lvsr(int a, const float *b) 02335 { 02336 return (vector unsigned char)__builtin_altivec_lvsr(a, b); 02337 } 02338 02339 /* vec_madd */ 02340 02341 static vector float __attribute__((__always_inline__)) 02342 vec_madd(vector float a, vector float b, vector float c) 02343 { 02344 return __builtin_altivec_vmaddfp(a, b, c); 02345 } 02346 02347 /* vec_vmaddfp */ 02348 02349 static vector float __attribute__((__always_inline__)) 02350 vec_vmaddfp(vector float a, vector float b, vector float c) 02351 { 02352 return __builtin_altivec_vmaddfp(a, b, c); 02353 } 02354 02355 /* vec_madds */ 02356 02357 static vector signed short __attribute__((__always_inline__)) 02358 vec_madds(vector signed short a, vector signed short b, vector signed short c) 02359 { 02360 return __builtin_altivec_vmhaddshs(a, b, c); 02361 } 02362 02363 /* vec_vmhaddshs */ 02364 static vector signed short __attribute__((__always_inline__)) 02365 vec_vmhaddshs(vector signed short a, 02366 vector signed short b, 02367 vector signed short c) 02368 { 02369 return __builtin_altivec_vmhaddshs(a, b, c); 02370 } 02371 02372 /* vec_max */ 02373 02374 static vector signed char __ATTRS_o_ai 02375 vec_max(vector signed char a, vector signed char b) 02376 { 02377 return __builtin_altivec_vmaxsb(a, b); 02378 } 02379 02380 static vector signed char __ATTRS_o_ai 02381 vec_max(vector bool char a, vector signed char b) 02382 { 02383 return __builtin_altivec_vmaxsb((vector signed char)a, b); 02384 } 02385 02386 static vector signed char __ATTRS_o_ai 02387 vec_max(vector signed char a, vector bool char b) 02388 { 02389 return __builtin_altivec_vmaxsb(a, (vector signed char)b); 02390 } 02391 02392 static vector unsigned char __ATTRS_o_ai 02393 vec_max(vector unsigned char a, vector unsigned char b) 02394 { 02395 return __builtin_altivec_vmaxub(a, b); 02396 } 02397 02398 static vector unsigned char __ATTRS_o_ai 02399 vec_max(vector bool char a, vector unsigned char b) 02400 { 02401 return __builtin_altivec_vmaxub((vector unsigned char)a, b); 02402 } 02403 02404 static vector unsigned char __ATTRS_o_ai 02405 vec_max(vector unsigned char a, vector bool char b) 02406 { 02407 return __builtin_altivec_vmaxub(a, (vector unsigned char)b); 02408 } 02409 02410 static vector short __ATTRS_o_ai 02411 vec_max(vector short a, vector short b) 02412 { 02413 return __builtin_altivec_vmaxsh(a, b); 02414 } 02415 02416 static vector short __ATTRS_o_ai 02417 vec_max(vector bool short a, vector short b) 02418 { 02419 return __builtin_altivec_vmaxsh((vector short)a, b); 02420 } 02421 02422 static vector short __ATTRS_o_ai 02423 vec_max(vector short a, vector bool short b) 02424 { 02425 return __builtin_altivec_vmaxsh(a, (vector short)b); 02426 } 02427 02428 static vector unsigned short __ATTRS_o_ai 02429 vec_max(vector unsigned short a, vector unsigned short b) 02430 { 02431 return __builtin_altivec_vmaxuh(a, b); 02432 } 02433 02434 static vector unsigned short __ATTRS_o_ai 02435 vec_max(vector bool short a, vector unsigned short b) 02436 { 02437 return __builtin_altivec_vmaxuh((vector unsigned short)a, b); 02438 } 02439 02440 static vector unsigned short __ATTRS_o_ai 02441 vec_max(vector unsigned short a, vector bool short b) 02442 { 02443 return __builtin_altivec_vmaxuh(a, (vector unsigned short)b); 02444 } 02445 02446 static vector int __ATTRS_o_ai 02447 vec_max(vector int a, vector int b) 02448 { 02449 return __builtin_altivec_vmaxsw(a, b); 02450 } 02451 02452 static vector int __ATTRS_o_ai 02453 vec_max(vector bool int a, vector int b) 02454 { 02455 return __builtin_altivec_vmaxsw((vector int)a, b); 02456 } 02457 02458 static vector int __ATTRS_o_ai 02459 vec_max(vector int a, vector bool int b) 02460 { 02461 return __builtin_altivec_vmaxsw(a, (vector int)b); 02462 } 02463 02464 static vector unsigned int __ATTRS_o_ai 02465 vec_max(vector unsigned int a, vector unsigned int b) 02466 { 02467 return __builtin_altivec_vmaxuw(a, b); 02468 } 02469 02470 static vector unsigned int __ATTRS_o_ai 02471 vec_max(vector bool int a, vector unsigned int b) 02472 { 02473 return __builtin_altivec_vmaxuw((vector unsigned int)a, b); 02474 } 02475 02476 static vector unsigned int __ATTRS_o_ai 02477 vec_max(vector unsigned int a, vector bool int b) 02478 { 02479 return __builtin_altivec_vmaxuw(a, (vector unsigned int)b); 02480 } 02481 02482 static vector float __ATTRS_o_ai 02483 vec_max(vector float a, vector float b) 02484 { 02485 return __builtin_altivec_vmaxfp(a, b); 02486 } 02487 02488 /* vec_vmaxsb */ 02489 02490 static vector signed char __ATTRS_o_ai 02491 vec_vmaxsb(vector signed char a, vector signed char b) 02492 { 02493 return __builtin_altivec_vmaxsb(a, b); 02494 } 02495 02496 static vector signed char __ATTRS_o_ai 02497 vec_vmaxsb(vector bool char a, vector signed char b) 02498 { 02499 return __builtin_altivec_vmaxsb((vector signed char)a, b); 02500 } 02501 02502 static vector signed char __ATTRS_o_ai 02503 vec_vmaxsb(vector signed char a, vector bool char b) 02504 { 02505 return __builtin_altivec_vmaxsb(a, (vector signed char)b); 02506 } 02507 02508 /* vec_vmaxub */ 02509 02510 static vector unsigned char __ATTRS_o_ai 02511 vec_vmaxub(vector unsigned char a, vector unsigned char b) 02512 { 02513 return __builtin_altivec_vmaxub(a, b); 02514 } 02515 02516 static vector unsigned char __ATTRS_o_ai 02517 vec_vmaxub(vector bool char a, vector unsigned char b) 02518 { 02519 return __builtin_altivec_vmaxub((vector unsigned char)a, b); 02520 } 02521 02522 static vector unsigned char __ATTRS_o_ai 02523 vec_vmaxub(vector unsigned char a, vector bool char b) 02524 { 02525 return __builtin_altivec_vmaxub(a, (vector unsigned char)b); 02526 } 02527 02528 /* vec_vmaxsh */ 02529 02530 static vector short __ATTRS_o_ai 02531 vec_vmaxsh(vector short a, vector short b) 02532 { 02533 return __builtin_altivec_vmaxsh(a, b); 02534 } 02535 02536 static vector short __ATTRS_o_ai 02537 vec_vmaxsh(vector bool short a, vector short b) 02538 { 02539 return __builtin_altivec_vmaxsh((vector short)a, b); 02540 } 02541 02542 static vector short __ATTRS_o_ai 02543 vec_vmaxsh(vector short a, vector bool short b) 02544 { 02545 return __builtin_altivec_vmaxsh(a, (vector short)b); 02546 } 02547 02548 /* vec_vmaxuh */ 02549 02550 static vector unsigned short __ATTRS_o_ai 02551 vec_vmaxuh(vector unsigned short a, vector unsigned short b) 02552 { 02553 return __builtin_altivec_vmaxuh(a, b); 02554 } 02555 02556 static vector unsigned short __ATTRS_o_ai 02557 vec_vmaxuh(vector bool short a, vector unsigned short b) 02558 { 02559 return __builtin_altivec_vmaxuh((vector unsigned short)a, b); 02560 } 02561 02562 static vector unsigned short __ATTRS_o_ai 02563 vec_vmaxuh(vector unsigned short a, vector bool short b) 02564 { 02565 return __builtin_altivec_vmaxuh(a, (vector unsigned short)b); 02566 } 02567 02568 /* vec_vmaxsw */ 02569 02570 static vector int __ATTRS_o_ai 02571 vec_vmaxsw(vector int a, vector int b) 02572 { 02573 return __builtin_altivec_vmaxsw(a, b); 02574 } 02575 02576 static vector int __ATTRS_o_ai 02577 vec_vmaxsw(vector bool int a, vector int b) 02578 { 02579 return __builtin_altivec_vmaxsw((vector int)a, b); 02580 } 02581 02582 static vector int __ATTRS_o_ai 02583 vec_vmaxsw(vector int a, vector bool int b) 02584 { 02585 return __builtin_altivec_vmaxsw(a, (vector int)b); 02586 } 02587 02588 /* vec_vmaxuw */ 02589 02590 static vector unsigned int __ATTRS_o_ai 02591 vec_vmaxuw(vector unsigned int a, vector unsigned int b) 02592 { 02593 return __builtin_altivec_vmaxuw(a, b); 02594 } 02595 02596 static vector unsigned int __ATTRS_o_ai 02597 vec_vmaxuw(vector bool int a, vector unsigned int b) 02598 { 02599 return __builtin_altivec_vmaxuw((vector unsigned int)a, b); 02600 } 02601 02602 static vector unsigned int __ATTRS_o_ai 02603 vec_vmaxuw(vector unsigned int a, vector bool int b) 02604 { 02605 return __builtin_altivec_vmaxuw(a, (vector unsigned int)b); 02606 } 02607 02608 /* vec_vmaxfp */ 02609 02610 static vector float __attribute__((__always_inline__)) 02611 vec_vmaxfp(vector float a, vector float b) 02612 { 02613 return __builtin_altivec_vmaxfp(a, b); 02614 } 02615 02616 /* vec_mergeh */ 02617 02618 static vector signed char __ATTRS_o_ai 02619 vec_mergeh(vector signed char a, vector signed char b) 02620 { 02621 return vec_perm(a, b, (vector unsigned char) 02622 (0x00, 0x10, 0x01, 0x11, 0x02, 0x12, 0x03, 0x13, 02623 0x04, 0x14, 0x05, 0x15, 0x06, 0x16, 0x07, 0x17)); 02624 } 02625 02626 static vector unsigned char __ATTRS_o_ai 02627 vec_mergeh(vector unsigned char a, vector unsigned char b) 02628 { 02629 return vec_perm(a, b, (vector unsigned char) 02630 (0x00, 0x10, 0x01, 0x11, 0x02, 0x12, 0x03, 0x13, 02631 0x04, 0x14, 0x05, 0x15, 0x06, 0x16, 0x07, 0x17)); 02632 } 02633 02634 static vector bool char __ATTRS_o_ai 02635 vec_mergeh(vector bool char a, vector bool char b) 02636 { 02637 return vec_perm(a, b, (vector unsigned char) 02638 (0x00, 0x10, 0x01, 0x11, 0x02, 0x12, 0x03, 0x13, 02639 0x04, 0x14, 0x05, 0x15, 0x06, 0x16, 0x07, 0x17)); 02640 } 02641 02642 static vector short __ATTRS_o_ai 02643 vec_mergeh(vector short a, vector short b) 02644 { 02645 return vec_perm(a, b, (vector unsigned char) 02646 (0x00, 0x01, 0x10, 0x11, 0x02, 0x03, 0x12, 0x13, 02647 0x04, 0x05, 0x14, 0x15, 0x06, 0x07, 0x16, 0x17)); 02648 } 02649 02650 static vector unsigned short __ATTRS_o_ai 02651 vec_mergeh(vector unsigned short a, vector unsigned short b) 02652 { 02653 return vec_perm(a, b, (vector unsigned char) 02654 (0x00, 0x01, 0x10, 0x11, 0x02, 0x03, 0x12, 0x13, 02655 0x04, 0x05, 0x14, 0x15, 0x06, 0x07, 0x16, 0x17)); 02656 } 02657 02658 static vector bool short __ATTRS_o_ai 02659 vec_mergeh(vector bool short a, vector bool short b) 02660 { 02661 return vec_perm(a, b, (vector unsigned char) 02662 (0x00, 0x01, 0x10, 0x11, 0x02, 0x03, 0x12, 0x13, 02663 0x04, 0x05, 0x14, 0x15, 0x06, 0x07, 0x16, 0x17)); 02664 } 02665 02666 static vector pixel __ATTRS_o_ai 02667 vec_mergeh(vector pixel a, vector pixel b) 02668 { 02669 return vec_perm(a, b, (vector unsigned char) 02670 (0x00, 0x01, 0x10, 0x11, 0x02, 0x03, 0x12, 0x13, 02671 0x04, 0x05, 0x14, 0x15, 0x06, 0x07, 0x16, 0x17)); 02672 } 02673 02674 static vector int __ATTRS_o_ai 02675 vec_mergeh(vector int a, vector int b) 02676 { 02677 return vec_perm(a, b, (vector unsigned char) 02678 (0x00, 0x01, 0x02, 0x03, 0x10, 0x11, 0x12, 0x13, 02679 0x04, 0x05, 0x06, 0x07, 0x14, 0x15, 0x16, 0x17)); 02680 } 02681 02682 static vector unsigned int __ATTRS_o_ai 02683 vec_mergeh(vector unsigned int a, vector unsigned int b) 02684 { 02685 return vec_perm(a, b, (vector unsigned char) 02686 (0x00, 0x01, 0x02, 0x03, 0x10, 0x11, 0x12, 0x13, 02687 0x04, 0x05, 0x06, 0x07, 0x14, 0x15, 0x16, 0x17)); 02688 } 02689 02690 static vector bool int __ATTRS_o_ai 02691 vec_mergeh(vector bool int a, vector bool int b) 02692 { 02693 return vec_perm(a, b, (vector unsigned char) 02694 (0x00, 0x01, 0x02, 0x03, 0x10, 0x11, 0x12, 0x13, 02695 0x04, 0x05, 0x06, 0x07, 0x14, 0x15, 0x16, 0x17)); 02696 } 02697 02698 static vector float __ATTRS_o_ai 02699 vec_mergeh(vector float a, vector float b) 02700 { 02701 return vec_perm(a, b, (vector unsigned char) 02702 (0x00, 0x01, 0x02, 0x03, 0x10, 0x11, 0x12, 0x13, 02703 0x04, 0x05, 0x06, 0x07, 0x14, 0x15, 0x16, 0x17)); 02704 } 02705 02706 /* vec_vmrghb */ 02707 02708 #define __builtin_altivec_vmrghb vec_vmrghb 02709 02710 static vector signed char __ATTRS_o_ai 02711 vec_vmrghb(vector signed char a, vector signed char b) 02712 { 02713 return vec_perm(a, b, (vector unsigned char) 02714 (0x00, 0x10, 0x01, 0x11, 0x02, 0x12, 0x03, 0x13, 02715 0x04, 0x14, 0x05, 0x15, 0x06, 0x16, 0x07, 0x17)); 02716 } 02717 02718 static vector unsigned char __ATTRS_o_ai 02719 vec_vmrghb(vector unsigned char a, vector unsigned char b) 02720 { 02721 return vec_perm(a, b, (vector unsigned char) 02722 (0x00, 0x10, 0x01, 0x11, 0x02, 0x12, 0x03, 0x13, 02723 0x04, 0x14, 0x05, 0x15, 0x06, 0x16, 0x07, 0x17)); 02724 } 02725 02726 static vector bool char __ATTRS_o_ai 02727 vec_vmrghb(vector bool char a, vector bool char b) 02728 { 02729 return vec_perm(a, b, (vector unsigned char) 02730 (0x00, 0x10, 0x01, 0x11, 0x02, 0x12, 0x03, 0x13, 02731 0x04, 0x14, 0x05, 0x15, 0x06, 0x16, 0x07, 0x17)); 02732 } 02733 02734 /* vec_vmrghh */ 02735 02736 #define __builtin_altivec_vmrghh vec_vmrghh 02737 02738 static vector short __ATTRS_o_ai 02739 vec_vmrghh(vector short a, vector short b) 02740 { 02741 return vec_perm(a, b, (vector unsigned char) 02742 (0x00, 0x01, 0x10, 0x11, 0x02, 0x03, 0x12, 0x13, 02743 0x04, 0x05, 0x14, 0x15, 0x06, 0x07, 0x16, 0x17)); 02744 } 02745 02746 static vector unsigned short __ATTRS_o_ai 02747 vec_vmrghh(vector unsigned short a, vector unsigned short b) 02748 { 02749 return vec_perm(a, b, (vector unsigned char) 02750 (0x00, 0x01, 0x10, 0x11, 0x02, 0x03, 0x12, 0x13, 02751 0x04, 0x05, 0x14, 0x15, 0x06, 0x07, 0x16, 0x17)); 02752 } 02753 02754 static vector bool short __ATTRS_o_ai 02755 vec_vmrghh(vector bool short a, vector bool short b) 02756 { 02757 return vec_perm(a, b, (vector unsigned char) 02758 (0x00, 0x01, 0x10, 0x11, 0x02, 0x03, 0x12, 0x13, 02759 0x04, 0x05, 0x14, 0x15, 0x06, 0x07, 0x16, 0x17)); 02760 } 02761 02762 static vector pixel __ATTRS_o_ai 02763 vec_vmrghh(vector pixel a, vector pixel b) 02764 { 02765 return vec_perm(a, b, (vector unsigned char) 02766 (0x00, 0x01, 0x10, 0x11, 0x02, 0x03, 0x12, 0x13, 02767 0x04, 0x05, 0x14, 0x15, 0x06, 0x07, 0x16, 0x17)); 02768 } 02769 02770 /* vec_vmrghw */ 02771 02772 #define __builtin_altivec_vmrghw vec_vmrghw 02773 02774 static vector int __ATTRS_o_ai 02775 vec_vmrghw(vector int a, vector int b) 02776 { 02777 return vec_perm(a, b, (vector unsigned char) 02778 (0x00, 0x01, 0x02, 0x03, 0x10, 0x11, 0x12, 0x13, 02779 0x04, 0x05, 0x06, 0x07, 0x14, 0x15, 0x16, 0x17)); 02780 } 02781 02782 static vector unsigned int __ATTRS_o_ai 02783 vec_vmrghw(vector unsigned int a, vector unsigned int b) 02784 { 02785 return vec_perm(a, b, (vector unsigned char) 02786 (0x00, 0x01, 0x02, 0x03, 0x10, 0x11, 0x12, 0x13, 02787 0x04, 0x05, 0x06, 0x07, 0x14, 0x15, 0x16, 0x17)); 02788 } 02789 02790 static vector bool int __ATTRS_o_ai 02791 vec_vmrghw(vector bool int a, vector bool int b) 02792 { 02793 return vec_perm(a, b, (vector unsigned char) 02794 (0x00, 0x01, 0x02, 0x03, 0x10, 0x11, 0x12, 0x13, 02795 0x04, 0x05, 0x06, 0x07, 0x14, 0x15, 0x16, 0x17)); 02796 } 02797 02798 static vector float __ATTRS_o_ai 02799 vec_vmrghw(vector float a, vector float b) 02800 { 02801 return vec_perm(a, b, (vector unsigned char) 02802 (0x00, 0x01, 0x02, 0x03, 0x10, 0x11, 0x12, 0x13, 02803 0x04, 0x05, 0x06, 0x07, 0x14, 0x15, 0x16, 0x17)); 02804 } 02805 02806 /* vec_mergel */ 02807 02808 static vector signed char __ATTRS_o_ai 02809 vec_mergel(vector signed char a, vector signed char b) 02810 { 02811 return vec_perm(a, b, (vector unsigned char) 02812 (0x08, 0x18, 0x09, 0x19, 0x0A, 0x1A, 0x0B, 0x1B, 02813 0x0C, 0x1C, 0x0D, 0x1D, 0x0E, 0x1E, 0x0F, 0x1F)); 02814 } 02815 02816 static vector unsigned char __ATTRS_o_ai 02817 vec_mergel(vector unsigned char a, vector unsigned char b) 02818 { 02819 return vec_perm(a, b, (vector unsigned char) 02820 (0x08, 0x18, 0x09, 0x19, 0x0A, 0x1A, 0x0B, 0x1B, 02821 0x0C, 0x1C, 0x0D, 0x1D, 0x0E, 0x1E, 0x0F, 0x1F)); 02822 } 02823 02824 static vector bool char __ATTRS_o_ai 02825 vec_mergel(vector bool char a, vector bool char b) 02826 { 02827 return vec_perm(a, b, (vector unsigned char) 02828 (0x08, 0x18, 0x09, 0x19, 0x0A, 0x1A, 0x0B, 0x1B, 02829 0x0C, 0x1C, 0x0D, 0x1D, 0x0E, 0x1E, 0x0F, 0x1F)); 02830 } 02831 02832 static vector short __ATTRS_o_ai 02833 vec_mergel(vector short a, vector short b) 02834 { 02835 return vec_perm(a, b, (vector unsigned char) 02836 (0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B, 0x1A, 0x1B, 02837 0x0C, 0x0D, 0x1C, 0x1D, 0x0E, 0x0F, 0x1E, 0x1F)); 02838 } 02839 02840 static vector unsigned short __ATTRS_o_ai 02841 vec_mergel(vector unsigned short a, vector unsigned short b) 02842 { 02843 return vec_perm(a, b, (vector unsigned char) 02844 (0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B, 0x1A, 0x1B, 02845 0x0C, 0x0D, 0x1C, 0x1D, 0x0E, 0x0F, 0x1E, 0x1F)); 02846 } 02847 02848 static vector bool short __ATTRS_o_ai 02849 vec_mergel(vector bool short a, vector bool short b) 02850 { 02851 return vec_perm(a, b, (vector unsigned char) 02852 (0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B, 0x1A, 0x1B, 02853 0x0C, 0x0D, 0x1C, 0x1D, 0x0E, 0x0F, 0x1E, 0x1F)); 02854 } 02855 02856 static vector pixel __ATTRS_o_ai 02857 vec_mergel(vector pixel a, vector pixel b) 02858 { 02859 return vec_perm(a, b, (vector unsigned char) 02860 (0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B, 0x1A, 0x1B, 02861 0x0C, 0x0D, 0x1C, 0x1D, 0x0E, 0x0F, 0x1E, 0x1F)); 02862 } 02863 02864 static vector int __ATTRS_o_ai 02865 vec_mergel(vector int a, vector int b) 02866 { 02867 return vec_perm(a, b, (vector unsigned char) 02868 (0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19, 0x1A, 0x1B, 02869 0x0C, 0x0D, 0x0E, 0x0F, 0x1C, 0x1D, 0x1E, 0x1F)); 02870 } 02871 02872 static vector unsigned int __ATTRS_o_ai 02873 vec_mergel(vector unsigned int a, vector unsigned int b) 02874 { 02875 return vec_perm(a, b, (vector unsigned char) 02876 (0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19, 0x1A, 0x1B, 02877 0x0C, 0x0D, 0x0E, 0x0F, 0x1C, 0x1D, 0x1E, 0x1F)); 02878 } 02879 02880 static vector bool int __ATTRS_o_ai 02881 vec_mergel(vector bool int a, vector bool int b) 02882 { 02883 return vec_perm(a, b, (vector unsigned char) 02884 (0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19, 0x1A, 0x1B, 02885 0x0C, 0x0D, 0x0E, 0x0F, 0x1C, 0x1D, 0x1E, 0x1F)); 02886 } 02887 02888 static vector float __ATTRS_o_ai 02889 vec_mergel(vector float a, vector float b) 02890 { 02891 return vec_perm(a, b, (vector unsigned char) 02892 (0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19, 0x1A, 0x1B, 02893 0x0C, 0x0D, 0x0E, 0x0F, 0x1C, 0x1D, 0x1E, 0x1F)); 02894 } 02895 02896 /* vec_vmrglb */ 02897 02898 #define __builtin_altivec_vmrglb vec_vmrglb 02899 02900 static vector signed char __ATTRS_o_ai 02901 vec_vmrglb(vector signed char a, vector signed char b) 02902 { 02903 return vec_perm(a, b, (vector unsigned char) 02904 (0x08, 0x18, 0x09, 0x19, 0x0A, 0x1A, 0x0B, 0x1B, 02905 0x0C, 0x1C, 0x0D, 0x1D, 0x0E, 0x1E, 0x0F, 0x1F)); 02906 } 02907 02908 static vector unsigned char __ATTRS_o_ai 02909 vec_vmrglb(vector unsigned char a, vector unsigned char b) 02910 { 02911 return vec_perm(a, b, (vector unsigned char) 02912 (0x08, 0x18, 0x09, 0x19, 0x0A, 0x1A, 0x0B, 0x1B, 02913 0x0C, 0x1C, 0x0D, 0x1D, 0x0E, 0x1E, 0x0F, 0x1F)); 02914 } 02915 02916 static vector bool char __ATTRS_o_ai 02917 vec_vmrglb(vector bool char a, vector bool char b) 02918 { 02919 return vec_perm(a, b, (vector unsigned char) 02920 (0x08, 0x18, 0x09, 0x19, 0x0A, 0x1A, 0x0B, 0x1B, 02921 0x0C, 0x1C, 0x0D, 0x1D, 0x0E, 0x1E, 0x0F, 0x1F)); 02922 } 02923 02924 /* vec_vmrglh */ 02925 02926 #define __builtin_altivec_vmrglh vec_vmrglh 02927 02928 static vector short __ATTRS_o_ai 02929 vec_vmrglh(vector short a, vector short b) 02930 { 02931 return vec_perm(a, b, (vector unsigned char) 02932 (0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B, 0x1A, 0x1B, 02933 0x0C, 0x0D, 0x1C, 0x1D, 0x0E, 0x0F, 0x1E, 0x1F)); 02934 } 02935 02936 static vector unsigned short __ATTRS_o_ai 02937 vec_vmrglh(vector unsigned short a, vector unsigned short b) 02938 { 02939 return vec_perm(a, b, (vector unsigned char) 02940 (0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B, 0x1A, 0x1B, 02941 0x0C, 0x0D, 0x1C, 0x1D, 0x0E, 0x0F, 0x1E, 0x1F)); 02942 } 02943 02944 static vector bool short __ATTRS_o_ai 02945 vec_vmrglh(vector bool short a, vector bool short b) 02946 { 02947 return vec_perm(a, b, (vector unsigned char) 02948 (0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B, 0x1A, 0x1B, 02949 0x0C, 0x0D, 0x1C, 0x1D, 0x0E, 0x0F, 0x1E, 0x1F)); 02950 } 02951 02952 static vector pixel __ATTRS_o_ai 02953 vec_vmrglh(vector pixel a, vector pixel b) 02954 { 02955 return vec_perm(a, b, (vector unsigned char) 02956 (0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B, 0x1A, 0x1B, 02957 0x0C, 0x0D, 0x1C, 0x1D, 0x0E, 0x0F, 0x1E, 0x1F)); 02958 } 02959 02960 /* vec_vmrglw */ 02961 02962 #define __builtin_altivec_vmrglw vec_vmrglw 02963 02964 static vector int __ATTRS_o_ai 02965 vec_vmrglw(vector int a, vector int b) 02966 { 02967 return vec_perm(a, b, (vector unsigned char) 02968 (0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19, 0x1A, 0x1B, 02969 0x0C, 0x0D, 0x0E, 0x0F, 0x1C, 0x1D, 0x1E, 0x1F)); 02970 } 02971 02972 static vector unsigned int __ATTRS_o_ai 02973 vec_vmrglw(vector unsigned int a, vector unsigned int b) 02974 { 02975 return vec_perm(a, b, (vector unsigned char) 02976 (0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19, 0x1A, 0x1B, 02977 0x0C, 0x0D, 0x0E, 0x0F, 0x1C, 0x1D, 0x1E, 0x1F)); 02978 } 02979 02980 static vector bool int __ATTRS_o_ai 02981 vec_vmrglw(vector bool int a, vector bool int b) 02982 { 02983 return vec_perm(a, b, (vector unsigned char) 02984 (0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19, 0x1A, 0x1B, 02985 0x0C, 0x0D, 0x0E, 0x0F, 0x1C, 0x1D, 0x1E, 0x1F)); 02986 } 02987 02988 static vector float __ATTRS_o_ai 02989 vec_vmrglw(vector float a, vector float b) 02990 { 02991 return vec_perm(a, b, (vector unsigned char) 02992 (0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19, 0x1A, 0x1B, 02993 0x0C, 0x0D, 0x0E, 0x0F, 0x1C, 0x1D, 0x1E, 0x1F)); 02994 } 02995 02996 /* vec_mfvscr */ 02997 02998 static vector unsigned short __attribute__((__always_inline__)) 02999 vec_mfvscr(void) 03000 { 03001 return __builtin_altivec_mfvscr(); 03002 } 03003 03004 /* vec_min */ 03005 03006 static vector signed char __ATTRS_o_ai 03007 vec_min(vector signed char a, vector signed char b) 03008 { 03009 return __builtin_altivec_vminsb(a, b); 03010 } 03011 03012 static vector signed char __ATTRS_o_ai 03013 vec_min(vector bool char a, vector signed char b) 03014 { 03015 return __builtin_altivec_vminsb((vector signed char)a, b); 03016 } 03017 03018 static vector signed char __ATTRS_o_ai 03019 vec_min(vector signed char a, vector bool char b) 03020 { 03021 return __builtin_altivec_vminsb(a, (vector signed char)b); 03022 } 03023 03024 static vector unsigned char __ATTRS_o_ai 03025 vec_min(vector unsigned char a, vector unsigned char b) 03026 { 03027 return __builtin_altivec_vminub(a, b); 03028 } 03029 03030 static vector unsigned char __ATTRS_o_ai 03031 vec_min(vector bool char a, vector unsigned char b) 03032 { 03033 return __builtin_altivec_vminub((vector unsigned char)a, b); 03034 } 03035 03036 static vector unsigned char __ATTRS_o_ai 03037 vec_min(vector unsigned char a, vector bool char b) 03038 { 03039 return __builtin_altivec_vminub(a, (vector unsigned char)b); 03040 } 03041 03042 static vector short __ATTRS_o_ai 03043 vec_min(vector short a, vector short b) 03044 { 03045 return __builtin_altivec_vminsh(a, b); 03046 } 03047 03048 static vector short __ATTRS_o_ai 03049 vec_min(vector bool short a, vector short b) 03050 { 03051 return __builtin_altivec_vminsh((vector short)a, b); 03052 } 03053 03054 static vector short __ATTRS_o_ai 03055 vec_min(vector short a, vector bool short b) 03056 { 03057 return __builtin_altivec_vminsh(a, (vector short)b); 03058 } 03059 03060 static vector unsigned short __ATTRS_o_ai 03061 vec_min(vector unsigned short a, vector unsigned short b) 03062 { 03063 return __builtin_altivec_vminuh(a, b); 03064 } 03065 03066 static vector unsigned short __ATTRS_o_ai 03067 vec_min(vector bool short a, vector unsigned short b) 03068 { 03069 return __builtin_altivec_vminuh((vector unsigned short)a, b); 03070 } 03071 03072 static vector unsigned short __ATTRS_o_ai 03073 vec_min(vector unsigned short a, vector bool short b) 03074 { 03075 return __builtin_altivec_vminuh(a, (vector unsigned short)b); 03076 } 03077 03078 static vector int __ATTRS_o_ai 03079 vec_min(vector int a, vector int b) 03080 { 03081 return __builtin_altivec_vminsw(a, b); 03082 } 03083 03084 static vector int __ATTRS_o_ai 03085 vec_min(vector bool int a, vector int b) 03086 { 03087 return __builtin_altivec_vminsw((vector int)a, b); 03088 } 03089 03090 static vector int __ATTRS_o_ai 03091 vec_min(vector int a, vector bool int b) 03092 { 03093 return __builtin_altivec_vminsw(a, (vector int)b); 03094 } 03095 03096 static vector unsigned int __ATTRS_o_ai 03097 vec_min(vector unsigned int a, vector unsigned int b) 03098 { 03099 return __builtin_altivec_vminuw(a, b); 03100 } 03101 03102 static vector unsigned int __ATTRS_o_ai 03103 vec_min(vector bool int a, vector unsigned int b) 03104 { 03105 return __builtin_altivec_vminuw((vector unsigned int)a, b); 03106 } 03107 03108 static vector unsigned int __ATTRS_o_ai 03109 vec_min(vector unsigned int a, vector bool int b) 03110 { 03111 return __builtin_altivec_vminuw(a, (vector unsigned int)b); 03112 } 03113 03114 static vector float __ATTRS_o_ai 03115 vec_min(vector float a, vector float b) 03116 { 03117 return __builtin_altivec_vminfp(a, b); 03118 } 03119 03120 /* vec_vminsb */ 03121 03122 static vector signed char __ATTRS_o_ai 03123 vec_vminsb(vector signed char a, vector signed char b) 03124 { 03125 return __builtin_altivec_vminsb(a, b); 03126 } 03127 03128 static vector signed char __ATTRS_o_ai 03129 vec_vminsb(vector bool char a, vector signed char b) 03130 { 03131 return __builtin_altivec_vminsb((vector signed char)a, b); 03132 } 03133 03134 static vector signed char __ATTRS_o_ai 03135 vec_vminsb(vector signed char a, vector bool char b) 03136 { 03137 return __builtin_altivec_vminsb(a, (vector signed char)b); 03138 } 03139 03140 /* vec_vminub */ 03141 03142 static vector unsigned char __ATTRS_o_ai 03143 vec_vminub(vector unsigned char a, vector unsigned char b) 03144 { 03145 return __builtin_altivec_vminub(a, b); 03146 } 03147 03148 static vector unsigned char __ATTRS_o_ai 03149 vec_vminub(vector bool char a, vector unsigned char b) 03150 { 03151 return __builtin_altivec_vminub((vector unsigned char)a, b); 03152 } 03153 03154 static vector unsigned char __ATTRS_o_ai 03155 vec_vminub(vector unsigned char a, vector bool char b) 03156 { 03157 return __builtin_altivec_vminub(a, (vector unsigned char)b); 03158 } 03159 03160 /* vec_vminsh */ 03161 03162 static vector short __ATTRS_o_ai 03163 vec_vminsh(vector short a, vector short b) 03164 { 03165 return __builtin_altivec_vminsh(a, b); 03166 } 03167 03168 static vector short __ATTRS_o_ai 03169 vec_vminsh(vector bool short a, vector short b) 03170 { 03171 return __builtin_altivec_vminsh((vector short)a, b); 03172 } 03173 03174 static vector short __ATTRS_o_ai 03175 vec_vminsh(vector short a, vector bool short b) 03176 { 03177 return __builtin_altivec_vminsh(a, (vector short)b); 03178 } 03179 03180 /* vec_vminuh */ 03181 03182 static vector unsigned short __ATTRS_o_ai 03183 vec_vminuh(vector unsigned short a, vector unsigned short b) 03184 { 03185 return __builtin_altivec_vminuh(a, b); 03186 } 03187 03188 static vector unsigned short __ATTRS_o_ai 03189 vec_vminuh(vector bool short a, vector unsigned short b) 03190 { 03191 return __builtin_altivec_vminuh((vector unsigned short)a, b); 03192 } 03193 03194 static vector unsigned short __ATTRS_o_ai 03195 vec_vminuh(vector unsigned short a, vector bool short b) 03196 { 03197 return __builtin_altivec_vminuh(a, (vector unsigned short)b); 03198 } 03199 03200 /* vec_vminsw */ 03201 03202 static vector int __ATTRS_o_ai 03203 vec_vminsw(vector int a, vector int b) 03204 { 03205 return __builtin_altivec_vminsw(a, b); 03206 } 03207 03208 static vector int __ATTRS_o_ai 03209 vec_vminsw(vector bool int a, vector int b) 03210 { 03211 return __builtin_altivec_vminsw((vector int)a, b); 03212 } 03213 03214 static vector int __ATTRS_o_ai 03215 vec_vminsw(vector int a, vector bool int b) 03216 { 03217 return __builtin_altivec_vminsw(a, (vector int)b); 03218 } 03219 03220 /* vec_vminuw */ 03221 03222 static vector unsigned int __ATTRS_o_ai 03223 vec_vminuw(vector unsigned int a, vector unsigned int b) 03224 { 03225 return __builtin_altivec_vminuw(a, b); 03226 } 03227 03228 static vector unsigned int __ATTRS_o_ai 03229 vec_vminuw(vector bool int a, vector unsigned int b) 03230 { 03231 return __builtin_altivec_vminuw((vector unsigned int)a, b); 03232 } 03233 03234 static vector unsigned int __ATTRS_o_ai 03235 vec_vminuw(vector unsigned int a, vector bool int b) 03236 { 03237 return __builtin_altivec_vminuw(a, (vector unsigned int)b); 03238 } 03239 03240 /* vec_vminfp */ 03241 03242 static vector float __attribute__((__always_inline__)) 03243 vec_vminfp(vector float a, vector float b) 03244 { 03245 return __builtin_altivec_vminfp(a, b); 03246 } 03247 03248 /* vec_mladd */ 03249 03250 #define __builtin_altivec_vmladduhm vec_mladd 03251 03252 static vector short __ATTRS_o_ai 03253 vec_mladd(vector short a, vector short b, vector short c) 03254 { 03255 return a * b + c; 03256 } 03257 03258 static vector short __ATTRS_o_ai 03259 vec_mladd(vector short a, vector unsigned short b, vector unsigned short c) 03260 { 03261 return a * (vector short)b + (vector short)c; 03262 } 03263 03264 static vector short __ATTRS_o_ai 03265 vec_mladd(vector unsigned short a, vector short b, vector short c) 03266 { 03267 return (vector short)a * b + c; 03268 } 03269 03270 static vector unsigned short __ATTRS_o_ai 03271 vec_mladd(vector unsigned short a, 03272 vector unsigned short b, 03273 vector unsigned short c) 03274 { 03275 return a * b + c; 03276 } 03277 03278 /* vec_vmladduhm */ 03279 03280 static vector short __ATTRS_o_ai 03281 vec_vmladduhm(vector short a, vector short b, vector short c) 03282 { 03283 return a * b + c; 03284 } 03285 03286 static vector short __ATTRS_o_ai 03287 vec_vmladduhm(vector short a, vector unsigned short b, vector unsigned short c) 03288 { 03289 return a * (vector short)b + (vector short)c; 03290 } 03291 03292 static vector short __ATTRS_o_ai 03293 vec_vmladduhm(vector unsigned short a, vector short b, vector short c) 03294 { 03295 return (vector short)a * b + c; 03296 } 03297 03298 static vector unsigned short __ATTRS_o_ai 03299 vec_vmladduhm(vector unsigned short a, 03300 vector unsigned short b, 03301 vector unsigned short c) 03302 { 03303 return a * b + c; 03304 } 03305 03306 /* vec_mradds */ 03307 03308 static vector short __attribute__((__always_inline__)) 03309 vec_mradds(vector short a, vector short b, vector short c) 03310 { 03311 return __builtin_altivec_vmhraddshs(a, b, c); 03312 } 03313 03314 /* vec_vmhraddshs */ 03315 03316 static vector short __attribute__((__always_inline__)) 03317 vec_vmhraddshs(vector short a, vector short b, vector short c) 03318 { 03319 return __builtin_altivec_vmhraddshs(a, b, c); 03320 } 03321 03322 /* vec_msum */ 03323 03324 static vector int __ATTRS_o_ai 03325 vec_msum(vector signed char a, vector unsigned char b, vector int c) 03326 { 03327 return __builtin_altivec_vmsummbm(a, b, c); 03328 } 03329 03330 static vector unsigned int __ATTRS_o_ai 03331 vec_msum(vector unsigned char a, vector unsigned char b, vector unsigned int c) 03332 { 03333 return __builtin_altivec_vmsumubm(a, b, c); 03334 } 03335 03336 static vector int __ATTRS_o_ai 03337 vec_msum(vector short a, vector short b, vector int c) 03338 { 03339 return __builtin_altivec_vmsumshm(a, b, c); 03340 } 03341 03342 static vector unsigned int __ATTRS_o_ai 03343 vec_msum(vector unsigned short a, 03344 vector unsigned short b, 03345 vector unsigned int c) 03346 { 03347 return __builtin_altivec_vmsumuhm(a, b, c); 03348 } 03349 03350 /* vec_vmsummbm */ 03351 03352 static vector int __attribute__((__always_inline__)) 03353 vec_vmsummbm(vector signed char a, vector unsigned char b, vector int c) 03354 { 03355 return __builtin_altivec_vmsummbm(a, b, c); 03356 } 03357 03358 /* vec_vmsumubm */ 03359 03360 static vector unsigned int __attribute__((__always_inline__)) 03361 vec_vmsumubm(vector unsigned char a, 03362 vector unsigned char b, 03363 vector unsigned int c) 03364 { 03365 return __builtin_altivec_vmsumubm(a, b, c); 03366 } 03367 03368 /* vec_vmsumshm */ 03369 03370 static vector int __attribute__((__always_inline__)) 03371 vec_vmsumshm(vector short a, vector short b, vector int c) 03372 { 03373 return __builtin_altivec_vmsumshm(a, b, c); 03374 } 03375 03376 /* vec_vmsumuhm */ 03377 03378 static vector unsigned int __attribute__((__always_inline__)) 03379 vec_vmsumuhm(vector unsigned short a, 03380 vector unsigned short b, 03381 vector unsigned int c) 03382 { 03383 return __builtin_altivec_vmsumuhm(a, b, c); 03384 } 03385 03386 /* vec_msums */ 03387 03388 static vector int __ATTRS_o_ai 03389 vec_msums(vector short a, vector short b, vector int c) 03390 { 03391 return __builtin_altivec_vmsumshs(a, b, c); 03392 } 03393 03394 static vector unsigned int __ATTRS_o_ai 03395 vec_msums(vector unsigned short a, 03396 vector unsigned short b, 03397 vector unsigned int c) 03398 { 03399 return __builtin_altivec_vmsumuhs(a, b, c); 03400 } 03401 03402 /* vec_vmsumshs */ 03403 03404 static vector int __attribute__((__always_inline__)) 03405 vec_vmsumshs(vector short a, vector short b, vector int c) 03406 { 03407 return __builtin_altivec_vmsumshs(a, b, c); 03408 } 03409 03410 /* vec_vmsumuhs */ 03411 03412 static vector unsigned int __attribute__((__always_inline__)) 03413 vec_vmsumuhs(vector unsigned short a, 03414 vector unsigned short b, 03415 vector unsigned int c) 03416 { 03417 return __builtin_altivec_vmsumuhs(a, b, c); 03418 } 03419 03420 /* vec_mtvscr */ 03421 03422 static void __ATTRS_o_ai 03423 vec_mtvscr(vector signed char a) 03424 { 03425 __builtin_altivec_mtvscr((vector int)a); 03426 } 03427 03428 static void __ATTRS_o_ai 03429 vec_mtvscr(vector unsigned char a) 03430 { 03431 __builtin_altivec_mtvscr((vector int)a); 03432 } 03433 03434 static void __ATTRS_o_ai 03435 vec_mtvscr(vector bool char a) 03436 { 03437 __builtin_altivec_mtvscr((vector int)a); 03438 } 03439 03440 static void __ATTRS_o_ai 03441 vec_mtvscr(vector short a) 03442 { 03443 __builtin_altivec_mtvscr((vector int)a); 03444 } 03445 03446 static void __ATTRS_o_ai 03447 vec_mtvscr(vector unsigned short a) 03448 { 03449 __builtin_altivec_mtvscr((vector int)a); 03450 } 03451 03452 static void __ATTRS_o_ai 03453 vec_mtvscr(vector bool short a) 03454 { 03455 __builtin_altivec_mtvscr((vector int)a); 03456 } 03457 03458 static void __ATTRS_o_ai 03459 vec_mtvscr(vector pixel a) 03460 { 03461 __builtin_altivec_mtvscr((vector int)a); 03462 } 03463 03464 static void __ATTRS_o_ai 03465 vec_mtvscr(vector int a) 03466 { 03467 __builtin_altivec_mtvscr((vector int)a); 03468 } 03469 03470 static void __ATTRS_o_ai 03471 vec_mtvscr(vector unsigned int a) 03472 { 03473 __builtin_altivec_mtvscr((vector int)a); 03474 } 03475 03476 static void __ATTRS_o_ai 03477 vec_mtvscr(vector bool int a) 03478 { 03479 __builtin_altivec_mtvscr((vector int)a); 03480 } 03481 03482 static void __ATTRS_o_ai 03483 vec_mtvscr(vector float a) 03484 { 03485 __builtin_altivec_mtvscr((vector int)a); 03486 } 03487 03488 /* vec_mule */ 03489 03490 static vector short __ATTRS_o_ai 03491 vec_mule(vector signed char a, vector signed char b) 03492 { 03493 return __builtin_altivec_vmulesb(a, b); 03494 } 03495 03496 static vector unsigned short __ATTRS_o_ai 03497 vec_mule(vector unsigned char a, vector unsigned char b) 03498 { 03499 return __builtin_altivec_vmuleub(a, b); 03500 } 03501 03502 static vector int __ATTRS_o_ai 03503 vec_mule(vector short a, vector short b) 03504 { 03505 return __builtin_altivec_vmulesh(a, b); 03506 } 03507 03508 static vector unsigned int __ATTRS_o_ai 03509 vec_mule(vector unsigned short a, vector unsigned short b) 03510 { 03511 return __builtin_altivec_vmuleuh(a, b); 03512 } 03513 03514 /* vec_vmulesb */ 03515 03516 static vector short __attribute__((__always_inline__)) 03517 vec_vmulesb(vector signed char a, vector signed char b) 03518 { 03519 return __builtin_altivec_vmulesb(a, b); 03520 } 03521 03522 /* vec_vmuleub */ 03523 03524 static vector unsigned short __attribute__((__always_inline__)) 03525 vec_vmuleub(vector unsigned char a, vector unsigned char b) 03526 { 03527 return __builtin_altivec_vmuleub(a, b); 03528 } 03529 03530 /* vec_vmulesh */ 03531 03532 static vector int __attribute__((__always_inline__)) 03533 vec_vmulesh(vector short a, vector short b) 03534 { 03535 return __builtin_altivec_vmulesh(a, b); 03536 } 03537 03538 /* vec_vmuleuh */ 03539 03540 static vector unsigned int __attribute__((__always_inline__)) 03541 vec_vmuleuh(vector unsigned short a, vector unsigned short b) 03542 { 03543 return __builtin_altivec_vmuleuh(a, b); 03544 } 03545 03546 /* vec_mulo */ 03547 03548 static vector short __ATTRS_o_ai 03549 vec_mulo(vector signed char a, vector signed char b) 03550 { 03551 return __builtin_altivec_vmulosb(a, b); 03552 } 03553 03554 static vector unsigned short __ATTRS_o_ai 03555 vec_mulo(vector unsigned char a, vector unsigned char b) 03556 { 03557 return __builtin_altivec_vmuloub(a, b); 03558 } 03559 03560 static vector int __ATTRS_o_ai 03561 vec_mulo(vector short a, vector short b) 03562 { 03563 return __builtin_altivec_vmulosh(a, b); 03564 } 03565 03566 static vector unsigned int __ATTRS_o_ai 03567 vec_mulo(vector unsigned short a, vector unsigned short b) 03568 { 03569 return __builtin_altivec_vmulouh(a, b); 03570 } 03571 03572 /* vec_vmulosb */ 03573 03574 static vector short __attribute__((__always_inline__)) 03575 vec_vmulosb(vector signed char a, vector signed char b) 03576 { 03577 return __builtin_altivec_vmulosb(a, b); 03578 } 03579 03580 /* vec_vmuloub */ 03581 03582 static vector unsigned short __attribute__((__always_inline__)) 03583 vec_vmuloub(vector unsigned char a, vector unsigned char b) 03584 { 03585 return __builtin_altivec_vmuloub(a, b); 03586 } 03587 03588 /* vec_vmulosh */ 03589 03590 static vector int __attribute__((__always_inline__)) 03591 vec_vmulosh(vector short a, vector short b) 03592 { 03593 return __builtin_altivec_vmulosh(a, b); 03594 } 03595 03596 /* vec_vmulouh */ 03597 03598 static vector unsigned int __attribute__((__always_inline__)) 03599 vec_vmulouh(vector unsigned short a, vector unsigned short b) 03600 { 03601 return __builtin_altivec_vmulouh(a, b); 03602 } 03603 03604 /* vec_nmsub */ 03605 03606 static vector float __attribute__((__always_inline__)) 03607 vec_nmsub(vector float a, vector float b, vector float c) 03608 { 03609 return __builtin_altivec_vnmsubfp(a, b, c); 03610 } 03611 03612 /* vec_vnmsubfp */ 03613 03614 static vector float __attribute__((__always_inline__)) 03615 vec_vnmsubfp(vector float a, vector float b, vector float c) 03616 { 03617 return __builtin_altivec_vnmsubfp(a, b, c); 03618 } 03619 03620 /* vec_nor */ 03621 03622 #define __builtin_altivec_vnor vec_nor 03623 03624 static vector signed char __ATTRS_o_ai 03625 vec_nor(vector signed char a, vector signed char b) 03626 { 03627 return ~(a | b); 03628 } 03629 03630 static vector unsigned char __ATTRS_o_ai 03631 vec_nor(vector unsigned char a, vector unsigned char b) 03632 { 03633 return ~(a | b); 03634 } 03635 03636 static vector bool char __ATTRS_o_ai 03637 vec_nor(vector bool char a, vector bool char b) 03638 { 03639 return ~(a | b); 03640 } 03641 03642 static vector short __ATTRS_o_ai 03643 vec_nor(vector short a, vector short b) 03644 { 03645 return ~(a | b); 03646 } 03647 03648 static vector unsigned short __ATTRS_o_ai 03649 vec_nor(vector unsigned short a, vector unsigned short b) 03650 { 03651 return ~(a | b); 03652 } 03653 03654 static vector bool short __ATTRS_o_ai 03655 vec_nor(vector bool short a, vector bool short b) 03656 { 03657 return ~(a | b); 03658 } 03659 03660 static vector int __ATTRS_o_ai 03661 vec_nor(vector int a, vector int b) 03662 { 03663 return ~(a | b); 03664 } 03665 03666 static vector unsigned int __ATTRS_o_ai 03667 vec_nor(vector unsigned int a, vector unsigned int b) 03668 { 03669 return ~(a | b); 03670 } 03671 03672 static vector bool int __ATTRS_o_ai 03673 vec_nor(vector bool int a, vector bool int b) 03674 { 03675 return ~(a | b); 03676 } 03677 03678 static vector float __ATTRS_o_ai 03679 vec_nor(vector float a, vector float b) 03680 { 03681 vector unsigned int res = ~((vector unsigned int)a | (vector unsigned int)b); 03682 return (vector float)res; 03683 } 03684 03685 /* vec_vnor */ 03686 03687 static vector signed char __ATTRS_o_ai 03688 vec_vnor(vector signed char a, vector signed char b) 03689 { 03690 return ~(a | b); 03691 } 03692 03693 static vector unsigned char __ATTRS_o_ai 03694 vec_vnor(vector unsigned char a, vector unsigned char b) 03695 { 03696 return ~(a | b); 03697 } 03698 03699 static vector bool char __ATTRS_o_ai 03700 vec_vnor(vector bool char a, vector bool char b) 03701 { 03702 return ~(a | b); 03703 } 03704 03705 static vector short __ATTRS_o_ai 03706 vec_vnor(vector short a, vector short b) 03707 { 03708 return ~(a | b); 03709 } 03710 03711 static vector unsigned short __ATTRS_o_ai 03712 vec_vnor(vector unsigned short a, vector unsigned short b) 03713 { 03714 return ~(a | b); 03715 } 03716 03717 static vector bool short __ATTRS_o_ai 03718 vec_vnor(vector bool short a, vector bool short b) 03719 { 03720 return ~(a | b); 03721 } 03722 03723 static vector int __ATTRS_o_ai 03724 vec_vnor(vector int a, vector int b) 03725 { 03726 return ~(a | b); 03727 } 03728 03729 static vector unsigned int __ATTRS_o_ai 03730 vec_vnor(vector unsigned int a, vector unsigned int b) 03731 { 03732 return ~(a | b); 03733 } 03734 03735 static vector bool int __ATTRS_o_ai 03736 vec_vnor(vector bool int a, vector bool int b) 03737 { 03738 return ~(a | b); 03739 } 03740 03741 static vector float __ATTRS_o_ai 03742 vec_vnor(vector float a, vector float b) 03743 { 03744 vector unsigned int res = ~((vector unsigned int)a | (vector unsigned int)b); 03745 return (vector float)res; 03746 } 03747 03748 /* vec_or */ 03749 03750 #define __builtin_altivec_vor vec_or 03751 03752 static vector signed char __ATTRS_o_ai 03753 vec_or(vector signed char a, vector signed char b) 03754 { 03755 return a | b; 03756 } 03757 03758 static vector signed char __ATTRS_o_ai 03759 vec_or(vector bool char a, vector signed char b) 03760 { 03761 return (vector signed char)a | b; 03762 } 03763 03764 static vector signed char __ATTRS_o_ai 03765 vec_or(vector signed char a, vector bool char b) 03766 { 03767 return a | (vector signed char)b; 03768 } 03769 03770 static vector unsigned char __ATTRS_o_ai 03771 vec_or(vector unsigned char a, vector unsigned char b) 03772 { 03773 return a | b; 03774 } 03775 03776 static vector unsigned char __ATTRS_o_ai 03777 vec_or(vector bool char a, vector unsigned char b) 03778 { 03779 return (vector unsigned char)a | b; 03780 } 03781 03782 static vector unsigned char __ATTRS_o_ai 03783 vec_or(vector unsigned char a, vector bool char b) 03784 { 03785 return a | (vector unsigned char)b; 03786 } 03787 03788 static vector bool char __ATTRS_o_ai 03789 vec_or(vector bool char a, vector bool char b) 03790 { 03791 return a | b; 03792 } 03793 03794 static vector short __ATTRS_o_ai 03795 vec_or(vector short a, vector short b) 03796 { 03797 return a | b; 03798 } 03799 03800 static vector short __ATTRS_o_ai 03801 vec_or(vector bool short a, vector short b) 03802 { 03803 return (vector short)a | b; 03804 } 03805 03806 static vector short __ATTRS_o_ai 03807 vec_or(vector short a, vector bool short b) 03808 { 03809 return a | (vector short)b; 03810 } 03811 03812 static vector unsigned short __ATTRS_o_ai 03813 vec_or(vector unsigned short a, vector unsigned short b) 03814 { 03815 return a | b; 03816 } 03817 03818 static vector unsigned short __ATTRS_o_ai 03819 vec_or(vector bool short a, vector unsigned short b) 03820 { 03821 return (vector unsigned short)a | b; 03822 } 03823 03824 static vector unsigned short __ATTRS_o_ai 03825 vec_or(vector unsigned short a, vector bool short b) 03826 { 03827 return a | (vector unsigned short)b; 03828 } 03829 03830 static vector bool short __ATTRS_o_ai 03831 vec_or(vector bool short a, vector bool short b) 03832 { 03833 return a | b; 03834 } 03835 03836 static vector int __ATTRS_o_ai 03837 vec_or(vector int a, vector int b) 03838 { 03839 return a | b; 03840 } 03841 03842 static vector int __ATTRS_o_ai 03843 vec_or(vector bool int a, vector int b) 03844 { 03845 return (vector int)a | b; 03846 } 03847 03848 static vector int __ATTRS_o_ai 03849 vec_or(vector int a, vector bool int b) 03850 { 03851 return a | (vector int)b; 03852 } 03853 03854 static vector unsigned int __ATTRS_o_ai 03855 vec_or(vector unsigned int a, vector unsigned int b) 03856 { 03857 return a | b; 03858 } 03859 03860 static vector unsigned int __ATTRS_o_ai 03861 vec_or(vector bool int a, vector unsigned int b) 03862 { 03863 return (vector unsigned int)a | b; 03864 } 03865 03866 static vector unsigned int __ATTRS_o_ai 03867 vec_or(vector unsigned int a, vector bool int b) 03868 { 03869 return a | (vector unsigned int)b; 03870 } 03871 03872 static vector bool int __ATTRS_o_ai 03873 vec_or(vector bool int a, vector bool int b) 03874 { 03875 return a | b; 03876 } 03877 03878 static vector float __ATTRS_o_ai 03879 vec_or(vector float a, vector float b) 03880 { 03881 vector unsigned int res = (vector unsigned int)a | (vector unsigned int)b; 03882 return (vector float)res; 03883 } 03884 03885 static vector float __ATTRS_o_ai 03886 vec_or(vector bool int a, vector float b) 03887 { 03888 vector unsigned int res = (vector unsigned int)a | (vector unsigned int)b; 03889 return (vector float)res; 03890 } 03891 03892 static vector float __ATTRS_o_ai 03893 vec_or(vector float a, vector bool int b) 03894 { 03895 vector unsigned int res = (vector unsigned int)a | (vector unsigned int)b; 03896 return (vector float)res; 03897 } 03898 03899 /* vec_vor */ 03900 03901 static vector signed char __ATTRS_o_ai 03902 vec_vor(vector signed char a, vector signed char b) 03903 { 03904 return a | b; 03905 } 03906 03907 static vector signed char __ATTRS_o_ai 03908 vec_vor(vector bool char a, vector signed char b) 03909 { 03910 return (vector signed char)a | b; 03911 } 03912 03913 static vector signed char __ATTRS_o_ai 03914 vec_vor(vector signed char a, vector bool char b) 03915 { 03916 return a | (vector signed char)b; 03917 } 03918 03919 static vector unsigned char __ATTRS_o_ai 03920 vec_vor(vector unsigned char a, vector unsigned char b) 03921 { 03922 return a | b; 03923 } 03924 03925 static vector unsigned char __ATTRS_o_ai 03926 vec_vor(vector bool char a, vector unsigned char b) 03927 { 03928 return (vector unsigned char)a | b; 03929 } 03930 03931 static vector unsigned char __ATTRS_o_ai 03932 vec_vor(vector unsigned char a, vector bool char b) 03933 { 03934 return a | (vector unsigned char)b; 03935 } 03936 03937 static vector bool char __ATTRS_o_ai 03938 vec_vor(vector bool char a, vector bool char b) 03939 { 03940 return a | b; 03941 } 03942 03943 static vector short __ATTRS_o_ai 03944 vec_vor(vector short a, vector short b) 03945 { 03946 return a | b; 03947 } 03948 03949 static vector short __ATTRS_o_ai 03950 vec_vor(vector bool short a, vector short b) 03951 { 03952 return (vector short)a | b; 03953 } 03954 03955 static vector short __ATTRS_o_ai 03956 vec_vor(vector short a, vector bool short b) 03957 { 03958 return a | (vector short)b; 03959 } 03960 03961 static vector unsigned short __ATTRS_o_ai 03962 vec_vor(vector unsigned short a, vector unsigned short b) 03963 { 03964 return a | b; 03965 } 03966 03967 static vector unsigned short __ATTRS_o_ai 03968 vec_vor(vector bool short a, vector unsigned short b) 03969 { 03970 return (vector unsigned short)a | b; 03971 } 03972 03973 static vector unsigned short __ATTRS_o_ai 03974 vec_vor(vector unsigned short a, vector bool short b) 03975 { 03976 return a | (vector unsigned short)b; 03977 } 03978 03979 static vector bool short __ATTRS_o_ai 03980 vec_vor(vector bool short a, vector bool short b) 03981 { 03982 return a | b; 03983 } 03984 03985 static vector int __ATTRS_o_ai 03986 vec_vor(vector int a, vector int b) 03987 { 03988 return a | b; 03989 } 03990 03991 static vector int __ATTRS_o_ai 03992 vec_vor(vector bool int a, vector int b) 03993 { 03994 return (vector int)a | b; 03995 } 03996 03997 static vector int __ATTRS_o_ai 03998 vec_vor(vector int a, vector bool int b) 03999 { 04000 return a | (vector int)b; 04001 } 04002 04003 static vector unsigned int __ATTRS_o_ai 04004 vec_vor(vector unsigned int a, vector unsigned int b) 04005 { 04006 return a | b; 04007 } 04008 04009 static vector unsigned int __ATTRS_o_ai 04010 vec_vor(vector bool int a, vector unsigned int b) 04011 { 04012 return (vector unsigned int)a | b; 04013 } 04014 04015 static vector unsigned int __ATTRS_o_ai 04016 vec_vor(vector unsigned int a, vector bool int b) 04017 { 04018 return a | (vector unsigned int)b; 04019 } 04020 04021 static vector bool int __ATTRS_o_ai 04022 vec_vor(vector bool int a, vector bool int b) 04023 { 04024 return a | b; 04025 } 04026 04027 static vector float __ATTRS_o_ai 04028 vec_vor(vector float a, vector float b) 04029 { 04030 vector unsigned int res = (vector unsigned int)a | (vector unsigned int)b; 04031 return (vector float)res; 04032 } 04033 04034 static vector float __ATTRS_o_ai 04035 vec_vor(vector bool int a, vector float b) 04036 { 04037 vector unsigned int res = (vector unsigned int)a | (vector unsigned int)b; 04038 return (vector float)res; 04039 } 04040 04041 static vector float __ATTRS_o_ai 04042 vec_vor(vector float a, vector bool int b) 04043 { 04044 vector unsigned int res = (vector unsigned int)a | (vector unsigned int)b; 04045 return (vector float)res; 04046 } 04047 04048 /* vec_pack */ 04049 04050 static vector signed char __ATTRS_o_ai 04051 vec_pack(vector signed short a, vector signed short b) 04052 { 04053 return (vector signed char)vec_perm(a, b, (vector unsigned char) 04054 (0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F, 04055 0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F)); 04056 } 04057 04058 static vector unsigned char __ATTRS_o_ai 04059 vec_pack(vector unsigned short a, vector unsigned short b) 04060 { 04061 return (vector unsigned char)vec_perm(a, b, (vector unsigned char) 04062 (0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F, 04063 0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F)); 04064 } 04065 04066 static vector bool char __ATTRS_o_ai 04067 vec_pack(vector bool short a, vector bool short b) 04068 { 04069 return (vector bool char)vec_perm(a, b, (vector unsigned char) 04070 (0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F, 04071 0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F)); 04072 } 04073 04074 static vector short __ATTRS_o_ai 04075 vec_pack(vector int a, vector int b) 04076 { 04077 return (vector short)vec_perm(a, b, (vector unsigned char) 04078 (0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F, 04079 0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F)); 04080 } 04081 04082 static vector unsigned short __ATTRS_o_ai 04083 vec_pack(vector unsigned int a, vector unsigned int b) 04084 { 04085 return (vector unsigned short)vec_perm(a, b, (vector unsigned char) 04086 (0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F, 04087 0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F)); 04088 } 04089 04090 static vector bool short __ATTRS_o_ai 04091 vec_pack(vector bool int a, vector bool int b) 04092 { 04093 return (vector bool short)vec_perm(a, b, (vector unsigned char) 04094 (0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F, 04095 0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F)); 04096 } 04097 04098 /* vec_vpkuhum */ 04099 04100 #define __builtin_altivec_vpkuhum vec_vpkuhum 04101 04102 static vector signed char __ATTRS_o_ai 04103 vec_vpkuhum(vector signed short a, vector signed short b) 04104 { 04105 return (vector signed char)vec_perm(a, b, (vector unsigned char) 04106 (0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F, 04107 0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F)); 04108 } 04109 04110 static vector unsigned char __ATTRS_o_ai 04111 vec_vpkuhum(vector unsigned short a, vector unsigned short b) 04112 { 04113 return (vector unsigned char)vec_perm(a, b, (vector unsigned char) 04114 (0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F, 04115 0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F)); 04116 } 04117 04118 static vector bool char __ATTRS_o_ai 04119 vec_vpkuhum(vector bool short a, vector bool short b) 04120 { 04121 return (vector bool char)vec_perm(a, b, (vector unsigned char) 04122 (0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F, 04123 0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F)); 04124 } 04125 04126 /* vec_vpkuwum */ 04127 04128 #define __builtin_altivec_vpkuwum vec_vpkuwum 04129 04130 static vector short __ATTRS_o_ai 04131 vec_vpkuwum(vector int a, vector int b) 04132 { 04133 return (vector short)vec_perm(a, b, (vector unsigned char) 04134 (0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F, 04135 0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F)); 04136 } 04137 04138 static vector unsigned short __ATTRS_o_ai 04139 vec_vpkuwum(vector unsigned int a, vector unsigned int b) 04140 { 04141 return (vector unsigned short)vec_perm(a, b, (vector unsigned char) 04142 (0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F, 04143 0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F)); 04144 } 04145 04146 static vector bool short __ATTRS_o_ai 04147 vec_vpkuwum(vector bool int a, vector bool int b) 04148 { 04149 return (vector bool short)vec_perm(a, b, (vector unsigned char) 04150 (0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F, 04151 0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F)); 04152 } 04153 04154 /* vec_packpx */ 04155 04156 static vector pixel __attribute__((__always_inline__)) 04157 vec_packpx(vector unsigned int a, vector unsigned int b) 04158 { 04159 return (vector pixel)__builtin_altivec_vpkpx(a, b); 04160 } 04161 04162 /* vec_vpkpx */ 04163 04164 static vector pixel __attribute__((__always_inline__)) 04165 vec_vpkpx(vector unsigned int a, vector unsigned int b) 04166 { 04167 return (vector pixel)__builtin_altivec_vpkpx(a, b); 04168 } 04169 04170 /* vec_packs */ 04171 04172 static vector signed char __ATTRS_o_ai 04173 vec_packs(vector short a, vector short b) 04174 { 04175 return __builtin_altivec_vpkshss(a, b); 04176 } 04177 04178 static vector unsigned char __ATTRS_o_ai 04179 vec_packs(vector unsigned short a, vector unsigned short b) 04180 { 04181 return __builtin_altivec_vpkuhus(a, b); 04182 } 04183 04184 static vector signed short __ATTRS_o_ai 04185 vec_packs(vector int a, vector int b) 04186 { 04187 return __builtin_altivec_vpkswss(a, b); 04188 } 04189 04190 static vector unsigned short __ATTRS_o_ai 04191 vec_packs(vector unsigned int a, vector unsigned int b) 04192 { 04193 return __builtin_altivec_vpkuwus(a, b); 04194 } 04195 04196 /* vec_vpkshss */ 04197 04198 static vector signed char __attribute__((__always_inline__)) 04199 vec_vpkshss(vector short a, vector short b) 04200 { 04201 return __builtin_altivec_vpkshss(a, b); 04202 } 04203 04204 /* vec_vpkuhus */ 04205 04206 static vector unsigned char __attribute__((__always_inline__)) 04207 vec_vpkuhus(vector unsigned short a, vector unsigned short b) 04208 { 04209 return __builtin_altivec_vpkuhus(a, b); 04210 } 04211 04212 /* vec_vpkswss */ 04213 04214 static vector signed short __attribute__((__always_inline__)) 04215 vec_vpkswss(vector int a, vector int b) 04216 { 04217 return __builtin_altivec_vpkswss(a, b); 04218 } 04219 04220 /* vec_vpkuwus */ 04221 04222 static vector unsigned short __attribute__((__always_inline__)) 04223 vec_vpkuwus(vector unsigned int a, vector unsigned int b) 04224 { 04225 return __builtin_altivec_vpkuwus(a, b); 04226 } 04227 04228 /* vec_packsu */ 04229 04230 static vector unsigned char __ATTRS_o_ai 04231 vec_packsu(vector short a, vector short b) 04232 { 04233 return __builtin_altivec_vpkshus(a, b); 04234 } 04235 04236 static vector unsigned char __ATTRS_o_ai 04237 vec_packsu(vector unsigned short a, vector unsigned short b) 04238 { 04239 return __builtin_altivec_vpkuhus(a, b); 04240 } 04241 04242 static vector unsigned short __ATTRS_o_ai 04243 vec_packsu(vector int a, vector int b) 04244 { 04245 return __builtin_altivec_vpkswus(a, b); 04246 } 04247 04248 static vector unsigned short __ATTRS_o_ai 04249 vec_packsu(vector unsigned int a, vector unsigned int b) 04250 { 04251 return __builtin_altivec_vpkuwus(a, b); 04252 } 04253 04254 /* vec_vpkshus */ 04255 04256 static vector unsigned char __ATTRS_o_ai 04257 vec_vpkshus(vector short a, vector short b) 04258 { 04259 return __builtin_altivec_vpkshus(a, b); 04260 } 04261 04262 static vector unsigned char __ATTRS_o_ai 04263 vec_vpkshus(vector unsigned short a, vector unsigned short b) 04264 { 04265 return __builtin_altivec_vpkuhus(a, b); 04266 } 04267 04268 /* vec_vpkswus */ 04269 04270 static vector unsigned short __ATTRS_o_ai 04271 vec_vpkswus(vector int a, vector int b) 04272 { 04273 return __builtin_altivec_vpkswus(a, b); 04274 } 04275 04276 static vector unsigned short __ATTRS_o_ai 04277 vec_vpkswus(vector unsigned int a, vector unsigned int b) 04278 { 04279 return __builtin_altivec_vpkuwus(a, b); 04280 } 04281 04282 /* vec_perm */ 04283 04284 vector signed char __ATTRS_o_ai 04285 vec_perm(vector signed char a, vector signed char b, vector unsigned char c) 04286 { 04287 return (vector signed char) 04288 __builtin_altivec_vperm_4si((vector int)a, (vector int)b, c); 04289 } 04290 04291 vector unsigned char __ATTRS_o_ai 04292 vec_perm(vector unsigned char a, 04293 vector unsigned char b, 04294 vector unsigned char c) 04295 { 04296 return (vector unsigned char) 04297 __builtin_altivec_vperm_4si((vector int)a, (vector int)b, c); 04298 } 04299 04300 vector bool char __ATTRS_o_ai 04301 vec_perm(vector bool char a, vector bool char b, vector unsigned char c) 04302 { 04303 return (vector bool char) 04304 __builtin_altivec_vperm_4si((vector int)a, (vector int)b, c); 04305 } 04306 04307 vector short __ATTRS_o_ai 04308 vec_perm(vector short a, vector short b, vector unsigned char c) 04309 { 04310 return (vector short) 04311 __builtin_altivec_vperm_4si((vector int)a, (vector int)b, c); 04312 } 04313 04314 vector unsigned short __ATTRS_o_ai 04315 vec_perm(vector unsigned short a, 04316 vector unsigned short b, 04317 vector unsigned char c) 04318 { 04319 return (vector unsigned short) 04320 __builtin_altivec_vperm_4si((vector int)a, (vector int)b, c); 04321 } 04322 04323 vector bool short __ATTRS_o_ai 04324 vec_perm(vector bool short a, vector bool short b, vector unsigned char c) 04325 { 04326 return (vector bool short) 04327 __builtin_altivec_vperm_4si((vector int)a, (vector int)b, c); 04328 } 04329 04330 vector pixel __ATTRS_o_ai 04331 vec_perm(vector pixel a, vector pixel b, vector unsigned char c) 04332 { 04333 return (vector pixel) 04334 __builtin_altivec_vperm_4si((vector int)a, (vector int)b, c); 04335 } 04336 04337 vector int __ATTRS_o_ai 04338 vec_perm(vector int a, vector int b, vector unsigned char c) 04339 { 04340 return (vector int)__builtin_altivec_vperm_4si(a, b, c); 04341 } 04342 04343 vector unsigned int __ATTRS_o_ai 04344 vec_perm(vector unsigned int a, vector unsigned int b, vector unsigned char c) 04345 { 04346 return (vector unsigned int) 04347 __builtin_altivec_vperm_4si((vector int)a, (vector int)b, c); 04348 } 04349 04350 vector bool int __ATTRS_o_ai 04351 vec_perm(vector bool int a, vector bool int b, vector unsigned char c) 04352 { 04353 return (vector bool int) 04354 __builtin_altivec_vperm_4si((vector int)a, (vector int)b, c); 04355 } 04356 04357 vector float __ATTRS_o_ai 04358 vec_perm(vector float a, vector float b, vector unsigned char c) 04359 { 04360 return (vector float) 04361 __builtin_altivec_vperm_4si((vector int)a, (vector int)b, c); 04362 } 04363 04364 /* vec_vperm */ 04365 04366 vector signed char __ATTRS_o_ai 04367 vec_vperm(vector signed char a, vector signed char b, vector unsigned char c) 04368 { 04369 return (vector signed char) 04370 __builtin_altivec_vperm_4si((vector int)a, (vector int)b, c); 04371 } 04372 04373 vector unsigned char __ATTRS_o_ai 04374 vec_vperm(vector unsigned char a, 04375 vector unsigned char b, 04376 vector unsigned char c) 04377 { 04378 return (vector unsigned char) 04379 __builtin_altivec_vperm_4si((vector int)a, (vector int)b, c); 04380 } 04381 04382 vector bool char __ATTRS_o_ai 04383 vec_vperm(vector bool char a, vector bool char b, vector unsigned char c) 04384 { 04385 return (vector bool char) 04386 __builtin_altivec_vperm_4si((vector int)a, (vector int)b, c); 04387 } 04388 04389 vector short __ATTRS_o_ai 04390 vec_vperm(vector short a, vector short b, vector unsigned char c) 04391 { 04392 return (vector short) 04393 __builtin_altivec_vperm_4si((vector int)a, (vector int)b, c); 04394 } 04395 04396 vector unsigned short __ATTRS_o_ai 04397 vec_vperm(vector unsigned short a, 04398 vector unsigned short b, 04399 vector unsigned char c) 04400 { 04401 return (vector unsigned short) 04402 __builtin_altivec_vperm_4si((vector int)a, (vector int)b, c); 04403 } 04404 04405 vector bool short __ATTRS_o_ai 04406 vec_vperm(vector bool short a, vector bool short b, vector unsigned char c) 04407 { 04408 return (vector bool short) 04409 __builtin_altivec_vperm_4si((vector int)a, (vector int)b, c); 04410 } 04411 04412 vector pixel __ATTRS_o_ai 04413 vec_vperm(vector pixel a, vector pixel b, vector unsigned char c) 04414 { 04415 return (vector pixel) 04416 __builtin_altivec_vperm_4si((vector int)a, (vector int)b, c); 04417 } 04418 04419 vector int __ATTRS_o_ai 04420 vec_vperm(vector int a, vector int b, vector unsigned char c) 04421 { 04422 return (vector int)__builtin_altivec_vperm_4si(a, b, c); 04423 } 04424 04425 vector unsigned int __ATTRS_o_ai 04426 vec_vperm(vector unsigned int a, vector unsigned int b, vector unsigned char c) 04427 { 04428 return (vector unsigned int) 04429 __builtin_altivec_vperm_4si((vector int)a, (vector int)b, c); 04430 } 04431 04432 vector bool int __ATTRS_o_ai 04433 vec_vperm(vector bool int a, vector bool int b, vector unsigned char c) 04434 { 04435 return (vector bool int) 04436 __builtin_altivec_vperm_4si((vector int)a, (vector int)b, c); 04437 } 04438 04439 vector float __ATTRS_o_ai 04440 vec_vperm(vector float a, vector float b, vector unsigned char c) 04441 { 04442 return (vector float) 04443 __builtin_altivec_vperm_4si((vector int)a, (vector int)b, c); 04444 } 04445 04446 /* vec_re */ 04447 04448 vector float __attribute__((__always_inline__)) 04449 vec_re(vector float a) 04450 { 04451 return __builtin_altivec_vrefp(a); 04452 } 04453 04454 /* vec_vrefp */ 04455 04456 vector float __attribute__((__always_inline__)) 04457 vec_vrefp(vector float a) 04458 { 04459 return __builtin_altivec_vrefp(a); 04460 } 04461 04462 /* vec_rl */ 04463 04464 static vector signed char __ATTRS_o_ai 04465 vec_rl(vector signed char a, vector unsigned char b) 04466 { 04467 return (vector signed char)__builtin_altivec_vrlb((vector char)a, b); 04468 } 04469 04470 static vector unsigned char __ATTRS_o_ai 04471 vec_rl(vector unsigned char a, vector unsigned char b) 04472 { 04473 return (vector unsigned char)__builtin_altivec_vrlb((vector char)a, b); 04474 } 04475 04476 static vector short __ATTRS_o_ai 04477 vec_rl(vector short a, vector unsigned short b) 04478 { 04479 return __builtin_altivec_vrlh(a, b); 04480 } 04481 04482 static vector unsigned short __ATTRS_o_ai 04483 vec_rl(vector unsigned short a, vector unsigned short b) 04484 { 04485 return (vector unsigned short)__builtin_altivec_vrlh((vector short)a, b); 04486 } 04487 04488 static vector int __ATTRS_o_ai 04489 vec_rl(vector int a, vector unsigned int b) 04490 { 04491 return __builtin_altivec_vrlw(a, b); 04492 } 04493 04494 static vector unsigned int __ATTRS_o_ai 04495 vec_rl(vector unsigned int a, vector unsigned int b) 04496 { 04497 return (vector unsigned int)__builtin_altivec_vrlw((vector int)a, b); 04498 } 04499 04500 /* vec_vrlb */ 04501 04502 static vector signed char __ATTRS_o_ai 04503 vec_vrlb(vector signed char a, vector unsigned char b) 04504 { 04505 return (vector signed char)__builtin_altivec_vrlb((vector char)a, b); 04506 } 04507 04508 static vector unsigned char __ATTRS_o_ai 04509 vec_vrlb(vector unsigned char a, vector unsigned char b) 04510 { 04511 return (vector unsigned char)__builtin_altivec_vrlb((vector char)a, b); 04512 } 04513 04514 /* vec_vrlh */ 04515 04516 static vector short __ATTRS_o_ai 04517 vec_vrlh(vector short a, vector unsigned short b) 04518 { 04519 return __builtin_altivec_vrlh(a, b); 04520 } 04521 04522 static vector unsigned short __ATTRS_o_ai 04523 vec_vrlh(vector unsigned short a, vector unsigned short b) 04524 { 04525 return (vector unsigned short)__builtin_altivec_vrlh((vector short)a, b); 04526 } 04527 04528 /* vec_vrlw */ 04529 04530 static vector int __ATTRS_o_ai 04531 vec_vrlw(vector int a, vector unsigned int b) 04532 { 04533 return __builtin_altivec_vrlw(a, b); 04534 } 04535 04536 static vector unsigned int __ATTRS_o_ai 04537 vec_vrlw(vector unsigned int a, vector unsigned int b) 04538 { 04539 return (vector unsigned int)__builtin_altivec_vrlw((vector int)a, b); 04540 } 04541 04542 /* vec_round */ 04543 04544 static vector float __attribute__((__always_inline__)) 04545 vec_round(vector float a) 04546 { 04547 return __builtin_altivec_vrfin(a); 04548 } 04549 04550 /* vec_vrfin */ 04551 04552 static vector float __attribute__((__always_inline__)) 04553 vec_vrfin(vector float a) 04554 { 04555 return __builtin_altivec_vrfin(a); 04556 } 04557 04558 /* vec_rsqrte */ 04559 04560 static __vector float __attribute__((__always_inline__)) 04561 vec_rsqrte(vector float a) 04562 { 04563 return __builtin_altivec_vrsqrtefp(a); 04564 } 04565 04566 /* vec_vrsqrtefp */ 04567 04568 static __vector float __attribute__((__always_inline__)) 04569 vec_vrsqrtefp(vector float a) 04570 { 04571 return __builtin_altivec_vrsqrtefp(a); 04572 } 04573 04574 /* vec_sel */ 04575 04576 #define __builtin_altivec_vsel_4si vec_sel 04577 04578 static vector signed char __ATTRS_o_ai 04579 vec_sel(vector signed char a, vector signed char b, vector unsigned char c) 04580 { 04581 return (a & ~(vector signed char)c) | (b & (vector signed char)c); 04582 } 04583 04584 static vector signed char __ATTRS_o_ai 04585 vec_sel(vector signed char a, vector signed char b, vector bool char c) 04586 { 04587 return (a & ~(vector signed char)c) | (b & (vector signed char)c); 04588 } 04589 04590 static vector unsigned char __ATTRS_o_ai 04591 vec_sel(vector unsigned char a, vector unsigned char b, vector unsigned char c) 04592 { 04593 return (a & ~c) | (b & c); 04594 } 04595 04596 static vector unsigned char __ATTRS_o_ai 04597 vec_sel(vector unsigned char a, vector unsigned char b, vector bool char c) 04598 { 04599 return (a & ~(vector unsigned char)c) | (b & (vector unsigned char)c); 04600 } 04601 04602 static vector bool char __ATTRS_o_ai 04603 vec_sel(vector bool char a, vector bool char b, vector unsigned char c) 04604 { 04605 return (a & ~(vector bool char)c) | (b & (vector bool char)c); 04606 } 04607 04608 static vector bool char __ATTRS_o_ai 04609 vec_sel(vector bool char a, vector bool char b, vector bool char c) 04610 { 04611 return (a & ~c) | (b & c); 04612 } 04613 04614 static vector short __ATTRS_o_ai 04615 vec_sel(vector short a, vector short b, vector unsigned short c) 04616 { 04617 return (a & ~(vector short)c) | (b & (vector short)c); 04618 } 04619 04620 static vector short __ATTRS_o_ai 04621 vec_sel(vector short a, vector short b, vector bool short c) 04622 { 04623 return (a & ~(vector short)c) | (b & (vector short)c); 04624 } 04625 04626 static vector unsigned short __ATTRS_o_ai 04627 vec_sel(vector unsigned short a, 04628 vector unsigned short b, 04629 vector unsigned short c) 04630 { 04631 return (a & ~c) | (b & c); 04632 } 04633 04634 static vector unsigned short __ATTRS_o_ai 04635 vec_sel(vector unsigned short a, vector unsigned short b, vector bool short c) 04636 { 04637 return (a & ~(vector unsigned short)c) | (b & (vector unsigned short)c); 04638 } 04639 04640 static vector bool short __ATTRS_o_ai 04641 vec_sel(vector bool short a, vector bool short b, vector unsigned short c) 04642 { 04643 return (a & ~(vector bool short)c) | (b & (vector bool short)c); 04644 } 04645 04646 static vector bool short __ATTRS_o_ai 04647 vec_sel(vector bool short a, vector bool short b, vector bool short c) 04648 { 04649 return (a & ~c) | (b & c); 04650 } 04651 04652 static vector int __ATTRS_o_ai 04653 vec_sel(vector int a, vector int b, vector unsigned int c) 04654 { 04655 return (a & ~(vector int)c) | (b & (vector int)c); 04656 } 04657 04658 static vector int __ATTRS_o_ai 04659 vec_sel(vector int a, vector int b, vector bool int c) 04660 { 04661 return (a & ~(vector int)c) | (b & (vector int)c); 04662 } 04663 04664 static vector unsigned int __ATTRS_o_ai 04665 vec_sel(vector unsigned int a, vector unsigned int b, vector unsigned int c) 04666 { 04667 return (a & ~c) | (b & c); 04668 } 04669 04670 static vector unsigned int __ATTRS_o_ai 04671 vec_sel(vector unsigned int a, vector unsigned int b, vector bool int c) 04672 { 04673 return (a & ~(vector unsigned int)c) | (b & (vector unsigned int)c); 04674 } 04675 04676 static vector bool int __ATTRS_o_ai 04677 vec_sel(vector bool int a, vector bool int b, vector unsigned int c) 04678 { 04679 return (a & ~(vector bool int)c) | (b & (vector bool int)c); 04680 } 04681 04682 static vector bool int __ATTRS_o_ai 04683 vec_sel(vector bool int a, vector bool int b, vector bool int c) 04684 { 04685 return (a & ~c) | (b & c); 04686 } 04687 04688 static vector float __ATTRS_o_ai 04689 vec_sel(vector float a, vector float b, vector unsigned int c) 04690 { 04691 vector int res = ((vector int)a & ~(vector int)c) 04692 | ((vector int)b & (vector int)c); 04693 return (vector float)res; 04694 } 04695 04696 static vector float __ATTRS_o_ai 04697 vec_sel(vector float a, vector float b, vector bool int c) 04698 { 04699 vector int res = ((vector int)a & ~(vector int)c) 04700 | ((vector int)b & (vector int)c); 04701 return (vector float)res; 04702 } 04703 04704 /* vec_vsel */ 04705 04706 static vector signed char __ATTRS_o_ai 04707 vec_vsel(vector signed char a, vector signed char b, vector unsigned char c) 04708 { 04709 return (a & ~(vector signed char)c) | (b & (vector signed char)c); 04710 } 04711 04712 static vector signed char __ATTRS_o_ai 04713 vec_vsel(vector signed char a, vector signed char b, vector bool char c) 04714 { 04715 return (a & ~(vector signed char)c) | (b & (vector signed char)c); 04716 } 04717 04718 static vector unsigned char __ATTRS_o_ai 04719 vec_vsel(vector unsigned char a, vector unsigned char b, vector unsigned char c) 04720 { 04721 return (a & ~c) | (b & c); 04722 } 04723 04724 static vector unsigned char __ATTRS_o_ai 04725 vec_vsel(vector unsigned char a, vector unsigned char b, vector bool char c) 04726 { 04727 return (a & ~(vector unsigned char)c) | (b & (vector unsigned char)c); 04728 } 04729 04730 static vector bool char __ATTRS_o_ai 04731 vec_vsel(vector bool char a, vector bool char b, vector unsigned char c) 04732 { 04733 return (a & ~(vector bool char)c) | (b & (vector bool char)c); 04734 } 04735 04736 static vector bool char __ATTRS_o_ai 04737 vec_vsel(vector bool char a, vector bool char b, vector bool char c) 04738 { 04739 return (a & ~c) | (b & c); 04740 } 04741 04742 static vector short __ATTRS_o_ai 04743 vec_vsel(vector short a, vector short b, vector unsigned short c) 04744 { 04745 return (a & ~(vector short)c) | (b & (vector short)c); 04746 } 04747 04748 static vector short __ATTRS_o_ai 04749 vec_vsel(vector short a, vector short b, vector bool short c) 04750 { 04751 return (a & ~(vector short)c) | (b & (vector short)c); 04752 } 04753 04754 static vector unsigned short __ATTRS_o_ai 04755 vec_vsel(vector unsigned short a, 04756 vector unsigned short b, 04757 vector unsigned short c) 04758 { 04759 return (a & ~c) | (b & c); 04760 } 04761 04762 static vector unsigned short __ATTRS_o_ai 04763 vec_vsel(vector unsigned short a, vector unsigned short b, vector bool short c) 04764 { 04765 return (a & ~(vector unsigned short)c) | (b & (vector unsigned short)c); 04766 } 04767 04768 static vector bool short __ATTRS_o_ai 04769 vec_vsel(vector bool short a, vector bool short b, vector unsigned short c) 04770 { 04771 return (a & ~(vector bool short)c) | (b & (vector bool short)c); 04772 } 04773 04774 static vector bool short __ATTRS_o_ai 04775 vec_vsel(vector bool short a, vector bool short b, vector bool short c) 04776 { 04777 return (a & ~c) | (b & c); 04778 } 04779 04780 static vector int __ATTRS_o_ai 04781 vec_vsel(vector int a, vector int b, vector unsigned int c) 04782 { 04783 return (a & ~(vector int)c) | (b & (vector int)c); 04784 } 04785 04786 static vector int __ATTRS_o_ai 04787 vec_vsel(vector int a, vector int b, vector bool int c) 04788 { 04789 return (a & ~(vector int)c) | (b & (vector int)c); 04790 } 04791 04792 static vector unsigned int __ATTRS_o_ai 04793 vec_vsel(vector unsigned int a, vector unsigned int b, vector unsigned int c) 04794 { 04795 return (a & ~c) | (b & c); 04796 } 04797 04798 static vector unsigned int __ATTRS_o_ai 04799 vec_vsel(vector unsigned int a, vector unsigned int b, vector bool int c) 04800 { 04801 return (a & ~(vector unsigned int)c) | (b & (vector unsigned int)c); 04802 } 04803 04804 static vector bool int __ATTRS_o_ai 04805 vec_vsel(vector bool int a, vector bool int b, vector unsigned int c) 04806 { 04807 return (a & ~(vector bool int)c) | (b & (vector bool int)c); 04808 } 04809 04810 static vector bool int __ATTRS_o_ai 04811 vec_vsel(vector bool int a, vector bool int b, vector bool int c) 04812 { 04813 return (a & ~c) | (b & c); 04814 } 04815 04816 static vector float __ATTRS_o_ai 04817 vec_vsel(vector float a, vector float b, vector unsigned int c) 04818 { 04819 vector int res = ((vector int)a & ~(vector int)c) 04820 | ((vector int)b & (vector int)c); 04821 return (vector float)res; 04822 } 04823 04824 static vector float __ATTRS_o_ai 04825 vec_vsel(vector float a, vector float b, vector bool int c) 04826 { 04827 vector int res = ((vector int)a & ~(vector int)c) 04828 | ((vector int)b & (vector int)c); 04829 return (vector float)res; 04830 } 04831 04832 /* vec_sl */ 04833 04834 static vector signed char __ATTRS_o_ai 04835 vec_sl(vector signed char a, vector unsigned char b) 04836 { 04837 return a << (vector signed char)b; 04838 } 04839 04840 static vector unsigned char __ATTRS_o_ai 04841 vec_sl(vector unsigned char a, vector unsigned char b) 04842 { 04843 return a << b; 04844 } 04845 04846 static vector short __ATTRS_o_ai 04847 vec_sl(vector short a, vector unsigned short b) 04848 { 04849 return a << (vector short)b; 04850 } 04851 04852 static vector unsigned short __ATTRS_o_ai 04853 vec_sl(vector unsigned short a, vector unsigned short b) 04854 { 04855 return a << b; 04856 } 04857 04858 static vector int __ATTRS_o_ai 04859 vec_sl(vector int a, vector unsigned int b) 04860 { 04861 return a << (vector int)b; 04862 } 04863 04864 static vector unsigned int __ATTRS_o_ai 04865 vec_sl(vector unsigned int a, vector unsigned int b) 04866 { 04867 return a << b; 04868 } 04869 04870 /* vec_vslb */ 04871 04872 #define __builtin_altivec_vslb vec_vslb 04873 04874 static vector signed char __ATTRS_o_ai 04875 vec_vslb(vector signed char a, vector unsigned char b) 04876 { 04877 return vec_sl(a, b); 04878 } 04879 04880 static vector unsigned char __ATTRS_o_ai 04881 vec_vslb(vector unsigned char a, vector unsigned char b) 04882 { 04883 return vec_sl(a, b); 04884 } 04885 04886 /* vec_vslh */ 04887 04888 #define __builtin_altivec_vslh vec_vslh 04889 04890 static vector short __ATTRS_o_ai 04891 vec_vslh(vector short a, vector unsigned short b) 04892 { 04893 return vec_sl(a, b); 04894 } 04895 04896 static vector unsigned short __ATTRS_o_ai 04897 vec_vslh(vector unsigned short a, vector unsigned short b) 04898 { 04899 return vec_sl(a, b); 04900 } 04901 04902 /* vec_vslw */ 04903 04904 #define __builtin_altivec_vslw vec_vslw 04905 04906 static vector int __ATTRS_o_ai 04907 vec_vslw(vector int a, vector unsigned int b) 04908 { 04909 return vec_sl(a, b); 04910 } 04911 04912 static vector unsigned int __ATTRS_o_ai 04913 vec_vslw(vector unsigned int a, vector unsigned int b) 04914 { 04915 return vec_sl(a, b); 04916 } 04917 04918 /* vec_sld */ 04919 04920 #define __builtin_altivec_vsldoi_4si vec_sld 04921 04922 static vector signed char __ATTRS_o_ai 04923 vec_sld(vector signed char a, vector signed char b, unsigned char c) 04924 { 04925 return vec_perm(a, b, (vector unsigned char) 04926 (c, c+1, c+2, c+3, c+4, c+5, c+6, c+7, 04927 c+8, c+9, c+10, c+11, c+12, c+13, c+14, c+15)); 04928 } 04929 04930 static vector unsigned char __ATTRS_o_ai 04931 vec_sld(vector unsigned char a, vector unsigned char b, unsigned char c) 04932 { 04933 return vec_perm(a, b, (vector unsigned char) 04934 (c, c+1, c+2, c+3, c+4, c+5, c+6, c+7, 04935 c+8, c+9, c+10, c+11, c+12, c+13, c+14, c+15)); 04936 } 04937 04938 static vector short __ATTRS_o_ai 04939 vec_sld(vector short a, vector short b, unsigned char c) 04940 { 04941 return vec_perm(a, b, (vector unsigned char) 04942 (c, c+1, c+2, c+3, c+4, c+5, c+6, c+7, 04943 c+8, c+9, c+10, c+11, c+12, c+13, c+14, c+15)); 04944 } 04945 04946 static vector unsigned short __ATTRS_o_ai 04947 vec_sld(vector unsigned short a, vector unsigned short b, unsigned char c) 04948 { 04949 return vec_perm(a, b, (vector unsigned char) 04950 (c, c+1, c+2, c+3, c+4, c+5, c+6, c+7, 04951 c+8, c+9, c+10, c+11, c+12, c+13, c+14, c+15)); 04952 } 04953 04954 static vector pixel __ATTRS_o_ai 04955 vec_sld(vector pixel a, vector pixel b, unsigned char c) 04956 { 04957 return vec_perm(a, b, (vector unsigned char) 04958 (c, c+1, c+2, c+3, c+4, c+5, c+6, c+7, 04959 c+8, c+9, c+10, c+11, c+12, c+13, c+14, c+15)); 04960 } 04961 04962 static vector int __ATTRS_o_ai 04963 vec_sld(vector int a, vector int b, unsigned char c) 04964 { 04965 return vec_perm(a, b, (vector unsigned char) 04966 (c, c+1, c+2, c+3, c+4, c+5, c+6, c+7, 04967 c+8, c+9, c+10, c+11, c+12, c+13, c+14, c+15)); 04968 } 04969 04970 static vector unsigned int __ATTRS_o_ai 04971 vec_sld(vector unsigned int a, vector unsigned int b, unsigned char c) 04972 { 04973 return vec_perm(a, b, (vector unsigned char) 04974 (c, c+1, c+2, c+3, c+4, c+5, c+6, c+7, 04975 c+8, c+9, c+10, c+11, c+12, c+13, c+14, c+15)); 04976 } 04977 04978 static vector float __ATTRS_o_ai 04979 vec_sld(vector float a, vector float b, unsigned char c) 04980 { 04981 return vec_perm(a, b, (vector unsigned char) 04982 (c, c+1, c+2, c+3, c+4, c+5, c+6, c+7, 04983 c+8, c+9, c+10, c+11, c+12, c+13, c+14, c+15)); 04984 } 04985 04986 /* vec_vsldoi */ 04987 04988 static vector signed char __ATTRS_o_ai 04989 vec_vsldoi(vector signed char a, vector signed char b, unsigned char c) 04990 { 04991 return vec_perm(a, b, (vector unsigned char) 04992 (c, c+1, c+2, c+3, c+4, c+5, c+6, c+7, 04993 c+8, c+9, c+10, c+11, c+12, c+13, c+14, c+15)); 04994 } 04995 04996 static vector unsigned char __ATTRS_o_ai 04997 vec_vsldoi(vector unsigned char a, vector unsigned char b, unsigned char c) 04998 { 04999 return vec_perm(a, b, (vector unsigned char) 05000 (c, c+1, c+2, c+3, c+4, c+5, c+6, c+7, 05001 c+8, c+9, c+10, c+11, c+12, c+13, c+14, c+15)); 05002 } 05003 05004 static vector short __ATTRS_o_ai 05005 vec_vsldoi(vector short a, vector short b, unsigned char c) 05006 { 05007 return vec_perm(a, b, (vector unsigned char) 05008 (c, c+1, c+2, c+3, c+4, c+5, c+6, c+7, 05009 c+8, c+9, c+10, c+11, c+12, c+13, c+14, c+15)); 05010 } 05011 05012 static vector unsigned short __ATTRS_o_ai 05013 vec_vsldoi(vector unsigned short a, vector unsigned short b, unsigned char c) 05014 { 05015 return vec_perm(a, b, (vector unsigned char) 05016 (c, c+1, c+2, c+3, c+4, c+5, c+6, c+7, 05017 c+8, c+9, c+10, c+11, c+12, c+13, c+14, c+15)); 05018 } 05019 05020 static vector pixel __ATTRS_o_ai 05021 vec_vsldoi(vector pixel a, vector pixel b, unsigned char c) 05022 { 05023 return vec_perm(a, b, (vector unsigned char) 05024 (c, c+1, c+2, c+3, c+4, c+5, c+6, c+7, 05025 c+8, c+9, c+10, c+11, c+12, c+13, c+14, c+15)); 05026 } 05027 05028 static vector int __ATTRS_o_ai 05029 vec_vsldoi(vector int a, vector int b, unsigned char c) 05030 { 05031 return vec_perm(a, b, (vector unsigned char) 05032 (c, c+1, c+2, c+3, c+4, c+5, c+6, c+7, 05033 c+8, c+9, c+10, c+11, c+12, c+13, c+14, c+15)); 05034 } 05035 05036 static vector unsigned int __ATTRS_o_ai 05037 vec_vsldoi(vector unsigned int a, vector unsigned int b, unsigned char c) 05038 { 05039 return vec_perm(a, b, (vector unsigned char) 05040 (c, c+1, c+2, c+3, c+4, c+5, c+6, c+7, 05041 c+8, c+9, c+10, c+11, c+12, c+13, c+14, c+15)); 05042 } 05043 05044 static vector float __ATTRS_o_ai 05045 vec_vsldoi(vector float a, vector float b, unsigned char c) 05046 { 05047 return vec_perm(a, b, (vector unsigned char) 05048 (c, c+1, c+2, c+3, c+4, c+5, c+6, c+7, 05049 c+8, c+9, c+10, c+11, c+12, c+13, c+14, c+15)); 05050 } 05051 05052 /* vec_sll */ 05053 05054 static vector signed char __ATTRS_o_ai 05055 vec_sll(vector signed char a, vector unsigned char b) 05056 { 05057 return (vector signed char) 05058 __builtin_altivec_vsl((vector int)a, (vector int)b); 05059 } 05060 05061 static vector signed char __ATTRS_o_ai 05062 vec_sll(vector signed char a, vector unsigned short b) 05063 { 05064 return (vector signed char) 05065 __builtin_altivec_vsl((vector int)a, (vector int)b); 05066 } 05067 05068 static vector signed char __ATTRS_o_ai 05069 vec_sll(vector signed char a, vector unsigned int b) 05070 { 05071 return (vector signed char) 05072 __builtin_altivec_vsl((vector int)a, (vector int)b); 05073 } 05074 05075 static vector unsigned char __ATTRS_o_ai 05076 vec_sll(vector unsigned char a, vector unsigned char b) 05077 { 05078 return (vector unsigned char) 05079 __builtin_altivec_vsl((vector int)a, (vector int)b); 05080 } 05081 05082 static vector unsigned char __ATTRS_o_ai 05083 vec_sll(vector unsigned char a, vector unsigned short b) 05084 { 05085 return (vector unsigned char) 05086 __builtin_altivec_vsl((vector int)a, (vector int)b); 05087 } 05088 05089 static vector unsigned char __ATTRS_o_ai 05090 vec_sll(vector unsigned char a, vector unsigned int b) 05091 { 05092 return (vector unsigned char) 05093 __builtin_altivec_vsl((vector int)a, (vector int)b); 05094 } 05095 05096 static vector bool char __ATTRS_o_ai 05097 vec_sll(vector bool char a, vector unsigned char b) 05098 { 05099 return (vector bool char)__builtin_altivec_vsl((vector int)a, (vector int)b); 05100 } 05101 05102 static vector bool char __ATTRS_o_ai 05103 vec_sll(vector bool char a, vector unsigned short b) 05104 { 05105 return (vector bool char)__builtin_altivec_vsl((vector int)a, (vector int)b); 05106 } 05107 05108 static vector bool char __ATTRS_o_ai 05109 vec_sll(vector bool char a, vector unsigned int b) 05110 { 05111 return (vector bool char)__builtin_altivec_vsl((vector int)a, (vector int)b); 05112 } 05113 05114 static vector short __ATTRS_o_ai 05115 vec_sll(vector short a, vector unsigned char b) 05116 { 05117 return (vector short)__builtin_altivec_vsl((vector int)a, (vector int)b); 05118 } 05119 05120 static vector short __ATTRS_o_ai 05121 vec_sll(vector short a, vector unsigned short b) 05122 { 05123 return (vector short)__builtin_altivec_vsl((vector int)a, (vector int)b); 05124 } 05125 05126 static vector short __ATTRS_o_ai 05127 vec_sll(vector short a, vector unsigned int b) 05128 { 05129 return (vector short)__builtin_altivec_vsl((vector int)a, (vector int)b); 05130 } 05131 05132 static vector unsigned short __ATTRS_o_ai 05133 vec_sll(vector unsigned short a, vector unsigned char b) 05134 { 05135 return (vector unsigned short) 05136 __builtin_altivec_vsl((vector int)a, (vector int)b); 05137 } 05138 05139 static vector unsigned short __ATTRS_o_ai 05140 vec_sll(vector unsigned short a, vector unsigned short b) 05141 { 05142 return (vector unsigned short) 05143 __builtin_altivec_vsl((vector int)a, (vector int)b); 05144 } 05145 05146 static vector unsigned short __ATTRS_o_ai 05147 vec_sll(vector unsigned short a, vector unsigned int b) 05148 { 05149 return (vector unsigned short) 05150 __builtin_altivec_vsl((vector int)a, (vector int)b); 05151 } 05152 05153 static vector bool short __ATTRS_o_ai 05154 vec_sll(vector bool short a, vector unsigned char b) 05155 { 05156 return (vector bool short)__builtin_altivec_vsl((vector int)a, (vector int)b); 05157 } 05158 05159 static vector bool short __ATTRS_o_ai 05160 vec_sll(vector bool short a, vector unsigned short b) 05161 { 05162 return (vector bool short)__builtin_altivec_vsl((vector int)a, (vector int)b); 05163 } 05164 05165 static vector bool short __ATTRS_o_ai 05166 vec_sll(vector bool short a, vector unsigned int b) 05167 { 05168 return (vector bool short)__builtin_altivec_vsl((vector int)a, (vector int)b); 05169 } 05170 05171 static vector pixel __ATTRS_o_ai 05172 vec_sll(vector pixel a, vector unsigned char b) 05173 { 05174 return (vector pixel)__builtin_altivec_vsl((vector int)a, (vector int)b); 05175 } 05176 05177 static vector pixel __ATTRS_o_ai 05178 vec_sll(vector pixel a, vector unsigned short b) 05179 { 05180 return (vector pixel)__builtin_altivec_vsl((vector int)a, (vector int)b); 05181 } 05182 05183 static vector pixel __ATTRS_o_ai 05184 vec_sll(vector pixel a, vector unsigned int b) 05185 { 05186 return (vector pixel)__builtin_altivec_vsl((vector int)a, (vector int)b); 05187 } 05188 05189 static vector int __ATTRS_o_ai 05190 vec_sll(vector int a, vector unsigned char b) 05191 { 05192 return (vector int)__builtin_altivec_vsl(a, (vector int)b); 05193 } 05194 05195 static vector int __ATTRS_o_ai 05196 vec_sll(vector int a, vector unsigned short b) 05197 { 05198 return (vector int)__builtin_altivec_vsl(a, (vector int)b); 05199 } 05200 05201 static vector int __ATTRS_o_ai 05202 vec_sll(vector int a, vector unsigned int b) 05203 { 05204 return (vector int)__builtin_altivec_vsl(a, (vector int)b); 05205 } 05206 05207 static vector unsigned int __ATTRS_o_ai 05208 vec_sll(vector unsigned int a, vector unsigned char b) 05209 { 05210 return (vector unsigned int) 05211 __builtin_altivec_vsl((vector int)a, (vector int)b); 05212 } 05213 05214 static vector unsigned int __ATTRS_o_ai 05215 vec_sll(vector unsigned int a, vector unsigned short b) 05216 { 05217 return (vector unsigned int) 05218 __builtin_altivec_vsl((vector int)a, (vector int)b); 05219 } 05220 05221 static vector unsigned int __ATTRS_o_ai 05222 vec_sll(vector unsigned int a, vector unsigned int b) 05223 { 05224 return (vector unsigned int) 05225 __builtin_altivec_vsl((vector int)a, (vector int)b); 05226 } 05227 05228 static vector bool int __ATTRS_o_ai 05229 vec_sll(vector bool int a, vector unsigned char b) 05230 { 05231 return (vector bool int)__builtin_altivec_vsl((vector int)a, (vector int)b); 05232 } 05233 05234 static vector bool int __ATTRS_o_ai 05235 vec_sll(vector bool int a, vector unsigned short b) 05236 { 05237 return (vector bool int)__builtin_altivec_vsl((vector int)a, (vector int)b); 05238 } 05239 05240 static vector bool int __ATTRS_o_ai 05241 vec_sll(vector bool int a, vector unsigned int b) 05242 { 05243 return (vector bool int)__builtin_altivec_vsl((vector int)a, (vector int)b); 05244 } 05245 05246 /* vec_vsl */ 05247 05248 static vector signed char __ATTRS_o_ai 05249 vec_vsl(vector signed char a, vector unsigned char b) 05250 { 05251 return (vector signed char) 05252 __builtin_altivec_vsl((vector int)a, (vector int)b); 05253 } 05254 05255 static vector signed char __ATTRS_o_ai 05256 vec_vsl(vector signed char a, vector unsigned short b) 05257 { 05258 return (vector signed char) 05259 __builtin_altivec_vsl((vector int)a, (vector int)b); 05260 } 05261 05262 static vector signed char __ATTRS_o_ai 05263 vec_vsl(vector signed char a, vector unsigned int b) 05264 { 05265 return (vector signed char) 05266 __builtin_altivec_vsl((vector int)a, (vector int)b); 05267 } 05268 05269 static vector unsigned char __ATTRS_o_ai 05270 vec_vsl(vector unsigned char a, vector unsigned char b) 05271 { 05272 return (vector unsigned char) 05273 __builtin_altivec_vsl((vector int)a, (vector int)b); 05274 } 05275 05276 static vector unsigned char __ATTRS_o_ai 05277 vec_vsl(vector unsigned char a, vector unsigned short b) 05278 { 05279 return (vector unsigned char) 05280 __builtin_altivec_vsl((vector int)a, (vector int)b); 05281 } 05282 05283 static vector unsigned char __ATTRS_o_ai 05284 vec_vsl(vector unsigned char a, vector unsigned int b) 05285 { 05286 return (vector unsigned char) 05287 __builtin_altivec_vsl((vector int)a, (vector int)b); 05288 } 05289 05290 static vector bool char __ATTRS_o_ai 05291 vec_vsl(vector bool char a, vector unsigned char b) 05292 { 05293 return (vector bool char)__builtin_altivec_vsl((vector int)a, (vector int)b); 05294 } 05295 05296 static vector bool char __ATTRS_o_ai 05297 vec_vsl(vector bool char a, vector unsigned short b) 05298 { 05299 return (vector bool char)__builtin_altivec_vsl((vector int)a, (vector int)b); 05300 } 05301 05302 static vector bool char __ATTRS_o_ai 05303 vec_vsl(vector bool char a, vector unsigned int b) 05304 { 05305 return (vector bool char)__builtin_altivec_vsl((vector int)a, (vector int)b); 05306 } 05307 05308 static vector short __ATTRS_o_ai 05309 vec_vsl(vector short a, vector unsigned char b) 05310 { 05311 return (vector short)__builtin_altivec_vsl((vector int)a, (vector int)b); 05312 } 05313 05314 static vector short __ATTRS_o_ai 05315 vec_vsl(vector short a, vector unsigned short b) 05316 { 05317 return (vector short)__builtin_altivec_vsl((vector int)a, (vector int)b); 05318 } 05319 05320 static vector short __ATTRS_o_ai 05321 vec_vsl(vector short a, vector unsigned int b) 05322 { 05323 return (vector short)__builtin_altivec_vsl((vector int)a, (vector int)b); 05324 } 05325 05326 static vector unsigned short __ATTRS_o_ai 05327 vec_vsl(vector unsigned short a, vector unsigned char b) 05328 { 05329 return (vector unsigned short) 05330 __builtin_altivec_vsl((vector int)a, (vector int)b); 05331 } 05332 05333 static vector unsigned short __ATTRS_o_ai 05334 vec_vsl(vector unsigned short a, vector unsigned short b) 05335 { 05336 return (vector unsigned short) 05337 __builtin_altivec_vsl((vector int)a, (vector int)b); 05338 } 05339 05340 static vector unsigned short __ATTRS_o_ai 05341 vec_vsl(vector unsigned short a, vector unsigned int b) 05342 { 05343 return (vector unsigned short) 05344 __builtin_altivec_vsl((vector int)a, (vector int)b); 05345 } 05346 05347 static vector bool short __ATTRS_o_ai 05348 vec_vsl(vector bool short a, vector unsigned char b) 05349 { 05350 return (vector bool short)__builtin_altivec_vsl((vector int)a, (vector int)b); 05351 } 05352 05353 static vector bool short __ATTRS_o_ai 05354 vec_vsl(vector bool short a, vector unsigned short b) 05355 { 05356 return (vector bool short)__builtin_altivec_vsl((vector int)a, (vector int)b); 05357 } 05358 05359 static vector bool short __ATTRS_o_ai 05360 vec_vsl(vector bool short a, vector unsigned int b) 05361 { 05362 return (vector bool short)__builtin_altivec_vsl((vector int)a, (vector int)b); 05363 } 05364 05365 static vector pixel __ATTRS_o_ai 05366 vec_vsl(vector pixel a, vector unsigned char b) 05367 { 05368 return (vector pixel)__builtin_altivec_vsl((vector int)a, (vector int)b); 05369 } 05370 05371 static vector pixel __ATTRS_o_ai 05372 vec_vsl(vector pixel a, vector unsigned short b) 05373 { 05374 return (vector pixel)__builtin_altivec_vsl((vector int)a, (vector int)b); 05375 } 05376 05377 static vector pixel __ATTRS_o_ai 05378 vec_vsl(vector pixel a, vector unsigned int b) 05379 { 05380 return (vector pixel)__builtin_altivec_vsl((vector int)a, (vector int)b); 05381 } 05382 05383 static vector int __ATTRS_o_ai 05384 vec_vsl(vector int a, vector unsigned char b) 05385 { 05386 return (vector int)__builtin_altivec_vsl(a, (vector int)b); 05387 } 05388 05389 static vector int __ATTRS_o_ai 05390 vec_vsl(vector int a, vector unsigned short b) 05391 { 05392 return (vector int)__builtin_altivec_vsl(a, (vector int)b); 05393 } 05394 05395 static vector int __ATTRS_o_ai 05396 vec_vsl(vector int a, vector unsigned int b) 05397 { 05398 return (vector int)__builtin_altivec_vsl(a, (vector int)b); 05399 } 05400 05401 static vector unsigned int __ATTRS_o_ai 05402 vec_vsl(vector unsigned int a, vector unsigned char b) 05403 { 05404 return (vector unsigned int) 05405 __builtin_altivec_vsl((vector int)a, (vector int)b); 05406 } 05407 05408 static vector unsigned int __ATTRS_o_ai 05409 vec_vsl(vector unsigned int a, vector unsigned short b) 05410 { 05411 return (vector unsigned int) 05412 __builtin_altivec_vsl((vector int)a, (vector int)b); 05413 } 05414 05415 static vector unsigned int __ATTRS_o_ai 05416 vec_vsl(vector unsigned int a, vector unsigned int b) 05417 { 05418 return (vector unsigned int) 05419 __builtin_altivec_vsl((vector int)a, (vector int)b); 05420 } 05421 05422 static vector bool int __ATTRS_o_ai 05423 vec_vsl(vector bool int a, vector unsigned char b) 05424 { 05425 return (vector bool int)__builtin_altivec_vsl((vector int)a, (vector int)b); 05426 } 05427 05428 static vector bool int __ATTRS_o_ai 05429 vec_vsl(vector bool int a, vector unsigned short b) 05430 { 05431 return (vector bool int)__builtin_altivec_vsl((vector int)a, (vector int)b); 05432 } 05433 05434 static vector bool int __ATTRS_o_ai 05435 vec_vsl(vector bool int a, vector unsigned int b) 05436 { 05437 return (vector bool int)__builtin_altivec_vsl((vector int)a, (vector int)b); 05438 } 05439 05440 /* vec_slo */ 05441 05442 static vector signed char __ATTRS_o_ai 05443 vec_slo(vector signed char a, vector signed char b) 05444 { 05445 return (vector signed char) 05446 __builtin_altivec_vslo((vector int)a, (vector int)b); 05447 } 05448 05449 static vector signed char __ATTRS_o_ai 05450 vec_slo(vector signed char a, vector unsigned char b) 05451 { 05452 return (vector signed char) 05453 __builtin_altivec_vslo((vector int)a, (vector int)b); 05454 } 05455 05456 static vector unsigned char __ATTRS_o_ai 05457 vec_slo(vector unsigned char a, vector signed char b) 05458 { 05459 return (vector unsigned char) 05460 __builtin_altivec_vslo((vector int)a, (vector int)b); 05461 } 05462 05463 static vector unsigned char __ATTRS_o_ai 05464 vec_slo(vector unsigned char a, vector unsigned char b) 05465 { 05466 return (vector unsigned char) 05467 __builtin_altivec_vslo((vector int)a, (vector int)b); 05468 } 05469 05470 static vector short __ATTRS_o_ai 05471 vec_slo(vector short a, vector signed char b) 05472 { 05473 return (vector short)__builtin_altivec_vslo((vector int)a, (vector int)b); 05474 } 05475 05476 static vector short __ATTRS_o_ai 05477 vec_slo(vector short a, vector unsigned char b) 05478 { 05479 return (vector short)__builtin_altivec_vslo((vector int)a, (vector int)b); 05480 } 05481 05482 static vector unsigned short __ATTRS_o_ai 05483 vec_slo(vector unsigned short a, vector signed char b) 05484 { 05485 return (vector unsigned short) 05486 __builtin_altivec_vslo((vector int)a, (vector int)b); 05487 } 05488 05489 static vector unsigned short __ATTRS_o_ai 05490 vec_slo(vector unsigned short a, vector unsigned char b) 05491 { 05492 return (vector unsigned short) 05493 __builtin_altivec_vslo((vector int)a, (vector int)b); 05494 } 05495 05496 static vector pixel __ATTRS_o_ai 05497 vec_slo(vector pixel a, vector signed char b) 05498 { 05499 return (vector pixel)__builtin_altivec_vslo((vector int)a, (vector int)b); 05500 } 05501 05502 static vector pixel __ATTRS_o_ai 05503 vec_slo(vector pixel a, vector unsigned char b) 05504 { 05505 return (vector pixel)__builtin_altivec_vslo((vector int)a, (vector int)b); 05506 } 05507 05508 static vector int __ATTRS_o_ai 05509 vec_slo(vector int a, vector signed char b) 05510 { 05511 return (vector int)__builtin_altivec_vslo(a, (vector int)b); 05512 } 05513 05514 static vector int __ATTRS_o_ai 05515 vec_slo(vector int a, vector unsigned char b) 05516 { 05517 return (vector int)__builtin_altivec_vslo(a, (vector int)b); 05518 } 05519 05520 static vector unsigned int __ATTRS_o_ai 05521 vec_slo(vector unsigned int a, vector signed char b) 05522 { 05523 return (vector unsigned int) 05524 __builtin_altivec_vslo((vector int)a, (vector int)b); 05525 } 05526 05527 static vector unsigned int __ATTRS_o_ai 05528 vec_slo(vector unsigned int a, vector unsigned char b) 05529 { 05530 return (vector unsigned int) 05531 __builtin_altivec_vslo((vector int)a, (vector int)b); 05532 } 05533 05534 static vector float __ATTRS_o_ai 05535 vec_slo(vector float a, vector signed char b) 05536 { 05537 return (vector float)__builtin_altivec_vslo((vector int)a, (vector int)b); 05538 } 05539 05540 static vector float __ATTRS_o_ai 05541 vec_slo(vector float a, vector unsigned char b) 05542 { 05543 return (vector float)__builtin_altivec_vslo((vector int)a, (vector int)b); 05544 } 05545 05546 /* vec_vslo */ 05547 05548 static vector signed char __ATTRS_o_ai 05549 vec_vslo(vector signed char a, vector signed char b) 05550 { 05551 return (vector signed char) 05552 __builtin_altivec_vslo((vector int)a, (vector int)b); 05553 } 05554 05555 static vector signed char __ATTRS_o_ai 05556 vec_vslo(vector signed char a, vector unsigned char b) 05557 { 05558 return (vector signed char) 05559 __builtin_altivec_vslo((vector int)a, (vector int)b); 05560 } 05561 05562 static vector unsigned char __ATTRS_o_ai 05563 vec_vslo(vector unsigned char a, vector signed char b) 05564 { 05565 return (vector unsigned char) 05566 __builtin_altivec_vslo((vector int)a, (vector int)b); 05567 } 05568 05569 static vector unsigned char __ATTRS_o_ai 05570 vec_vslo(vector unsigned char a, vector unsigned char b) 05571 { 05572 return (vector unsigned char) 05573 __builtin_altivec_vslo((vector int)a, (vector int)b); 05574 } 05575 05576 static vector short __ATTRS_o_ai 05577 vec_vslo(vector short a, vector signed char b) 05578 { 05579 return (vector short)__builtin_altivec_vslo((vector int)a, (vector int)b); 05580 } 05581 05582 static vector short __ATTRS_o_ai 05583 vec_vslo(vector short a, vector unsigned char b) 05584 { 05585 return (vector short)__builtin_altivec_vslo((vector int)a, (vector int)b); 05586 } 05587 05588 static vector unsigned short __ATTRS_o_ai 05589 vec_vslo(vector unsigned short a, vector signed char b) 05590 { 05591 return (vector unsigned short) 05592 __builtin_altivec_vslo((vector int)a, (vector int)b); 05593 } 05594 05595 static vector unsigned short __ATTRS_o_ai 05596 vec_vslo(vector unsigned short a, vector unsigned char b) 05597 { 05598 return (vector unsigned short) 05599 __builtin_altivec_vslo((vector int)a, (vector int)b); 05600 } 05601 05602 static vector pixel __ATTRS_o_ai 05603 vec_vslo(vector pixel a, vector signed char b) 05604 { 05605 return (vector pixel)__builtin_altivec_vslo((vector int)a, (vector int)b); 05606 } 05607 05608 static vector pixel __ATTRS_o_ai 05609 vec_vslo(vector pixel a, vector unsigned char b) 05610 { 05611 return (vector pixel)__builtin_altivec_vslo((vector int)a, (vector int)b); 05612 } 05613 05614 static vector int __ATTRS_o_ai 05615 vec_vslo(vector int a, vector signed char b) 05616 { 05617 return (vector int)__builtin_altivec_vslo(a, (vector int)b); 05618 } 05619 05620 static vector int __ATTRS_o_ai 05621 vec_vslo(vector int a, vector unsigned char b) 05622 { 05623 return (vector int)__builtin_altivec_vslo(a, (vector int)b); 05624 } 05625 05626 static vector unsigned int __ATTRS_o_ai 05627 vec_vslo(vector unsigned int a, vector signed char b) 05628 { 05629 return (vector unsigned int) 05630 __builtin_altivec_vslo((vector int)a, (vector int)b); 05631 } 05632 05633 static vector unsigned int __ATTRS_o_ai 05634 vec_vslo(vector unsigned int a, vector unsigned char b) 05635 { 05636 return (vector unsigned int) 05637 __builtin_altivec_vslo((vector int)a, (vector int)b); 05638 } 05639 05640 static vector float __ATTRS_o_ai 05641 vec_vslo(vector float a, vector signed char b) 05642 { 05643 return (vector float)__builtin_altivec_vslo((vector int)a, (vector int)b); 05644 } 05645 05646 static vector float __ATTRS_o_ai 05647 vec_vslo(vector float a, vector unsigned char b) 05648 { 05649 return (vector float)__builtin_altivec_vslo((vector int)a, (vector int)b); 05650 } 05651 05652 /* vec_splat */ 05653 05654 static vector signed char __ATTRS_o_ai 05655 vec_splat(vector signed char a, unsigned char b) 05656 { 05657 return vec_perm(a, a, (vector unsigned char)(b)); 05658 } 05659 05660 static vector unsigned char __ATTRS_o_ai 05661 vec_splat(vector unsigned char a, unsigned char b) 05662 { 05663 return vec_perm(a, a, (vector unsigned char)(b)); 05664 } 05665 05666 static vector bool char __ATTRS_o_ai 05667 vec_splat(vector bool char a, unsigned char b) 05668 { 05669 return vec_perm(a, a, (vector unsigned char)(b)); 05670 } 05671 05672 static vector short __ATTRS_o_ai 05673 vec_splat(vector short a, unsigned char b) 05674 { 05675 b *= 2; 05676 unsigned char b1=b+1; 05677 return vec_perm(a, a, (vector unsigned char) 05678 (b, b1, b, b1, b, b1, b, b1, b, b1, b, b1, b, b1, b, b1)); 05679 } 05680 05681 static vector unsigned short __ATTRS_o_ai 05682 vec_splat(vector unsigned short a, unsigned char b) 05683 { 05684 b *= 2; 05685 unsigned char b1=b+1; 05686 return vec_perm(a, a, (vector unsigned char) 05687 (b, b1, b, b1, b, b1, b, b1, b, b1, b, b1, b, b1, b, b1)); 05688 } 05689 05690 static vector bool short __ATTRS_o_ai 05691 vec_splat(vector bool short a, unsigned char b) 05692 { 05693 b *= 2; 05694 unsigned char b1=b+1; 05695 return vec_perm(a, a, (vector unsigned char) 05696 (b, b1, b, b1, b, b1, b, b1, b, b1, b, b1, b, b1, b, b1)); 05697 } 05698 05699 static vector pixel __ATTRS_o_ai 05700 vec_splat(vector pixel a, unsigned char b) 05701 { 05702 b *= 2; 05703 unsigned char b1=b+1; 05704 return vec_perm(a, a, (vector unsigned char) 05705 (b, b1, b, b1, b, b1, b, b1, b, b1, b, b1, b, b1, b, b1)); 05706 } 05707 05708 static vector int __ATTRS_o_ai 05709 vec_splat(vector int a, unsigned char b) 05710 { 05711 b *= 4; 05712 unsigned char b1=b+1, b2=b+2, b3=b+3; 05713 return vec_perm(a, a, (vector unsigned char) 05714 (b, b1, b2, b3, b, b1, b2, b3, b, b1, b2, b3, b, b1, b2, b3)); 05715 } 05716 05717 static vector unsigned int __ATTRS_o_ai 05718 vec_splat(vector unsigned int a, unsigned char b) 05719 { 05720 b *= 4; 05721 unsigned char b1=b+1, b2=b+2, b3=b+3; 05722 return vec_perm(a, a, (vector unsigned char) 05723 (b, b1, b2, b3, b, b1, b2, b3, b, b1, b2, b3, b, b1, b2, b3)); 05724 } 05725 05726 static vector bool int __ATTRS_o_ai 05727 vec_splat(vector bool int a, unsigned char b) 05728 { 05729 b *= 4; 05730 unsigned char b1=b+1, b2=b+2, b3=b+3; 05731 return vec_perm(a, a, (vector unsigned char) 05732 (b, b1, b2, b3, b, b1, b2, b3, b, b1, b2, b3, b, b1, b2, b3)); 05733 } 05734 05735 static vector float __ATTRS_o_ai 05736 vec_splat(vector float a, unsigned char b) 05737 { 05738 b *= 4; 05739 unsigned char b1=b+1, b2=b+2, b3=b+3; 05740 return vec_perm(a, a, (vector unsigned char) 05741 (b, b1, b2, b3, b, b1, b2, b3, b, b1, b2, b3, b, b1, b2, b3)); 05742 } 05743 05744 /* vec_vspltb */ 05745 05746 #define __builtin_altivec_vspltb vec_vspltb 05747 05748 static vector signed char __ATTRS_o_ai 05749 vec_vspltb(vector signed char a, unsigned char b) 05750 { 05751 return vec_perm(a, a, (vector unsigned char)(b)); 05752 } 05753 05754 static vector unsigned char __ATTRS_o_ai 05755 vec_vspltb(vector unsigned char a, unsigned char b) 05756 { 05757 return vec_perm(a, a, (vector unsigned char)(b)); 05758 } 05759 05760 static vector bool char __ATTRS_o_ai 05761 vec_vspltb(vector bool char a, unsigned char b) 05762 { 05763 return vec_perm(a, a, (vector unsigned char)(b)); 05764 } 05765 05766 /* vec_vsplth */ 05767 05768 #define __builtin_altivec_vsplth vec_vsplth 05769 05770 static vector short __ATTRS_o_ai 05771 vec_vsplth(vector short a, unsigned char b) 05772 { 05773 b *= 2; 05774 unsigned char b1=b+1; 05775 return vec_perm(a, a, (vector unsigned char) 05776 (b, b1, b, b1, b, b1, b, b1, b, b1, b, b1, b, b1, b, b1)); 05777 } 05778 05779 static vector unsigned short __ATTRS_o_ai 05780 vec_vsplth(vector unsigned short a, unsigned char b) 05781 { 05782 b *= 2; 05783 unsigned char b1=b+1; 05784 return vec_perm(a, a, (vector unsigned char) 05785 (b, b1, b, b1, b, b1, b, b1, b, b1, b, b1, b, b1, b, b1)); 05786 } 05787 05788 static vector bool short __ATTRS_o_ai 05789 vec_vsplth(vector bool short a, unsigned char b) 05790 { 05791 b *= 2; 05792 unsigned char b1=b+1; 05793 return vec_perm(a, a, (vector unsigned char) 05794 (b, b1, b, b1, b, b1, b, b1, b, b1, b, b1, b, b1, b, b1)); 05795 } 05796 05797 static vector pixel __ATTRS_o_ai 05798 vec_vsplth(vector pixel a, unsigned char b) 05799 { 05800 b *= 2; 05801 unsigned char b1=b+1; 05802 return vec_perm(a, a, (vector unsigned char) 05803 (b, b1, b, b1, b, b1, b, b1, b, b1, b, b1, b, b1, b, b1)); 05804 } 05805 05806 /* vec_vspltw */ 05807 05808 #define __builtin_altivec_vspltw vec_vspltw 05809 05810 static vector int __ATTRS_o_ai 05811 vec_vspltw(vector int a, unsigned char b) 05812 { 05813 b *= 4; 05814 unsigned char b1=b+1, b2=b+2, b3=b+3; 05815 return vec_perm(a, a, (vector unsigned char) 05816 (b, b1, b2, b3, b, b1, b2, b3, b, b1, b2, b3, b, b1, b2, b3)); 05817 } 05818 05819 static vector unsigned int __ATTRS_o_ai 05820 vec_vspltw(vector unsigned int a, unsigned char b) 05821 { 05822 b *= 4; 05823 unsigned char b1=b+1, b2=b+2, b3=b+3; 05824 return vec_perm(a, a, (vector unsigned char) 05825 (b, b1, b2, b3, b, b1, b2, b3, b, b1, b2, b3, b, b1, b2, b3)); 05826 } 05827 05828 static vector bool int __ATTRS_o_ai 05829 vec_vspltw(vector bool int a, unsigned char b) 05830 { 05831 b *= 4; 05832 unsigned char b1=b+1, b2=b+2, b3=b+3; 05833 return vec_perm(a, a, (vector unsigned char) 05834 (b, b1, b2, b3, b, b1, b2, b3, b, b1, b2, b3, b, b1, b2, b3)); 05835 } 05836 05837 static vector float __ATTRS_o_ai 05838 vec_vspltw(vector float a, unsigned char b) 05839 { 05840 b *= 4; 05841 unsigned char b1=b+1, b2=b+2, b3=b+3; 05842 return vec_perm(a, a, (vector unsigned char) 05843 (b, b1, b2, b3, b, b1, b2, b3, b, b1, b2, b3, b, b1, b2, b3)); 05844 } 05845 05846 /* vec_splat_s8 */ 05847 05848 #define __builtin_altivec_vspltisb vec_splat_s8 05849 05850 // FIXME: parameter should be treated as 5-bit signed literal 05851 static vector signed char __ATTRS_o_ai 05852 vec_splat_s8(signed char a) 05853 { 05854 return (vector signed char)(a); 05855 } 05856 05857 /* vec_vspltisb */ 05858 05859 // FIXME: parameter should be treated as 5-bit signed literal 05860 static vector signed char __ATTRS_o_ai 05861 vec_vspltisb(signed char a) 05862 { 05863 return (vector signed char)(a); 05864 } 05865 05866 /* vec_splat_s16 */ 05867 05868 #define __builtin_altivec_vspltish vec_splat_s16 05869 05870 // FIXME: parameter should be treated as 5-bit signed literal 05871 static vector short __ATTRS_o_ai 05872 vec_splat_s16(signed char a) 05873 { 05874 return (vector short)(a); 05875 } 05876 05877 /* vec_vspltish */ 05878 05879 // FIXME: parameter should be treated as 5-bit signed literal 05880 static vector short __ATTRS_o_ai 05881 vec_vspltish(signed char a) 05882 { 05883 return (vector short)(a); 05884 } 05885 05886 /* vec_splat_s32 */ 05887 05888 #define __builtin_altivec_vspltisw vec_splat_s32 05889 05890 // FIXME: parameter should be treated as 5-bit signed literal 05891 static vector int __ATTRS_o_ai 05892 vec_splat_s32(signed char a) 05893 { 05894 return (vector int)(a); 05895 } 05896 05897 /* vec_vspltisw */ 05898 05899 // FIXME: parameter should be treated as 5-bit signed literal 05900 static vector int __ATTRS_o_ai 05901 vec_vspltisw(signed char a) 05902 { 05903 return (vector int)(a); 05904 } 05905 05906 /* vec_splat_u8 */ 05907 05908 // FIXME: parameter should be treated as 5-bit signed literal 05909 static vector unsigned char __ATTRS_o_ai 05910 vec_splat_u8(unsigned char a) 05911 { 05912 return (vector unsigned char)(a); 05913 } 05914 05915 /* vec_splat_u16 */ 05916 05917 // FIXME: parameter should be treated as 5-bit signed literal 05918 static vector unsigned short __ATTRS_o_ai 05919 vec_splat_u16(signed char a) 05920 { 05921 return (vector unsigned short)(a); 05922 } 05923 05924 /* vec_splat_u32 */ 05925 05926 // FIXME: parameter should be treated as 5-bit signed literal 05927 static vector unsigned int __ATTRS_o_ai 05928 vec_splat_u32(signed char a) 05929 { 05930 return (vector unsigned int)(a); 05931 } 05932 05933 /* vec_sr */ 05934 05935 static vector signed char __ATTRS_o_ai 05936 vec_sr(vector signed char a, vector unsigned char b) 05937 { 05938 return a >> (vector signed char)b; 05939 } 05940 05941 static vector unsigned char __ATTRS_o_ai 05942 vec_sr(vector unsigned char a, vector unsigned char b) 05943 { 05944 return a >> b; 05945 } 05946 05947 static vector short __ATTRS_o_ai 05948 vec_sr(vector short a, vector unsigned short b) 05949 { 05950 return a >> (vector short)b; 05951 } 05952 05953 static vector unsigned short __ATTRS_o_ai 05954 vec_sr(vector unsigned short a, vector unsigned short b) 05955 { 05956 return a >> b; 05957 } 05958 05959 static vector int __ATTRS_o_ai 05960 vec_sr(vector int a, vector unsigned int b) 05961 { 05962 return a >> (vector int)b; 05963 } 05964 05965 static vector unsigned int __ATTRS_o_ai 05966 vec_sr(vector unsigned int a, vector unsigned int b) 05967 { 05968 return a >> b; 05969 } 05970 05971 /* vec_vsrb */ 05972 05973 #define __builtin_altivec_vsrb vec_vsrb 05974 05975 static vector signed char __ATTRS_o_ai 05976 vec_vsrb(vector signed char a, vector unsigned char b) 05977 { 05978 return a >> (vector signed char)b; 05979 } 05980 05981 static vector unsigned char __ATTRS_o_ai 05982 vec_vsrb(vector unsigned char a, vector unsigned char b) 05983 { 05984 return a >> b; 05985 } 05986 05987 /* vec_vsrh */ 05988 05989 #define __builtin_altivec_vsrh vec_vsrh 05990 05991 static vector short __ATTRS_o_ai 05992 vec_vsrh(vector short a, vector unsigned short b) 05993 { 05994 return a >> (vector short)b; 05995 } 05996 05997 static vector unsigned short __ATTRS_o_ai 05998 vec_vsrh(vector unsigned short a, vector unsigned short b) 05999 { 06000 return a >> b; 06001 } 06002 06003 /* vec_vsrw */ 06004 06005 #define __builtin_altivec_vsrw vec_vsrw 06006 06007 static vector int __ATTRS_o_ai 06008 vec_vsrw(vector int a, vector unsigned int b) 06009 { 06010 return a >> (vector int)b; 06011 } 06012 06013 static vector unsigned int __ATTRS_o_ai 06014 vec_vsrw(vector unsigned int a, vector unsigned int b) 06015 { 06016 return a >> b; 06017 } 06018 06019 /* vec_sra */ 06020 06021 static vector signed char __ATTRS_o_ai 06022 vec_sra(vector signed char a, vector unsigned char b) 06023 { 06024 return (vector signed char)__builtin_altivec_vsrab((vector char)a, b); 06025 } 06026 06027 static vector unsigned char __ATTRS_o_ai 06028 vec_sra(vector unsigned char a, vector unsigned char b) 06029 { 06030 return (vector unsigned char)__builtin_altivec_vsrab((vector char)a, b); 06031 } 06032 06033 static vector short __ATTRS_o_ai 06034 vec_sra(vector short a, vector unsigned short b) 06035 { 06036 return __builtin_altivec_vsrah(a, (vector unsigned short)b); 06037 } 06038 06039 static vector unsigned short __ATTRS_o_ai 06040 vec_sra(vector unsigned short a, vector unsigned short b) 06041 { 06042 return (vector unsigned short)__builtin_altivec_vsrah((vector short)a, b); 06043 } 06044 06045 static vector int __ATTRS_o_ai 06046 vec_sra(vector int a, vector unsigned int b) 06047 { 06048 return __builtin_altivec_vsraw(a, b); 06049 } 06050 06051 static vector unsigned int __ATTRS_o_ai 06052 vec_sra(vector unsigned int a, vector unsigned int b) 06053 { 06054 return (vector unsigned int)__builtin_altivec_vsraw((vector int)a, b); 06055 } 06056 06057 /* vec_vsrab */ 06058 06059 static vector signed char __ATTRS_o_ai 06060 vec_vsrab(vector signed char a, vector unsigned char b) 06061 { 06062 return (vector signed char)__builtin_altivec_vsrab((vector char)a, b); 06063 } 06064 06065 static vector unsigned char __ATTRS_o_ai 06066 vec_vsrab(vector unsigned char a, vector unsigned char b) 06067 { 06068 return (vector unsigned char)__builtin_altivec_vsrab((vector char)a, b); 06069 } 06070 06071 /* vec_vsrah */ 06072 06073 static vector short __ATTRS_o_ai 06074 vec_vsrah(vector short a, vector unsigned short b) 06075 { 06076 return __builtin_altivec_vsrah(a, (vector unsigned short)b); 06077 } 06078 06079 static vector unsigned short __ATTRS_o_ai 06080 vec_vsrah(vector unsigned short a, vector unsigned short b) 06081 { 06082 return (vector unsigned short)__builtin_altivec_vsrah((vector short)a, b); 06083 } 06084 06085 /* vec_vsraw */ 06086 06087 static vector int __ATTRS_o_ai 06088 vec_vsraw(vector int a, vector unsigned int b) 06089 { 06090 return __builtin_altivec_vsraw(a, b); 06091 } 06092 06093 static vector unsigned int __ATTRS_o_ai 06094 vec_vsraw(vector unsigned int a, vector unsigned int b) 06095 { 06096 return (vector unsigned int)__builtin_altivec_vsraw((vector int)a, b); 06097 } 06098 06099 /* vec_srl */ 06100 06101 static vector signed char __ATTRS_o_ai 06102 vec_srl(vector signed char a, vector unsigned char b) 06103 { 06104 return (vector signed char) 06105 __builtin_altivec_vsr((vector int)a, (vector int)b); 06106 } 06107 06108 static vector signed char __ATTRS_o_ai 06109 vec_srl(vector signed char a, vector unsigned short b) 06110 { 06111 return (vector signed char) 06112 __builtin_altivec_vsr((vector int)a, (vector int)b); 06113 } 06114 06115 static vector signed char __ATTRS_o_ai 06116 vec_srl(vector signed char a, vector unsigned int b) 06117 { 06118 return (vector signed char) 06119 __builtin_altivec_vsr((vector int)a, (vector int)b); 06120 } 06121 06122 static vector unsigned char __ATTRS_o_ai 06123 vec_srl(vector unsigned char a, vector unsigned char b) 06124 { 06125 return (vector unsigned char) 06126 __builtin_altivec_vsr((vector int)a, (vector int)b); 06127 } 06128 06129 static vector unsigned char __ATTRS_o_ai 06130 vec_srl(vector unsigned char a, vector unsigned short b) 06131 { 06132 return (vector unsigned char) 06133 __builtin_altivec_vsr((vector int)a, (vector int)b); 06134 } 06135 06136 static vector unsigned char __ATTRS_o_ai 06137 vec_srl(vector unsigned char a, vector unsigned int b) 06138 { 06139 return (vector unsigned char) 06140 __builtin_altivec_vsr((vector int)a, (vector int)b); 06141 } 06142 06143 static vector bool char __ATTRS_o_ai 06144 vec_srl(vector bool char a, vector unsigned char b) 06145 { 06146 return (vector bool char)__builtin_altivec_vsr((vector int)a, (vector int)b); 06147 } 06148 06149 static vector bool char __ATTRS_o_ai 06150 vec_srl(vector bool char a, vector unsigned short b) 06151 { 06152 return (vector bool char)__builtin_altivec_vsr((vector int)a, (vector int)b); 06153 } 06154 06155 static vector bool char __ATTRS_o_ai 06156 vec_srl(vector bool char a, vector unsigned int b) 06157 { 06158 return (vector bool char)__builtin_altivec_vsr((vector int)a, (vector int)b); 06159 } 06160 06161 static vector short __ATTRS_o_ai 06162 vec_srl(vector short a, vector unsigned char b) 06163 { 06164 return (vector short)__builtin_altivec_vsr((vector int)a, (vector int)b); 06165 } 06166 06167 static vector short __ATTRS_o_ai 06168 vec_srl(vector short a, vector unsigned short b) 06169 { 06170 return (vector short)__builtin_altivec_vsr((vector int)a, (vector int)b); 06171 } 06172 06173 static vector short __ATTRS_o_ai 06174 vec_srl(vector short a, vector unsigned int b) 06175 { 06176 return (vector short)__builtin_altivec_vsr((vector int)a, (vector int)b); 06177 } 06178 06179 static vector unsigned short __ATTRS_o_ai 06180 vec_srl(vector unsigned short a, vector unsigned char b) 06181 { 06182 return (vector unsigned short) 06183 __builtin_altivec_vsr((vector int)a, (vector int)b); 06184 } 06185 06186 static vector unsigned short __ATTRS_o_ai 06187 vec_srl(vector unsigned short a, vector unsigned short b) 06188 { 06189 return (vector unsigned short) 06190 __builtin_altivec_vsr((vector int)a, (vector int)b); 06191 } 06192 06193 static vector unsigned short __ATTRS_o_ai 06194 vec_srl(vector unsigned short a, vector unsigned int b) 06195 { 06196 return (vector unsigned short) 06197 __builtin_altivec_vsr((vector int)a, (vector int)b); 06198 } 06199 06200 static vector bool short __ATTRS_o_ai 06201 vec_srl(vector bool short a, vector unsigned char b) 06202 { 06203 return (vector bool short)__builtin_altivec_vsr((vector int)a, (vector int)b); 06204 } 06205 06206 static vector bool short __ATTRS_o_ai 06207 vec_srl(vector bool short a, vector unsigned short b) 06208 { 06209 return (vector bool short)__builtin_altivec_vsr((vector int)a, (vector int)b); 06210 } 06211 06212 static vector bool short __ATTRS_o_ai 06213 vec_srl(vector bool short a, vector unsigned int b) 06214 { 06215 return (vector bool short)__builtin_altivec_vsr((vector int)a, (vector int)b); 06216 } 06217 06218 static vector pixel __ATTRS_o_ai 06219 vec_srl(vector pixel a, vector unsigned char b) 06220 { 06221 return (vector pixel)__builtin_altivec_vsr((vector int)a, (vector int)b); 06222 } 06223 06224 static vector pixel __ATTRS_o_ai 06225 vec_srl(vector pixel a, vector unsigned short b) 06226 { 06227 return (vector pixel)__builtin_altivec_vsr((vector int)a, (vector int)b); 06228 } 06229 06230 static vector pixel __ATTRS_o_ai 06231 vec_srl(vector pixel a, vector unsigned int b) 06232 { 06233 return (vector pixel)__builtin_altivec_vsr((vector int)a, (vector int)b); 06234 } 06235 06236 static vector int __ATTRS_o_ai 06237 vec_srl(vector int a, vector unsigned char b) 06238 { 06239 return (vector int)__builtin_altivec_vsr(a, (vector int)b); 06240 } 06241 06242 static vector int __ATTRS_o_ai 06243 vec_srl(vector int a, vector unsigned short b) 06244 { 06245 return (vector int)__builtin_altivec_vsr(a, (vector int)b); 06246 } 06247 06248 static vector int __ATTRS_o_ai 06249 vec_srl(vector int a, vector unsigned int b) 06250 { 06251 return (vector int)__builtin_altivec_vsr(a, (vector int)b); 06252 } 06253 06254 static vector unsigned int __ATTRS_o_ai 06255 vec_srl(vector unsigned int a, vector unsigned char b) 06256 { 06257 return (vector unsigned int) 06258 __builtin_altivec_vsr((vector int)a, (vector int)b); 06259 } 06260 06261 static vector unsigned int __ATTRS_o_ai 06262 vec_srl(vector unsigned int a, vector unsigned short b) 06263 { 06264 return (vector unsigned int) 06265 __builtin_altivec_vsr((vector int)a, (vector int)b); 06266 } 06267 06268 static vector unsigned int __ATTRS_o_ai 06269 vec_srl(vector unsigned int a, vector unsigned int b) 06270 { 06271 return (vector unsigned int) 06272 __builtin_altivec_vsr((vector int)a, (vector int)b); 06273 } 06274 06275 static vector bool int __ATTRS_o_ai 06276 vec_srl(vector bool int a, vector unsigned char b) 06277 { 06278 return (vector bool int)__builtin_altivec_vsr((vector int)a, (vector int)b); 06279 } 06280 06281 static vector bool int __ATTRS_o_ai 06282 vec_srl(vector bool int a, vector unsigned short b) 06283 { 06284 return (vector bool int)__builtin_altivec_vsr((vector int)a, (vector int)b); 06285 } 06286 06287 static vector bool int __ATTRS_o_ai 06288 vec_srl(vector bool int a, vector unsigned int b) 06289 { 06290 return (vector bool int)__builtin_altivec_vsr((vector int)a, (vector int)b); 06291 } 06292 06293 /* vec_vsr */ 06294 06295 static vector signed char __ATTRS_o_ai 06296 vec_vsr(vector signed char a, vector unsigned char b) 06297 { 06298 return (vector signed char) 06299 __builtin_altivec_vsr((vector int)a, (vector int)b); 06300 } 06301 06302 static vector signed char __ATTRS_o_ai 06303 vec_vsr(vector signed char a, vector unsigned short b) 06304 { 06305 return (vector signed char) 06306 __builtin_altivec_vsr((vector int)a, (vector int)b); 06307 } 06308 06309 static vector signed char __ATTRS_o_ai 06310 vec_vsr(vector signed char a, vector unsigned int b) 06311 { 06312 return (vector signed char) 06313 __builtin_altivec_vsr((vector int)a, (vector int)b); 06314 } 06315 06316 static vector unsigned char __ATTRS_o_ai 06317 vec_vsr(vector unsigned char a, vector unsigned char b) 06318 { 06319 return (vector unsigned char) 06320 __builtin_altivec_vsr((vector int)a, (vector int)b); 06321 } 06322 06323 static vector unsigned char __ATTRS_o_ai 06324 vec_vsr(vector unsigned char a, vector unsigned short b) 06325 { 06326 return (vector unsigned char) 06327 __builtin_altivec_vsr((vector int)a, (vector int)b); 06328 } 06329 06330 static vector unsigned char __ATTRS_o_ai 06331 vec_vsr(vector unsigned char a, vector unsigned int b) 06332 { 06333 return (vector unsigned char) 06334 __builtin_altivec_vsr((vector int)a, (vector int)b); 06335 } 06336 06337 static vector bool char __ATTRS_o_ai 06338 vec_vsr(vector bool char a, vector unsigned char b) 06339 { 06340 return (vector bool char)__builtin_altivec_vsr((vector int)a, (vector int)b); 06341 } 06342 06343 static vector bool char __ATTRS_o_ai 06344 vec_vsr(vector bool char a, vector unsigned short b) 06345 { 06346 return (vector bool char)__builtin_altivec_vsr((vector int)a, (vector int)b); 06347 } 06348 06349 static vector bool char __ATTRS_o_ai 06350 vec_vsr(vector bool char a, vector unsigned int b) 06351 { 06352 return (vector bool char)__builtin_altivec_vsr((vector int)a, (vector int)b); 06353 } 06354 06355 static vector short __ATTRS_o_ai 06356 vec_vsr(vector short a, vector unsigned char b) 06357 { 06358 return (vector short)__builtin_altivec_vsr((vector int)a, (vector int)b); 06359 } 06360 06361 static vector short __ATTRS_o_ai 06362 vec_vsr(vector short a, vector unsigned short b) 06363 { 06364 return (vector short)__builtin_altivec_vsr((vector int)a, (vector int)b); 06365 } 06366 06367 static vector short __ATTRS_o_ai 06368 vec_vsr(vector short a, vector unsigned int b) 06369 { 06370 return (vector short)__builtin_altivec_vsr((vector int)a, (vector int)b); 06371 } 06372 06373 static vector unsigned short __ATTRS_o_ai 06374 vec_vsr(vector unsigned short a, vector unsigned char b) 06375 { 06376 return (vector unsigned short) 06377 __builtin_altivec_vsr((vector int)a, (vector int)b); 06378 } 06379 06380 static vector unsigned short __ATTRS_o_ai 06381 vec_vsr(vector unsigned short a, vector unsigned short b) 06382 { 06383 return (vector unsigned short) 06384 __builtin_altivec_vsr((vector int)a, (vector int)b); 06385 } 06386 06387 static vector unsigned short __ATTRS_o_ai 06388 vec_vsr(vector unsigned short a, vector unsigned int b) 06389 { 06390 return (vector unsigned short) 06391 __builtin_altivec_vsr((vector int)a, (vector int)b); 06392 } 06393 06394 static vector bool short __ATTRS_o_ai 06395 vec_vsr(vector bool short a, vector unsigned char b) 06396 { 06397 return (vector bool short)__builtin_altivec_vsr((vector int)a, (vector int)b); 06398 } 06399 06400 static vector bool short __ATTRS_o_ai 06401 vec_vsr(vector bool short a, vector unsigned short b) 06402 { 06403 return (vector bool short)__builtin_altivec_vsr((vector int)a, (vector int)b); 06404 } 06405 06406 static vector bool short __ATTRS_o_ai 06407 vec_vsr(vector bool short a, vector unsigned int b) 06408 { 06409 return (vector bool short)__builtin_altivec_vsr((vector int)a, (vector int)b); 06410 } 06411 06412 static vector pixel __ATTRS_o_ai 06413 vec_vsr(vector pixel a, vector unsigned char b) 06414 { 06415 return (vector pixel)__builtin_altivec_vsr((vector int)a, (vector int)b); 06416 } 06417 06418 static vector pixel __ATTRS_o_ai 06419 vec_vsr(vector pixel a, vector unsigned short b) 06420 { 06421 return (vector pixel)__builtin_altivec_vsr((vector int)a, (vector int)b); 06422 } 06423 06424 static vector pixel __ATTRS_o_ai 06425 vec_vsr(vector pixel a, vector unsigned int b) 06426 { 06427 return (vector pixel)__builtin_altivec_vsr((vector int)a, (vector int)b); 06428 } 06429 06430 static vector int __ATTRS_o_ai 06431 vec_vsr(vector int a, vector unsigned char b) 06432 { 06433 return (vector int)__builtin_altivec_vsr(a, (vector int)b); 06434 } 06435 06436 static vector int __ATTRS_o_ai 06437 vec_vsr(vector int a, vector unsigned short b) 06438 { 06439 return (vector int)__builtin_altivec_vsr(a, (vector int)b); 06440 } 06441 06442 static vector int __ATTRS_o_ai 06443 vec_vsr(vector int a, vector unsigned int b) 06444 { 06445 return (vector int)__builtin_altivec_vsr(a, (vector int)b); 06446 } 06447 06448 static vector unsigned int __ATTRS_o_ai 06449 vec_vsr(vector unsigned int a, vector unsigned char b) 06450 { 06451 return (vector unsigned int) 06452 __builtin_altivec_vsr((vector int)a, (vector int)b); 06453 } 06454 06455 static vector unsigned int __ATTRS_o_ai 06456 vec_vsr(vector unsigned int a, vector unsigned short b) 06457 { 06458 return (vector unsigned int) 06459 __builtin_altivec_vsr((vector int)a, (vector int)b); 06460 } 06461 06462 static vector unsigned int __ATTRS_o_ai 06463 vec_vsr(vector unsigned int a, vector unsigned int b) 06464 { 06465 return (vector unsigned int) 06466 __builtin_altivec_vsr((vector int)a, (vector int)b); 06467 } 06468 06469 static vector bool int __ATTRS_o_ai 06470 vec_vsr(vector bool int a, vector unsigned char b) 06471 { 06472 return (vector bool int)__builtin_altivec_vsr((vector int)a, (vector int)b); 06473 } 06474 06475 static vector bool int __ATTRS_o_ai 06476 vec_vsr(vector bool int a, vector unsigned short b) 06477 { 06478 return (vector bool int)__builtin_altivec_vsr((vector int)a, (vector int)b); 06479 } 06480 06481 static vector bool int __ATTRS_o_ai 06482 vec_vsr(vector bool int a, vector unsigned int b) 06483 { 06484 return (vector bool int)__builtin_altivec_vsr((vector int)a, (vector int)b); 06485 } 06486 06487 /* vec_sro */ 06488 06489 static vector signed char __ATTRS_o_ai 06490 vec_sro(vector signed char a, vector signed char b) 06491 { 06492 return (vector signed char) 06493 __builtin_altivec_vsro((vector int)a, (vector int)b); 06494 } 06495 06496 static vector signed char __ATTRS_o_ai 06497 vec_sro(vector signed char a, vector unsigned char b) 06498 { 06499 return (vector signed char) 06500 __builtin_altivec_vsro((vector int)a, (vector int)b); 06501 } 06502 06503 static vector unsigned char __ATTRS_o_ai 06504 vec_sro(vector unsigned char a, vector signed char b) 06505 { 06506 return (vector unsigned char) 06507 __builtin_altivec_vsro((vector int)a, (vector int)b); 06508 } 06509 06510 static vector unsigned char __ATTRS_o_ai 06511 vec_sro(vector unsigned char a, vector unsigned char b) 06512 { 06513 return (vector unsigned char) 06514 __builtin_altivec_vsro((vector int)a, (vector int)b); 06515 } 06516 06517 static vector short __ATTRS_o_ai 06518 vec_sro(vector short a, vector signed char b) 06519 { 06520 return (vector short)__builtin_altivec_vsro((vector int)a, (vector int)b); 06521 } 06522 06523 static vector short __ATTRS_o_ai 06524 vec_sro(vector short a, vector unsigned char b) 06525 { 06526 return (vector short)__builtin_altivec_vsro((vector int)a, (vector int)b); 06527 } 06528 06529 static vector unsigned short __ATTRS_o_ai 06530 vec_sro(vector unsigned short a, vector signed char b) 06531 { 06532 return (vector unsigned short) 06533 __builtin_altivec_vsro((vector int)a, (vector int)b); 06534 } 06535 06536 static vector unsigned short __ATTRS_o_ai 06537 vec_sro(vector unsigned short a, vector unsigned char b) 06538 { 06539 return (vector unsigned short) 06540 __builtin_altivec_vsro((vector int)a, (vector int)b); 06541 } 06542 06543 static vector pixel __ATTRS_o_ai 06544 vec_sro(vector pixel a, vector signed char b) 06545 { 06546 return (vector pixel)__builtin_altivec_vsro((vector int)a, (vector int)b); 06547 } 06548 06549 static vector pixel __ATTRS_o_ai 06550 vec_sro(vector pixel a, vector unsigned char b) 06551 { 06552 return (vector pixel)__builtin_altivec_vsro((vector int)a, (vector int)b); 06553 } 06554 06555 static vector int __ATTRS_o_ai 06556 vec_sro(vector int a, vector signed char b) 06557 { 06558 return (vector int)__builtin_altivec_vsro(a, (vector int)b); 06559 } 06560 06561 static vector int __ATTRS_o_ai 06562 vec_sro(vector int a, vector unsigned char b) 06563 { 06564 return (vector int)__builtin_altivec_vsro(a, (vector int)b); 06565 } 06566 06567 static vector unsigned int __ATTRS_o_ai 06568 vec_sro(vector unsigned int a, vector signed char b) 06569 { 06570 return (vector unsigned int) 06571 __builtin_altivec_vsro((vector int)a, (vector int)b); 06572 } 06573 06574 static vector unsigned int __ATTRS_o_ai 06575 vec_sro(vector unsigned int a, vector unsigned char b) 06576 { 06577 return (vector unsigned int) 06578 __builtin_altivec_vsro((vector int)a, (vector int)b); 06579 } 06580 06581 static vector float __ATTRS_o_ai 06582 vec_sro(vector float a, vector signed char b) 06583 { 06584 return (vector float)__builtin_altivec_vsro((vector int)a, (vector int)b); 06585 } 06586 06587 static vector float __ATTRS_o_ai 06588 vec_sro(vector float a, vector unsigned char b) 06589 { 06590 return (vector float)__builtin_altivec_vsro((vector int)a, (vector int)b); 06591 } 06592 06593 /* vec_vsro */ 06594 06595 static vector signed char __ATTRS_o_ai 06596 vec_vsro(vector signed char a, vector signed char b) 06597 { 06598 return (vector signed char) 06599 __builtin_altivec_vsro((vector int)a, (vector int)b); 06600 } 06601 06602 static vector signed char __ATTRS_o_ai 06603 vec_vsro(vector signed char a, vector unsigned char b) 06604 { 06605 return (vector signed char) 06606 __builtin_altivec_vsro((vector int)a, (vector int)b); 06607 } 06608 06609 static vector unsigned char __ATTRS_o_ai 06610 vec_vsro(vector unsigned char a, vector signed char b) 06611 { 06612 return (vector unsigned char) 06613 __builtin_altivec_vsro((vector int)a, (vector int)b); 06614 } 06615 06616 static vector unsigned char __ATTRS_o_ai 06617 vec_vsro(vector unsigned char a, vector unsigned char b) 06618 { 06619 return (vector unsigned char) 06620 __builtin_altivec_vsro((vector int)a, (vector int)b); 06621 } 06622 06623 static vector short __ATTRS_o_ai 06624 vec_vsro(vector short a, vector signed char b) 06625 { 06626 return (vector short)__builtin_altivec_vsro((vector int)a, (vector int)b); 06627 } 06628 06629 static vector short __ATTRS_o_ai 06630 vec_vsro(vector short a, vector unsigned char b) 06631 { 06632 return (vector short)__builtin_altivec_vsro((vector int)a, (vector int)b); 06633 } 06634 06635 static vector unsigned short __ATTRS_o_ai 06636 vec_vsro(vector unsigned short a, vector signed char b) 06637 { 06638 return (vector unsigned short) 06639 __builtin_altivec_vsro((vector int)a, (vector int)b); 06640 } 06641 06642 static vector unsigned short __ATTRS_o_ai 06643 vec_vsro(vector unsigned short a, vector unsigned char b) 06644 { 06645 return (vector unsigned short) 06646 __builtin_altivec_vsro((vector int)a, (vector int)b); 06647 } 06648 06649 static vector pixel __ATTRS_o_ai 06650 vec_vsro(vector pixel a, vector signed char b) 06651 { 06652 return (vector pixel)__builtin_altivec_vsro((vector int)a, (vector int)b); 06653 } 06654 06655 static vector pixel __ATTRS_o_ai 06656 vec_vsro(vector pixel a, vector unsigned char b) 06657 { 06658 return (vector pixel)__builtin_altivec_vsro((vector int)a, (vector int)b); 06659 } 06660 06661 static vector int __ATTRS_o_ai 06662 vec_vsro(vector int a, vector signed char b) 06663 { 06664 return (vector int)__builtin_altivec_vsro(a, (vector int)b); 06665 } 06666 06667 static vector int __ATTRS_o_ai 06668 vec_vsro(vector int a, vector unsigned char b) 06669 { 06670 return (vector int)__builtin_altivec_vsro(a, (vector int)b); 06671 } 06672 06673 static vector unsigned int __ATTRS_o_ai 06674 vec_vsro(vector unsigned int a, vector signed char b) 06675 { 06676 return (vector unsigned int) 06677 __builtin_altivec_vsro((vector int)a, (vector int)b); 06678 } 06679 06680 static vector unsigned int __ATTRS_o_ai 06681 vec_vsro(vector unsigned int a, vector unsigned char b) 06682 { 06683 return (vector unsigned int) 06684 __builtin_altivec_vsro((vector int)a, (vector int)b); 06685 } 06686 06687 static vector float __ATTRS_o_ai 06688 vec_vsro(vector float a, vector signed char b) 06689 { 06690 return (vector float)__builtin_altivec_vsro((vector int)a, (vector int)b); 06691 } 06692 06693 static vector float __ATTRS_o_ai 06694 vec_vsro(vector float a, vector unsigned char b) 06695 { 06696 return (vector float)__builtin_altivec_vsro((vector int)a, (vector int)b); 06697 } 06698 06699 /* vec_st */ 06700 06701 static void __ATTRS_o_ai 06702 vec_st(vector signed char a, int b, vector signed char *c) 06703 { 06704 __builtin_altivec_stvx((vector int)a, b, c); 06705 } 06706 06707 static void __ATTRS_o_ai 06708 vec_st(vector signed char a, int b, signed char *c) 06709 { 06710 __builtin_altivec_stvx((vector int)a, b, c); 06711 } 06712 06713 static void __ATTRS_o_ai 06714 vec_st(vector unsigned char a, int b, vector unsigned char *c) 06715 { 06716 __builtin_altivec_stvx((vector int)a, b, c); 06717 } 06718 06719 static void __ATTRS_o_ai 06720 vec_st(vector unsigned char a, int b, unsigned char *c) 06721 { 06722 __builtin_altivec_stvx((vector int)a, b, c); 06723 } 06724 06725 static void __ATTRS_o_ai 06726 vec_st(vector bool char a, int b, signed char *c) 06727 { 06728 __builtin_altivec_stvx((vector int)a, b, c); 06729 } 06730 06731 static void __ATTRS_o_ai 06732 vec_st(vector bool char a, int b, unsigned char *c) 06733 { 06734 __builtin_altivec_stvx((vector int)a, b, c); 06735 } 06736 06737 static void __ATTRS_o_ai 06738 vec_st(vector bool char a, int b, vector bool char *c) 06739 { 06740 __builtin_altivec_stvx((vector int)a, b, c); 06741 } 06742 06743 static void __ATTRS_o_ai 06744 vec_st(vector short a, int b, vector short *c) 06745 { 06746 __builtin_altivec_stvx((vector int)a, b, c); 06747 } 06748 06749 static void __ATTRS_o_ai 06750 vec_st(vector short a, int b, short *c) 06751 { 06752 __builtin_altivec_stvx((vector int)a, b, c); 06753 } 06754 06755 static void __ATTRS_o_ai 06756 vec_st(vector unsigned short a, int b, vector unsigned short *c) 06757 { 06758 __builtin_altivec_stvx((vector int)a, b, c); 06759 } 06760 06761 static void __ATTRS_o_ai 06762 vec_st(vector unsigned short a, int b, unsigned short *c) 06763 { 06764 __builtin_altivec_stvx((vector int)a, b, c); 06765 } 06766 06767 static void __ATTRS_o_ai 06768 vec_st(vector bool short a, int b, short *c) 06769 { 06770 __builtin_altivec_stvx((vector int)a, b, c); 06771 } 06772 06773 static void __ATTRS_o_ai 06774 vec_st(vector bool short a, int b, unsigned short *c) 06775 { 06776 __builtin_altivec_stvx((vector int)a, b, c); 06777 } 06778 06779 static void __ATTRS_o_ai 06780 vec_st(vector bool short a, int b, vector bool short *c) 06781 { 06782 __builtin_altivec_stvx((vector int)a, b, c); 06783 } 06784 06785 static void __ATTRS_o_ai 06786 vec_st(vector pixel a, int b, short *c) 06787 { 06788 __builtin_altivec_stvx((vector int)a, b, c); 06789 } 06790 06791 static void __ATTRS_o_ai 06792 vec_st(vector pixel a, int b, unsigned short *c) 06793 { 06794 __builtin_altivec_stvx((vector int)a, b, c); 06795 } 06796 06797 static void __ATTRS_o_ai 06798 vec_st(vector pixel a, int b, vector pixel *c) 06799 { 06800 __builtin_altivec_stvx((vector int)a, b, c); 06801 } 06802 06803 static void __ATTRS_o_ai 06804 vec_st(vector int a, int b, vector int *c) 06805 { 06806 __builtin_altivec_stvx(a, b, c); 06807 } 06808 06809 static void __ATTRS_o_ai 06810 vec_st(vector int a, int b, int *c) 06811 { 06812 __builtin_altivec_stvx(a, b, c); 06813 } 06814 06815 static void __ATTRS_o_ai 06816 vec_st(vector unsigned int a, int b, vector unsigned int *c) 06817 { 06818 __builtin_altivec_stvx((vector int)a, b, c); 06819 } 06820 06821 static void __ATTRS_o_ai 06822 vec_st(vector unsigned int a, int b, unsigned int *c) 06823 { 06824 __builtin_altivec_stvx((vector int)a, b, c); 06825 } 06826 06827 static void __ATTRS_o_ai 06828 vec_st(vector bool int a, int b, int *c) 06829 { 06830 __builtin_altivec_stvx((vector int)a, b, c); 06831 } 06832 06833 static void __ATTRS_o_ai 06834 vec_st(vector bool int a, int b, unsigned int *c) 06835 { 06836 __builtin_altivec_stvx((vector int)a, b, c); 06837 } 06838 06839 static void __ATTRS_o_ai 06840 vec_st(vector bool int a, int b, vector bool int *c) 06841 { 06842 __builtin_altivec_stvx((vector int)a, b, c); 06843 } 06844 06845 static void __ATTRS_o_ai 06846 vec_st(vector float a, int b, vector float *c) 06847 { 06848 __builtin_altivec_stvx((vector int)a, b, c); 06849 } 06850 06851 static void __ATTRS_o_ai 06852 vec_st(vector float a, int b, float *c) 06853 { 06854 __builtin_altivec_stvx((vector int)a, b, c); 06855 } 06856 06857 /* vec_stvx */ 06858 06859 static void __ATTRS_o_ai 06860 vec_stvx(vector signed char a, int b, vector signed char *c) 06861 { 06862 __builtin_altivec_stvx((vector int)a, b, c); 06863 } 06864 06865 static void __ATTRS_o_ai 06866 vec_stvx(vector signed char a, int b, signed char *c) 06867 { 06868 __builtin_altivec_stvx((vector int)a, b, c); 06869 } 06870 06871 static void __ATTRS_o_ai 06872 vec_stvx(vector unsigned char a, int b, vector unsigned char *c) 06873 { 06874 __builtin_altivec_stvx((vector int)a, b, c); 06875 } 06876 06877 static void __ATTRS_o_ai 06878 vec_stvx(vector unsigned char a, int b, unsigned char *c) 06879 { 06880 __builtin_altivec_stvx((vector int)a, b, c); 06881 } 06882 06883 static void __ATTRS_o_ai 06884 vec_stvx(vector bool char a, int b, signed char *c) 06885 { 06886 __builtin_altivec_stvx((vector int)a, b, c); 06887 } 06888 06889 static void __ATTRS_o_ai 06890 vec_stvx(vector bool char a, int b, unsigned char *c) 06891 { 06892 __builtin_altivec_stvx((vector int)a, b, c); 06893 } 06894 06895 static void __ATTRS_o_ai 06896 vec_stvx(vector bool char a, int b, vector bool char *c) 06897 { 06898 __builtin_altivec_stvx((vector int)a, b, c); 06899 } 06900 06901 static void __ATTRS_o_ai 06902 vec_stvx(vector short a, int b, vector short *c) 06903 { 06904 __builtin_altivec_stvx((vector int)a, b, c); 06905 } 06906 06907 static void __ATTRS_o_ai 06908 vec_stvx(vector short a, int b, short *c) 06909 { 06910 __builtin_altivec_stvx((vector int)a, b, c); 06911 } 06912 06913 static void __ATTRS_o_ai 06914 vec_stvx(vector unsigned short a, int b, vector unsigned short *c) 06915 { 06916 __builtin_altivec_stvx((vector int)a, b, c); 06917 } 06918 06919 static void __ATTRS_o_ai 06920 vec_stvx(vector unsigned short a, int b, unsigned short *c) 06921 { 06922 __builtin_altivec_stvx((vector int)a, b, c); 06923 } 06924 06925 static void __ATTRS_o_ai 06926 vec_stvx(vector bool short a, int b, short *c) 06927 { 06928 __builtin_altivec_stvx((vector int)a, b, c); 06929 } 06930 06931 static void __ATTRS_o_ai 06932 vec_stvx(vector bool short a, int b, unsigned short *c) 06933 { 06934 __builtin_altivec_stvx((vector int)a, b, c); 06935 } 06936 06937 static void __ATTRS_o_ai 06938 vec_stvx(vector bool short a, int b, vector bool short *c) 06939 { 06940 __builtin_altivec_stvx((vector int)a, b, c); 06941 } 06942 06943 static void __ATTRS_o_ai 06944 vec_stvx(vector pixel a, int b, short *c) 06945 { 06946 __builtin_altivec_stvx((vector int)a, b, c); 06947 } 06948 06949 static void __ATTRS_o_ai 06950 vec_stvx(vector pixel a, int b, unsigned short *c) 06951 { 06952 __builtin_altivec_stvx((vector int)a, b, c); 06953 } 06954 06955 static void __ATTRS_o_ai 06956 vec_stvx(vector pixel a, int b, vector pixel *c) 06957 { 06958 __builtin_altivec_stvx((vector int)a, b, c); 06959 } 06960 06961 static void __ATTRS_o_ai 06962 vec_stvx(vector int a, int b, vector int *c) 06963 { 06964 __builtin_altivec_stvx(a, b, c); 06965 } 06966 06967 static void __ATTRS_o_ai 06968 vec_stvx(vector int a, int b, int *c) 06969 { 06970 __builtin_altivec_stvx(a, b, c); 06971 } 06972 06973 static void __ATTRS_o_ai 06974 vec_stvx(vector unsigned int a, int b, vector unsigned int *c) 06975 { 06976 __builtin_altivec_stvx((vector int)a, b, c); 06977 } 06978 06979 static void __ATTRS_o_ai 06980 vec_stvx(vector unsigned int a, int b, unsigned int *c) 06981 { 06982 __builtin_altivec_stvx((vector int)a, b, c); 06983 } 06984 06985 static void __ATTRS_o_ai 06986 vec_stvx(vector bool int a, int b, int *c) 06987 { 06988 __builtin_altivec_stvx((vector int)a, b, c); 06989 } 06990 06991 static void __ATTRS_o_ai 06992 vec_stvx(vector bool int a, int b, unsigned int *c) 06993 { 06994 __builtin_altivec_stvx((vector int)a, b, c); 06995 } 06996 06997 static void __ATTRS_o_ai 06998 vec_stvx(vector bool int a, int b, vector bool int *c) 06999 { 07000 __builtin_altivec_stvx((vector int)a, b, c); 07001 } 07002 07003 static void __ATTRS_o_ai 07004 vec_stvx(vector float a, int b, vector float *c) 07005 { 07006 __builtin_altivec_stvx((vector int)a, b, c); 07007 } 07008 07009 static void __ATTRS_o_ai 07010 vec_stvx(vector float a, int b, float *c) 07011 { 07012 __builtin_altivec_stvx((vector int)a, b, c); 07013 } 07014 07015 /* vec_ste */ 07016 07017 static void __ATTRS_o_ai 07018 vec_ste(vector signed char a, int b, signed char *c) 07019 { 07020 __builtin_altivec_stvebx((vector char)a, b, c); 07021 } 07022 07023 static void __ATTRS_o_ai 07024 vec_ste(vector unsigned char a, int b, unsigned char *c) 07025 { 07026 __builtin_altivec_stvebx((vector char)a, b, c); 07027 } 07028 07029 static void __ATTRS_o_ai 07030 vec_ste(vector bool char a, int b, signed char *c) 07031 { 07032 __builtin_altivec_stvebx((vector char)a, b, c); 07033 } 07034 07035 static void __ATTRS_o_ai 07036 vec_ste(vector bool char a, int b, unsigned char *c) 07037 { 07038 __builtin_altivec_stvebx((vector char)a, b, c); 07039 } 07040 07041 static void __ATTRS_o_ai 07042 vec_ste(vector short a, int b, short *c) 07043 { 07044 __builtin_altivec_stvehx(a, b, c); 07045 } 07046 07047 static void __ATTRS_o_ai 07048 vec_ste(vector unsigned short a, int b, unsigned short *c) 07049 { 07050 __builtin_altivec_stvehx((vector short)a, b, c); 07051 } 07052 07053 static void __ATTRS_o_ai 07054 vec_ste(vector bool short a, int b, short *c) 07055 { 07056 __builtin_altivec_stvehx((vector short)a, b, c); 07057 } 07058 07059 static void __ATTRS_o_ai 07060 vec_ste(vector bool short a, int b, unsigned short *c) 07061 { 07062 __builtin_altivec_stvehx((vector short)a, b, c); 07063 } 07064 07065 static void __ATTRS_o_ai 07066 vec_ste(vector pixel a, int b, short *c) 07067 { 07068 __builtin_altivec_stvehx((vector short)a, b, c); 07069 } 07070 07071 static void __ATTRS_o_ai 07072 vec_ste(vector pixel a, int b, unsigned short *c) 07073 { 07074 __builtin_altivec_stvehx((vector short)a, b, c); 07075 } 07076 07077 static void __ATTRS_o_ai 07078 vec_ste(vector int a, int b, int *c) 07079 { 07080 __builtin_altivec_stvewx(a, b, c); 07081 } 07082 07083 static void __ATTRS_o_ai 07084 vec_ste(vector unsigned int a, int b, unsigned int *c) 07085 { 07086 __builtin_altivec_stvewx((vector int)a, b, c); 07087 } 07088 07089 static void __ATTRS_o_ai 07090 vec_ste(vector bool int a, int b, int *c) 07091 { 07092 __builtin_altivec_stvewx((vector int)a, b, c); 07093 } 07094 07095 static void __ATTRS_o_ai 07096 vec_ste(vector bool int a, int b, unsigned int *c) 07097 { 07098 __builtin_altivec_stvewx((vector int)a, b, c); 07099 } 07100 07101 static void __ATTRS_o_ai 07102 vec_ste(vector float a, int b, float *c) 07103 { 07104 __builtin_altivec_stvewx((vector int)a, b, c); 07105 } 07106 07107 /* vec_stvebx */ 07108 07109 static void __ATTRS_o_ai 07110 vec_stvebx(vector signed char a, int b, signed char *c) 07111 { 07112 __builtin_altivec_stvebx((vector char)a, b, c); 07113 } 07114 07115 static void __ATTRS_o_ai 07116 vec_stvebx(vector unsigned char a, int b, unsigned char *c) 07117 { 07118 __builtin_altivec_stvebx((vector char)a, b, c); 07119 } 07120 07121 static void __ATTRS_o_ai 07122 vec_stvebx(vector bool char a, int b, signed char *c) 07123 { 07124 __builtin_altivec_stvebx((vector char)a, b, c); 07125 } 07126 07127 static void __ATTRS_o_ai 07128 vec_stvebx(vector bool char a, int b, unsigned char *c) 07129 { 07130 __builtin_altivec_stvebx((vector char)a, b, c); 07131 } 07132 07133 /* vec_stvehx */ 07134 07135 static void __ATTRS_o_ai 07136 vec_stvehx(vector short a, int b, short *c) 07137 { 07138 __builtin_altivec_stvehx(a, b, c); 07139 } 07140 07141 static void __ATTRS_o_ai 07142 vec_stvehx(vector unsigned short a, int b, unsigned short *c) 07143 { 07144 __builtin_altivec_stvehx((vector short)a, b, c); 07145 } 07146 07147 static void __ATTRS_o_ai 07148 vec_stvehx(vector bool short a, int b, short *c) 07149 { 07150 __builtin_altivec_stvehx((vector short)a, b, c); 07151 } 07152 07153 static void __ATTRS_o_ai 07154 vec_stvehx(vector bool short a, int b, unsigned short *c) 07155 { 07156 __builtin_altivec_stvehx((vector short)a, b, c); 07157 } 07158 07159 static void __ATTRS_o_ai 07160 vec_stvehx(vector pixel a, int b, short *c) 07161 { 07162 __builtin_altivec_stvehx((vector short)a, b, c); 07163 } 07164 07165 static void __ATTRS_o_ai 07166 vec_stvehx(vector pixel a, int b, unsigned short *c) 07167 { 07168 __builtin_altivec_stvehx((vector short)a, b, c); 07169 } 07170 07171 /* vec_stvewx */ 07172 07173 static void __ATTRS_o_ai 07174 vec_stvewx(vector int a, int b, int *c) 07175 { 07176 __builtin_altivec_stvewx(a, b, c); 07177 } 07178 07179 static void __ATTRS_o_ai 07180 vec_stvewx(vector unsigned int a, int b, unsigned int *c) 07181 { 07182 __builtin_altivec_stvewx((vector int)a, b, c); 07183 } 07184 07185 static void __ATTRS_o_ai 07186 vec_stvewx(vector bool int a, int b, int *c) 07187 { 07188 __builtin_altivec_stvewx((vector int)a, b, c); 07189 } 07190 07191 static void __ATTRS_o_ai 07192 vec_stvewx(vector bool int a, int b, unsigned int *c) 07193 { 07194 __builtin_altivec_stvewx((vector int)a, b, c); 07195 } 07196 07197 static void __ATTRS_o_ai 07198 vec_stvewx(vector float a, int b, float *c) 07199 { 07200 __builtin_altivec_stvewx((vector int)a, b, c); 07201 } 07202 07203 /* vec_stl */ 07204 07205 static void __ATTRS_o_ai 07206 vec_stl(vector signed char a, int b, vector signed char *c) 07207 { 07208 __builtin_altivec_stvxl((vector int)a, b, c); 07209 } 07210 07211 static void __ATTRS_o_ai 07212 vec_stl(vector signed char a, int b, signed char *c) 07213 { 07214 __builtin_altivec_stvxl((vector int)a, b, c); 07215 } 07216 07217 static void __ATTRS_o_ai 07218 vec_stl(vector unsigned char a, int b, vector unsigned char *c) 07219 { 07220 __builtin_altivec_stvxl((vector int)a, b, c); 07221 } 07222 07223 static void __ATTRS_o_ai 07224 vec_stl(vector unsigned char a, int b, unsigned char *c) 07225 { 07226 __builtin_altivec_stvxl((vector int)a, b, c); 07227 } 07228 07229 static void __ATTRS_o_ai 07230 vec_stl(vector bool char a, int b, signed char *c) 07231 { 07232 __builtin_altivec_stvxl((vector int)a, b, c); 07233 } 07234 07235 static void __ATTRS_o_ai 07236 vec_stl(vector bool char a, int b, unsigned char *c) 07237 { 07238 __builtin_altivec_stvxl((vector int)a, b, c); 07239 } 07240 07241 static void __ATTRS_o_ai 07242 vec_stl(vector bool char a, int b, vector bool char *c) 07243 { 07244 __builtin_altivec_stvxl((vector int)a, b, c); 07245 } 07246 07247 static void __ATTRS_o_ai 07248 vec_stl(vector short a, int b, vector short *c) 07249 { 07250 __builtin_altivec_stvxl((vector int)a, b, c); 07251 } 07252 07253 static void __ATTRS_o_ai 07254 vec_stl(vector short a, int b, short *c) 07255 { 07256 __builtin_altivec_stvxl((vector int)a, b, c); 07257 } 07258 07259 static void __ATTRS_o_ai 07260 vec_stl(vector unsigned short a, int b, vector unsigned short *c) 07261 { 07262 __builtin_altivec_stvxl((vector int)a, b, c); 07263 } 07264 07265 static void __ATTRS_o_ai 07266 vec_stl(vector unsigned short a, int b, unsigned short *c) 07267 { 07268 __builtin_altivec_stvxl((vector int)a, b, c); 07269 } 07270 07271 static void __ATTRS_o_ai 07272 vec_stl(vector bool short a, int b, short *c) 07273 { 07274 __builtin_altivec_stvxl((vector int)a, b, c); 07275 } 07276 07277 static void __ATTRS_o_ai 07278 vec_stl(vector bool short a, int b, unsigned short *c) 07279 { 07280 __builtin_altivec_stvxl((vector int)a, b, c); 07281 } 07282 07283 static void __ATTRS_o_ai 07284 vec_stl(vector bool short a, int b, vector bool short *c) 07285 { 07286 __builtin_altivec_stvxl((vector int)a, b, c); 07287 } 07288 07289 static void __ATTRS_o_ai 07290 vec_stl(vector pixel a, int b, short *c) 07291 { 07292 __builtin_altivec_stvxl((vector int)a, b, c); 07293 } 07294 07295 static void __ATTRS_o_ai 07296 vec_stl(vector pixel a, int b, unsigned short *c) 07297 { 07298 __builtin_altivec_stvxl((vector int)a, b, c); 07299 } 07300 07301 static void __ATTRS_o_ai 07302 vec_stl(vector pixel a, int b, vector pixel *c) 07303 { 07304 __builtin_altivec_stvxl((vector int)a, b, c); 07305 } 07306 07307 static void __ATTRS_o_ai 07308 vec_stl(vector int a, int b, vector int *c) 07309 { 07310 __builtin_altivec_stvxl(a, b, c); 07311 } 07312 07313 static void __ATTRS_o_ai 07314 vec_stl(vector int a, int b, int *c) 07315 { 07316 __builtin_altivec_stvxl(a, b, c); 07317 } 07318 07319 static void __ATTRS_o_ai 07320 vec_stl(vector unsigned int a, int b, vector unsigned int *c) 07321 { 07322 __builtin_altivec_stvxl((vector int)a, b, c); 07323 } 07324 07325 static void __ATTRS_o_ai 07326 vec_stl(vector unsigned int a, int b, unsigned int *c) 07327 { 07328 __builtin_altivec_stvxl((vector int)a, b, c); 07329 } 07330 07331 static void __ATTRS_o_ai 07332 vec_stl(vector bool int a, int b, int *c) 07333 { 07334 __builtin_altivec_stvxl((vector int)a, b, c); 07335 } 07336 07337 static void __ATTRS_o_ai 07338 vec_stl(vector bool int a, int b, unsigned int *c) 07339 { 07340 __builtin_altivec_stvxl((vector int)a, b, c); 07341 } 07342 07343 static void __ATTRS_o_ai 07344 vec_stl(vector bool int a, int b, vector bool int *c) 07345 { 07346 __builtin_altivec_stvxl((vector int)a, b, c); 07347 } 07348 07349 static void __ATTRS_o_ai 07350 vec_stl(vector float a, int b, vector float *c) 07351 { 07352 __builtin_altivec_stvxl((vector int)a, b, c); 07353 } 07354 07355 static void __ATTRS_o_ai 07356 vec_stl(vector float a, int b, float *c) 07357 { 07358 __builtin_altivec_stvxl((vector int)a, b, c); 07359 } 07360 07361 /* vec_stvxl */ 07362 07363 static void __ATTRS_o_ai 07364 vec_stvxl(vector signed char a, int b, vector signed char *c) 07365 { 07366 __builtin_altivec_stvxl((vector int)a, b, c); 07367 } 07368 07369 static void __ATTRS_o_ai 07370 vec_stvxl(vector signed char a, int b, signed char *c) 07371 { 07372 __builtin_altivec_stvxl((vector int)a, b, c); 07373 } 07374 07375 static void __ATTRS_o_ai 07376 vec_stvxl(vector unsigned char a, int b, vector unsigned char *c) 07377 { 07378 __builtin_altivec_stvxl((vector int)a, b, c); 07379 } 07380 07381 static void __ATTRS_o_ai 07382 vec_stvxl(vector unsigned char a, int b, unsigned char *c) 07383 { 07384 __builtin_altivec_stvxl((vector int)a, b, c); 07385 } 07386 07387 static void __ATTRS_o_ai 07388 vec_stvxl(vector bool char a, int b, signed char *c) 07389 { 07390 __builtin_altivec_stvxl((vector int)a, b, c); 07391 } 07392 07393 static void __ATTRS_o_ai 07394 vec_stvxl(vector bool char a, int b, unsigned char *c) 07395 { 07396 __builtin_altivec_stvxl((vector int)a, b, c); 07397 } 07398 07399 static void __ATTRS_o_ai 07400 vec_stvxl(vector bool char a, int b, vector bool char *c) 07401 { 07402 __builtin_altivec_stvxl((vector int)a, b, c); 07403 } 07404 07405 static void __ATTRS_o_ai 07406 vec_stvxl(vector short a, int b, vector short *c) 07407 { 07408 __builtin_altivec_stvxl((vector int)a, b, c); 07409 } 07410 07411 static void __ATTRS_o_ai 07412 vec_stvxl(vector short a, int b, short *c) 07413 { 07414 __builtin_altivec_stvxl((vector int)a, b, c); 07415 } 07416 07417 static void __ATTRS_o_ai 07418 vec_stvxl(vector unsigned short a, int b, vector unsigned short *c) 07419 { 07420 __builtin_altivec_stvxl((vector int)a, b, c); 07421 } 07422 07423 static void __ATTRS_o_ai 07424 vec_stvxl(vector unsigned short a, int b, unsigned short *c) 07425 { 07426 __builtin_altivec_stvxl((vector int)a, b, c); 07427 } 07428 07429 static void __ATTRS_o_ai 07430 vec_stvxl(vector bool short a, int b, short *c) 07431 { 07432 __builtin_altivec_stvxl((vector int)a, b, c); 07433 } 07434 07435 static void __ATTRS_o_ai 07436 vec_stvxl(vector bool short a, int b, unsigned short *c) 07437 { 07438 __builtin_altivec_stvxl((vector int)a, b, c); 07439 } 07440 07441 static void __ATTRS_o_ai 07442 vec_stvxl(vector bool short a, int b, vector bool short *c) 07443 { 07444 __builtin_altivec_stvxl((vector int)a, b, c); 07445 } 07446 07447 static void __ATTRS_o_ai 07448 vec_stvxl(vector pixel a, int b, short *c) 07449 { 07450 __builtin_altivec_stvxl((vector int)a, b, c); 07451 } 07452 07453 static void __ATTRS_o_ai 07454 vec_stvxl(vector pixel a, int b, unsigned short *c) 07455 { 07456 __builtin_altivec_stvxl((vector int)a, b, c); 07457 } 07458 07459 static void __ATTRS_o_ai 07460 vec_stvxl(vector pixel a, int b, vector pixel *c) 07461 { 07462 __builtin_altivec_stvxl((vector int)a, b, c); 07463 } 07464 07465 static void __ATTRS_o_ai 07466 vec_stvxl(vector int a, int b, vector int *c) 07467 { 07468 __builtin_altivec_stvxl(a, b, c); 07469 } 07470 07471 static void __ATTRS_o_ai 07472 vec_stvxl(vector int a, int b, int *c) 07473 { 07474 __builtin_altivec_stvxl(a, b, c); 07475 } 07476 07477 static void __ATTRS_o_ai 07478 vec_stvxl(vector unsigned int a, int b, vector unsigned int *c) 07479 { 07480 __builtin_altivec_stvxl((vector int)a, b, c); 07481 } 07482 07483 static void __ATTRS_o_ai 07484 vec_stvxl(vector unsigned int a, int b, unsigned int *c) 07485 { 07486 __builtin_altivec_stvxl((vector int)a, b, c); 07487 } 07488 07489 static void __ATTRS_o_ai 07490 vec_stvxl(vector bool int a, int b, int *c) 07491 { 07492 __builtin_altivec_stvxl((vector int)a, b, c); 07493 } 07494 07495 static void __ATTRS_o_ai 07496 vec_stvxl(vector bool int a, int b, unsigned int *c) 07497 { 07498 __builtin_altivec_stvxl((vector int)a, b, c); 07499 } 07500 07501 static void __ATTRS_o_ai 07502 vec_stvxl(vector bool int a, int b, vector bool int *c) 07503 { 07504 __builtin_altivec_stvxl((vector int)a, b, c); 07505 } 07506 07507 static void __ATTRS_o_ai 07508 vec_stvxl(vector float a, int b, vector float *c) 07509 { 07510 __builtin_altivec_stvxl((vector int)a, b, c); 07511 } 07512 07513 static void __ATTRS_o_ai 07514 vec_stvxl(vector float a, int b, float *c) 07515 { 07516 __builtin_altivec_stvxl((vector int)a, b, c); 07517 } 07518 07519 /* vec_sub */ 07520 07521 static vector signed char __ATTRS_o_ai 07522 vec_sub(vector signed char a, vector signed char b) 07523 { 07524 return a - b; 07525 } 07526 07527 static vector signed char __ATTRS_o_ai 07528 vec_sub(vector bool char a, vector signed char b) 07529 { 07530 return (vector signed char)a - b; 07531 } 07532 07533 static vector signed char __ATTRS_o_ai 07534 vec_sub(vector signed char a, vector bool char b) 07535 { 07536 return a - (vector signed char)b; 07537 } 07538 07539 static vector unsigned char __ATTRS_o_ai 07540 vec_sub(vector unsigned char a, vector unsigned char b) 07541 { 07542 return a - b; 07543 } 07544 07545 static vector unsigned char __ATTRS_o_ai 07546 vec_sub(vector bool char a, vector unsigned char b) 07547 { 07548 return (vector unsigned char)a - b; 07549 } 07550 07551 static vector unsigned char __ATTRS_o_ai 07552 vec_sub(vector unsigned char a, vector bool char b) 07553 { 07554 return a - (vector unsigned char)b; 07555 } 07556 07557 static vector short __ATTRS_o_ai 07558 vec_sub(vector short a, vector short b) 07559 { 07560 return a - b; 07561 } 07562 07563 static vector short __ATTRS_o_ai 07564 vec_sub(vector bool short a, vector short b) 07565 { 07566 return (vector short)a - b; 07567 } 07568 07569 static vector short __ATTRS_o_ai 07570 vec_sub(vector short a, vector bool short b) 07571 { 07572 return a - (vector short)b; 07573 } 07574 07575 static vector unsigned short __ATTRS_o_ai 07576 vec_sub(vector unsigned short a, vector unsigned short b) 07577 { 07578 return a - b; 07579 } 07580 07581 static vector unsigned short __ATTRS_o_ai 07582 vec_sub(vector bool short a, vector unsigned short b) 07583 { 07584 return (vector unsigned short)a - b; 07585 } 07586 07587 static vector unsigned short __ATTRS_o_ai 07588 vec_sub(vector unsigned short a, vector bool short b) 07589 { 07590 return a - (vector unsigned short)b; 07591 } 07592 07593 static vector int __ATTRS_o_ai 07594 vec_sub(vector int a, vector int b) 07595 { 07596 return a - b; 07597 } 07598 07599 static vector int __ATTRS_o_ai 07600 vec_sub(vector bool int a, vector int b) 07601 { 07602 return (vector int)a - b; 07603 } 07604 07605 static vector int __ATTRS_o_ai 07606 vec_sub(vector int a, vector bool int b) 07607 { 07608 return a - (vector int)b; 07609 } 07610 07611 static vector unsigned int __ATTRS_o_ai 07612 vec_sub(vector unsigned int a, vector unsigned int b) 07613 { 07614 return a - b; 07615 } 07616 07617 static vector unsigned int __ATTRS_o_ai 07618 vec_sub(vector bool int a, vector unsigned int b) 07619 { 07620 return (vector unsigned int)a - b; 07621 } 07622 07623 static vector unsigned int __ATTRS_o_ai 07624 vec_sub(vector unsigned int a, vector bool int b) 07625 { 07626 return a - (vector unsigned int)b; 07627 } 07628 07629 static vector float __ATTRS_o_ai 07630 vec_sub(vector float a, vector float b) 07631 { 07632 return a - b; 07633 } 07634 07635 /* vec_vsububm */ 07636 07637 #define __builtin_altivec_vsububm vec_vsububm 07638 07639 static vector signed char __ATTRS_o_ai 07640 vec_vsububm(vector signed char a, vector signed char b) 07641 { 07642 return a - b; 07643 } 07644 07645 static vector signed char __ATTRS_o_ai 07646 vec_vsububm(vector bool char a, vector signed char b) 07647 { 07648 return (vector signed char)a - b; 07649 } 07650 07651 static vector signed char __ATTRS_o_ai 07652 vec_vsububm(vector signed char a, vector bool char b) 07653 { 07654 return a - (vector signed char)b; 07655 } 07656 07657 static vector unsigned char __ATTRS_o_ai 07658 vec_vsububm(vector unsigned char a, vector unsigned char b) 07659 { 07660 return a - b; 07661 } 07662 07663 static vector unsigned char __ATTRS_o_ai 07664 vec_vsububm(vector bool char a, vector unsigned char b) 07665 { 07666 return (vector unsigned char)a - b; 07667 } 07668 07669 static vector unsigned char __ATTRS_o_ai 07670 vec_vsububm(vector unsigned char a, vector bool char b) 07671 { 07672 return a - (vector unsigned char)b; 07673 } 07674 07675 /* vec_vsubuhm */ 07676 07677 #define __builtin_altivec_vsubuhm vec_vsubuhm 07678 07679 static vector short __ATTRS_o_ai 07680 vec_vsubuhm(vector short a, vector short b) 07681 { 07682 return a - b; 07683 } 07684 07685 static vector short __ATTRS_o_ai 07686 vec_vsubuhm(vector bool short a, vector short b) 07687 { 07688 return (vector short)a - b; 07689 } 07690 07691 static vector short __ATTRS_o_ai 07692 vec_vsubuhm(vector short a, vector bool short b) 07693 { 07694 return a - (vector short)b; 07695 } 07696 07697 static vector unsigned short __ATTRS_o_ai 07698 vec_vsubuhm(vector unsigned short a, vector unsigned short b) 07699 { 07700 return a - b; 07701 } 07702 07703 static vector unsigned short __ATTRS_o_ai 07704 vec_vsubuhm(vector bool short a, vector unsigned short b) 07705 { 07706 return (vector unsigned short)a - b; 07707 } 07708 07709 static vector unsigned short __ATTRS_o_ai 07710 vec_vsubuhm(vector unsigned short a, vector bool short b) 07711 { 07712 return a - (vector unsigned short)b; 07713 } 07714 07715 /* vec_vsubuwm */ 07716 07717 #define __builtin_altivec_vsubuwm vec_vsubuwm 07718 07719 static vector int __ATTRS_o_ai 07720 vec_vsubuwm(vector int a, vector int b) 07721 { 07722 return a - b; 07723 } 07724 07725 static vector int __ATTRS_o_ai 07726 vec_vsubuwm(vector bool int a, vector int b) 07727 { 07728 return (vector int)a - b; 07729 } 07730 07731 static vector int __ATTRS_o_ai 07732 vec_vsubuwm(vector int a, vector bool int b) 07733 { 07734 return a - (vector int)b; 07735 } 07736 07737 static vector unsigned int __ATTRS_o_ai 07738 vec_vsubuwm(vector unsigned int a, vector unsigned int b) 07739 { 07740 return a - b; 07741 } 07742 07743 static vector unsigned int __ATTRS_o_ai 07744 vec_vsubuwm(vector bool int a, vector unsigned int b) 07745 { 07746 return (vector unsigned int)a - b; 07747 } 07748 07749 static vector unsigned int __ATTRS_o_ai 07750 vec_vsubuwm(vector unsigned int a, vector bool int b) 07751 { 07752 return a - (vector unsigned int)b; 07753 } 07754 07755 /* vec_vsubfp */ 07756 07757 #define __builtin_altivec_vsubfp vec_vsubfp 07758 07759 static vector float __attribute__((__always_inline__)) 07760 vec_vsubfp(vector float a, vector float b) 07761 { 07762 return a - b; 07763 } 07764 07765 /* vec_subc */ 07766 07767 static vector unsigned int __attribute__((__always_inline__)) 07768 vec_subc(vector unsigned int a, vector unsigned int b) 07769 { 07770 return __builtin_altivec_vsubcuw(a, b); 07771 } 07772 07773 /* vec_vsubcuw */ 07774 07775 static vector unsigned int __attribute__((__always_inline__)) 07776 vec_vsubcuw(vector unsigned int a, vector unsigned int b) 07777 { 07778 return __builtin_altivec_vsubcuw(a, b); 07779 } 07780 07781 /* vec_subs */ 07782 07783 static vector signed char __ATTRS_o_ai 07784 vec_subs(vector signed char a, vector signed char b) 07785 { 07786 return __builtin_altivec_vsubsbs(a, b); 07787 } 07788 07789 static vector signed char __ATTRS_o_ai 07790 vec_subs(vector bool char a, vector signed char b) 07791 { 07792 return __builtin_altivec_vsubsbs((vector signed char)a, b); 07793 } 07794 07795 static vector signed char __ATTRS_o_ai 07796 vec_subs(vector signed char a, vector bool char b) 07797 { 07798 return __builtin_altivec_vsubsbs(a, (vector signed char)b); 07799 } 07800 07801 static vector unsigned char __ATTRS_o_ai 07802 vec_subs(vector unsigned char a, vector unsigned char b) 07803 { 07804 return __builtin_altivec_vsububs(a, b); 07805 } 07806 07807 static vector unsigned char __ATTRS_o_ai 07808 vec_subs(vector bool char a, vector unsigned char b) 07809 { 07810 return __builtin_altivec_vsububs((vector unsigned char)a, b); 07811 } 07812 07813 static vector unsigned char __ATTRS_o_ai 07814 vec_subs(vector unsigned char a, vector bool char b) 07815 { 07816 return __builtin_altivec_vsububs(a, (vector unsigned char)b); 07817 } 07818 07819 static vector short __ATTRS_o_ai 07820 vec_subs(vector short a, vector short b) 07821 { 07822 return __builtin_altivec_vsubshs(a, b); 07823 } 07824 07825 static vector short __ATTRS_o_ai 07826 vec_subs(vector bool short a, vector short b) 07827 { 07828 return __builtin_altivec_vsubshs((vector short)a, b); 07829 } 07830 07831 static vector short __ATTRS_o_ai 07832 vec_subs(vector short a, vector bool short b) 07833 { 07834 return __builtin_altivec_vsubshs(a, (vector short)b); 07835 } 07836 07837 static vector unsigned short __ATTRS_o_ai 07838 vec_subs(vector unsigned short a, vector unsigned short b) 07839 { 07840 return __builtin_altivec_vsubuhs(a, b); 07841 } 07842 07843 static vector unsigned short __ATTRS_o_ai 07844 vec_subs(vector bool short a, vector unsigned short b) 07845 { 07846 return __builtin_altivec_vsubuhs((vector unsigned short)a, b); 07847 } 07848 07849 static vector unsigned short __ATTRS_o_ai 07850 vec_subs(vector unsigned short a, vector bool short b) 07851 { 07852 return __builtin_altivec_vsubuhs(a, (vector unsigned short)b); 07853 } 07854 07855 static vector int __ATTRS_o_ai 07856 vec_subs(vector int a, vector int b) 07857 { 07858 return __builtin_altivec_vsubsws(a, b); 07859 } 07860 07861 static vector int __ATTRS_o_ai 07862 vec_subs(vector bool int a, vector int b) 07863 { 07864 return __builtin_altivec_vsubsws((vector int)a, b); 07865 } 07866 07867 static vector int __ATTRS_o_ai 07868 vec_subs(vector int a, vector bool int b) 07869 { 07870 return __builtin_altivec_vsubsws(a, (vector int)b); 07871 } 07872 07873 static vector unsigned int __ATTRS_o_ai 07874 vec_subs(vector unsigned int a, vector unsigned int b) 07875 { 07876 return __builtin_altivec_vsubuws(a, b); 07877 } 07878 07879 static vector unsigned int __ATTRS_o_ai 07880 vec_subs(vector bool int a, vector unsigned int b) 07881 { 07882 return __builtin_altivec_vsubuws((vector unsigned int)a, b); 07883 } 07884 07885 static vector unsigned int __ATTRS_o_ai 07886 vec_subs(vector unsigned int a, vector bool int b) 07887 { 07888 return __builtin_altivec_vsubuws(a, (vector unsigned int)b); 07889 } 07890 07891 /* vec_vsubsbs */ 07892 07893 static vector signed char __ATTRS_o_ai 07894 vec_vsubsbs(vector signed char a, vector signed char b) 07895 { 07896 return __builtin_altivec_vsubsbs(a, b); 07897 } 07898 07899 static vector signed char __ATTRS_o_ai 07900 vec_vsubsbs(vector bool char a, vector signed char b) 07901 { 07902 return __builtin_altivec_vsubsbs((vector signed char)a, b); 07903 } 07904 07905 static vector signed char __ATTRS_o_ai 07906 vec_vsubsbs(vector signed char a, vector bool char b) 07907 { 07908 return __builtin_altivec_vsubsbs(a, (vector signed char)b); 07909 } 07910 07911 /* vec_vsububs */ 07912 07913 static vector unsigned char __ATTRS_o_ai 07914 vec_vsububs(vector unsigned char a, vector unsigned char b) 07915 { 07916 return __builtin_altivec_vsububs(a, b); 07917 } 07918 07919 static vector unsigned char __ATTRS_o_ai 07920 vec_vsububs(vector bool char a, vector unsigned char b) 07921 { 07922 return __builtin_altivec_vsububs((vector unsigned char)a, b); 07923 } 07924 07925 static vector unsigned char __ATTRS_o_ai 07926 vec_vsububs(vector unsigned char a, vector bool char b) 07927 { 07928 return __builtin_altivec_vsububs(a, (vector unsigned char)b); 07929 } 07930 07931 /* vec_vsubshs */ 07932 07933 static vector short __ATTRS_o_ai 07934 vec_vsubshs(vector short a, vector short b) 07935 { 07936 return __builtin_altivec_vsubshs(a, b); 07937 } 07938 07939 static vector short __ATTRS_o_ai 07940 vec_vsubshs(vector bool short a, vector short b) 07941 { 07942 return __builtin_altivec_vsubshs((vector short)a, b); 07943 } 07944 07945 static vector short __ATTRS_o_ai 07946 vec_vsubshs(vector short a, vector bool short b) 07947 { 07948 return __builtin_altivec_vsubshs(a, (vector short)b); 07949 } 07950 07951 /* vec_vsubuhs */ 07952 07953 static vector unsigned short __ATTRS_o_ai 07954 vec_vsubuhs(vector unsigned short a, vector unsigned short b) 07955 { 07956 return __builtin_altivec_vsubuhs(a, b); 07957 } 07958 07959 static vector unsigned short __ATTRS_o_ai 07960 vec_vsubuhs(vector bool short a, vector unsigned short b) 07961 { 07962 return __builtin_altivec_vsubuhs((vector unsigned short)a, b); 07963 } 07964 07965 static vector unsigned short __ATTRS_o_ai 07966 vec_vsubuhs(vector unsigned short a, vector bool short b) 07967 { 07968 return __builtin_altivec_vsubuhs(a, (vector unsigned short)b); 07969 } 07970 07971 /* vec_vsubsws */ 07972 07973 static vector int __ATTRS_o_ai 07974 vec_vsubsws(vector int a, vector int b) 07975 { 07976 return __builtin_altivec_vsubsws(a, b); 07977 } 07978 07979 static vector int __ATTRS_o_ai 07980 vec_vsubsws(vector bool int a, vector int b) 07981 { 07982 return __builtin_altivec_vsubsws((vector int)a, b); 07983 } 07984 07985 static vector int __ATTRS_o_ai 07986 vec_vsubsws(vector int a, vector bool int b) 07987 { 07988 return __builtin_altivec_vsubsws(a, (vector int)b); 07989 } 07990 07991 /* vec_vsubuws */ 07992 07993 static vector unsigned int __ATTRS_o_ai 07994 vec_vsubuws(vector unsigned int a, vector unsigned int b) 07995 { 07996 return __builtin_altivec_vsubuws(a, b); 07997 } 07998 07999 static vector unsigned int __ATTRS_o_ai 08000 vec_vsubuws(vector bool int a, vector unsigned int b) 08001 { 08002 return __builtin_altivec_vsubuws((vector unsigned int)a, b); 08003 } 08004 08005 static vector unsigned int __ATTRS_o_ai 08006 vec_vsubuws(vector unsigned int a, vector bool int b) 08007 { 08008 return __builtin_altivec_vsubuws(a, (vector unsigned int)b); 08009 } 08010 08011 /* vec_sum4s */ 08012 08013 static vector int __ATTRS_o_ai 08014 vec_sum4s(vector signed char a, vector int b) 08015 { 08016 return __builtin_altivec_vsum4sbs(a, b); 08017 } 08018 08019 static vector unsigned int __ATTRS_o_ai 08020 vec_sum4s(vector unsigned char a, vector unsigned int b) 08021 { 08022 return __builtin_altivec_vsum4ubs(a, b); 08023 } 08024 08025 static vector int __ATTRS_o_ai 08026 vec_sum4s(vector signed short a, vector int b) 08027 { 08028 return __builtin_altivec_vsum4shs(a, b); 08029 } 08030 08031 /* vec_vsum4sbs */ 08032 08033 static vector int __attribute__((__always_inline__)) 08034 vec_vsum4sbs(vector signed char a, vector int b) 08035 { 08036 return __builtin_altivec_vsum4sbs(a, b); 08037 } 08038 08039 /* vec_vsum4ubs */ 08040 08041 static vector unsigned int __attribute__((__always_inline__)) 08042 vec_vsum4ubs(vector unsigned char a, vector unsigned int b) 08043 { 08044 return __builtin_altivec_vsum4ubs(a, b); 08045 } 08046 08047 /* vec_vsum4shs */ 08048 08049 static vector int __attribute__((__always_inline__)) 08050 vec_vsum4shs(vector signed short a, vector int b) 08051 { 08052 return __builtin_altivec_vsum4shs(a, b); 08053 } 08054 08055 /* vec_sum2s */ 08056 08057 static vector signed int __attribute__((__always_inline__)) 08058 vec_sum2s(vector int a, vector int b) 08059 { 08060 return __builtin_altivec_vsum2sws(a, b); 08061 } 08062 08063 /* vec_vsum2sws */ 08064 08065 static vector signed int __attribute__((__always_inline__)) 08066 vec_vsum2sws(vector int a, vector int b) 08067 { 08068 return __builtin_altivec_vsum2sws(a, b); 08069 } 08070 08071 /* vec_sums */ 08072 08073 static vector signed int __attribute__((__always_inline__)) 08074 vec_sums(vector signed int a, vector signed int b) 08075 { 08076 return __builtin_altivec_vsumsws(a, b); 08077 } 08078 08079 /* vec_vsumsws */ 08080 08081 static vector signed int __attribute__((__always_inline__)) 08082 vec_vsumsws(vector signed int a, vector signed int b) 08083 { 08084 return __builtin_altivec_vsumsws(a, b); 08085 } 08086 08087 /* vec_trunc */ 08088 08089 static vector float __attribute__((__always_inline__)) 08090 vec_trunc(vector float a) 08091 { 08092 return __builtin_altivec_vrfiz(a); 08093 } 08094 08095 /* vec_vrfiz */ 08096 08097 static vector float __attribute__((__always_inline__)) 08098 vec_vrfiz(vector float a) 08099 { 08100 return __builtin_altivec_vrfiz(a); 08101 } 08102 08103 /* vec_unpackh */ 08104 08105 static vector short __ATTRS_o_ai 08106 vec_unpackh(vector signed char a) 08107 { 08108 return __builtin_altivec_vupkhsb((vector char)a); 08109 } 08110 08111 static vector bool short __ATTRS_o_ai 08112 vec_unpackh(vector bool char a) 08113 { 08114 return (vector bool short)__builtin_altivec_vupkhsb((vector char)a); 08115 } 08116 08117 static vector int __ATTRS_o_ai 08118 vec_unpackh(vector short a) 08119 { 08120 return __builtin_altivec_vupkhsh(a); 08121 } 08122 08123 static vector bool int __ATTRS_o_ai 08124 vec_unpackh(vector bool short a) 08125 { 08126 return (vector bool int)__builtin_altivec_vupkhsh((vector short)a); 08127 } 08128 08129 static vector unsigned int __ATTRS_o_ai 08130 vec_unpackh(vector pixel a) 08131 { 08132 return (vector unsigned int)__builtin_altivec_vupkhsh((vector short)a); 08133 } 08134 08135 /* vec_vupkhsb */ 08136 08137 static vector short __ATTRS_o_ai 08138 vec_vupkhsb(vector signed char a) 08139 { 08140 return __builtin_altivec_vupkhsb((vector char)a); 08141 } 08142 08143 static vector bool short __ATTRS_o_ai 08144 vec_vupkhsb(vector bool char a) 08145 { 08146 return (vector bool short)__builtin_altivec_vupkhsb((vector char)a); 08147 } 08148 08149 /* vec_vupkhsh */ 08150 08151 static vector int __ATTRS_o_ai 08152 vec_vupkhsh(vector short a) 08153 { 08154 return __builtin_altivec_vupkhsh(a); 08155 } 08156 08157 static vector bool int __ATTRS_o_ai 08158 vec_vupkhsh(vector bool short a) 08159 { 08160 return (vector bool int)__builtin_altivec_vupkhsh((vector short)a); 08161 } 08162 08163 static vector unsigned int __ATTRS_o_ai 08164 vec_vupkhsh(vector pixel a) 08165 { 08166 return (vector unsigned int)__builtin_altivec_vupkhsh((vector short)a); 08167 } 08168 08169 /* vec_unpackl */ 08170 08171 static vector short __ATTRS_o_ai 08172 vec_unpackl(vector signed char a) 08173 { 08174 return __builtin_altivec_vupklsb((vector char)a); 08175 } 08176 08177 static vector bool short __ATTRS_o_ai 08178 vec_unpackl(vector bool char a) 08179 { 08180 return (vector bool short)__builtin_altivec_vupklsb((vector char)a); 08181 } 08182 08183 static vector int __ATTRS_o_ai 08184 vec_unpackl(vector short a) 08185 { 08186 return __builtin_altivec_vupklsh(a); 08187 } 08188 08189 static vector bool int __ATTRS_o_ai 08190 vec_unpackl(vector bool short a) 08191 { 08192 return (vector bool int)__builtin_altivec_vupklsh((vector short)a); 08193 } 08194 08195 static vector unsigned int __ATTRS_o_ai 08196 vec_unpackl(vector pixel a) 08197 { 08198 return (vector unsigned int)__builtin_altivec_vupklsh((vector short)a); 08199 } 08200 08201 /* vec_vupklsb */ 08202 08203 static vector short __ATTRS_o_ai 08204 vec_vupklsb(vector signed char a) 08205 { 08206 return __builtin_altivec_vupklsb((vector char)a); 08207 } 08208 08209 static vector bool short __ATTRS_o_ai 08210 vec_vupklsb(vector bool char a) 08211 { 08212 return (vector bool short)__builtin_altivec_vupklsb((vector char)a); 08213 } 08214 08215 /* vec_vupklsh */ 08216 08217 static vector int __ATTRS_o_ai 08218 vec_vupklsh(vector short a) 08219 { 08220 return __builtin_altivec_vupklsh(a); 08221 } 08222 08223 static vector bool int __ATTRS_o_ai 08224 vec_vupklsh(vector bool short a) 08225 { 08226 return (vector bool int)__builtin_altivec_vupklsh((vector short)a); 08227 } 08228 08229 static vector unsigned int __ATTRS_o_ai 08230 vec_vupklsh(vector pixel a) 08231 { 08232 return (vector unsigned int)__builtin_altivec_vupklsh((vector short)a); 08233 } 08234 08235 /* vec_xor */ 08236 08237 #define __builtin_altivec_vxor vec_xor 08238 08239 static vector signed char __ATTRS_o_ai 08240 vec_xor(vector signed char a, vector signed char b) 08241 { 08242 return a ^ b; 08243 } 08244 08245 static vector signed char __ATTRS_o_ai 08246 vec_xor(vector bool char a, vector signed char b) 08247 { 08248 return (vector signed char)a ^ b; 08249 } 08250 08251 static vector signed char __ATTRS_o_ai 08252 vec_xor(vector signed char a, vector bool char b) 08253 { 08254 return a ^ (vector signed char)b; 08255 } 08256 08257 static vector unsigned char __ATTRS_o_ai 08258 vec_xor(vector unsigned char a, vector unsigned char b) 08259 { 08260 return a ^ b; 08261 } 08262 08263 static vector unsigned char __ATTRS_o_ai 08264 vec_xor(vector bool char a, vector unsigned char b) 08265 { 08266 return (vector unsigned char)a ^ b; 08267 } 08268 08269 static vector unsigned char __ATTRS_o_ai 08270 vec_xor(vector unsigned char a, vector bool char b) 08271 { 08272 return a ^ (vector unsigned char)b; 08273 } 08274 08275 static vector bool char __ATTRS_o_ai 08276 vec_xor(vector bool char a, vector bool char b) 08277 { 08278 return a ^ b; 08279 } 08280 08281 static vector short __ATTRS_o_ai 08282 vec_xor(vector short a, vector short b) 08283 { 08284 return a ^ b; 08285 } 08286 08287 static vector short __ATTRS_o_ai 08288 vec_xor(vector bool short a, vector short b) 08289 { 08290 return (vector short)a ^ b; 08291 } 08292 08293 static vector short __ATTRS_o_ai 08294 vec_xor(vector short a, vector bool short b) 08295 { 08296 return a ^ (vector short)b; 08297 } 08298 08299 static vector unsigned short __ATTRS_o_ai 08300 vec_xor(vector unsigned short a, vector unsigned short b) 08301 { 08302 return a ^ b; 08303 } 08304 08305 static vector unsigned short __ATTRS_o_ai 08306 vec_xor(vector bool short a, vector unsigned short b) 08307 { 08308 return (vector unsigned short)a ^ b; 08309 } 08310 08311 static vector unsigned short __ATTRS_o_ai 08312 vec_xor(vector unsigned short a, vector bool short b) 08313 { 08314 return a ^ (vector unsigned short)b; 08315 } 08316 08317 static vector bool short __ATTRS_o_ai 08318 vec_xor(vector bool short a, vector bool short b) 08319 { 08320 return a ^ b; 08321 } 08322 08323 static vector int __ATTRS_o_ai 08324 vec_xor(vector int a, vector int b) 08325 { 08326 return a ^ b; 08327 } 08328 08329 static vector int __ATTRS_o_ai 08330 vec_xor(vector bool int a, vector int b) 08331 { 08332 return (vector int)a ^ b; 08333 } 08334 08335 static vector int __ATTRS_o_ai 08336 vec_xor(vector int a, vector bool int b) 08337 { 08338 return a ^ (vector int)b; 08339 } 08340 08341 static vector unsigned int __ATTRS_o_ai 08342 vec_xor(vector unsigned int a, vector unsigned int b) 08343 { 08344 return a ^ b; 08345 } 08346 08347 static vector unsigned int __ATTRS_o_ai 08348 vec_xor(vector bool int a, vector unsigned int b) 08349 { 08350 return (vector unsigned int)a ^ b; 08351 } 08352 08353 static vector unsigned int __ATTRS_o_ai 08354 vec_xor(vector unsigned int a, vector bool int b) 08355 { 08356 return a ^ (vector unsigned int)b; 08357 } 08358 08359 static vector bool int __ATTRS_o_ai 08360 vec_xor(vector bool int a, vector bool int b) 08361 { 08362 return a ^ b; 08363 } 08364 08365 static vector float __ATTRS_o_ai 08366 vec_xor(vector float a, vector float b) 08367 { 08368 vector unsigned int res = (vector unsigned int)a ^ (vector unsigned int)b; 08369 return (vector float)res; 08370 } 08371 08372 static vector float __ATTRS_o_ai 08373 vec_xor(vector bool int a, vector float b) 08374 { 08375 vector unsigned int res = (vector unsigned int)a ^ (vector unsigned int)b; 08376 return (vector float)res; 08377 } 08378 08379 static vector float __ATTRS_o_ai 08380 vec_xor(vector float a, vector bool int b) 08381 { 08382 vector unsigned int res = (vector unsigned int)a ^ (vector unsigned int)b; 08383 return (vector float)res; 08384 } 08385 08386 /* vec_vxor */ 08387 08388 static vector signed char __ATTRS_o_ai 08389 vec_vxor(vector signed char a, vector signed char b) 08390 { 08391 return a ^ b; 08392 } 08393 08394 static vector signed char __ATTRS_o_ai 08395 vec_vxor(vector bool char a, vector signed char b) 08396 { 08397 return (vector signed char)a ^ b; 08398 } 08399 08400 static vector signed char __ATTRS_o_ai 08401 vec_vxor(vector signed char a, vector bool char b) 08402 { 08403 return a ^ (vector signed char)b; 08404 } 08405 08406 static vector unsigned char __ATTRS_o_ai 08407 vec_vxor(vector unsigned char a, vector unsigned char b) 08408 { 08409 return a ^ b; 08410 } 08411 08412 static vector unsigned char __ATTRS_o_ai 08413 vec_vxor(vector bool char a, vector unsigned char b) 08414 { 08415 return (vector unsigned char)a ^ b; 08416 } 08417 08418 static vector unsigned char __ATTRS_o_ai 08419 vec_vxor(vector unsigned char a, vector bool char b) 08420 { 08421 return a ^ (vector unsigned char)b; 08422 } 08423 08424 static vector bool char __ATTRS_o_ai 08425 vec_vxor(vector bool char a, vector bool char b) 08426 { 08427 return a ^ b; 08428 } 08429 08430 static vector short __ATTRS_o_ai 08431 vec_vxor(vector short a, vector short b) 08432 { 08433 return a ^ b; 08434 } 08435 08436 static vector short __ATTRS_o_ai 08437 vec_vxor(vector bool short a, vector short b) 08438 { 08439 return (vector short)a ^ b; 08440 } 08441 08442 static vector short __ATTRS_o_ai 08443 vec_vxor(vector short a, vector bool short b) 08444 { 08445 return a ^ (vector short)b; 08446 } 08447 08448 static vector unsigned short __ATTRS_o_ai 08449 vec_vxor(vector unsigned short a, vector unsigned short b) 08450 { 08451 return a ^ b; 08452 } 08453 08454 static vector unsigned short __ATTRS_o_ai 08455 vec_vxor(vector bool short a, vector unsigned short b) 08456 { 08457 return (vector unsigned short)a ^ b; 08458 } 08459 08460 static vector unsigned short __ATTRS_o_ai 08461 vec_vxor(vector unsigned short a, vector bool short b) 08462 { 08463 return a ^ (vector unsigned short)b; 08464 } 08465 08466 static vector bool short __ATTRS_o_ai 08467 vec_vxor(vector bool short a, vector bool short b) 08468 { 08469 return a ^ b; 08470 } 08471 08472 static vector int __ATTRS_o_ai 08473 vec_vxor(vector int a, vector int b) 08474 { 08475 return a ^ b; 08476 } 08477 08478 static vector int __ATTRS_o_ai 08479 vec_vxor(vector bool int a, vector int b) 08480 { 08481 return (vector int)a ^ b; 08482 } 08483 08484 static vector int __ATTRS_o_ai 08485 vec_vxor(vector int a, vector bool int b) 08486 { 08487 return a ^ (vector int)b; 08488 } 08489 08490 static vector unsigned int __ATTRS_o_ai 08491 vec_vxor(vector unsigned int a, vector unsigned int b) 08492 { 08493 return a ^ b; 08494 } 08495 08496 static vector unsigned int __ATTRS_o_ai 08497 vec_vxor(vector bool int a, vector unsigned int b) 08498 { 08499 return (vector unsigned int)a ^ b; 08500 } 08501 08502 static vector unsigned int __ATTRS_o_ai 08503 vec_vxor(vector unsigned int a, vector bool int b) 08504 { 08505 return a ^ (vector unsigned int)b; 08506 } 08507 08508 static vector bool int __ATTRS_o_ai 08509 vec_vxor(vector bool int a, vector bool int b) 08510 { 08511 return a ^ b; 08512 } 08513 08514 static vector float __ATTRS_o_ai 08515 vec_vxor(vector float a, vector float b) 08516 { 08517 vector unsigned int res = (vector unsigned int)a ^ (vector unsigned int)b; 08518 return (vector float)res; 08519 } 08520 08521 static vector float __ATTRS_o_ai 08522 vec_vxor(vector bool int a, vector float b) 08523 { 08524 vector unsigned int res = (vector unsigned int)a ^ (vector unsigned int)b; 08525 return (vector float)res; 08526 } 08527 08528 static vector float __ATTRS_o_ai 08529 vec_vxor(vector float a, vector bool int b) 08530 { 08531 vector unsigned int res = (vector unsigned int)a ^ (vector unsigned int)b; 08532 return (vector float)res; 08533 } 08534 08535 /* ------------------------ extensions for CBEA ----------------------------- */ 08536 08537 /* vec_extract */ 08538 08539 static signed char __ATTRS_o_ai 08540 vec_extract(vector signed char a, int b) 08541 { 08542 return a[b]; 08543 } 08544 08545 static unsigned char __ATTRS_o_ai 08546 vec_extract(vector unsigned char a, int b) 08547 { 08548 return a[b]; 08549 } 08550 08551 static short __ATTRS_o_ai 08552 vec_extract(vector short a, int b) 08553 { 08554 return a[b]; 08555 } 08556 08557 static unsigned short __ATTRS_o_ai 08558 vec_extract(vector unsigned short a, int b) 08559 { 08560 return a[b]; 08561 } 08562 08563 static int __ATTRS_o_ai 08564 vec_extract(vector int a, int b) 08565 { 08566 return a[b]; 08567 } 08568 08569 static unsigned int __ATTRS_o_ai 08570 vec_extract(vector unsigned int a, int b) 08571 { 08572 return a[b]; 08573 } 08574 08575 static float __ATTRS_o_ai 08576 vec_extract(vector float a, int b) 08577 { 08578 return a[b]; 08579 } 08580 08581 /* vec_insert */ 08582 08583 static vector signed char __ATTRS_o_ai 08584 vec_insert(signed char a, vector signed char b, int c) 08585 { 08586 b[c] = a; 08587 return b; 08588 } 08589 08590 static vector unsigned char __ATTRS_o_ai 08591 vec_insert(unsigned char a, vector unsigned char b, int c) 08592 { 08593 b[c] = a; 08594 return b; 08595 } 08596 08597 static vector short __ATTRS_o_ai 08598 vec_insert(short a, vector short b, int c) 08599 { 08600 b[c] = a; 08601 return b; 08602 } 08603 08604 static vector unsigned short __ATTRS_o_ai 08605 vec_insert(unsigned short a, vector unsigned short b, int c) 08606 { 08607 b[c] = a; 08608 return b; 08609 } 08610 08611 static vector int __ATTRS_o_ai 08612 vec_insert(int a, vector int b, int c) 08613 { 08614 b[c] = a; 08615 return b; 08616 } 08617 08618 static vector unsigned int __ATTRS_o_ai 08619 vec_insert(unsigned int a, vector unsigned int b, int c) 08620 { 08621 b[c] = a; 08622 return b; 08623 } 08624 08625 static vector float __ATTRS_o_ai 08626 vec_insert(float a, vector float b, int c) 08627 { 08628 b[c] = a; 08629 return b; 08630 } 08631 08632 /* vec_lvlx */ 08633 08634 static vector signed char __ATTRS_o_ai 08635 vec_lvlx(int a, const signed char *b) 08636 { 08637 return vec_perm(vec_ld(a, b), 08638 (vector signed char)(0), 08639 vec_lvsl(a, b)); 08640 } 08641 08642 static vector signed char __ATTRS_o_ai 08643 vec_lvlx(int a, const vector signed char *b) 08644 { 08645 return vec_perm(vec_ld(a, b), 08646 (vector signed char)(0), 08647 vec_lvsl(a, (unsigned char *)b)); 08648 } 08649 08650 static vector unsigned char __ATTRS_o_ai 08651 vec_lvlx(int a, const unsigned char *b) 08652 { 08653 return vec_perm(vec_ld(a, b), 08654 (vector unsigned char)(0), 08655 vec_lvsl(a, b)); 08656 } 08657 08658 static vector unsigned char __ATTRS_o_ai 08659 vec_lvlx(int a, const vector unsigned char *b) 08660 { 08661 return vec_perm(vec_ld(a, b), 08662 (vector unsigned char)(0), 08663 vec_lvsl(a, (unsigned char *)b)); 08664 } 08665 08666 static vector bool char __ATTRS_o_ai 08667 vec_lvlx(int a, const vector bool char *b) 08668 { 08669 return vec_perm(vec_ld(a, b), 08670 (vector bool char)(0), 08671 vec_lvsl(a, (unsigned char *)b)); 08672 } 08673 08674 static vector short __ATTRS_o_ai 08675 vec_lvlx(int a, const short *b) 08676 { 08677 return vec_perm(vec_ld(a, b), 08678 (vector short)(0), 08679 vec_lvsl(a, b)); 08680 } 08681 08682 static vector short __ATTRS_o_ai 08683 vec_lvlx(int a, const vector short *b) 08684 { 08685 return vec_perm(vec_ld(a, b), 08686 (vector short)(0), 08687 vec_lvsl(a, (unsigned char *)b)); 08688 } 08689 08690 static vector unsigned short __ATTRS_o_ai 08691 vec_lvlx(int a, const unsigned short *b) 08692 { 08693 return vec_perm(vec_ld(a, b), 08694 (vector unsigned short)(0), 08695 vec_lvsl(a, b)); 08696 } 08697 08698 static vector unsigned short __ATTRS_o_ai 08699 vec_lvlx(int a, const vector unsigned short *b) 08700 { 08701 return vec_perm(vec_ld(a, b), 08702 (vector unsigned short)(0), 08703 vec_lvsl(a, (unsigned char *)b)); 08704 } 08705 08706 static vector bool short __ATTRS_o_ai 08707 vec_lvlx(int a, const vector bool short *b) 08708 { 08709 return vec_perm(vec_ld(a, b), 08710 (vector bool short)(0), 08711 vec_lvsl(a, (unsigned char *)b)); 08712 } 08713 08714 static vector pixel __ATTRS_o_ai 08715 vec_lvlx(int a, const vector pixel *b) 08716 { 08717 return vec_perm(vec_ld(a, b), 08718 (vector pixel)(0), 08719 vec_lvsl(a, (unsigned char *)b)); 08720 } 08721 08722 static vector int __ATTRS_o_ai 08723 vec_lvlx(int a, const int *b) 08724 { 08725 return vec_perm(vec_ld(a, b), 08726 (vector int)(0), 08727 vec_lvsl(a, b)); 08728 } 08729 08730 static vector int __ATTRS_o_ai 08731 vec_lvlx(int a, const vector int *b) 08732 { 08733 return vec_perm(vec_ld(a, b), 08734 (vector int)(0), 08735 vec_lvsl(a, (unsigned char *)b)); 08736 } 08737 08738 static vector unsigned int __ATTRS_o_ai 08739 vec_lvlx(int a, const unsigned int *b) 08740 { 08741 return vec_perm(vec_ld(a, b), 08742 (vector unsigned int)(0), 08743 vec_lvsl(a, b)); 08744 } 08745 08746 static vector unsigned int __ATTRS_o_ai 08747 vec_lvlx(int a, const vector unsigned int *b) 08748 { 08749 return vec_perm(vec_ld(a, b), 08750 (vector unsigned int)(0), 08751 vec_lvsl(a, (unsigned char *)b)); 08752 } 08753 08754 static vector bool int __ATTRS_o_ai 08755 vec_lvlx(int a, const vector bool int *b) 08756 { 08757 return vec_perm(vec_ld(a, b), 08758 (vector bool int)(0), 08759 vec_lvsl(a, (unsigned char *)b)); 08760 } 08761 08762 static vector float __ATTRS_o_ai 08763 vec_lvlx(int a, const float *b) 08764 { 08765 return vec_perm(vec_ld(a, b), 08766 (vector float)(0), 08767 vec_lvsl(a, b)); 08768 } 08769 08770 static vector float __ATTRS_o_ai 08771 vec_lvlx(int a, const vector float *b) 08772 { 08773 return vec_perm(vec_ld(a, b), 08774 (vector float)(0), 08775 vec_lvsl(a, (unsigned char *)b)); 08776 } 08777 08778 /* vec_lvlxl */ 08779 08780 static vector signed char __ATTRS_o_ai 08781 vec_lvlxl(int a, const signed char *b) 08782 { 08783 return vec_perm(vec_ldl(a, b), 08784 (vector signed char)(0), 08785 vec_lvsl(a, b)); 08786 } 08787 08788 static vector signed char __ATTRS_o_ai 08789 vec_lvlxl(int a, const vector signed char *b) 08790 { 08791 return vec_perm(vec_ldl(a, b), 08792 (vector signed char)(0), 08793 vec_lvsl(a, (unsigned char *)b)); 08794 } 08795 08796 static vector unsigned char __ATTRS_o_ai 08797 vec_lvlxl(int a, const unsigned char *b) 08798 { 08799 return vec_perm(vec_ldl(a, b), 08800 (vector unsigned char)(0), 08801 vec_lvsl(a, b)); 08802 } 08803 08804 static vector unsigned char __ATTRS_o_ai 08805 vec_lvlxl(int a, const vector unsigned char *b) 08806 { 08807 return vec_perm(vec_ldl(a, b), 08808 (vector unsigned char)(0), 08809 vec_lvsl(a, (unsigned char *)b)); 08810 } 08811 08812 static vector bool char __ATTRS_o_ai 08813 vec_lvlxl(int a, const vector bool char *b) 08814 { 08815 return vec_perm(vec_ldl(a, b), 08816 (vector bool char)(0), 08817 vec_lvsl(a, (unsigned char *)b)); 08818 } 08819 08820 static vector short __ATTRS_o_ai 08821 vec_lvlxl(int a, const short *b) 08822 { 08823 return vec_perm(vec_ldl(a, b), 08824 (vector short)(0), 08825 vec_lvsl(a, b)); 08826 } 08827 08828 static vector short __ATTRS_o_ai 08829 vec_lvlxl(int a, const vector short *b) 08830 { 08831 return vec_perm(vec_ldl(a, b), 08832 (vector short)(0), 08833 vec_lvsl(a, (unsigned char *)b)); 08834 } 08835 08836 static vector unsigned short __ATTRS_o_ai 08837 vec_lvlxl(int a, const unsigned short *b) 08838 { 08839 return vec_perm(vec_ldl(a, b), 08840 (vector unsigned short)(0), 08841 vec_lvsl(a, b)); 08842 } 08843 08844 static vector unsigned short __ATTRS_o_ai 08845 vec_lvlxl(int a, const vector unsigned short *b) 08846 { 08847 return vec_perm(vec_ldl(a, b), 08848 (vector unsigned short)(0), 08849 vec_lvsl(a, (unsigned char *)b)); 08850 } 08851 08852 static vector bool short __ATTRS_o_ai 08853 vec_lvlxl(int a, const vector bool short *b) 08854 { 08855 return vec_perm(vec_ldl(a, b), 08856 (vector bool short)(0), 08857 vec_lvsl(a, (unsigned char *)b)); 08858 } 08859 08860 static vector pixel __ATTRS_o_ai 08861 vec_lvlxl(int a, const vector pixel *b) 08862 { 08863 return vec_perm(vec_ldl(a, b), 08864 (vector pixel)(0), 08865 vec_lvsl(a, (unsigned char *)b)); 08866 } 08867 08868 static vector int __ATTRS_o_ai 08869 vec_lvlxl(int a, const int *b) 08870 { 08871 return vec_perm(vec_ldl(a, b), 08872 (vector int)(0), 08873 vec_lvsl(a, b)); 08874 } 08875 08876 static vector int __ATTRS_o_ai 08877 vec_lvlxl(int a, const vector int *b) 08878 { 08879 return vec_perm(vec_ldl(a, b), 08880 (vector int)(0), 08881 vec_lvsl(a, (unsigned char *)b)); 08882 } 08883 08884 static vector unsigned int __ATTRS_o_ai 08885 vec_lvlxl(int a, const unsigned int *b) 08886 { 08887 return vec_perm(vec_ldl(a, b), 08888 (vector unsigned int)(0), 08889 vec_lvsl(a, b)); 08890 } 08891 08892 static vector unsigned int __ATTRS_o_ai 08893 vec_lvlxl(int a, const vector unsigned int *b) 08894 { 08895 return vec_perm(vec_ldl(a, b), 08896 (vector unsigned int)(0), 08897 vec_lvsl(a, (unsigned char *)b)); 08898 } 08899 08900 static vector bool int __ATTRS_o_ai 08901 vec_lvlxl(int a, const vector bool int *b) 08902 { 08903 return vec_perm(vec_ldl(a, b), 08904 (vector bool int)(0), 08905 vec_lvsl(a, (unsigned char *)b)); 08906 } 08907 08908 static vector float __ATTRS_o_ai 08909 vec_lvlxl(int a, const float *b) 08910 { 08911 return vec_perm(vec_ldl(a, b), 08912 (vector float)(0), 08913 vec_lvsl(a, b)); 08914 } 08915 08916 static vector float __ATTRS_o_ai 08917 vec_lvlxl(int a, vector float *b) 08918 { 08919 return vec_perm(vec_ldl(a, b), 08920 (vector float)(0), 08921 vec_lvsl(a, (unsigned char *)b)); 08922 } 08923 08924 /* vec_lvrx */ 08925 08926 static vector signed char __ATTRS_o_ai 08927 vec_lvrx(int a, const signed char *b) 08928 { 08929 return vec_perm((vector signed char)(0), 08930 vec_ld(a, b), 08931 vec_lvsl(a, b)); 08932 } 08933 08934 static vector signed char __ATTRS_o_ai 08935 vec_lvrx(int a, const vector signed char *b) 08936 { 08937 return vec_perm((vector signed char)(0), 08938 vec_ld(a, b), 08939 vec_lvsl(a, (unsigned char *)b)); 08940 } 08941 08942 static vector unsigned char __ATTRS_o_ai 08943 vec_lvrx(int a, const unsigned char *b) 08944 { 08945 return vec_perm((vector unsigned char)(0), 08946 vec_ld(a, b), 08947 vec_lvsl(a, b)); 08948 } 08949 08950 static vector unsigned char __ATTRS_o_ai 08951 vec_lvrx(int a, const vector unsigned char *b) 08952 { 08953 return vec_perm((vector unsigned char)(0), 08954 vec_ld(a, b), 08955 vec_lvsl(a, (unsigned char *)b)); 08956 } 08957 08958 static vector bool char __ATTRS_o_ai 08959 vec_lvrx(int a, const vector bool char *b) 08960 { 08961 return vec_perm((vector bool char)(0), 08962 vec_ld(a, b), 08963 vec_lvsl(a, (unsigned char *)b)); 08964 } 08965 08966 static vector short __ATTRS_o_ai 08967 vec_lvrx(int a, const short *b) 08968 { 08969 return vec_perm((vector short)(0), 08970 vec_ld(a, b), 08971 vec_lvsl(a, b)); 08972 } 08973 08974 static vector short __ATTRS_o_ai 08975 vec_lvrx(int a, const vector short *b) 08976 { 08977 return vec_perm((vector short)(0), 08978 vec_ld(a, b), 08979 vec_lvsl(a, (unsigned char *)b)); 08980 } 08981 08982 static vector unsigned short __ATTRS_o_ai 08983 vec_lvrx(int a, const unsigned short *b) 08984 { 08985 return vec_perm((vector unsigned short)(0), 08986 vec_ld(a, b), 08987 vec_lvsl(a, b)); 08988 } 08989 08990 static vector unsigned short __ATTRS_o_ai 08991 vec_lvrx(int a, const vector unsigned short *b) 08992 { 08993 return vec_perm((vector unsigned short)(0), 08994 vec_ld(a, b), 08995 vec_lvsl(a, (unsigned char *)b)); 08996 } 08997 08998 static vector bool short __ATTRS_o_ai 08999 vec_lvrx(int a, const vector bool short *b) 09000 { 09001 return vec_perm((vector bool short)(0), 09002 vec_ld(a, b), 09003 vec_lvsl(a, (unsigned char *)b)); 09004 } 09005 09006 static vector pixel __ATTRS_o_ai 09007 vec_lvrx(int a, const vector pixel *b) 09008 { 09009 return vec_perm((vector pixel)(0), 09010 vec_ld(a, b), 09011 vec_lvsl(a, (unsigned char *)b)); 09012 } 09013 09014 static vector int __ATTRS_o_ai 09015 vec_lvrx(int a, const int *b) 09016 { 09017 return vec_perm((vector int)(0), 09018 vec_ld(a, b), 09019 vec_lvsl(a, b)); 09020 } 09021 09022 static vector int __ATTRS_o_ai 09023 vec_lvrx(int a, const vector int *b) 09024 { 09025 return vec_perm((vector int)(0), 09026 vec_ld(a, b), 09027 vec_lvsl(a, (unsigned char *)b)); 09028 } 09029 09030 static vector unsigned int __ATTRS_o_ai 09031 vec_lvrx(int a, const unsigned int *b) 09032 { 09033 return vec_perm((vector unsigned int)(0), 09034 vec_ld(a, b), 09035 vec_lvsl(a, b)); 09036 } 09037 09038 static vector unsigned int __ATTRS_o_ai 09039 vec_lvrx(int a, const vector unsigned int *b) 09040 { 09041 return vec_perm((vector unsigned int)(0), 09042 vec_ld(a, b), 09043 vec_lvsl(a, (unsigned char *)b)); 09044 } 09045 09046 static vector bool int __ATTRS_o_ai 09047 vec_lvrx(int a, const vector bool int *b) 09048 { 09049 return vec_perm((vector bool int)(0), 09050 vec_ld(a, b), 09051 vec_lvsl(a, (unsigned char *)b)); 09052 } 09053 09054 static vector float __ATTRS_o_ai 09055 vec_lvrx(int a, const float *b) 09056 { 09057 return vec_perm((vector float)(0), 09058 vec_ld(a, b), 09059 vec_lvsl(a, b)); 09060 } 09061 09062 static vector float __ATTRS_o_ai 09063 vec_lvrx(int a, const vector float *b) 09064 { 09065 return vec_perm((vector float)(0), 09066 vec_ld(a, b), 09067 vec_lvsl(a, (unsigned char *)b)); 09068 } 09069 09070 /* vec_lvrxl */ 09071 09072 static vector signed char __ATTRS_o_ai 09073 vec_lvrxl(int a, const signed char *b) 09074 { 09075 return vec_perm((vector signed char)(0), 09076 vec_ldl(a, b), 09077 vec_lvsl(a, b)); 09078 } 09079 09080 static vector signed char __ATTRS_o_ai 09081 vec_lvrxl(int a, const vector signed char *b) 09082 { 09083 return vec_perm((vector signed char)(0), 09084 vec_ldl(a, b), 09085 vec_lvsl(a, (unsigned char *)b)); 09086 } 09087 09088 static vector unsigned char __ATTRS_o_ai 09089 vec_lvrxl(int a, const unsigned char *b) 09090 { 09091 return vec_perm((vector unsigned char)(0), 09092 vec_ldl(a, b), 09093 vec_lvsl(a, b)); 09094 } 09095 09096 static vector unsigned char __ATTRS_o_ai 09097 vec_lvrxl(int a, const vector unsigned char *b) 09098 { 09099 return vec_perm((vector unsigned char)(0), 09100 vec_ldl(a, b), 09101 vec_lvsl(a, (unsigned char *)b)); 09102 } 09103 09104 static vector bool char __ATTRS_o_ai 09105 vec_lvrxl(int a, const vector bool char *b) 09106 { 09107 return vec_perm((vector bool char)(0), 09108 vec_ldl(a, b), 09109 vec_lvsl(a, (unsigned char *)b)); 09110 } 09111 09112 static vector short __ATTRS_o_ai 09113 vec_lvrxl(int a, const short *b) 09114 { 09115 return vec_perm((vector short)(0), 09116 vec_ldl(a, b), 09117 vec_lvsl(a, b)); 09118 } 09119 09120 static vector short __ATTRS_o_ai 09121 vec_lvrxl(int a, const vector short *b) 09122 { 09123 return vec_perm((vector short)(0), 09124 vec_ldl(a, b), 09125 vec_lvsl(a, (unsigned char *)b)); 09126 } 09127 09128 static vector unsigned short __ATTRS_o_ai 09129 vec_lvrxl(int a, const unsigned short *b) 09130 { 09131 return vec_perm((vector unsigned short)(0), 09132 vec_ldl(a, b), 09133 vec_lvsl(a, b)); 09134 } 09135 09136 static vector unsigned short __ATTRS_o_ai 09137 vec_lvrxl(int a, const vector unsigned short *b) 09138 { 09139 return vec_perm((vector unsigned short)(0), 09140 vec_ldl(a, b), 09141 vec_lvsl(a, (unsigned char *)b)); 09142 } 09143 09144 static vector bool short __ATTRS_o_ai 09145 vec_lvrxl(int a, const vector bool short *b) 09146 { 09147 return vec_perm((vector bool short)(0), 09148 vec_ldl(a, b), 09149 vec_lvsl(a, (unsigned char *)b)); 09150 } 09151 09152 static vector pixel __ATTRS_o_ai 09153 vec_lvrxl(int a, const vector pixel *b) 09154 { 09155 return vec_perm((vector pixel)(0), 09156 vec_ldl(a, b), 09157 vec_lvsl(a, (unsigned char *)b)); 09158 } 09159 09160 static vector int __ATTRS_o_ai 09161 vec_lvrxl(int a, const int *b) 09162 { 09163 return vec_perm((vector int)(0), 09164 vec_ldl(a, b), 09165 vec_lvsl(a, b)); 09166 } 09167 09168 static vector int __ATTRS_o_ai 09169 vec_lvrxl(int a, const vector int *b) 09170 { 09171 return vec_perm((vector int)(0), 09172 vec_ldl(a, b), 09173 vec_lvsl(a, (unsigned char *)b)); 09174 } 09175 09176 static vector unsigned int __ATTRS_o_ai 09177 vec_lvrxl(int a, const unsigned int *b) 09178 { 09179 return vec_perm((vector unsigned int)(0), 09180 vec_ldl(a, b), 09181 vec_lvsl(a, b)); 09182 } 09183 09184 static vector unsigned int __ATTRS_o_ai 09185 vec_lvrxl(int a, const vector unsigned int *b) 09186 { 09187 return vec_perm((vector unsigned int)(0), 09188 vec_ldl(a, b), 09189 vec_lvsl(a, (unsigned char *)b)); 09190 } 09191 09192 static vector bool int __ATTRS_o_ai 09193 vec_lvrxl(int a, const vector bool int *b) 09194 { 09195 return vec_perm((vector bool int)(0), 09196 vec_ldl(a, b), 09197 vec_lvsl(a, (unsigned char *)b)); 09198 } 09199 09200 static vector float __ATTRS_o_ai 09201 vec_lvrxl(int a, const float *b) 09202 { 09203 return vec_perm((vector float)(0), 09204 vec_ldl(a, b), 09205 vec_lvsl(a, b)); 09206 } 09207 09208 static vector float __ATTRS_o_ai 09209 vec_lvrxl(int a, const vector float *b) 09210 { 09211 return vec_perm((vector float)(0), 09212 vec_ldl(a, b), 09213 vec_lvsl(a, (unsigned char *)b)); 09214 } 09215 09216 /* vec_stvlx */ 09217 09218 static void __ATTRS_o_ai 09219 vec_stvlx(vector signed char a, int b, signed char *c) 09220 { 09221 return vec_st(vec_perm(vec_lvrx(b, c), 09222 a, 09223 vec_lvsr(b, c)), 09224 b, c); 09225 } 09226 09227 static void __ATTRS_o_ai 09228 vec_stvlx(vector signed char a, int b, vector signed char *c) 09229 { 09230 return vec_st(vec_perm(vec_lvrx(b, c), 09231 a, 09232 vec_lvsr(b, (unsigned char *)c)), 09233 b, c); 09234 } 09235 09236 static void __ATTRS_o_ai 09237 vec_stvlx(vector unsigned char a, int b, unsigned char *c) 09238 { 09239 return vec_st(vec_perm(vec_lvrx(b, c), 09240 a, 09241 vec_lvsr(b, c)), 09242 b, c); 09243 } 09244 09245 static void __ATTRS_o_ai 09246 vec_stvlx(vector unsigned char a, int b, vector unsigned char *c) 09247 { 09248 return vec_st(vec_perm(vec_lvrx(b, c), 09249 a, 09250 vec_lvsr(b, (unsigned char *)c)), 09251 b, c); 09252 } 09253 09254 static void __ATTRS_o_ai 09255 vec_stvlx(vector bool char a, int b, vector bool char *c) 09256 { 09257 return vec_st(vec_perm(vec_lvrx(b, c), 09258 a, 09259 vec_lvsr(b, (unsigned char *)c)), 09260 b, c); 09261 } 09262 09263 static void __ATTRS_o_ai 09264 vec_stvlx(vector short a, int b, short *c) 09265 { 09266 return vec_st(vec_perm(vec_lvrx(b, c), 09267 a, 09268 vec_lvsr(b, c)), 09269 b, c); 09270 } 09271 09272 static void __ATTRS_o_ai 09273 vec_stvlx(vector short a, int b, vector short *c) 09274 { 09275 return vec_st(vec_perm(vec_lvrx(b, c), 09276 a, 09277 vec_lvsr(b, (unsigned char *)c)), 09278 b, c); 09279 } 09280 09281 static void __ATTRS_o_ai 09282 vec_stvlx(vector unsigned short a, int b, unsigned short *c) 09283 { 09284 return vec_st(vec_perm(vec_lvrx(b, c), 09285 a, 09286 vec_lvsr(b, c)), 09287 b, c); 09288 } 09289 09290 static void __ATTRS_o_ai 09291 vec_stvlx(vector unsigned short a, int b, vector unsigned short *c) 09292 { 09293 return vec_st(vec_perm(vec_lvrx(b, c), 09294 a, 09295 vec_lvsr(b, (unsigned char *)c)), 09296 b, c); 09297 } 09298 09299 static void __ATTRS_o_ai 09300 vec_stvlx(vector bool short a, int b, vector bool short *c) 09301 { 09302 return vec_st(vec_perm(vec_lvrx(b, c), 09303 a, 09304 vec_lvsr(b, (unsigned char *)c)), 09305 b, c); 09306 } 09307 09308 static void __ATTRS_o_ai 09309 vec_stvlx(vector pixel a, int b, vector pixel *c) 09310 { 09311 return vec_st(vec_perm(vec_lvrx(b, c), 09312 a, 09313 vec_lvsr(b, (unsigned char *)c)), 09314 b, c); 09315 } 09316 09317 static void __ATTRS_o_ai 09318 vec_stvlx(vector int a, int b, int *c) 09319 { 09320 return vec_st(vec_perm(vec_lvrx(b, c), 09321 a, 09322 vec_lvsr(b, c)), 09323 b, c); 09324 } 09325 09326 static void __ATTRS_o_ai 09327 vec_stvlx(vector int a, int b, vector int *c) 09328 { 09329 return vec_st(vec_perm(vec_lvrx(b, c), 09330 a, 09331 vec_lvsr(b, (unsigned char *)c)), 09332 b, c); 09333 } 09334 09335 static void __ATTRS_o_ai 09336 vec_stvlx(vector unsigned int a, int b, unsigned int *c) 09337 { 09338 return vec_st(vec_perm(vec_lvrx(b, c), 09339 a, 09340 vec_lvsr(b, c)), 09341 b, c); 09342 } 09343 09344 static void __ATTRS_o_ai 09345 vec_stvlx(vector unsigned int a, int b, vector unsigned int *c) 09346 { 09347 return vec_st(vec_perm(vec_lvrx(b, c), 09348 a, 09349 vec_lvsr(b, (unsigned char *)c)), 09350 b, c); 09351 } 09352 09353 static void __ATTRS_o_ai 09354 vec_stvlx(vector bool int a, int b, vector bool int *c) 09355 { 09356 return vec_st(vec_perm(vec_lvrx(b, c), 09357 a, 09358 vec_lvsr(b, (unsigned char *)c)), 09359 b, c); 09360 } 09361 09362 static void __ATTRS_o_ai 09363 vec_stvlx(vector float a, int b, vector float *c) 09364 { 09365 return vec_st(vec_perm(vec_lvrx(b, c), 09366 a, 09367 vec_lvsr(b, (unsigned char *)c)), 09368 b, c); 09369 } 09370 09371 /* vec_stvlxl */ 09372 09373 static void __ATTRS_o_ai 09374 vec_stvlxl(vector signed char a, int b, signed char *c) 09375 { 09376 return vec_stl(vec_perm(vec_lvrx(b, c), 09377 a, 09378 vec_lvsr(b, c)), 09379 b, c); 09380 } 09381 09382 static void __ATTRS_o_ai 09383 vec_stvlxl(vector signed char a, int b, vector signed char *c) 09384 { 09385 return vec_stl(vec_perm(vec_lvrx(b, c), 09386 a, 09387 vec_lvsr(b, (unsigned char *)c)), 09388 b, c); 09389 } 09390 09391 static void __ATTRS_o_ai 09392 vec_stvlxl(vector unsigned char a, int b, unsigned char *c) 09393 { 09394 return vec_stl(vec_perm(vec_lvrx(b, c), 09395 a, 09396 vec_lvsr(b, c)), 09397 b, c); 09398 } 09399 09400 static void __ATTRS_o_ai 09401 vec_stvlxl(vector unsigned char a, int b, vector unsigned char *c) 09402 { 09403 return vec_stl(vec_perm(vec_lvrx(b, c), 09404 a, 09405 vec_lvsr(b, (unsigned char *)c)), 09406 b, c); 09407 } 09408 09409 static void __ATTRS_o_ai 09410 vec_stvlxl(vector bool char a, int b, vector bool char *c) 09411 { 09412 return vec_stl(vec_perm(vec_lvrx(b, c), 09413 a, 09414 vec_lvsr(b, (unsigned char *)c)), 09415 b, c); 09416 } 09417 09418 static void __ATTRS_o_ai 09419 vec_stvlxl(vector short a, int b, short *c) 09420 { 09421 return vec_stl(vec_perm(vec_lvrx(b, c), 09422 a, 09423 vec_lvsr(b, c)), 09424 b, c); 09425 } 09426 09427 static void __ATTRS_o_ai 09428 vec_stvlxl(vector short a, int b, vector short *c) 09429 { 09430 return vec_stl(vec_perm(vec_lvrx(b, c), 09431 a, 09432 vec_lvsr(b, (unsigned char *)c)), 09433 b, c); 09434 } 09435 09436 static void __ATTRS_o_ai 09437 vec_stvlxl(vector unsigned short a, int b, unsigned short *c) 09438 { 09439 return vec_stl(vec_perm(vec_lvrx(b, c), 09440 a, 09441 vec_lvsr(b, c)), 09442 b, c); 09443 } 09444 09445 static void __ATTRS_o_ai 09446 vec_stvlxl(vector unsigned short a, int b, vector unsigned short *c) 09447 { 09448 return vec_stl(vec_perm(vec_lvrx(b, c), 09449 a, 09450 vec_lvsr(b, (unsigned char *)c)), 09451 b, c); 09452 } 09453 09454 static void __ATTRS_o_ai 09455 vec_stvlxl(vector bool short a, int b, vector bool short *c) 09456 { 09457 return vec_stl(vec_perm(vec_lvrx(b, c), 09458 a, 09459 vec_lvsr(b, (unsigned char *)c)), 09460 b, c); 09461 } 09462 09463 static void __ATTRS_o_ai 09464 vec_stvlxl(vector pixel a, int b, vector pixel *c) 09465 { 09466 return vec_stl(vec_perm(vec_lvrx(b, c), 09467 a, 09468 vec_lvsr(b, (unsigned char *)c)), 09469 b, c); 09470 } 09471 09472 static void __ATTRS_o_ai 09473 vec_stvlxl(vector int a, int b, int *c) 09474 { 09475 return vec_stl(vec_perm(vec_lvrx(b, c), 09476 a, 09477 vec_lvsr(b, c)), 09478 b, c); 09479 } 09480 09481 static void __ATTRS_o_ai 09482 vec_stvlxl(vector int a, int b, vector int *c) 09483 { 09484 return vec_stl(vec_perm(vec_lvrx(b, c), 09485 a, 09486 vec_lvsr(b, (unsigned char *)c)), 09487 b, c); 09488 } 09489 09490 static void __ATTRS_o_ai 09491 vec_stvlxl(vector unsigned int a, int b, unsigned int *c) 09492 { 09493 return vec_stl(vec_perm(vec_lvrx(b, c), 09494 a, 09495 vec_lvsr(b, c)), 09496 b, c); 09497 } 09498 09499 static void __ATTRS_o_ai 09500 vec_stvlxl(vector unsigned int a, int b, vector unsigned int *c) 09501 { 09502 return vec_stl(vec_perm(vec_lvrx(b, c), 09503 a, 09504 vec_lvsr(b, (unsigned char *)c)), 09505 b, c); 09506 } 09507 09508 static void __ATTRS_o_ai 09509 vec_stvlxl(vector bool int a, int b, vector bool int *c) 09510 { 09511 return vec_stl(vec_perm(vec_lvrx(b, c), 09512 a, 09513 vec_lvsr(b, (unsigned char *)c)), 09514 b, c); 09515 } 09516 09517 static void __ATTRS_o_ai 09518 vec_stvlxl(vector float a, int b, vector float *c) 09519 { 09520 return vec_stl(vec_perm(vec_lvrx(b, c), 09521 a, 09522 vec_lvsr(b, (unsigned char *)c)), 09523 b, c); 09524 } 09525 09526 /* vec_stvrx */ 09527 09528 static void __ATTRS_o_ai 09529 vec_stvrx(vector signed char a, int b, signed char *c) 09530 { 09531 return vec_st(vec_perm(a, 09532 vec_lvlx(b, c), 09533 vec_lvsr(b, c)), 09534 b, c); 09535 } 09536 09537 static void __ATTRS_o_ai 09538 vec_stvrx(vector signed char a, int b, vector signed char *c) 09539 { 09540 return vec_st(vec_perm(a, 09541 vec_lvlx(b, c), 09542 vec_lvsr(b, (unsigned char *)c)), 09543 b, c); 09544 } 09545 09546 static void __ATTRS_o_ai 09547 vec_stvrx(vector unsigned char a, int b, unsigned char *c) 09548 { 09549 return vec_st(vec_perm(a, 09550 vec_lvlx(b, c), 09551 vec_lvsr(b, c)), 09552 b, c); 09553 } 09554 09555 static void __ATTRS_o_ai 09556 vec_stvrx(vector unsigned char a, int b, vector unsigned char *c) 09557 { 09558 return vec_st(vec_perm(a, 09559 vec_lvlx(b, c), 09560 vec_lvsr(b, (unsigned char *)c)), 09561 b, c); 09562 } 09563 09564 static void __ATTRS_o_ai 09565 vec_stvrx(vector bool char a, int b, vector bool char *c) 09566 { 09567 return vec_st(vec_perm(a, 09568 vec_lvlx(b, c), 09569 vec_lvsr(b, (unsigned char *)c)), 09570 b, c); 09571 } 09572 09573 static void __ATTRS_o_ai 09574 vec_stvrx(vector short a, int b, short *c) 09575 { 09576 return vec_st(vec_perm(a, 09577 vec_lvlx(b, c), 09578 vec_lvsr(b, c)), 09579 b, c); 09580 } 09581 09582 static void __ATTRS_o_ai 09583 vec_stvrx(vector short a, int b, vector short *c) 09584 { 09585 return vec_st(vec_perm(a, 09586 vec_lvlx(b, c), 09587 vec_lvsr(b, (unsigned char *)c)), 09588 b, c); 09589 } 09590 09591 static void __ATTRS_o_ai 09592 vec_stvrx(vector unsigned short a, int b, unsigned short *c) 09593 { 09594 return vec_st(vec_perm(a, 09595 vec_lvlx(b, c), 09596 vec_lvsr(b, c)), 09597 b, c); 09598 } 09599 09600 static void __ATTRS_o_ai 09601 vec_stvrx(vector unsigned short a, int b, vector unsigned short *c) 09602 { 09603 return vec_st(vec_perm(a, 09604 vec_lvlx(b, c), 09605 vec_lvsr(b, (unsigned char *)c)), 09606 b, c); 09607 } 09608 09609 static void __ATTRS_o_ai 09610 vec_stvrx(vector bool short a, int b, vector bool short *c) 09611 { 09612 return vec_st(vec_perm(a, 09613 vec_lvlx(b, c), 09614 vec_lvsr(b, (unsigned char *)c)), 09615 b, c); 09616 } 09617 09618 static void __ATTRS_o_ai 09619 vec_stvrx(vector pixel a, int b, vector pixel *c) 09620 { 09621 return vec_st(vec_perm(a, 09622 vec_lvlx(b, c), 09623 vec_lvsr(b, (unsigned char *)c)), 09624 b, c); 09625 } 09626 09627 static void __ATTRS_o_ai 09628 vec_stvrx(vector int a, int b, int *c) 09629 { 09630 return vec_st(vec_perm(a, 09631 vec_lvlx(b, c), 09632 vec_lvsr(b, c)), 09633 b, c); 09634 } 09635 09636 static void __ATTRS_o_ai 09637 vec_stvrx(vector int a, int b, vector int *c) 09638 { 09639 return vec_st(vec_perm(a, 09640 vec_lvlx(b, c), 09641 vec_lvsr(b, (unsigned char *)c)), 09642 b, c); 09643 } 09644 09645 static void __ATTRS_o_ai 09646 vec_stvrx(vector unsigned int a, int b, unsigned int *c) 09647 { 09648 return vec_st(vec_perm(a, 09649 vec_lvlx(b, c), 09650 vec_lvsr(b, c)), 09651 b, c); 09652 } 09653 09654 static void __ATTRS_o_ai 09655 vec_stvrx(vector unsigned int a, int b, vector unsigned int *c) 09656 { 09657 return vec_st(vec_perm(a, 09658 vec_lvlx(b, c), 09659 vec_lvsr(b, (unsigned char *)c)), 09660 b, c); 09661 } 09662 09663 static void __ATTRS_o_ai 09664 vec_stvrx(vector bool int a, int b, vector bool int *c) 09665 { 09666 return vec_st(vec_perm(a, 09667 vec_lvlx(b, c), 09668 vec_lvsr(b, (unsigned char *)c)), 09669 b, c); 09670 } 09671 09672 static void __ATTRS_o_ai 09673 vec_stvrx(vector float a, int b, vector float *c) 09674 { 09675 return vec_st(vec_perm(a, 09676 vec_lvlx(b, c), 09677 vec_lvsr(b, (unsigned char *)c)), 09678 b, c); 09679 } 09680 09681 /* vec_stvrxl */ 09682 09683 static void __ATTRS_o_ai 09684 vec_stvrxl(vector signed char a, int b, signed char *c) 09685 { 09686 return vec_stl(vec_perm(a, 09687 vec_lvlx(b, c), 09688 vec_lvsr(b, c)), 09689 b, c); 09690 } 09691 09692 static void __ATTRS_o_ai 09693 vec_stvrxl(vector signed char a, int b, vector signed char *c) 09694 { 09695 return vec_stl(vec_perm(a, 09696 vec_lvlx(b, c), 09697 vec_lvsr(b, (unsigned char *)c)), 09698 b, c); 09699 } 09700 09701 static void __ATTRS_o_ai 09702 vec_stvrxl(vector unsigned char a, int b, unsigned char *c) 09703 { 09704 return vec_stl(vec_perm(a, 09705 vec_lvlx(b, c), 09706 vec_lvsr(b, c)), 09707 b, c); 09708 } 09709 09710 static void __ATTRS_o_ai 09711 vec_stvrxl(vector unsigned char a, int b, vector unsigned char *c) 09712 { 09713 return vec_stl(vec_perm(a, 09714 vec_lvlx(b, c), 09715 vec_lvsr(b, (unsigned char *)c)), 09716 b, c); 09717 } 09718 09719 static void __ATTRS_o_ai 09720 vec_stvrxl(vector bool char a, int b, vector bool char *c) 09721 { 09722 return vec_stl(vec_perm(a, 09723 vec_lvlx(b, c), 09724 vec_lvsr(b, (unsigned char *)c)), 09725 b, c); 09726 } 09727 09728 static void __ATTRS_o_ai 09729 vec_stvrxl(vector short a, int b, short *c) 09730 { 09731 return vec_stl(vec_perm(a, 09732 vec_lvlx(b, c), 09733 vec_lvsr(b, c)), 09734 b, c); 09735 } 09736 09737 static void __ATTRS_o_ai 09738 vec_stvrxl(vector short a, int b, vector short *c) 09739 { 09740 return vec_stl(vec_perm(a, 09741 vec_lvlx(b, c), 09742 vec_lvsr(b, (unsigned char *)c)), 09743 b, c); 09744 } 09745 09746 static void __ATTRS_o_ai 09747 vec_stvrxl(vector unsigned short a, int b, unsigned short *c) 09748 { 09749 return vec_stl(vec_perm(a, 09750 vec_lvlx(b, c), 09751 vec_lvsr(b, c)), 09752 b, c); 09753 } 09754 09755 static void __ATTRS_o_ai 09756 vec_stvrxl(vector unsigned short a, int b, vector unsigned short *c) 09757 { 09758 return vec_stl(vec_perm(a, 09759 vec_lvlx(b, c), 09760 vec_lvsr(b, (unsigned char *)c)), 09761 b, c); 09762 } 09763 09764 static void __ATTRS_o_ai 09765 vec_stvrxl(vector bool short a, int b, vector bool short *c) 09766 { 09767 return vec_stl(vec_perm(a, 09768 vec_lvlx(b, c), 09769 vec_lvsr(b, (unsigned char *)c)), 09770 b, c); 09771 } 09772 09773 static void __ATTRS_o_ai 09774 vec_stvrxl(vector pixel a, int b, vector pixel *c) 09775 { 09776 return vec_stl(vec_perm(a, 09777 vec_lvlx(b, c), 09778 vec_lvsr(b, (unsigned char *)c)), 09779 b, c); 09780 } 09781 09782 static void __ATTRS_o_ai 09783 vec_stvrxl(vector int a, int b, int *c) 09784 { 09785 return vec_stl(vec_perm(a, 09786 vec_lvlx(b, c), 09787 vec_lvsr(b, c)), 09788 b, c); 09789 } 09790 09791 static void __ATTRS_o_ai 09792 vec_stvrxl(vector int a, int b, vector int *c) 09793 { 09794 return vec_stl(vec_perm(a, 09795 vec_lvlx(b, c), 09796 vec_lvsr(b, (unsigned char *)c)), 09797 b, c); 09798 } 09799 09800 static void __ATTRS_o_ai 09801 vec_stvrxl(vector unsigned int a, int b, unsigned int *c) 09802 { 09803 return vec_stl(vec_perm(a, 09804 vec_lvlx(b, c), 09805 vec_lvsr(b, c)), 09806 b, c); 09807 } 09808 09809 static void __ATTRS_o_ai 09810 vec_stvrxl(vector unsigned int a, int b, vector unsigned int *c) 09811 { 09812 return vec_stl(vec_perm(a, 09813 vec_lvlx(b, c), 09814 vec_lvsr(b, (unsigned char *)c)), 09815 b, c); 09816 } 09817 09818 static void __ATTRS_o_ai 09819 vec_stvrxl(vector bool int a, int b, vector bool int *c) 09820 { 09821 return vec_stl(vec_perm(a, 09822 vec_lvlx(b, c), 09823 vec_lvsr(b, (unsigned char *)c)), 09824 b, c); 09825 } 09826 09827 static void __ATTRS_o_ai 09828 vec_stvrxl(vector float a, int b, vector float *c) 09829 { 09830 return vec_stl(vec_perm(a, 09831 vec_lvlx(b, c), 09832 vec_lvsr(b, (unsigned char *)c)), 09833 b, c); 09834 } 09835 09836 /* vec_promote */ 09837 09838 static vector signed char __ATTRS_o_ai 09839 vec_promote(signed char a, int b) 09840 { 09841 vector signed char res = (vector signed char)(0); 09842 res[b] = a; 09843 return res; 09844 } 09845 09846 static vector unsigned char __ATTRS_o_ai 09847 vec_promote(unsigned char a, int b) 09848 { 09849 vector unsigned char res = (vector unsigned char)(0); 09850 res[b] = a; 09851 return res; 09852 } 09853 09854 static vector short __ATTRS_o_ai 09855 vec_promote(short a, int b) 09856 { 09857 vector short res = (vector short)(0); 09858 res[b] = a; 09859 return res; 09860 } 09861 09862 static vector unsigned short __ATTRS_o_ai 09863 vec_promote(unsigned short a, int b) 09864 { 09865 vector unsigned short res = (vector unsigned short)(0); 09866 res[b] = a; 09867 return res; 09868 } 09869 09870 static vector int __ATTRS_o_ai 09871 vec_promote(int a, int b) 09872 { 09873 vector int res = (vector int)(0); 09874 res[b] = a; 09875 return res; 09876 } 09877 09878 static vector unsigned int __ATTRS_o_ai 09879 vec_promote(unsigned int a, int b) 09880 { 09881 vector unsigned int res = (vector unsigned int)(0); 09882 res[b] = a; 09883 return res; 09884 } 09885 09886 static vector float __ATTRS_o_ai 09887 vec_promote(float a, int b) 09888 { 09889 vector float res = (vector float)(0); 09890 res[b] = a; 09891 return res; 09892 } 09893 09894 /* vec_splats */ 09895 09896 static vector signed char __ATTRS_o_ai 09897 vec_splats(signed char a) 09898 { 09899 return (vector signed char)(a); 09900 } 09901 09902 static vector unsigned char __ATTRS_o_ai 09903 vec_splats(unsigned char a) 09904 { 09905 return (vector unsigned char)(a); 09906 } 09907 09908 static vector short __ATTRS_o_ai 09909 vec_splats(short a) 09910 { 09911 return (vector short)(a); 09912 } 09913 09914 static vector unsigned short __ATTRS_o_ai 09915 vec_splats(unsigned short a) 09916 { 09917 return (vector unsigned short)(a); 09918 } 09919 09920 static vector int __ATTRS_o_ai 09921 vec_splats(int a) 09922 { 09923 return (vector int)(a); 09924 } 09925 09926 static vector unsigned int __ATTRS_o_ai 09927 vec_splats(unsigned int a) 09928 { 09929 return (vector unsigned int)(a); 09930 } 09931 09932 static vector float __ATTRS_o_ai 09933 vec_splats(float a) 09934 { 09935 return (vector float)(a); 09936 } 09937 09938 /* ----------------------------- predicates --------------------------------- */ 09939 09940 /* vec_all_eq */ 09941 09942 static int __ATTRS_o_ai 09943 vec_all_eq(vector signed char a, vector signed char b) 09944 { 09945 return __builtin_altivec_vcmpequb_p(__CR6_LT, (vector char)a, (vector char)b); 09946 } 09947 09948 static int __ATTRS_o_ai 09949 vec_all_eq(vector signed char a, vector bool char b) 09950 { 09951 return __builtin_altivec_vcmpequb_p(__CR6_LT, (vector char)a, (vector char)b); 09952 } 09953 09954 static int __ATTRS_o_ai 09955 vec_all_eq(vector unsigned char a, vector unsigned char b) 09956 { 09957 return __builtin_altivec_vcmpequb_p(__CR6_LT, (vector char)a, (vector char)b); 09958 } 09959 09960 static int __ATTRS_o_ai 09961 vec_all_eq(vector unsigned char a, vector bool char b) 09962 { 09963 return __builtin_altivec_vcmpequb_p(__CR6_LT, (vector char)a, (vector char)b); 09964 } 09965 09966 static int __ATTRS_o_ai 09967 vec_all_eq(vector bool char a, vector signed char b) 09968 { 09969 return __builtin_altivec_vcmpequb_p(__CR6_LT, (vector char)a, (vector char)b); 09970 } 09971 09972 static int __ATTRS_o_ai 09973 vec_all_eq(vector bool char a, vector unsigned char b) 09974 { 09975 return __builtin_altivec_vcmpequb_p(__CR6_LT, (vector char)a, (vector char)b); 09976 } 09977 09978 static int __ATTRS_o_ai 09979 vec_all_eq(vector bool char a, vector bool char b) 09980 { 09981 return __builtin_altivec_vcmpequb_p(__CR6_LT, (vector char)a, (vector char)b); 09982 } 09983 09984 static int __ATTRS_o_ai 09985 vec_all_eq(vector short a, vector short b) 09986 { 09987 return __builtin_altivec_vcmpequh_p(__CR6_LT, a, b); 09988 } 09989 09990 static int __ATTRS_o_ai 09991 vec_all_eq(vector short a, vector bool short b) 09992 { 09993 return __builtin_altivec_vcmpequh_p(__CR6_LT, a, (vector short)b); 09994 } 09995 09996 static int __ATTRS_o_ai 09997 vec_all_eq(vector unsigned short a, vector unsigned short b) 09998 { 09999 return 10000 __builtin_altivec_vcmpequh_p(__CR6_LT, (vector short)a, (vector short)b); 10001 } 10002 10003 static int __ATTRS_o_ai 10004 vec_all_eq(vector unsigned short a, vector bool short b) 10005 { 10006 return 10007 __builtin_altivec_vcmpequh_p(__CR6_LT, (vector short)a, (vector short)b); 10008 } 10009 10010 static int __ATTRS_o_ai 10011 vec_all_eq(vector bool short a, vector short b) 10012 { 10013 return 10014 __builtin_altivec_vcmpequh_p(__CR6_LT, (vector short)a, (vector short)b); 10015 } 10016 10017 static int __ATTRS_o_ai 10018 vec_all_eq(vector bool short a, vector unsigned short b) 10019 { 10020 return 10021 __builtin_altivec_vcmpequh_p(__CR6_LT, (vector short)a, (vector short)b); 10022 } 10023 10024 static int __ATTRS_o_ai 10025 vec_all_eq(vector bool short a, vector bool short b) 10026 { 10027 return 10028 __builtin_altivec_vcmpequh_p(__CR6_LT, (vector short)a, (vector short)b); 10029 } 10030 10031 static int __ATTRS_o_ai 10032 vec_all_eq(vector pixel a, vector pixel b) 10033 { 10034 return 10035 __builtin_altivec_vcmpequh_p(__CR6_LT, (vector short)a, (vector short)b); 10036 } 10037 10038 static int __ATTRS_o_ai 10039 vec_all_eq(vector int a, vector int b) 10040 { 10041 return __builtin_altivec_vcmpequw_p(__CR6_LT, a, b); 10042 } 10043 10044 static int __ATTRS_o_ai 10045 vec_all_eq(vector int a, vector bool int b) 10046 { 10047 return __builtin_altivec_vcmpequw_p(__CR6_LT, a, (vector int)b); 10048 } 10049 10050 static int __ATTRS_o_ai 10051 vec_all_eq(vector unsigned int a, vector unsigned int b) 10052 { 10053 return __builtin_altivec_vcmpequw_p(__CR6_LT, (vector int)a, (vector int)b); 10054 } 10055 10056 static int __ATTRS_o_ai 10057 vec_all_eq(vector unsigned int a, vector bool int b) 10058 { 10059 return __builtin_altivec_vcmpequw_p(__CR6_LT, (vector int)a, (vector int)b); 10060 } 10061 10062 static int __ATTRS_o_ai 10063 vec_all_eq(vector bool int a, vector int b) 10064 { 10065 return __builtin_altivec_vcmpequw_p(__CR6_LT, (vector int)a, (vector int)b); 10066 } 10067 10068 static int __ATTRS_o_ai 10069 vec_all_eq(vector bool int a, vector unsigned int b) 10070 { 10071 return __builtin_altivec_vcmpequw_p(__CR6_LT, (vector int)a, (vector int)b); 10072 } 10073 10074 static int __ATTRS_o_ai 10075 vec_all_eq(vector bool int a, vector bool int b) 10076 { 10077 return __builtin_altivec_vcmpequw_p(__CR6_LT, (vector int)a, (vector int)b); 10078 } 10079 10080 static int __ATTRS_o_ai 10081 vec_all_eq(vector float a, vector float b) 10082 { 10083 return __builtin_altivec_vcmpeqfp_p(__CR6_LT, a, b); 10084 } 10085 10086 /* vec_all_ge */ 10087 10088 static int __ATTRS_o_ai 10089 vec_all_ge(vector signed char a, vector signed char b) 10090 { 10091 return __builtin_altivec_vcmpgtsb_p(__CR6_EQ, b, a); 10092 } 10093 10094 static int __ATTRS_o_ai 10095 vec_all_ge(vector signed char a, vector bool char b) 10096 { 10097 return __builtin_altivec_vcmpgtsb_p(__CR6_EQ, (vector signed char)b, a); 10098 } 10099 10100 static int __ATTRS_o_ai 10101 vec_all_ge(vector unsigned char a, vector unsigned char b) 10102 { 10103 return __builtin_altivec_vcmpgtub_p(__CR6_EQ, b, a); 10104 } 10105 10106 static int __ATTRS_o_ai 10107 vec_all_ge(vector unsigned char a, vector bool char b) 10108 { 10109 return __builtin_altivec_vcmpgtub_p(__CR6_EQ, (vector unsigned char)b, a); 10110 } 10111 10112 static int __ATTRS_o_ai 10113 vec_all_ge(vector bool char a, vector signed char b) 10114 { 10115 return __builtin_altivec_vcmpgtub_p(__CR6_EQ, 10116 (vector unsigned char)b, 10117 (vector unsigned char)a); 10118 } 10119 10120 static int __ATTRS_o_ai 10121 vec_all_ge(vector bool char a, vector unsigned char b) 10122 { 10123 return __builtin_altivec_vcmpgtub_p(__CR6_EQ, b, (vector unsigned char)a); 10124 } 10125 10126 static int __ATTRS_o_ai 10127 vec_all_ge(vector bool char a, vector bool char b) 10128 { 10129 return __builtin_altivec_vcmpgtub_p(__CR6_EQ, 10130 (vector unsigned char)b, 10131 (vector unsigned char)a); 10132 } 10133 10134 static int __ATTRS_o_ai 10135 vec_all_ge(vector short a, vector short b) 10136 { 10137 return __builtin_altivec_vcmpgtsh_p(__CR6_EQ, b, a); 10138 } 10139 10140 static int __ATTRS_o_ai 10141 vec_all_ge(vector short a, vector bool short b) 10142 { 10143 return __builtin_altivec_vcmpgtsh_p(__CR6_EQ, (vector short)b, a); 10144 } 10145 10146 static int __ATTRS_o_ai 10147 vec_all_ge(vector unsigned short a, vector unsigned short b) 10148 { 10149 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ, b, a); 10150 } 10151 10152 static int __ATTRS_o_ai 10153 vec_all_ge(vector unsigned short a, vector bool short b) 10154 { 10155 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ, (vector unsigned short)b, a); 10156 } 10157 10158 static int __ATTRS_o_ai 10159 vec_all_ge(vector bool short a, vector short b) 10160 { 10161 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ, 10162 (vector unsigned short)b, 10163 (vector unsigned short)a); 10164 } 10165 10166 static int __ATTRS_o_ai 10167 vec_all_ge(vector bool short a, vector unsigned short b) 10168 { 10169 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ, b, (vector unsigned short)a); 10170 } 10171 10172 static int __ATTRS_o_ai 10173 vec_all_ge(vector bool short a, vector bool short b) 10174 { 10175 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ, 10176 (vector unsigned short)b, 10177 (vector unsigned short)a); 10178 } 10179 10180 static int __ATTRS_o_ai 10181 vec_all_ge(vector int a, vector int b) 10182 { 10183 return __builtin_altivec_vcmpgtsw_p(__CR6_EQ, b, a); 10184 } 10185 10186 static int __ATTRS_o_ai 10187 vec_all_ge(vector int a, vector bool int b) 10188 { 10189 return __builtin_altivec_vcmpgtsw_p(__CR6_EQ, (vector int)b, a); 10190 } 10191 10192 static int __ATTRS_o_ai 10193 vec_all_ge(vector unsigned int a, vector unsigned int b) 10194 { 10195 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ, b, a); 10196 } 10197 10198 static int __ATTRS_o_ai 10199 vec_all_ge(vector unsigned int a, vector bool int b) 10200 { 10201 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ, (vector unsigned int)b, a); 10202 } 10203 10204 static int __ATTRS_o_ai 10205 vec_all_ge(vector bool int a, vector int b) 10206 { 10207 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ, 10208 (vector unsigned int)b, 10209 (vector unsigned int)a); 10210 } 10211 10212 static int __ATTRS_o_ai 10213 vec_all_ge(vector bool int a, vector unsigned int b) 10214 { 10215 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ, b, (vector unsigned int)a); 10216 } 10217 10218 static int __ATTRS_o_ai 10219 vec_all_ge(vector bool int a, vector bool int b) 10220 { 10221 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ, 10222 (vector unsigned int)b, 10223 (vector unsigned int)a); 10224 } 10225 10226 static int __ATTRS_o_ai 10227 vec_all_ge(vector float a, vector float b) 10228 { 10229 return __builtin_altivec_vcmpgefp_p(__CR6_LT, a, b); 10230 } 10231 10232 /* vec_all_gt */ 10233 10234 static int __ATTRS_o_ai 10235 vec_all_gt(vector signed char a, vector signed char b) 10236 { 10237 return __builtin_altivec_vcmpgtsb_p(__CR6_LT, a, b); 10238 } 10239 10240 static int __ATTRS_o_ai 10241 vec_all_gt(vector signed char a, vector bool char b) 10242 { 10243 return __builtin_altivec_vcmpgtsb_p(__CR6_LT, a, (vector signed char)b); 10244 } 10245 10246 static int __ATTRS_o_ai 10247 vec_all_gt(vector unsigned char a, vector unsigned char b) 10248 { 10249 return __builtin_altivec_vcmpgtub_p(__CR6_LT, a, b); 10250 } 10251 10252 static int __ATTRS_o_ai 10253 vec_all_gt(vector unsigned char a, vector bool char b) 10254 { 10255 return __builtin_altivec_vcmpgtub_p(__CR6_LT, a, (vector unsigned char)b); 10256 } 10257 10258 static int __ATTRS_o_ai 10259 vec_all_gt(vector bool char a, vector signed char b) 10260 { 10261 return __builtin_altivec_vcmpgtub_p(__CR6_LT, 10262 (vector unsigned char)a, 10263 (vector unsigned char)b); 10264 } 10265 10266 static int __ATTRS_o_ai 10267 vec_all_gt(vector bool char a, vector unsigned char b) 10268 { 10269 return __builtin_altivec_vcmpgtub_p(__CR6_LT, (vector unsigned char)a, b); 10270 } 10271 10272 static int __ATTRS_o_ai 10273 vec_all_gt(vector bool char a, vector bool char b) 10274 { 10275 return __builtin_altivec_vcmpgtub_p(__CR6_LT, 10276 (vector unsigned char)a, 10277 (vector unsigned char)b); 10278 } 10279 10280 static int __ATTRS_o_ai 10281 vec_all_gt(vector short a, vector short b) 10282 { 10283 return __builtin_altivec_vcmpgtsh_p(__CR6_LT, a, b); 10284 } 10285 10286 static int __ATTRS_o_ai 10287 vec_all_gt(vector short a, vector bool short b) 10288 { 10289 return __builtin_altivec_vcmpgtsh_p(__CR6_LT, a, (vector short)b); 10290 } 10291 10292 static int __ATTRS_o_ai 10293 vec_all_gt(vector unsigned short a, vector unsigned short b) 10294 { 10295 return __builtin_altivec_vcmpgtuh_p(__CR6_LT, a, b); 10296 } 10297 10298 static int __ATTRS_o_ai 10299 vec_all_gt(vector unsigned short a, vector bool short b) 10300 { 10301 return __builtin_altivec_vcmpgtuh_p(__CR6_LT, a, (vector unsigned short)b); 10302 } 10303 10304 static int __ATTRS_o_ai 10305 vec_all_gt(vector bool short a, vector short b) 10306 { 10307 return __builtin_altivec_vcmpgtuh_p(__CR6_LT, 10308 (vector unsigned short)a, 10309 (vector unsigned short)b); 10310 } 10311 10312 static int __ATTRS_o_ai 10313 vec_all_gt(vector bool short a, vector unsigned short b) 10314 { 10315 return __builtin_altivec_vcmpgtuh_p(__CR6_LT, (vector unsigned short)a, b); 10316 } 10317 10318 static int __ATTRS_o_ai 10319 vec_all_gt(vector bool short a, vector bool short b) 10320 { 10321 return __builtin_altivec_vcmpgtuh_p(__CR6_LT, 10322 (vector unsigned short)a, 10323 (vector unsigned short)b); 10324 } 10325 10326 static int __ATTRS_o_ai 10327 vec_all_gt(vector int a, vector int b) 10328 { 10329 return __builtin_altivec_vcmpgtsw_p(__CR6_LT, a, b); 10330 } 10331 10332 static int __ATTRS_o_ai 10333 vec_all_gt(vector int a, vector bool int b) 10334 { 10335 return __builtin_altivec_vcmpgtsw_p(__CR6_LT, a, (vector int)b); 10336 } 10337 10338 static int __ATTRS_o_ai 10339 vec_all_gt(vector unsigned int a, vector unsigned int b) 10340 { 10341 return __builtin_altivec_vcmpgtuw_p(__CR6_LT, a, b); 10342 } 10343 10344 static int __ATTRS_o_ai 10345 vec_all_gt(vector unsigned int a, vector bool int b) 10346 { 10347 return __builtin_altivec_vcmpgtuw_p(__CR6_LT, a, (vector unsigned int)b); 10348 } 10349 10350 static int __ATTRS_o_ai 10351 vec_all_gt(vector bool int a, vector int b) 10352 { 10353 return __builtin_altivec_vcmpgtuw_p(__CR6_LT, 10354 (vector unsigned int)a, 10355 (vector unsigned int)b); 10356 } 10357 10358 static int __ATTRS_o_ai 10359 vec_all_gt(vector bool int a, vector unsigned int b) 10360 { 10361 return __builtin_altivec_vcmpgtuw_p(__CR6_LT, (vector unsigned int)a, b); 10362 } 10363 10364 static int __ATTRS_o_ai 10365 vec_all_gt(vector bool int a, vector bool int b) 10366 { 10367 return __builtin_altivec_vcmpgtuw_p(__CR6_LT, 10368 (vector unsigned int)a, 10369 (vector unsigned int)b); 10370 } 10371 10372 static int __ATTRS_o_ai 10373 vec_all_gt(vector float a, vector float b) 10374 { 10375 return __builtin_altivec_vcmpgtfp_p(__CR6_LT, a, b); 10376 } 10377 10378 /* vec_all_in */ 10379 10380 static int __attribute__((__always_inline__)) 10381 vec_all_in(vector float a, vector float b) 10382 { 10383 return __builtin_altivec_vcmpbfp_p(__CR6_EQ, a, b); 10384 } 10385 10386 /* vec_all_le */ 10387 10388 static int __ATTRS_o_ai 10389 vec_all_le(vector signed char a, vector signed char b) 10390 { 10391 return __builtin_altivec_vcmpgtsb_p(__CR6_EQ, a, b); 10392 } 10393 10394 static int __ATTRS_o_ai 10395 vec_all_le(vector signed char a, vector bool char b) 10396 { 10397 return __builtin_altivec_vcmpgtsb_p(__CR6_EQ, a, (vector signed char)b); 10398 } 10399 10400 static int __ATTRS_o_ai 10401 vec_all_le(vector unsigned char a, vector unsigned char b) 10402 { 10403 return __builtin_altivec_vcmpgtub_p(__CR6_EQ, a, b); 10404 } 10405 10406 static int __ATTRS_o_ai 10407 vec_all_le(vector unsigned char a, vector bool char b) 10408 { 10409 return __builtin_altivec_vcmpgtub_p(__CR6_EQ, a, (vector unsigned char)b); 10410 } 10411 10412 static int __ATTRS_o_ai 10413 vec_all_le(vector bool char a, vector signed char b) 10414 { 10415 return __builtin_altivec_vcmpgtub_p(__CR6_EQ, 10416 (vector unsigned char)a, 10417 (vector unsigned char)b); 10418 } 10419 10420 static int __ATTRS_o_ai 10421 vec_all_le(vector bool char a, vector unsigned char b) 10422 { 10423 return __builtin_altivec_vcmpgtub_p(__CR6_EQ, (vector unsigned char)a, b); 10424 } 10425 10426 static int __ATTRS_o_ai 10427 vec_all_le(vector bool char a, vector bool char b) 10428 { 10429 return __builtin_altivec_vcmpgtub_p(__CR6_EQ, 10430 (vector unsigned char)a, 10431 (vector unsigned char)b); 10432 } 10433 10434 static int __ATTRS_o_ai 10435 vec_all_le(vector short a, vector short b) 10436 { 10437 return __builtin_altivec_vcmpgtsh_p(__CR6_EQ, a, b); 10438 } 10439 10440 static int __ATTRS_o_ai 10441 vec_all_le(vector short a, vector bool short b) 10442 { 10443 return __builtin_altivec_vcmpgtsh_p(__CR6_EQ, a, (vector short)b); 10444 } 10445 10446 static int __ATTRS_o_ai 10447 vec_all_le(vector unsigned short a, vector unsigned short b) 10448 { 10449 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ, a, b); 10450 } 10451 10452 static int __ATTRS_o_ai 10453 vec_all_le(vector unsigned short a, vector bool short b) 10454 { 10455 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ, a, (vector unsigned short)b); 10456 } 10457 10458 static int __ATTRS_o_ai 10459 vec_all_le(vector bool short a, vector short b) 10460 { 10461 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ, 10462 (vector unsigned short)a, 10463 (vector unsigned short)b); 10464 } 10465 10466 static int __ATTRS_o_ai 10467 vec_all_le(vector bool short a, vector unsigned short b) 10468 { 10469 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ, (vector unsigned short)a, b); 10470 } 10471 10472 static int __ATTRS_o_ai 10473 vec_all_le(vector bool short a, vector bool short b) 10474 { 10475 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ, 10476 (vector unsigned short)a, 10477 (vector unsigned short)b); 10478 } 10479 10480 static int __ATTRS_o_ai 10481 vec_all_le(vector int a, vector int b) 10482 { 10483 return __builtin_altivec_vcmpgtsw_p(__CR6_EQ, a, b); 10484 } 10485 10486 static int __ATTRS_o_ai 10487 vec_all_le(vector int a, vector bool int b) 10488 { 10489 return __builtin_altivec_vcmpgtsw_p(__CR6_EQ, a, (vector int)b); 10490 } 10491 10492 static int __ATTRS_o_ai 10493 vec_all_le(vector unsigned int a, vector unsigned int b) 10494 { 10495 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ, a, b); 10496 } 10497 10498 static int __ATTRS_o_ai 10499 vec_all_le(vector unsigned int a, vector bool int b) 10500 { 10501 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ, a, (vector unsigned int)b); 10502 } 10503 10504 static int __ATTRS_o_ai 10505 vec_all_le(vector bool int a, vector int b) 10506 { 10507 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ, 10508 (vector unsigned int)a, 10509 (vector unsigned int)b); 10510 } 10511 10512 static int __ATTRS_o_ai 10513 vec_all_le(vector bool int a, vector unsigned int b) 10514 { 10515 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ, (vector unsigned int)a, b); 10516 } 10517 10518 static int __ATTRS_o_ai 10519 vec_all_le(vector bool int a, vector bool int b) 10520 { 10521 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ, 10522 (vector unsigned int)a, 10523 (vector unsigned int)b); 10524 } 10525 10526 static int __ATTRS_o_ai 10527 vec_all_le(vector float a, vector float b) 10528 { 10529 return __builtin_altivec_vcmpgefp_p(__CR6_LT, b, a); 10530 } 10531 10532 /* vec_all_lt */ 10533 10534 static int __ATTRS_o_ai 10535 vec_all_lt(vector signed char a, vector signed char b) 10536 { 10537 return __builtin_altivec_vcmpgtsb_p(__CR6_LT, b, a); 10538 } 10539 10540 static int __ATTRS_o_ai 10541 vec_all_lt(vector signed char a, vector bool char b) 10542 { 10543 return __builtin_altivec_vcmpgtsb_p(__CR6_LT, (vector signed char)b, a); 10544 } 10545 10546 static int __ATTRS_o_ai 10547 vec_all_lt(vector unsigned char a, vector unsigned char b) 10548 { 10549 return __builtin_altivec_vcmpgtub_p(__CR6_LT, b, a); 10550 } 10551 10552 static int __ATTRS_o_ai 10553 vec_all_lt(vector unsigned char a, vector bool char b) 10554 { 10555 return __builtin_altivec_vcmpgtub_p(__CR6_LT, (vector unsigned char)b, a); 10556 } 10557 10558 static int __ATTRS_o_ai 10559 vec_all_lt(vector bool char a, vector signed char b) 10560 { 10561 return __builtin_altivec_vcmpgtub_p(__CR6_LT, 10562 (vector unsigned char)b, 10563 (vector unsigned char)a); 10564 } 10565 10566 static int __ATTRS_o_ai 10567 vec_all_lt(vector bool char a, vector unsigned char b) 10568 { 10569 return __builtin_altivec_vcmpgtub_p(__CR6_LT, b, (vector unsigned char)a); 10570 } 10571 10572 static int __ATTRS_o_ai 10573 vec_all_lt(vector bool char a, vector bool char b) 10574 { 10575 return __builtin_altivec_vcmpgtub_p(__CR6_LT, 10576 (vector unsigned char)b, 10577 (vector unsigned char)a); 10578 } 10579 10580 static int __ATTRS_o_ai 10581 vec_all_lt(vector short a, vector short b) 10582 { 10583 return __builtin_altivec_vcmpgtsh_p(__CR6_LT, b, a); 10584 } 10585 10586 static int __ATTRS_o_ai 10587 vec_all_lt(vector short a, vector bool short b) 10588 { 10589 return __builtin_altivec_vcmpgtsh_p(__CR6_LT, (vector short)b, a); 10590 } 10591 10592 static int __ATTRS_o_ai 10593 vec_all_lt(vector unsigned short a, vector unsigned short b) 10594 { 10595 return __builtin_altivec_vcmpgtuh_p(__CR6_LT, b, a); 10596 } 10597 10598 static int __ATTRS_o_ai 10599 vec_all_lt(vector unsigned short a, vector bool short b) 10600 { 10601 return __builtin_altivec_vcmpgtuh_p(__CR6_LT, (vector unsigned short)b, a); 10602 } 10603 10604 static int __ATTRS_o_ai 10605 vec_all_lt(vector bool short a, vector short b) 10606 { 10607 return __builtin_altivec_vcmpgtuh_p(__CR6_LT, 10608 (vector unsigned short)b, 10609 (vector unsigned short)a); 10610 } 10611 10612 static int __ATTRS_o_ai 10613 vec_all_lt(vector bool short a, vector unsigned short b) 10614 { 10615 return __builtin_altivec_vcmpgtuh_p(__CR6_LT, b, (vector unsigned short)a); 10616 } 10617 10618 static int __ATTRS_o_ai 10619 vec_all_lt(vector bool short a, vector bool short b) 10620 { 10621 return __builtin_altivec_vcmpgtuh_p(__CR6_LT, 10622 (vector unsigned short)b, 10623 (vector unsigned short)a); 10624 } 10625 10626 static int __ATTRS_o_ai 10627 vec_all_lt(vector int a, vector int b) 10628 { 10629 return __builtin_altivec_vcmpgtsw_p(__CR6_LT, b, a); 10630 } 10631 10632 static int __ATTRS_o_ai 10633 vec_all_lt(vector int a, vector bool int b) 10634 { 10635 return __builtin_altivec_vcmpgtsw_p(__CR6_LT, (vector int)b, a); 10636 } 10637 10638 static int __ATTRS_o_ai 10639 vec_all_lt(vector unsigned int a, vector unsigned int b) 10640 { 10641 return __builtin_altivec_vcmpgtuw_p(__CR6_LT, b, a); 10642 } 10643 10644 static int __ATTRS_o_ai 10645 vec_all_lt(vector unsigned int a, vector bool int b) 10646 { 10647 return __builtin_altivec_vcmpgtuw_p(__CR6_LT, (vector unsigned int)b, a); 10648 } 10649 10650 static int __ATTRS_o_ai 10651 vec_all_lt(vector bool int a, vector int b) 10652 { 10653 return __builtin_altivec_vcmpgtuw_p(__CR6_LT, 10654 (vector unsigned int)b, 10655 (vector unsigned int)a); 10656 } 10657 10658 static int __ATTRS_o_ai 10659 vec_all_lt(vector bool int a, vector unsigned int b) 10660 { 10661 return __builtin_altivec_vcmpgtuw_p(__CR6_LT, b, (vector unsigned int)a); 10662 } 10663 10664 static int __ATTRS_o_ai 10665 vec_all_lt(vector bool int a, vector bool int b) 10666 { 10667 return __builtin_altivec_vcmpgtuw_p(__CR6_LT, 10668 (vector unsigned int)b, 10669 (vector unsigned int)a); 10670 } 10671 10672 static int __ATTRS_o_ai 10673 vec_all_lt(vector float a, vector float b) 10674 { 10675 return __builtin_altivec_vcmpgtfp_p(__CR6_LT, b, a); 10676 } 10677 10678 /* vec_all_nan */ 10679 10680 static int __attribute__((__always_inline__)) 10681 vec_all_nan(vector float a) 10682 { 10683 return __builtin_altivec_vcmpeqfp_p(__CR6_EQ, a, a); 10684 } 10685 10686 /* vec_all_ne */ 10687 10688 static int __ATTRS_o_ai 10689 vec_all_ne(vector signed char a, vector signed char b) 10690 { 10691 return __builtin_altivec_vcmpequb_p(__CR6_EQ, (vector char)a, (vector char)b); 10692 } 10693 10694 static int __ATTRS_o_ai 10695 vec_all_ne(vector signed char a, vector bool char b) 10696 { 10697 return __builtin_altivec_vcmpequb_p(__CR6_EQ, (vector char)a, (vector char)b); 10698 } 10699 10700 static int __ATTRS_o_ai 10701 vec_all_ne(vector unsigned char a, vector unsigned char b) 10702 { 10703 return __builtin_altivec_vcmpequb_p(__CR6_EQ, (vector char)a, (vector char)b); 10704 } 10705 10706 static int __ATTRS_o_ai 10707 vec_all_ne(vector unsigned char a, vector bool char b) 10708 { 10709 return __builtin_altivec_vcmpequb_p(__CR6_EQ, (vector char)a, (vector char)b); 10710 } 10711 10712 static int __ATTRS_o_ai 10713 vec_all_ne(vector bool char a, vector signed char b) 10714 { 10715 return __builtin_altivec_vcmpequb_p(__CR6_EQ, (vector char)a, (vector char)b); 10716 } 10717 10718 static int __ATTRS_o_ai 10719 vec_all_ne(vector bool char a, vector unsigned char b) 10720 { 10721 return __builtin_altivec_vcmpequb_p(__CR6_EQ, (vector char)a, (vector char)b); 10722 } 10723 10724 static int __ATTRS_o_ai 10725 vec_all_ne(vector bool char a, vector bool char b) 10726 { 10727 return __builtin_altivec_vcmpequb_p(__CR6_EQ, (vector char)a, (vector char)b); 10728 } 10729 10730 static int __ATTRS_o_ai 10731 vec_all_ne(vector short a, vector short b) 10732 { 10733 return __builtin_altivec_vcmpequh_p(__CR6_EQ, a, b); 10734 } 10735 10736 static int __ATTRS_o_ai 10737 vec_all_ne(vector short a, vector bool short b) 10738 { 10739 return __builtin_altivec_vcmpequh_p(__CR6_EQ, a, (vector short)b); 10740 } 10741 10742 static int __ATTRS_o_ai 10743 vec_all_ne(vector unsigned short a, vector unsigned short b) 10744 { 10745 return 10746 __builtin_altivec_vcmpequh_p(__CR6_EQ, (vector short)a, (vector short)b); 10747 } 10748 10749 static int __ATTRS_o_ai 10750 vec_all_ne(vector unsigned short a, vector bool short b) 10751 { 10752 return 10753 __builtin_altivec_vcmpequh_p(__CR6_EQ, (vector short)a, (vector short)b); 10754 } 10755 10756 static int __ATTRS_o_ai 10757 vec_all_ne(vector bool short a, vector short b) 10758 { 10759 return 10760 __builtin_altivec_vcmpequh_p(__CR6_EQ, (vector short)a, (vector short)b); 10761 } 10762 10763 static int __ATTRS_o_ai 10764 vec_all_ne(vector bool short a, vector unsigned short b) 10765 { 10766 return 10767 __builtin_altivec_vcmpequh_p(__CR6_EQ, (vector short)a, (vector short)b); 10768 } 10769 10770 static int __ATTRS_o_ai 10771 vec_all_ne(vector bool short a, vector bool short b) 10772 { 10773 return 10774 __builtin_altivec_vcmpequh_p(__CR6_EQ, (vector short)a, (vector short)b); 10775 } 10776 10777 static int __ATTRS_o_ai 10778 vec_all_ne(vector pixel a, vector pixel b) 10779 { 10780 return 10781 __builtin_altivec_vcmpequh_p(__CR6_EQ, (vector short)a, (vector short)b); 10782 } 10783 10784 static int __ATTRS_o_ai 10785 vec_all_ne(vector int a, vector int b) 10786 { 10787 return __builtin_altivec_vcmpequw_p(__CR6_EQ, a, b); 10788 } 10789 10790 static int __ATTRS_o_ai 10791 vec_all_ne(vector int a, vector bool int b) 10792 { 10793 return __builtin_altivec_vcmpequw_p(__CR6_EQ, a, (vector int)b); 10794 } 10795 10796 static int __ATTRS_o_ai 10797 vec_all_ne(vector unsigned int a, vector unsigned int b) 10798 { 10799 return __builtin_altivec_vcmpequw_p(__CR6_EQ, (vector int)a, (vector int)b); 10800 } 10801 10802 static int __ATTRS_o_ai 10803 vec_all_ne(vector unsigned int a, vector bool int b) 10804 { 10805 return __builtin_altivec_vcmpequw_p(__CR6_EQ, (vector int)a, (vector int)b); 10806 } 10807 10808 static int __ATTRS_o_ai 10809 vec_all_ne(vector bool int a, vector int b) 10810 { 10811 return __builtin_altivec_vcmpequw_p(__CR6_EQ, (vector int)a, (vector int)b); 10812 } 10813 10814 static int __ATTRS_o_ai 10815 vec_all_ne(vector bool int a, vector unsigned int b) 10816 { 10817 return __builtin_altivec_vcmpequw_p(__CR6_EQ, (vector int)a, (vector int)b); 10818 } 10819 10820 static int __ATTRS_o_ai 10821 vec_all_ne(vector bool int a, vector bool int b) 10822 { 10823 return __builtin_altivec_vcmpequw_p(__CR6_EQ, (vector int)a, (vector int)b); 10824 } 10825 10826 static int __ATTRS_o_ai 10827 vec_all_ne(vector float a, vector float b) 10828 { 10829 return __builtin_altivec_vcmpeqfp_p(__CR6_EQ, a, b); 10830 } 10831 10832 /* vec_all_nge */ 10833 10834 static int __attribute__((__always_inline__)) 10835 vec_all_nge(vector float a, vector float b) 10836 { 10837 return __builtin_altivec_vcmpgefp_p(__CR6_EQ, a, b); 10838 } 10839 10840 /* vec_all_ngt */ 10841 10842 static int __attribute__((__always_inline__)) 10843 vec_all_ngt(vector float a, vector float b) 10844 { 10845 return __builtin_altivec_vcmpgtfp_p(__CR6_EQ, a, b); 10846 } 10847 10848 /* vec_all_nle */ 10849 10850 static int __attribute__((__always_inline__)) 10851 vec_all_nle(vector float a, vector float b) 10852 { 10853 return __builtin_altivec_vcmpgefp_p(__CR6_EQ, b, a); 10854 } 10855 10856 /* vec_all_nlt */ 10857 10858 static int __attribute__((__always_inline__)) 10859 vec_all_nlt(vector float a, vector float b) 10860 { 10861 return __builtin_altivec_vcmpgtfp_p(__CR6_EQ, b, a); 10862 } 10863 10864 /* vec_all_numeric */ 10865 10866 static int __attribute__((__always_inline__)) 10867 vec_all_numeric(vector float a) 10868 { 10869 return __builtin_altivec_vcmpeqfp_p(__CR6_LT, a, a); 10870 } 10871 10872 /* vec_any_eq */ 10873 10874 static int __ATTRS_o_ai 10875 vec_any_eq(vector signed char a, vector signed char b) 10876 { 10877 return 10878 __builtin_altivec_vcmpequb_p(__CR6_EQ_REV, (vector char)a, (vector char)b); 10879 } 10880 10881 static int __ATTRS_o_ai 10882 vec_any_eq(vector signed char a, vector bool char b) 10883 { 10884 return 10885 __builtin_altivec_vcmpequb_p(__CR6_EQ_REV, (vector char)a, (vector char)b); 10886 } 10887 10888 static int __ATTRS_o_ai 10889 vec_any_eq(vector unsigned char a, vector unsigned char b) 10890 { 10891 return 10892 __builtin_altivec_vcmpequb_p(__CR6_EQ_REV, (vector char)a, (vector char)b); 10893 } 10894 10895 static int __ATTRS_o_ai 10896 vec_any_eq(vector unsigned char a, vector bool char b) 10897 { 10898 return 10899 __builtin_altivec_vcmpequb_p(__CR6_EQ_REV, (vector char)a, (vector char)b); 10900 } 10901 10902 static int __ATTRS_o_ai 10903 vec_any_eq(vector bool char a, vector signed char b) 10904 { 10905 return 10906 __builtin_altivec_vcmpequb_p(__CR6_EQ_REV, (vector char)a, (vector char)b); 10907 } 10908 10909 static int __ATTRS_o_ai 10910 vec_any_eq(vector bool char a, vector unsigned char b) 10911 { 10912 return 10913 __builtin_altivec_vcmpequb_p(__CR6_EQ_REV, (vector char)a, (vector char)b); 10914 } 10915 10916 static int __ATTRS_o_ai 10917 vec_any_eq(vector bool char a, vector bool char b) 10918 { 10919 return 10920 __builtin_altivec_vcmpequb_p(__CR6_EQ_REV, (vector char)a, (vector char)b); 10921 } 10922 10923 static int __ATTRS_o_ai 10924 vec_any_eq(vector short a, vector short b) 10925 { 10926 return __builtin_altivec_vcmpequh_p(__CR6_EQ_REV, a, b); 10927 } 10928 10929 static int __ATTRS_o_ai 10930 vec_any_eq(vector short a, vector bool short b) 10931 { 10932 return __builtin_altivec_vcmpequh_p(__CR6_EQ_REV, a, (vector short)b); 10933 } 10934 10935 static int __ATTRS_o_ai 10936 vec_any_eq(vector unsigned short a, vector unsigned short b) 10937 { 10938 return __builtin_altivec_vcmpequh_p(__CR6_EQ_REV, 10939 (vector short)a, 10940 (vector short)b); 10941 } 10942 10943 static int __ATTRS_o_ai 10944 vec_any_eq(vector unsigned short a, vector bool short b) 10945 { 10946 return __builtin_altivec_vcmpequh_p(__CR6_EQ_REV, 10947 (vector short)a, 10948 (vector short)b); 10949 } 10950 10951 static int __ATTRS_o_ai 10952 vec_any_eq(vector bool short a, vector short b) 10953 { 10954 return __builtin_altivec_vcmpequh_p(__CR6_EQ_REV, 10955 (vector short)a, 10956 (vector short)b); 10957 } 10958 10959 static int __ATTRS_o_ai 10960 vec_any_eq(vector bool short a, vector unsigned short b) 10961 { 10962 return __builtin_altivec_vcmpequh_p(__CR6_EQ_REV, 10963 (vector short)a, 10964 (vector short)b); 10965 } 10966 10967 static int __ATTRS_o_ai 10968 vec_any_eq(vector bool short a, vector bool short b) 10969 { 10970 return __builtin_altivec_vcmpequh_p(__CR6_EQ_REV, 10971 (vector short)a, 10972 (vector short)b); 10973 } 10974 10975 static int __ATTRS_o_ai 10976 vec_any_eq(vector pixel a, vector pixel b) 10977 { 10978 return __builtin_altivec_vcmpequh_p(__CR6_EQ_REV, 10979 (vector short)a, 10980 (vector short)b); 10981 } 10982 10983 static int __ATTRS_o_ai 10984 vec_any_eq(vector int a, vector int b) 10985 { 10986 return __builtin_altivec_vcmpequw_p(__CR6_EQ_REV, a, b); 10987 } 10988 10989 static int __ATTRS_o_ai 10990 vec_any_eq(vector int a, vector bool int b) 10991 { 10992 return __builtin_altivec_vcmpequw_p(__CR6_EQ_REV, a, (vector int)b); 10993 } 10994 10995 static int __ATTRS_o_ai 10996 vec_any_eq(vector unsigned int a, vector unsigned int b) 10997 { 10998 return 10999 __builtin_altivec_vcmpequw_p(__CR6_EQ_REV, (vector int)a, (vector int)b); 11000 } 11001 11002 static int __ATTRS_o_ai 11003 vec_any_eq(vector unsigned int a, vector bool int b) 11004 { 11005 return 11006 __builtin_altivec_vcmpequw_p(__CR6_EQ_REV, (vector int)a, (vector int)b); 11007 } 11008 11009 static int __ATTRS_o_ai 11010 vec_any_eq(vector bool int a, vector int b) 11011 { 11012 return 11013 __builtin_altivec_vcmpequw_p(__CR6_EQ_REV, (vector int)a, (vector int)b); 11014 } 11015 11016 static int __ATTRS_o_ai 11017 vec_any_eq(vector bool int a, vector unsigned int b) 11018 { 11019 return 11020 __builtin_altivec_vcmpequw_p(__CR6_EQ_REV, (vector int)a, (vector int)b); 11021 } 11022 11023 static int __ATTRS_o_ai 11024 vec_any_eq(vector bool int a, vector bool int b) 11025 { 11026 return 11027 __builtin_altivec_vcmpequw_p(__CR6_EQ_REV, (vector int)a, (vector int)b); 11028 } 11029 11030 static int __ATTRS_o_ai 11031 vec_any_eq(vector float a, vector float b) 11032 { 11033 return __builtin_altivec_vcmpeqfp_p(__CR6_EQ_REV, a, b); 11034 } 11035 11036 /* vec_any_ge */ 11037 11038 static int __ATTRS_o_ai 11039 vec_any_ge(vector signed char a, vector signed char b) 11040 { 11041 return __builtin_altivec_vcmpgtsb_p(__CR6_LT_REV, b, a); 11042 } 11043 11044 static int __ATTRS_o_ai 11045 vec_any_ge(vector signed char a, vector bool char b) 11046 { 11047 return __builtin_altivec_vcmpgtsb_p(__CR6_LT_REV, (vector signed char)b, a); 11048 } 11049 11050 static int __ATTRS_o_ai 11051 vec_any_ge(vector unsigned char a, vector unsigned char b) 11052 { 11053 return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV, b, a); 11054 } 11055 11056 static int __ATTRS_o_ai 11057 vec_any_ge(vector unsigned char a, vector bool char b) 11058 { 11059 return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV, (vector unsigned char)b, a); 11060 } 11061 11062 static int __ATTRS_o_ai 11063 vec_any_ge(vector bool char a, vector signed char b) 11064 { 11065 return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV, 11066 (vector unsigned char)b, 11067 (vector unsigned char)a); 11068 } 11069 11070 static int __ATTRS_o_ai 11071 vec_any_ge(vector bool char a, vector unsigned char b) 11072 { 11073 return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV, b, (vector unsigned char)a); 11074 } 11075 11076 static int __ATTRS_o_ai 11077 vec_any_ge(vector bool char a, vector bool char b) 11078 { 11079 return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV, 11080 (vector unsigned char)b, 11081 (vector unsigned char)a); 11082 } 11083 11084 static int __ATTRS_o_ai 11085 vec_any_ge(vector short a, vector short b) 11086 { 11087 return __builtin_altivec_vcmpgtsh_p(__CR6_LT_REV, b, a); 11088 } 11089 11090 static int __ATTRS_o_ai 11091 vec_any_ge(vector short a, vector bool short b) 11092 { 11093 return __builtin_altivec_vcmpgtsh_p(__CR6_LT_REV, (vector short)b, a); 11094 } 11095 11096 static int __ATTRS_o_ai 11097 vec_any_ge(vector unsigned short a, vector unsigned short b) 11098 { 11099 return __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV, b, a); 11100 } 11101 11102 static int __ATTRS_o_ai 11103 vec_any_ge(vector unsigned short a, vector bool short b) 11104 { 11105 return 11106 __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV, (vector unsigned short)b, a); 11107 } 11108 11109 static int __ATTRS_o_ai 11110 vec_any_ge(vector bool short a, vector short b) 11111 { 11112 return __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV, 11113 (vector unsigned short)b, 11114 (vector unsigned short)a); 11115 } 11116 11117 static int __ATTRS_o_ai 11118 vec_any_ge(vector bool short a, vector unsigned short b) 11119 { 11120 return 11121 __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV, b, (vector unsigned short)a); 11122 } 11123 11124 static int __ATTRS_o_ai 11125 vec_any_ge(vector bool short a, vector bool short b) 11126 { 11127 return __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV, 11128 (vector unsigned short)b, 11129 (vector unsigned short)a); 11130 } 11131 11132 static int __ATTRS_o_ai 11133 vec_any_ge(vector int a, vector int b) 11134 { 11135 return __builtin_altivec_vcmpgtsw_p(__CR6_LT_REV, b, a); 11136 } 11137 11138 static int __ATTRS_o_ai 11139 vec_any_ge(vector int a, vector bool int b) 11140 { 11141 return __builtin_altivec_vcmpgtsw_p(__CR6_LT_REV, (vector int)b, a); 11142 } 11143 11144 static int __ATTRS_o_ai 11145 vec_any_ge(vector unsigned int a, vector unsigned int b) 11146 { 11147 return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV, b, a); 11148 } 11149 11150 static int __ATTRS_o_ai 11151 vec_any_ge(vector unsigned int a, vector bool int b) 11152 { 11153 return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV, (vector unsigned int)b, a); 11154 } 11155 11156 static int __ATTRS_o_ai 11157 vec_any_ge(vector bool int a, vector int b) 11158 { 11159 return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV, 11160 (vector unsigned int)b, 11161 (vector unsigned int)a); 11162 } 11163 11164 static int __ATTRS_o_ai 11165 vec_any_ge(vector bool int a, vector unsigned int b) 11166 { 11167 return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV, b, (vector unsigned int)a); 11168 } 11169 11170 static int __ATTRS_o_ai 11171 vec_any_ge(vector bool int a, vector bool int b) 11172 { 11173 return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV, 11174 (vector unsigned int)b, 11175 (vector unsigned int)a); 11176 } 11177 11178 static int __ATTRS_o_ai 11179 vec_any_ge(vector float a, vector float b) 11180 { 11181 return __builtin_altivec_vcmpgefp_p(__CR6_EQ_REV, a, b); 11182 } 11183 11184 /* vec_any_gt */ 11185 11186 static int __ATTRS_o_ai 11187 vec_any_gt(vector signed char a, vector signed char b) 11188 { 11189 return __builtin_altivec_vcmpgtsb_p(__CR6_EQ_REV, a, b); 11190 } 11191 11192 static int __ATTRS_o_ai 11193 vec_any_gt(vector signed char a, vector bool char b) 11194 { 11195 return __builtin_altivec_vcmpgtsb_p(__CR6_EQ_REV, a, (vector signed char)b); 11196 } 11197 11198 static int __ATTRS_o_ai 11199 vec_any_gt(vector unsigned char a, vector unsigned char b) 11200 { 11201 return __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV, a, b); 11202 } 11203 11204 static int __ATTRS_o_ai 11205 vec_any_gt(vector unsigned char a, vector bool char b) 11206 { 11207 return 11208 __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV, a, (vector unsigned char)b); 11209 } 11210 11211 static int __ATTRS_o_ai 11212 vec_any_gt(vector bool char a, vector signed char b) 11213 { 11214 return __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV, 11215 (vector unsigned char)a, 11216 (vector unsigned char)b); 11217 } 11218 11219 static int __ATTRS_o_ai 11220 vec_any_gt(vector bool char a, vector unsigned char b) 11221 { 11222 return 11223 __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV, (vector unsigned char)a, b); 11224 } 11225 11226 static int __ATTRS_o_ai 11227 vec_any_gt(vector bool char a, vector bool char b) 11228 { 11229 return __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV, 11230 (vector unsigned char)a, 11231 (vector unsigned char)b); 11232 } 11233 11234 static int __ATTRS_o_ai 11235 vec_any_gt(vector short a, vector short b) 11236 { 11237 return __builtin_altivec_vcmpgtsh_p(__CR6_EQ_REV, a, b); 11238 } 11239 11240 static int __ATTRS_o_ai 11241 vec_any_gt(vector short a, vector bool short b) 11242 { 11243 return __builtin_altivec_vcmpgtsh_p(__CR6_EQ_REV, a, (vector short)b); 11244 } 11245 11246 static int __ATTRS_o_ai 11247 vec_any_gt(vector unsigned short a, vector unsigned short b) 11248 { 11249 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV, a, b); 11250 } 11251 11252 static int __ATTRS_o_ai 11253 vec_any_gt(vector unsigned short a, vector bool short b) 11254 { 11255 return 11256 __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV, a, (vector unsigned short)b); 11257 } 11258 11259 static int __ATTRS_o_ai 11260 vec_any_gt(vector bool short a, vector short b) 11261 { 11262 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV, 11263 (vector unsigned short)a, 11264 (vector unsigned short)b); 11265 } 11266 11267 static int __ATTRS_o_ai 11268 vec_any_gt(vector bool short a, vector unsigned short b) 11269 { 11270 return 11271 __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV, (vector unsigned short)a, b); 11272 } 11273 11274 static int __ATTRS_o_ai 11275 vec_any_gt(vector bool short a, vector bool short b) 11276 { 11277 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV, 11278 (vector unsigned short)a, 11279 (vector unsigned short)b); 11280 } 11281 11282 static int __ATTRS_o_ai 11283 vec_any_gt(vector int a, vector int b) 11284 { 11285 return __builtin_altivec_vcmpgtsw_p(__CR6_EQ_REV, a, b); 11286 } 11287 11288 static int __ATTRS_o_ai 11289 vec_any_gt(vector int a, vector bool int b) 11290 { 11291 return __builtin_altivec_vcmpgtsw_p(__CR6_EQ_REV, a, (vector int)b); 11292 } 11293 11294 static int __ATTRS_o_ai 11295 vec_any_gt(vector unsigned int a, vector unsigned int b) 11296 { 11297 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV, a, b); 11298 } 11299 11300 static int __ATTRS_o_ai 11301 vec_any_gt(vector unsigned int a, vector bool int b) 11302 { 11303 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV, a, (vector unsigned int)b); 11304 } 11305 11306 static int __ATTRS_o_ai 11307 vec_any_gt(vector bool int a, vector int b) 11308 { 11309 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV, 11310 (vector unsigned int)a, 11311 (vector unsigned int)b); 11312 } 11313 11314 static int __ATTRS_o_ai 11315 vec_any_gt(vector bool int a, vector unsigned int b) 11316 { 11317 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV, (vector unsigned int)a, b); 11318 } 11319 11320 static int __ATTRS_o_ai 11321 vec_any_gt(vector bool int a, vector bool int b) 11322 { 11323 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV, 11324 (vector unsigned int)a, 11325 (vector unsigned int)b); 11326 } 11327 11328 static int __ATTRS_o_ai 11329 vec_any_gt(vector float a, vector float b) 11330 { 11331 return __builtin_altivec_vcmpgtfp_p(__CR6_EQ_REV, a, b); 11332 } 11333 11334 /* vec_any_le */ 11335 11336 static int __ATTRS_o_ai 11337 vec_any_le(vector signed char a, vector signed char b) 11338 { 11339 return __builtin_altivec_vcmpgtsb_p(__CR6_LT_REV, a, b); 11340 } 11341 11342 static int __ATTRS_o_ai 11343 vec_any_le(vector signed char a, vector bool char b) 11344 { 11345 return __builtin_altivec_vcmpgtsb_p(__CR6_LT_REV, a, (vector signed char)b); 11346 } 11347 11348 static int __ATTRS_o_ai 11349 vec_any_le(vector unsigned char a, vector unsigned char b) 11350 { 11351 return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV, a, b); 11352 } 11353 11354 static int __ATTRS_o_ai 11355 vec_any_le(vector unsigned char a, vector bool char b) 11356 { 11357 return 11358 __builtin_altivec_vcmpgtub_p(__CR6_LT_REV, a, (vector unsigned char)b); 11359 } 11360 11361 static int __ATTRS_o_ai 11362 vec_any_le(vector bool char a, vector signed char b) 11363 { 11364 return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV, 11365 (vector unsigned char)a, 11366 (vector unsigned char)b); 11367 } 11368 11369 static int __ATTRS_o_ai 11370 vec_any_le(vector bool char a, vector unsigned char b) 11371 { 11372 return 11373 __builtin_altivec_vcmpgtub_p(__CR6_LT_REV, (vector unsigned char)a, b); 11374 } 11375 11376 static int __ATTRS_o_ai 11377 vec_any_le(vector bool char a, vector bool char b) 11378 { 11379 return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV, 11380 (vector unsigned char)a, 11381 (vector unsigned char)b); 11382 } 11383 11384 static int __ATTRS_o_ai 11385 vec_any_le(vector short a, vector short b) 11386 { 11387 return __builtin_altivec_vcmpgtsh_p(__CR6_LT_REV, a, b); 11388 } 11389 11390 static int __ATTRS_o_ai 11391 vec_any_le(vector short a, vector bool short b) 11392 { 11393 return __builtin_altivec_vcmpgtsh_p(__CR6_LT_REV, a, (vector short)b); 11394 } 11395 11396 static int __ATTRS_o_ai 11397 vec_any_le(vector unsigned short a, vector unsigned short b) 11398 { 11399 return __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV, a, b); 11400 } 11401 11402 static int __ATTRS_o_ai 11403 vec_any_le(vector unsigned short a, vector bool short b) 11404 { 11405 return 11406 __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV, a, (vector unsigned short)b); 11407 } 11408 11409 static int __ATTRS_o_ai 11410 vec_any_le(vector bool short a, vector short b) 11411 { 11412 return __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV, 11413 (vector unsigned short)a, 11414 (vector unsigned short)b); 11415 } 11416 11417 static int __ATTRS_o_ai 11418 vec_any_le(vector bool short a, vector unsigned short b) 11419 { 11420 return 11421 __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV, (vector unsigned short)a, b); 11422 } 11423 11424 static int __ATTRS_o_ai 11425 vec_any_le(vector bool short a, vector bool short b) 11426 { 11427 return __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV, 11428 (vector unsigned short)a, 11429 (vector unsigned short)b); 11430 } 11431 11432 static int __ATTRS_o_ai 11433 vec_any_le(vector int a, vector int b) 11434 { 11435 return __builtin_altivec_vcmpgtsw_p(__CR6_LT_REV, a, b); 11436 } 11437 11438 static int __ATTRS_o_ai 11439 vec_any_le(vector int a, vector bool int b) 11440 { 11441 return __builtin_altivec_vcmpgtsw_p(__CR6_LT_REV, a, (vector int)b); 11442 } 11443 11444 static int __ATTRS_o_ai 11445 vec_any_le(vector unsigned int a, vector unsigned int b) 11446 { 11447 return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV, a, b); 11448 } 11449 11450 static int __ATTRS_o_ai 11451 vec_any_le(vector unsigned int a, vector bool int b) 11452 { 11453 return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV, a, (vector unsigned int)b); 11454 } 11455 11456 static int __ATTRS_o_ai 11457 vec_any_le(vector bool int a, vector int b) 11458 { 11459 return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV, 11460 (vector unsigned int)a, 11461 (vector unsigned int)b); 11462 } 11463 11464 static int __ATTRS_o_ai 11465 vec_any_le(vector bool int a, vector unsigned int b) 11466 { 11467 return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV, (vector unsigned int)a, b); 11468 } 11469 11470 static int __ATTRS_o_ai 11471 vec_any_le(vector bool int a, vector bool int b) 11472 { 11473 return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV, 11474 (vector unsigned int)a, 11475 (vector unsigned int)b); 11476 } 11477 11478 static int __ATTRS_o_ai 11479 vec_any_le(vector float a, vector float b) 11480 { 11481 return __builtin_altivec_vcmpgefp_p(__CR6_EQ_REV, b, a); 11482 } 11483 11484 /* vec_any_lt */ 11485 11486 static int __ATTRS_o_ai 11487 vec_any_lt(vector signed char a, vector signed char b) 11488 { 11489 return __builtin_altivec_vcmpgtsb_p(__CR6_EQ_REV, b, a); 11490 } 11491 11492 static int __ATTRS_o_ai 11493 vec_any_lt(vector signed char a, vector bool char b) 11494 { 11495 return __builtin_altivec_vcmpgtsb_p(__CR6_EQ_REV, (vector signed char)b, a); 11496 } 11497 11498 static int __ATTRS_o_ai 11499 vec_any_lt(vector unsigned char a, vector unsigned char b) 11500 { 11501 return __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV, b, a); 11502 } 11503 11504 static int __ATTRS_o_ai 11505 vec_any_lt(vector unsigned char a, vector bool char b) 11506 { 11507 return 11508 __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV, (vector unsigned char)b, a); 11509 } 11510 11511 static int __ATTRS_o_ai 11512 vec_any_lt(vector bool char a, vector signed char b) 11513 { 11514 return __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV, 11515 (vector unsigned char)b, 11516 (vector unsigned char)a); 11517 } 11518 11519 static int __ATTRS_o_ai 11520 vec_any_lt(vector bool char a, vector unsigned char b) 11521 { 11522 return 11523 __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV, b, (vector unsigned char)a); 11524 } 11525 11526 static int __ATTRS_o_ai 11527 vec_any_lt(vector bool char a, vector bool char b) 11528 { 11529 return __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV, 11530 (vector unsigned char)b, 11531 (vector unsigned char)a); 11532 } 11533 11534 static int __ATTRS_o_ai 11535 vec_any_lt(vector short a, vector short b) 11536 { 11537 return __builtin_altivec_vcmpgtsh_p(__CR6_EQ_REV, b, a); 11538 } 11539 11540 static int __ATTRS_o_ai 11541 vec_any_lt(vector short a, vector bool short b) 11542 { 11543 return __builtin_altivec_vcmpgtsh_p(__CR6_EQ_REV, (vector short)b, a); 11544 } 11545 11546 static int __ATTRS_o_ai 11547 vec_any_lt(vector unsigned short a, vector unsigned short b) 11548 { 11549 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV, b, a); 11550 } 11551 11552 static int __ATTRS_o_ai 11553 vec_any_lt(vector unsigned short a, vector bool short b) 11554 { 11555 return 11556 __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV, (vector unsigned short)b, a); 11557 } 11558 11559 static int __ATTRS_o_ai 11560 vec_any_lt(vector bool short a, vector short b) 11561 { 11562 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV, 11563 (vector unsigned short)b, 11564 (vector unsigned short)a); 11565 } 11566 11567 static int __ATTRS_o_ai 11568 vec_any_lt(vector bool short a, vector unsigned short b) 11569 { 11570 return 11571 __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV, b, (vector unsigned short)a); 11572 } 11573 11574 static int __ATTRS_o_ai 11575 vec_any_lt(vector bool short a, vector bool short b) 11576 { 11577 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV, 11578 (vector unsigned short)b, 11579 (vector unsigned short)a); 11580 } 11581 11582 static int __ATTRS_o_ai 11583 vec_any_lt(vector int a, vector int b) 11584 { 11585 return __builtin_altivec_vcmpgtsw_p(__CR6_EQ_REV, b, a); 11586 } 11587 11588 static int __ATTRS_o_ai 11589 vec_any_lt(vector int a, vector bool int b) 11590 { 11591 return __builtin_altivec_vcmpgtsw_p(__CR6_EQ_REV, (vector int)b, a); 11592 } 11593 11594 static int __ATTRS_o_ai 11595 vec_any_lt(vector unsigned int a, vector unsigned int b) 11596 { 11597 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV, b, a); 11598 } 11599 11600 static int __ATTRS_o_ai 11601 vec_any_lt(vector unsigned int a, vector bool int b) 11602 { 11603 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV, (vector unsigned int)b, a); 11604 } 11605 11606 static int __ATTRS_o_ai 11607 vec_any_lt(vector bool int a, vector int b) 11608 { 11609 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV, 11610 (vector unsigned int)b, 11611 (vector unsigned int)a); 11612 } 11613 11614 static int __ATTRS_o_ai 11615 vec_any_lt(vector bool int a, vector unsigned int b) 11616 { 11617 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV, b, (vector unsigned int)a); 11618 } 11619 11620 static int __ATTRS_o_ai 11621 vec_any_lt(vector bool int a, vector bool int b) 11622 { 11623 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV, 11624 (vector unsigned int)b, 11625 (vector unsigned int)a); 11626 } 11627 11628 static int __ATTRS_o_ai 11629 vec_any_lt(vector float a, vector float b) 11630 { 11631 return __builtin_altivec_vcmpgtfp_p(__CR6_EQ_REV, b, a); 11632 } 11633 11634 /* vec_any_nan */ 11635 11636 static int __attribute__((__always_inline__)) 11637 vec_any_nan(vector float a) 11638 { 11639 return __builtin_altivec_vcmpeqfp_p(__CR6_LT_REV, a, a); 11640 } 11641 11642 /* vec_any_ne */ 11643 11644 static int __ATTRS_o_ai 11645 vec_any_ne(vector signed char a, vector signed char b) 11646 { 11647 return 11648 __builtin_altivec_vcmpequb_p(__CR6_LT_REV, (vector char)a, (vector char)b); 11649 } 11650 11651 static int __ATTRS_o_ai 11652 vec_any_ne(vector signed char a, vector bool char b) 11653 { 11654 return 11655 __builtin_altivec_vcmpequb_p(__CR6_LT_REV, (vector char)a, (vector char)b); 11656 } 11657 11658 static int __ATTRS_o_ai 11659 vec_any_ne(vector unsigned char a, vector unsigned char b) 11660 { 11661 return 11662 __builtin_altivec_vcmpequb_p(__CR6_LT_REV, (vector char)a, (vector char)b); 11663 } 11664 11665 static int __ATTRS_o_ai 11666 vec_any_ne(vector unsigned char a, vector bool char b) 11667 { 11668 return 11669 __builtin_altivec_vcmpequb_p(__CR6_LT_REV, (vector char)a, (vector char)b); 11670 } 11671 11672 static int __ATTRS_o_ai 11673 vec_any_ne(vector bool char a, vector signed char b) 11674 { 11675 return 11676 __builtin_altivec_vcmpequb_p(__CR6_LT_REV, (vector char)a, (vector char)b); 11677 } 11678 11679 static int __ATTRS_o_ai 11680 vec_any_ne(vector bool char a, vector unsigned char b) 11681 { 11682 return 11683 __builtin_altivec_vcmpequb_p(__CR6_LT_REV, (vector char)a, (vector char)b); 11684 } 11685 11686 static int __ATTRS_o_ai 11687 vec_any_ne(vector bool char a, vector bool char b) 11688 { 11689 return 11690 __builtin_altivec_vcmpequb_p(__CR6_LT_REV, (vector char)a, (vector char)b); 11691 } 11692 11693 static int __ATTRS_o_ai 11694 vec_any_ne(vector short a, vector short b) 11695 { 11696 return __builtin_altivec_vcmpequh_p(__CR6_LT_REV, a, b); 11697 } 11698 11699 static int __ATTRS_o_ai 11700 vec_any_ne(vector short a, vector bool short b) 11701 { 11702 return __builtin_altivec_vcmpequh_p(__CR6_LT_REV, a, (vector short)b); 11703 } 11704 11705 static int __ATTRS_o_ai 11706 vec_any_ne(vector unsigned short a, vector unsigned short b) 11707 { 11708 return __builtin_altivec_vcmpequh_p(__CR6_LT_REV, 11709 (vector short)a, 11710 (vector short)b); 11711 } 11712 11713 static int __ATTRS_o_ai 11714 vec_any_ne(vector unsigned short a, vector bool short b) 11715 { 11716 return __builtin_altivec_vcmpequh_p(__CR6_LT_REV, 11717 (vector short)a, 11718 (vector short)b); 11719 } 11720 11721 static int __ATTRS_o_ai 11722 vec_any_ne(vector bool short a, vector short b) 11723 { 11724 return __builtin_altivec_vcmpequh_p(__CR6_LT_REV, 11725 (vector short)a, 11726 (vector short)b); 11727 } 11728 11729 static int __ATTRS_o_ai 11730 vec_any_ne(vector bool short a, vector unsigned short b) 11731 { 11732 return __builtin_altivec_vcmpequh_p(__CR6_LT_REV, 11733 (vector short)a, 11734 (vector short)b); 11735 } 11736 11737 static int __ATTRS_o_ai 11738 vec_any_ne(vector bool short a, vector bool short b) 11739 { 11740 return __builtin_altivec_vcmpequh_p(__CR6_LT_REV, 11741 (vector short)a, 11742 (vector short)b); 11743 } 11744 11745 static int __ATTRS_o_ai 11746 vec_any_ne(vector pixel a, vector pixel b) 11747 { 11748 return __builtin_altivec_vcmpequh_p(__CR6_LT_REV, 11749 (vector short)a, 11750 (vector short)b); 11751 } 11752 11753 static int __ATTRS_o_ai 11754 vec_any_ne(vector int a, vector int b) 11755 { 11756 return __builtin_altivec_vcmpequw_p(__CR6_LT_REV, a, b); 11757 } 11758 11759 static int __ATTRS_o_ai 11760 vec_any_ne(vector int a, vector bool int b) 11761 { 11762 return __builtin_altivec_vcmpequw_p(__CR6_LT_REV, a, (vector int)b); 11763 } 11764 11765 static int __ATTRS_o_ai 11766 vec_any_ne(vector unsigned int a, vector unsigned int b) 11767 { 11768 return 11769 __builtin_altivec_vcmpequw_p(__CR6_LT_REV, (vector int)a, (vector int)b); 11770 } 11771 11772 static int __ATTRS_o_ai 11773 vec_any_ne(vector unsigned int a, vector bool int b) 11774 { 11775 return 11776 __builtin_altivec_vcmpequw_p(__CR6_LT_REV, (vector int)a, (vector int)b); 11777 } 11778 11779 static int __ATTRS_o_ai 11780 vec_any_ne(vector bool int a, vector int b) 11781 { 11782 return 11783 __builtin_altivec_vcmpequw_p(__CR6_LT_REV, (vector int)a, (vector int)b); 11784 } 11785 11786 static int __ATTRS_o_ai 11787 vec_any_ne(vector bool int a, vector unsigned int b) 11788 { 11789 return 11790 __builtin_altivec_vcmpequw_p(__CR6_LT_REV, (vector int)a, (vector int)b); 11791 } 11792 11793 static int __ATTRS_o_ai 11794 vec_any_ne(vector bool int a, vector bool int b) 11795 { 11796 return 11797 __builtin_altivec_vcmpequw_p(__CR6_LT_REV, (vector int)a, (vector int)b); 11798 } 11799 11800 static int __ATTRS_o_ai 11801 vec_any_ne(vector float a, vector float b) 11802 { 11803 return __builtin_altivec_vcmpeqfp_p(__CR6_LT_REV, a, b); 11804 } 11805 11806 /* vec_any_nge */ 11807 11808 static int __attribute__((__always_inline__)) 11809 vec_any_nge(vector float a, vector float b) 11810 { 11811 return __builtin_altivec_vcmpgefp_p(__CR6_LT_REV, a, b); 11812 } 11813 11814 /* vec_any_ngt */ 11815 11816 static int __attribute__((__always_inline__)) 11817 vec_any_ngt(vector float a, vector float b) 11818 { 11819 return __builtin_altivec_vcmpgtfp_p(__CR6_LT_REV, a, b); 11820 } 11821 11822 /* vec_any_nle */ 11823 11824 static int __attribute__((__always_inline__)) 11825 vec_any_nle(vector float a, vector float b) 11826 { 11827 return __builtin_altivec_vcmpgefp_p(__CR6_LT_REV, b, a); 11828 } 11829 11830 /* vec_any_nlt */ 11831 11832 static int __attribute__((__always_inline__)) 11833 vec_any_nlt(vector float a, vector float b) 11834 { 11835 return __builtin_altivec_vcmpgtfp_p(__CR6_LT_REV, b, a); 11836 } 11837 11838 /* vec_any_numeric */ 11839 11840 static int __attribute__((__always_inline__)) 11841 vec_any_numeric(vector float a) 11842 { 11843 return __builtin_altivec_vcmpeqfp_p(__CR6_EQ_REV, a, a); 11844 } 11845 11846 /* vec_any_out */ 11847 11848 static int __attribute__((__always_inline__)) 11849 vec_any_out(vector float a, vector float b) 11850 { 11851 return __builtin_altivec_vcmpbfp_p(__CR6_EQ_REV, a, b); 11852 } 11853 11854 #undef __ATTRS_o_ai 11855 11856 #endif /* __ALTIVEC_H */