| OLD | NEW |
| (Empty) |
| 1 /*===---- altivec.h - Standard header for type generic math ---------------===*\ | |
| 2 * | |
| 3 * Permission is hereby granted, free of charge, to any person obtaining a copy | |
| 4 * of this software and associated documentation files (the "Software"), to deal | |
| 5 * in the Software without restriction, including without limitation the rights | |
| 6 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| 7 * copies of the Software, and to permit persons to whom the Software is | |
| 8 * furnished to do so, subject to the following conditions: | |
| 9 * | |
| 10 * The above copyright notice and this permission notice shall be included in | |
| 11 * all copies or substantial portions of the Software. | |
| 12 * | |
| 13 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |
| 14 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |
| 15 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | |
| 16 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |
| 17 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | |
| 18 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | |
| 19 * THE SOFTWARE. | |
| 20 * | |
| 21 \*===----------------------------------------------------------------------===*/ | |
| 22 | |
| 23 #ifndef __ALTIVEC_H | |
| 24 #define __ALTIVEC_H | |
| 25 | |
| 26 #ifndef __ALTIVEC__ | |
| 27 #error "AltiVec support not enabled" | |
| 28 #endif | |
| 29 | |
| 30 /* constants for mapping CR6 bits to predicate result. */ | |
| 31 | |
| 32 #define __CR6_EQ 0 | |
| 33 #define __CR6_EQ_REV 1 | |
| 34 #define __CR6_LT 2 | |
| 35 #define __CR6_LT_REV 3 | |
| 36 | |
| 37 #define __ATTRS_o_ai __attribute__((__overloadable__, __always_inline__)) | |
| 38 | |
| 39 static vector signed char __ATTRS_o_ai | |
| 40 vec_perm(vector signed char a, vector signed char b, vector unsigned char c); | |
| 41 | |
| 42 static vector unsigned char __ATTRS_o_ai | |
| 43 vec_perm(vector unsigned char a, | |
| 44 vector unsigned char b, | |
| 45 vector unsigned char c); | |
| 46 | |
| 47 static vector bool char __ATTRS_o_ai | |
| 48 vec_perm(vector bool char a, vector bool char b, vector unsigned char c); | |
| 49 | |
| 50 static vector short __ATTRS_o_ai | |
| 51 vec_perm(vector short a, vector short b, vector unsigned char c); | |
| 52 | |
| 53 static vector unsigned short __ATTRS_o_ai | |
| 54 vec_perm(vector unsigned short a, | |
| 55 vector unsigned short b, | |
| 56 vector unsigned char c); | |
| 57 | |
| 58 static vector bool short __ATTRS_o_ai | |
| 59 vec_perm(vector bool short a, vector bool short b, vector unsigned char c); | |
| 60 | |
| 61 static vector pixel __ATTRS_o_ai | |
| 62 vec_perm(vector pixel a, vector pixel b, vector unsigned char c); | |
| 63 | |
| 64 static vector int __ATTRS_o_ai | |
| 65 vec_perm(vector int a, vector int b, vector unsigned char c); | |
| 66 | |
| 67 static vector unsigned int __ATTRS_o_ai | |
| 68 vec_perm(vector unsigned int a, vector unsigned int b, vector unsigned char c); | |
| 69 | |
| 70 static vector bool int __ATTRS_o_ai | |
| 71 vec_perm(vector bool int a, vector bool int b, vector unsigned char c); | |
| 72 | |
| 73 static vector float __ATTRS_o_ai | |
| 74 vec_perm(vector float a, vector float b, vector unsigned char c); | |
| 75 | |
| 76 /* vec_abs */ | |
| 77 | |
| 78 #define __builtin_altivec_abs_v16qi vec_abs | |
| 79 #define __builtin_altivec_abs_v8hi vec_abs | |
| 80 #define __builtin_altivec_abs_v4si vec_abs | |
| 81 | |
| 82 static vector signed char __ATTRS_o_ai | |
| 83 vec_abs(vector signed char a) | |
| 84 { | |
| 85 return __builtin_altivec_vmaxsb(a, -a); | |
| 86 } | |
| 87 | |
| 88 static vector signed short __ATTRS_o_ai | |
| 89 vec_abs(vector signed short a) | |
| 90 { | |
| 91 return __builtin_altivec_vmaxsh(a, -a); | |
| 92 } | |
| 93 | |
| 94 static vector signed int __ATTRS_o_ai | |
| 95 vec_abs(vector signed int a) | |
| 96 { | |
| 97 return __builtin_altivec_vmaxsw(a, -a); | |
| 98 } | |
| 99 | |
| 100 static vector float __ATTRS_o_ai | |
| 101 vec_abs(vector float a) | |
| 102 { | |
| 103 vector unsigned int res = (vector unsigned int)a | |
| 104 & (vector unsigned int)(0x7FFFFFFF); | |
| 105 return (vector float)res; | |
| 106 } | |
| 107 | |
| 108 /* vec_abss */ | |
| 109 | |
| 110 #define __builtin_altivec_abss_v16qi vec_abss | |
| 111 #define __builtin_altivec_abss_v8hi vec_abss | |
| 112 #define __builtin_altivec_abss_v4si vec_abss | |
| 113 | |
| 114 static vector signed char __ATTRS_o_ai | |
| 115 vec_abss(vector signed char a) | |
| 116 { | |
| 117 return __builtin_altivec_vmaxsb | |
| 118 (a, __builtin_altivec_vsubsbs((vector signed char)(0), a)); | |
| 119 } | |
| 120 | |
| 121 static vector signed short __ATTRS_o_ai | |
| 122 vec_abss(vector signed short a) | |
| 123 { | |
| 124 return __builtin_altivec_vmaxsh | |
| 125 (a, __builtin_altivec_vsubshs((vector signed short)(0), a)); | |
| 126 } | |
| 127 | |
| 128 static vector signed int __ATTRS_o_ai | |
| 129 vec_abss(vector signed int a) | |
| 130 { | |
| 131 return __builtin_altivec_vmaxsw | |
| 132 (a, __builtin_altivec_vsubsws((vector signed int)(0), a)); | |
| 133 } | |
| 134 | |
| 135 /* vec_add */ | |
| 136 | |
| 137 static vector signed char __ATTRS_o_ai | |
| 138 vec_add(vector signed char a, vector signed char b) | |
| 139 { | |
| 140 return a + b; | |
| 141 } | |
| 142 | |
| 143 static vector signed char __ATTRS_o_ai | |
| 144 vec_add(vector bool char a, vector signed char b) | |
| 145 { | |
| 146 return (vector signed char)a + b; | |
| 147 } | |
| 148 | |
| 149 static vector signed char __ATTRS_o_ai | |
| 150 vec_add(vector signed char a, vector bool char b) | |
| 151 { | |
| 152 return a + (vector signed char)b; | |
| 153 } | |
| 154 | |
| 155 static vector unsigned char __ATTRS_o_ai | |
| 156 vec_add(vector unsigned char a, vector unsigned char b) | |
| 157 { | |
| 158 return a + b; | |
| 159 } | |
| 160 | |
| 161 static vector unsigned char __ATTRS_o_ai | |
| 162 vec_add(vector bool char a, vector unsigned char b) | |
| 163 { | |
| 164 return (vector unsigned char)a + b; | |
| 165 } | |
| 166 | |
| 167 static vector unsigned char __ATTRS_o_ai | |
| 168 vec_add(vector unsigned char a, vector bool char b) | |
| 169 { | |
| 170 return a + (vector unsigned char)b; | |
| 171 } | |
| 172 | |
| 173 static vector short __ATTRS_o_ai | |
| 174 vec_add(vector short a, vector short b) | |
| 175 { | |
| 176 return a + b; | |
| 177 } | |
| 178 | |
| 179 static vector short __ATTRS_o_ai | |
| 180 vec_add(vector bool short a, vector short b) | |
| 181 { | |
| 182 return (vector short)a + b; | |
| 183 } | |
| 184 | |
| 185 static vector short __ATTRS_o_ai | |
| 186 vec_add(vector short a, vector bool short b) | |
| 187 { | |
| 188 return a + (vector short)b; | |
| 189 } | |
| 190 | |
| 191 static vector unsigned short __ATTRS_o_ai | |
| 192 vec_add(vector unsigned short a, vector unsigned short b) | |
| 193 { | |
| 194 return a + b; | |
| 195 } | |
| 196 | |
| 197 static vector unsigned short __ATTRS_o_ai | |
| 198 vec_add(vector bool short a, vector unsigned short b) | |
| 199 { | |
| 200 return (vector unsigned short)a + b; | |
| 201 } | |
| 202 | |
| 203 static vector unsigned short __ATTRS_o_ai | |
| 204 vec_add(vector unsigned short a, vector bool short b) | |
| 205 { | |
| 206 return a + (vector unsigned short)b; | |
| 207 } | |
| 208 | |
| 209 static vector int __ATTRS_o_ai | |
| 210 vec_add(vector int a, vector int b) | |
| 211 { | |
| 212 return a + b; | |
| 213 } | |
| 214 | |
| 215 static vector int __ATTRS_o_ai | |
| 216 vec_add(vector bool int a, vector int b) | |
| 217 { | |
| 218 return (vector int)a + b; | |
| 219 } | |
| 220 | |
| 221 static vector int __ATTRS_o_ai | |
| 222 vec_add(vector int a, vector bool int b) | |
| 223 { | |
| 224 return a + (vector int)b; | |
| 225 } | |
| 226 | |
| 227 static vector unsigned int __ATTRS_o_ai | |
| 228 vec_add(vector unsigned int a, vector unsigned int b) | |
| 229 { | |
| 230 return a + b; | |
| 231 } | |
| 232 | |
| 233 static vector unsigned int __ATTRS_o_ai | |
| 234 vec_add(vector bool int a, vector unsigned int b) | |
| 235 { | |
| 236 return (vector unsigned int)a + b; | |
| 237 } | |
| 238 | |
| 239 static vector unsigned int __ATTRS_o_ai | |
| 240 vec_add(vector unsigned int a, vector bool int b) | |
| 241 { | |
| 242 return a + (vector unsigned int)b; | |
| 243 } | |
| 244 | |
| 245 static vector float __ATTRS_o_ai | |
| 246 vec_add(vector float a, vector float b) | |
| 247 { | |
| 248 return a + b; | |
| 249 } | |
| 250 | |
| 251 /* vec_vaddubm */ | |
| 252 | |
| 253 #define __builtin_altivec_vaddubm vec_vaddubm | |
| 254 | |
| 255 static vector signed char __ATTRS_o_ai | |
| 256 vec_vaddubm(vector signed char a, vector signed char b) | |
| 257 { | |
| 258 return a + b; | |
| 259 } | |
| 260 | |
| 261 static vector signed char __ATTRS_o_ai | |
| 262 vec_vaddubm(vector bool char a, vector signed char b) | |
| 263 { | |
| 264 return (vector signed char)a + b; | |
| 265 } | |
| 266 | |
| 267 static vector signed char __ATTRS_o_ai | |
| 268 vec_vaddubm(vector signed char a, vector bool char b) | |
| 269 { | |
| 270 return a + (vector signed char)b; | |
| 271 } | |
| 272 | |
| 273 static vector unsigned char __ATTRS_o_ai | |
| 274 vec_vaddubm(vector unsigned char a, vector unsigned char b) | |
| 275 { | |
| 276 return a + b; | |
| 277 } | |
| 278 | |
| 279 static vector unsigned char __ATTRS_o_ai | |
| 280 vec_vaddubm(vector bool char a, vector unsigned char b) | |
| 281 { | |
| 282 return (vector unsigned char)a + b; | |
| 283 } | |
| 284 | |
| 285 static vector unsigned char __ATTRS_o_ai | |
| 286 vec_vaddubm(vector unsigned char a, vector bool char b) | |
| 287 { | |
| 288 return a + (vector unsigned char)b; | |
| 289 } | |
| 290 | |
| 291 /* vec_vadduhm */ | |
| 292 | |
| 293 #define __builtin_altivec_vadduhm vec_vadduhm | |
| 294 | |
| 295 static vector short __ATTRS_o_ai | |
| 296 vec_vadduhm(vector short a, vector short b) | |
| 297 { | |
| 298 return a + b; | |
| 299 } | |
| 300 | |
| 301 static vector short __ATTRS_o_ai | |
| 302 vec_vadduhm(vector bool short a, vector short b) | |
| 303 { | |
| 304 return (vector short)a + b; | |
| 305 } | |
| 306 | |
| 307 static vector short __ATTRS_o_ai | |
| 308 vec_vadduhm(vector short a, vector bool short b) | |
| 309 { | |
| 310 return a + (vector short)b; | |
| 311 } | |
| 312 | |
| 313 static vector unsigned short __ATTRS_o_ai | |
| 314 vec_vadduhm(vector unsigned short a, vector unsigned short b) | |
| 315 { | |
| 316 return a + b; | |
| 317 } | |
| 318 | |
| 319 static vector unsigned short __ATTRS_o_ai | |
| 320 vec_vadduhm(vector bool short a, vector unsigned short b) | |
| 321 { | |
| 322 return (vector unsigned short)a + b; | |
| 323 } | |
| 324 | |
| 325 static vector unsigned short __ATTRS_o_ai | |
| 326 vec_vadduhm(vector unsigned short a, vector bool short b) | |
| 327 { | |
| 328 return a + (vector unsigned short)b; | |
| 329 } | |
| 330 | |
| 331 /* vec_vadduwm */ | |
| 332 | |
| 333 #define __builtin_altivec_vadduwm vec_vadduwm | |
| 334 | |
| 335 static vector int __ATTRS_o_ai | |
| 336 vec_vadduwm(vector int a, vector int b) | |
| 337 { | |
| 338 return a + b; | |
| 339 } | |
| 340 | |
| 341 static vector int __ATTRS_o_ai | |
| 342 vec_vadduwm(vector bool int a, vector int b) | |
| 343 { | |
| 344 return (vector int)a + b; | |
| 345 } | |
| 346 | |
| 347 static vector int __ATTRS_o_ai | |
| 348 vec_vadduwm(vector int a, vector bool int b) | |
| 349 { | |
| 350 return a + (vector int)b; | |
| 351 } | |
| 352 | |
| 353 static vector unsigned int __ATTRS_o_ai | |
| 354 vec_vadduwm(vector unsigned int a, vector unsigned int b) | |
| 355 { | |
| 356 return a + b; | |
| 357 } | |
| 358 | |
| 359 static vector unsigned int __ATTRS_o_ai | |
| 360 vec_vadduwm(vector bool int a, vector unsigned int b) | |
| 361 { | |
| 362 return (vector unsigned int)a + b; | |
| 363 } | |
| 364 | |
| 365 static vector unsigned int __ATTRS_o_ai | |
| 366 vec_vadduwm(vector unsigned int a, vector bool int b) | |
| 367 { | |
| 368 return a + (vector unsigned int)b; | |
| 369 } | |
| 370 | |
| 371 /* vec_vaddfp */ | |
| 372 | |
| 373 #define __builtin_altivec_vaddfp vec_vaddfp | |
| 374 | |
| 375 static vector float __attribute__((__always_inline__)) | |
| 376 vec_vaddfp(vector float a, vector float b) | |
| 377 { | |
| 378 return a + b; | |
| 379 } | |
| 380 | |
| 381 /* vec_addc */ | |
| 382 | |
| 383 static vector unsigned int __attribute__((__always_inline__)) | |
| 384 vec_addc(vector unsigned int a, vector unsigned int b) | |
| 385 { | |
| 386 return __builtin_altivec_vaddcuw(a, b); | |
| 387 } | |
| 388 | |
| 389 /* vec_vaddcuw */ | |
| 390 | |
| 391 static vector unsigned int __attribute__((__always_inline__)) | |
| 392 vec_vaddcuw(vector unsigned int a, vector unsigned int b) | |
| 393 { | |
| 394 return __builtin_altivec_vaddcuw(a, b); | |
| 395 } | |
| 396 | |
| 397 /* vec_adds */ | |
| 398 | |
| 399 static vector signed char __ATTRS_o_ai | |
| 400 vec_adds(vector signed char a, vector signed char b) | |
| 401 { | |
| 402 return __builtin_altivec_vaddsbs(a, b); | |
| 403 } | |
| 404 | |
| 405 static vector signed char __ATTRS_o_ai | |
| 406 vec_adds(vector bool char a, vector signed char b) | |
| 407 { | |
| 408 return __builtin_altivec_vaddsbs((vector signed char)a, b); | |
| 409 } | |
| 410 | |
| 411 static vector signed char __ATTRS_o_ai | |
| 412 vec_adds(vector signed char a, vector bool char b) | |
| 413 { | |
| 414 return __builtin_altivec_vaddsbs(a, (vector signed char)b); | |
| 415 } | |
| 416 | |
| 417 static vector unsigned char __ATTRS_o_ai | |
| 418 vec_adds(vector unsigned char a, vector unsigned char b) | |
| 419 { | |
| 420 return __builtin_altivec_vaddubs(a, b); | |
| 421 } | |
| 422 | |
| 423 static vector unsigned char __ATTRS_o_ai | |
| 424 vec_adds(vector bool char a, vector unsigned char b) | |
| 425 { | |
| 426 return __builtin_altivec_vaddubs((vector unsigned char)a, b); | |
| 427 } | |
| 428 | |
| 429 static vector unsigned char __ATTRS_o_ai | |
| 430 vec_adds(vector unsigned char a, vector bool char b) | |
| 431 { | |
| 432 return __builtin_altivec_vaddubs(a, (vector unsigned char)b); | |
| 433 } | |
| 434 | |
| 435 static vector short __ATTRS_o_ai | |
| 436 vec_adds(vector short a, vector short b) | |
| 437 { | |
| 438 return __builtin_altivec_vaddshs(a, b); | |
| 439 } | |
| 440 | |
| 441 static vector short __ATTRS_o_ai | |
| 442 vec_adds(vector bool short a, vector short b) | |
| 443 { | |
| 444 return __builtin_altivec_vaddshs((vector short)a, b); | |
| 445 } | |
| 446 | |
| 447 static vector short __ATTRS_o_ai | |
| 448 vec_adds(vector short a, vector bool short b) | |
| 449 { | |
| 450 return __builtin_altivec_vaddshs(a, (vector short)b); | |
| 451 } | |
| 452 | |
| 453 static vector unsigned short __ATTRS_o_ai | |
| 454 vec_adds(vector unsigned short a, vector unsigned short b) | |
| 455 { | |
| 456 return __builtin_altivec_vadduhs(a, b); | |
| 457 } | |
| 458 | |
| 459 static vector unsigned short __ATTRS_o_ai | |
| 460 vec_adds(vector bool short a, vector unsigned short b) | |
| 461 { | |
| 462 return __builtin_altivec_vadduhs((vector unsigned short)a, b); | |
| 463 } | |
| 464 | |
| 465 static vector unsigned short __ATTRS_o_ai | |
| 466 vec_adds(vector unsigned short a, vector bool short b) | |
| 467 { | |
| 468 return __builtin_altivec_vadduhs(a, (vector unsigned short)b); | |
| 469 } | |
| 470 | |
| 471 static vector int __ATTRS_o_ai | |
| 472 vec_adds(vector int a, vector int b) | |
| 473 { | |
| 474 return __builtin_altivec_vaddsws(a, b); | |
| 475 } | |
| 476 | |
| 477 static vector int __ATTRS_o_ai | |
| 478 vec_adds(vector bool int a, vector int b) | |
| 479 { | |
| 480 return __builtin_altivec_vaddsws((vector int)a, b); | |
| 481 } | |
| 482 | |
| 483 static vector int __ATTRS_o_ai | |
| 484 vec_adds(vector int a, vector bool int b) | |
| 485 { | |
| 486 return __builtin_altivec_vaddsws(a, (vector int)b); | |
| 487 } | |
| 488 | |
| 489 static vector unsigned int __ATTRS_o_ai | |
| 490 vec_adds(vector unsigned int a, vector unsigned int b) | |
| 491 { | |
| 492 return __builtin_altivec_vadduws(a, b); | |
| 493 } | |
| 494 | |
| 495 static vector unsigned int __ATTRS_o_ai | |
| 496 vec_adds(vector bool int a, vector unsigned int b) | |
| 497 { | |
| 498 return __builtin_altivec_vadduws((vector unsigned int)a, b); | |
| 499 } | |
| 500 | |
| 501 static vector unsigned int __ATTRS_o_ai | |
| 502 vec_adds(vector unsigned int a, vector bool int b) | |
| 503 { | |
| 504 return __builtin_altivec_vadduws(a, (vector unsigned int)b); | |
| 505 } | |
| 506 | |
| 507 /* vec_vaddsbs */ | |
| 508 | |
| 509 static vector signed char __ATTRS_o_ai | |
| 510 vec_vaddsbs(vector signed char a, vector signed char b) | |
| 511 { | |
| 512 return __builtin_altivec_vaddsbs(a, b); | |
| 513 } | |
| 514 | |
| 515 static vector signed char __ATTRS_o_ai | |
| 516 vec_vaddsbs(vector bool char a, vector signed char b) | |
| 517 { | |
| 518 return __builtin_altivec_vaddsbs((vector signed char)a, b); | |
| 519 } | |
| 520 | |
| 521 static vector signed char __ATTRS_o_ai | |
| 522 vec_vaddsbs(vector signed char a, vector bool char b) | |
| 523 { | |
| 524 return __builtin_altivec_vaddsbs(a, (vector signed char)b); | |
| 525 } | |
| 526 | |
| 527 /* vec_vaddubs */ | |
| 528 | |
| 529 static vector unsigned char __ATTRS_o_ai | |
| 530 vec_vaddubs(vector unsigned char a, vector unsigned char b) | |
| 531 { | |
| 532 return __builtin_altivec_vaddubs(a, b); | |
| 533 } | |
| 534 | |
| 535 static vector unsigned char __ATTRS_o_ai | |
| 536 vec_vaddubs(vector bool char a, vector unsigned char b) | |
| 537 { | |
| 538 return __builtin_altivec_vaddubs((vector unsigned char)a, b); | |
| 539 } | |
| 540 | |
| 541 static vector unsigned char __ATTRS_o_ai | |
| 542 vec_vaddubs(vector unsigned char a, vector bool char b) | |
| 543 { | |
| 544 return __builtin_altivec_vaddubs(a, (vector unsigned char)b); | |
| 545 } | |
| 546 | |
| 547 /* vec_vaddshs */ | |
| 548 | |
| 549 static vector short __ATTRS_o_ai | |
| 550 vec_vaddshs(vector short a, vector short b) | |
| 551 { | |
| 552 return __builtin_altivec_vaddshs(a, b); | |
| 553 } | |
| 554 | |
| 555 static vector short __ATTRS_o_ai | |
| 556 vec_vaddshs(vector bool short a, vector short b) | |
| 557 { | |
| 558 return __builtin_altivec_vaddshs((vector short)a, b); | |
| 559 } | |
| 560 | |
| 561 static vector short __ATTRS_o_ai | |
| 562 vec_vaddshs(vector short a, vector bool short b) | |
| 563 { | |
| 564 return __builtin_altivec_vaddshs(a, (vector short)b); | |
| 565 } | |
| 566 | |
| 567 /* vec_vadduhs */ | |
| 568 | |
| 569 static vector unsigned short __ATTRS_o_ai | |
| 570 vec_vadduhs(vector unsigned short a, vector unsigned short b) | |
| 571 { | |
| 572 return __builtin_altivec_vadduhs(a, b); | |
| 573 } | |
| 574 | |
| 575 static vector unsigned short __ATTRS_o_ai | |
| 576 vec_vadduhs(vector bool short a, vector unsigned short b) | |
| 577 { | |
| 578 return __builtin_altivec_vadduhs((vector unsigned short)a, b); | |
| 579 } | |
| 580 | |
| 581 static vector unsigned short __ATTRS_o_ai | |
| 582 vec_vadduhs(vector unsigned short a, vector bool short b) | |
| 583 { | |
| 584 return __builtin_altivec_vadduhs(a, (vector unsigned short)b); | |
| 585 } | |
| 586 | |
| 587 /* vec_vaddsws */ | |
| 588 | |
| 589 static vector int __ATTRS_o_ai | |
| 590 vec_vaddsws(vector int a, vector int b) | |
| 591 { | |
| 592 return __builtin_altivec_vaddsws(a, b); | |
| 593 } | |
| 594 | |
| 595 static vector int __ATTRS_o_ai | |
| 596 vec_vaddsws(vector bool int a, vector int b) | |
| 597 { | |
| 598 return __builtin_altivec_vaddsws((vector int)a, b); | |
| 599 } | |
| 600 | |
| 601 static vector int __ATTRS_o_ai | |
| 602 vec_vaddsws(vector int a, vector bool int b) | |
| 603 { | |
| 604 return __builtin_altivec_vaddsws(a, (vector int)b); | |
| 605 } | |
| 606 | |
| 607 /* vec_vadduws */ | |
| 608 | |
| 609 static vector unsigned int __ATTRS_o_ai | |
| 610 vec_vadduws(vector unsigned int a, vector unsigned int b) | |
| 611 { | |
| 612 return __builtin_altivec_vadduws(a, b); | |
| 613 } | |
| 614 | |
| 615 static vector unsigned int __ATTRS_o_ai | |
| 616 vec_vadduws(vector bool int a, vector unsigned int b) | |
| 617 { | |
| 618 return __builtin_altivec_vadduws((vector unsigned int)a, b); | |
| 619 } | |
| 620 | |
| 621 static vector unsigned int __ATTRS_o_ai | |
| 622 vec_vadduws(vector unsigned int a, vector bool int b) | |
| 623 { | |
| 624 return __builtin_altivec_vadduws(a, (vector unsigned int)b); | |
| 625 } | |
| 626 | |
| 627 /* vec_and */ | |
| 628 | |
| 629 #define __builtin_altivec_vand vec_and | |
| 630 | |
| 631 static vector signed char __ATTRS_o_ai | |
| 632 vec_and(vector signed char a, vector signed char b) | |
| 633 { | |
| 634 return a & b; | |
| 635 } | |
| 636 | |
| 637 static vector signed char __ATTRS_o_ai | |
| 638 vec_and(vector bool char a, vector signed char b) | |
| 639 { | |
| 640 return (vector signed char)a & b; | |
| 641 } | |
| 642 | |
| 643 static vector signed char __ATTRS_o_ai | |
| 644 vec_and(vector signed char a, vector bool char b) | |
| 645 { | |
| 646 return a & (vector signed char)b; | |
| 647 } | |
| 648 | |
| 649 static vector unsigned char __ATTRS_o_ai | |
| 650 vec_and(vector unsigned char a, vector unsigned char b) | |
| 651 { | |
| 652 return a & b; | |
| 653 } | |
| 654 | |
| 655 static vector unsigned char __ATTRS_o_ai | |
| 656 vec_and(vector bool char a, vector unsigned char b) | |
| 657 { | |
| 658 return (vector unsigned char)a & b; | |
| 659 } | |
| 660 | |
| 661 static vector unsigned char __ATTRS_o_ai | |
| 662 vec_and(vector unsigned char a, vector bool char b) | |
| 663 { | |
| 664 return a & (vector unsigned char)b; | |
| 665 } | |
| 666 | |
| 667 static vector bool char __ATTRS_o_ai | |
| 668 vec_and(vector bool char a, vector bool char b) | |
| 669 { | |
| 670 return a & b; | |
| 671 } | |
| 672 | |
| 673 static vector short __ATTRS_o_ai | |
| 674 vec_and(vector short a, vector short b) | |
| 675 { | |
| 676 return a & b; | |
| 677 } | |
| 678 | |
| 679 static vector short __ATTRS_o_ai | |
| 680 vec_and(vector bool short a, vector short b) | |
| 681 { | |
| 682 return (vector short)a & b; | |
| 683 } | |
| 684 | |
| 685 static vector short __ATTRS_o_ai | |
| 686 vec_and(vector short a, vector bool short b) | |
| 687 { | |
| 688 return a & (vector short)b; | |
| 689 } | |
| 690 | |
| 691 static vector unsigned short __ATTRS_o_ai | |
| 692 vec_and(vector unsigned short a, vector unsigned short b) | |
| 693 { | |
| 694 return a & b; | |
| 695 } | |
| 696 | |
| 697 static vector unsigned short __ATTRS_o_ai | |
| 698 vec_and(vector bool short a, vector unsigned short b) | |
| 699 { | |
| 700 return (vector unsigned short)a & b; | |
| 701 } | |
| 702 | |
| 703 static vector unsigned short __ATTRS_o_ai | |
| 704 vec_and(vector unsigned short a, vector bool short b) | |
| 705 { | |
| 706 return a & (vector unsigned short)b; | |
| 707 } | |
| 708 | |
| 709 static vector bool short __ATTRS_o_ai | |
| 710 vec_and(vector bool short a, vector bool short b) | |
| 711 { | |
| 712 return a & b; | |
| 713 } | |
| 714 | |
| 715 static vector int __ATTRS_o_ai | |
| 716 vec_and(vector int a, vector int b) | |
| 717 { | |
| 718 return a & b; | |
| 719 } | |
| 720 | |
| 721 static vector int __ATTRS_o_ai | |
| 722 vec_and(vector bool int a, vector int b) | |
| 723 { | |
| 724 return (vector int)a & b; | |
| 725 } | |
| 726 | |
| 727 static vector int __ATTRS_o_ai | |
| 728 vec_and(vector int a, vector bool int b) | |
| 729 { | |
| 730 return a & (vector int)b; | |
| 731 } | |
| 732 | |
| 733 static vector unsigned int __ATTRS_o_ai | |
| 734 vec_and(vector unsigned int a, vector unsigned int b) | |
| 735 { | |
| 736 return a & b; | |
| 737 } | |
| 738 | |
| 739 static vector unsigned int __ATTRS_o_ai | |
| 740 vec_and(vector bool int a, vector unsigned int b) | |
| 741 { | |
| 742 return (vector unsigned int)a & b; | |
| 743 } | |
| 744 | |
| 745 static vector unsigned int __ATTRS_o_ai | |
| 746 vec_and(vector unsigned int a, vector bool int b) | |
| 747 { | |
| 748 return a & (vector unsigned int)b; | |
| 749 } | |
| 750 | |
| 751 static vector bool int __ATTRS_o_ai | |
| 752 vec_and(vector bool int a, vector bool int b) | |
| 753 { | |
| 754 return a & b; | |
| 755 } | |
| 756 | |
| 757 static vector float __ATTRS_o_ai | |
| 758 vec_and(vector float a, vector float b) | |
| 759 { | |
| 760 vector unsigned int res = (vector unsigned int)a & (vector unsigned int)b; | |
| 761 return (vector float)res; | |
| 762 } | |
| 763 | |
| 764 static vector float __ATTRS_o_ai | |
| 765 vec_and(vector bool int a, vector float b) | |
| 766 { | |
| 767 vector unsigned int res = (vector unsigned int)a & (vector unsigned int)b; | |
| 768 return (vector float)res; | |
| 769 } | |
| 770 | |
| 771 static vector float __ATTRS_o_ai | |
| 772 vec_and(vector float a, vector bool int b) | |
| 773 { | |
| 774 vector unsigned int res = (vector unsigned int)a & (vector unsigned int)b; | |
| 775 return (vector float)res; | |
| 776 } | |
| 777 | |
| 778 /* vec_vand */ | |
| 779 | |
| 780 static vector signed char __ATTRS_o_ai | |
| 781 vec_vand(vector signed char a, vector signed char b) | |
| 782 { | |
| 783 return a & b; | |
| 784 } | |
| 785 | |
| 786 static vector signed char __ATTRS_o_ai | |
| 787 vec_vand(vector bool char a, vector signed char b) | |
| 788 { | |
| 789 return (vector signed char)a & b; | |
| 790 } | |
| 791 | |
| 792 static vector signed char __ATTRS_o_ai | |
| 793 vec_vand(vector signed char a, vector bool char b) | |
| 794 { | |
| 795 return a & (vector signed char)b; | |
| 796 } | |
| 797 | |
| 798 static vector unsigned char __ATTRS_o_ai | |
| 799 vec_vand(vector unsigned char a, vector unsigned char b) | |
| 800 { | |
| 801 return a & b; | |
| 802 } | |
| 803 | |
| 804 static vector unsigned char __ATTRS_o_ai | |
| 805 vec_vand(vector bool char a, vector unsigned char b) | |
| 806 { | |
| 807 return (vector unsigned char)a & b; | |
| 808 } | |
| 809 | |
| 810 static vector unsigned char __ATTRS_o_ai | |
| 811 vec_vand(vector unsigned char a, vector bool char b) | |
| 812 { | |
| 813 return a & (vector unsigned char)b; | |
| 814 } | |
| 815 | |
| 816 static vector bool char __ATTRS_o_ai | |
| 817 vec_vand(vector bool char a, vector bool char b) | |
| 818 { | |
| 819 return a & b; | |
| 820 } | |
| 821 | |
| 822 static vector short __ATTRS_o_ai | |
| 823 vec_vand(vector short a, vector short b) | |
| 824 { | |
| 825 return a & b; | |
| 826 } | |
| 827 | |
| 828 static vector short __ATTRS_o_ai | |
| 829 vec_vand(vector bool short a, vector short b) | |
| 830 { | |
| 831 return (vector short)a & b; | |
| 832 } | |
| 833 | |
| 834 static vector short __ATTRS_o_ai | |
| 835 vec_vand(vector short a, vector bool short b) | |
| 836 { | |
| 837 return a & (vector short)b; | |
| 838 } | |
| 839 | |
| 840 static vector unsigned short __ATTRS_o_ai | |
| 841 vec_vand(vector unsigned short a, vector unsigned short b) | |
| 842 { | |
| 843 return a & b; | |
| 844 } | |
| 845 | |
| 846 static vector unsigned short __ATTRS_o_ai | |
| 847 vec_vand(vector bool short a, vector unsigned short b) | |
| 848 { | |
| 849 return (vector unsigned short)a & b; | |
| 850 } | |
| 851 | |
| 852 static vector unsigned short __ATTRS_o_ai | |
| 853 vec_vand(vector unsigned short a, vector bool short b) | |
| 854 { | |
| 855 return a & (vector unsigned short)b; | |
| 856 } | |
| 857 | |
| 858 static vector bool short __ATTRS_o_ai | |
| 859 vec_vand(vector bool short a, vector bool short b) | |
| 860 { | |
| 861 return a & b; | |
| 862 } | |
| 863 | |
| 864 static vector int __ATTRS_o_ai | |
| 865 vec_vand(vector int a, vector int b) | |
| 866 { | |
| 867 return a & b; | |
| 868 } | |
| 869 | |
| 870 static vector int __ATTRS_o_ai | |
| 871 vec_vand(vector bool int a, vector int b) | |
| 872 { | |
| 873 return (vector int)a & b; | |
| 874 } | |
| 875 | |
| 876 static vector int __ATTRS_o_ai | |
| 877 vec_vand(vector int a, vector bool int b) | |
| 878 { | |
| 879 return a & (vector int)b; | |
| 880 } | |
| 881 | |
| 882 static vector unsigned int __ATTRS_o_ai | |
| 883 vec_vand(vector unsigned int a, vector unsigned int b) | |
| 884 { | |
| 885 return a & b; | |
| 886 } | |
| 887 | |
| 888 static vector unsigned int __ATTRS_o_ai | |
| 889 vec_vand(vector bool int a, vector unsigned int b) | |
| 890 { | |
| 891 return (vector unsigned int)a & b; | |
| 892 } | |
| 893 | |
| 894 static vector unsigned int __ATTRS_o_ai | |
| 895 vec_vand(vector unsigned int a, vector bool int b) | |
| 896 { | |
| 897 return a & (vector unsigned int)b; | |
| 898 } | |
| 899 | |
| 900 static vector bool int __ATTRS_o_ai | |
| 901 vec_vand(vector bool int a, vector bool int b) | |
| 902 { | |
| 903 return a & b; | |
| 904 } | |
| 905 | |
| 906 static vector float __ATTRS_o_ai | |
| 907 vec_vand(vector float a, vector float b) | |
| 908 { | |
| 909 vector unsigned int res = (vector unsigned int)a & (vector unsigned int)b; | |
| 910 return (vector float)res; | |
| 911 } | |
| 912 | |
| 913 static vector float __ATTRS_o_ai | |
| 914 vec_vand(vector bool int a, vector float b) | |
| 915 { | |
| 916 vector unsigned int res = (vector unsigned int)a & (vector unsigned int)b; | |
| 917 return (vector float)res; | |
| 918 } | |
| 919 | |
| 920 static vector float __ATTRS_o_ai | |
| 921 vec_vand(vector float a, vector bool int b) | |
| 922 { | |
| 923 vector unsigned int res = (vector unsigned int)a & (vector unsigned int)b; | |
| 924 return (vector float)res; | |
| 925 } | |
| 926 | |
| 927 /* vec_andc */ | |
| 928 | |
| 929 #define __builtin_altivec_vandc vec_andc | |
| 930 | |
| 931 static vector signed char __ATTRS_o_ai | |
| 932 vec_andc(vector signed char a, vector signed char b) | |
| 933 { | |
| 934 return a & ~b; | |
| 935 } | |
| 936 | |
| 937 static vector signed char __ATTRS_o_ai | |
| 938 vec_andc(vector bool char a, vector signed char b) | |
| 939 { | |
| 940 return (vector signed char)a & ~b; | |
| 941 } | |
| 942 | |
| 943 static vector signed char __ATTRS_o_ai | |
| 944 vec_andc(vector signed char a, vector bool char b) | |
| 945 { | |
| 946 return a & ~(vector signed char)b; | |
| 947 } | |
| 948 | |
| 949 static vector unsigned char __ATTRS_o_ai | |
| 950 vec_andc(vector unsigned char a, vector unsigned char b) | |
| 951 { | |
| 952 return a & ~b; | |
| 953 } | |
| 954 | |
| 955 static vector unsigned char __ATTRS_o_ai | |
| 956 vec_andc(vector bool char a, vector unsigned char b) | |
| 957 { | |
| 958 return (vector unsigned char)a & ~b; | |
| 959 } | |
| 960 | |
| 961 static vector unsigned char __ATTRS_o_ai | |
| 962 vec_andc(vector unsigned char a, vector bool char b) | |
| 963 { | |
| 964 return a & ~(vector unsigned char)b; | |
| 965 } | |
| 966 | |
| 967 static vector bool char __ATTRS_o_ai | |
| 968 vec_andc(vector bool char a, vector bool char b) | |
| 969 { | |
| 970 return a & ~b; | |
| 971 } | |
| 972 | |
| 973 static vector short __ATTRS_o_ai | |
| 974 vec_andc(vector short a, vector short b) | |
| 975 { | |
| 976 return a & ~b; | |
| 977 } | |
| 978 | |
| 979 static vector short __ATTRS_o_ai | |
| 980 vec_andc(vector bool short a, vector short b) | |
| 981 { | |
| 982 return (vector short)a & ~b; | |
| 983 } | |
| 984 | |
| 985 static vector short __ATTRS_o_ai | |
| 986 vec_andc(vector short a, vector bool short b) | |
| 987 { | |
| 988 return a & ~(vector short)b; | |
| 989 } | |
| 990 | |
| 991 static vector unsigned short __ATTRS_o_ai | |
| 992 vec_andc(vector unsigned short a, vector unsigned short b) | |
| 993 { | |
| 994 return a & ~b; | |
| 995 } | |
| 996 | |
| 997 static vector unsigned short __ATTRS_o_ai | |
| 998 vec_andc(vector bool short a, vector unsigned short b) | |
| 999 { | |
| 1000 return (vector unsigned short)a & ~b; | |
| 1001 } | |
| 1002 | |
| 1003 static vector unsigned short __ATTRS_o_ai | |
| 1004 vec_andc(vector unsigned short a, vector bool short b) | |
| 1005 { | |
| 1006 return a & ~(vector unsigned short)b; | |
| 1007 } | |
| 1008 | |
| 1009 static vector bool short __ATTRS_o_ai | |
| 1010 vec_andc(vector bool short a, vector bool short b) | |
| 1011 { | |
| 1012 return a & ~b; | |
| 1013 } | |
| 1014 | |
| 1015 static vector int __ATTRS_o_ai | |
| 1016 vec_andc(vector int a, vector int b) | |
| 1017 { | |
| 1018 return a & ~b; | |
| 1019 } | |
| 1020 | |
| 1021 static vector int __ATTRS_o_ai | |
| 1022 vec_andc(vector bool int a, vector int b) | |
| 1023 { | |
| 1024 return (vector int)a & ~b; | |
| 1025 } | |
| 1026 | |
| 1027 static vector int __ATTRS_o_ai | |
| 1028 vec_andc(vector int a, vector bool int b) | |
| 1029 { | |
| 1030 return a & ~(vector int)b; | |
| 1031 } | |
| 1032 | |
| 1033 static vector unsigned int __ATTRS_o_ai | |
| 1034 vec_andc(vector unsigned int a, vector unsigned int b) | |
| 1035 { | |
| 1036 return a & ~b; | |
| 1037 } | |
| 1038 | |
| 1039 static vector unsigned int __ATTRS_o_ai | |
| 1040 vec_andc(vector bool int a, vector unsigned int b) | |
| 1041 { | |
| 1042 return (vector unsigned int)a & ~b; | |
| 1043 } | |
| 1044 | |
| 1045 static vector unsigned int __ATTRS_o_ai | |
| 1046 vec_andc(vector unsigned int a, vector bool int b) | |
| 1047 { | |
| 1048 return a & ~(vector unsigned int)b; | |
| 1049 } | |
| 1050 | |
| 1051 static vector bool int __ATTRS_o_ai | |
| 1052 vec_andc(vector bool int a, vector bool int b) | |
| 1053 { | |
| 1054 return a & ~b; | |
| 1055 } | |
| 1056 | |
| 1057 static vector float __ATTRS_o_ai | |
| 1058 vec_andc(vector float a, vector float b) | |
| 1059 { | |
| 1060 vector unsigned int res = (vector unsigned int)a & ~(vector unsigned int)b; | |
| 1061 return (vector float)res; | |
| 1062 } | |
| 1063 | |
| 1064 static vector float __ATTRS_o_ai | |
| 1065 vec_andc(vector bool int a, vector float b) | |
| 1066 { | |
| 1067 vector unsigned int res = (vector unsigned int)a & ~(vector unsigned int)b; | |
| 1068 return (vector float)res; | |
| 1069 } | |
| 1070 | |
| 1071 static vector float __ATTRS_o_ai | |
| 1072 vec_andc(vector float a, vector bool int b) | |
| 1073 { | |
| 1074 vector unsigned int res = (vector unsigned int)a & ~(vector unsigned int)b; | |
| 1075 return (vector float)res; | |
| 1076 } | |
| 1077 | |
| 1078 /* vec_vandc */ | |
| 1079 | |
| 1080 static vector signed char __ATTRS_o_ai | |
| 1081 vec_vandc(vector signed char a, vector signed char b) | |
| 1082 { | |
| 1083 return a & ~b; | |
| 1084 } | |
| 1085 | |
| 1086 static vector signed char __ATTRS_o_ai | |
| 1087 vec_vandc(vector bool char a, vector signed char b) | |
| 1088 { | |
| 1089 return (vector signed char)a & ~b; | |
| 1090 } | |
| 1091 | |
| 1092 static vector signed char __ATTRS_o_ai | |
| 1093 vec_vandc(vector signed char a, vector bool char b) | |
| 1094 { | |
| 1095 return a & ~(vector signed char)b; | |
| 1096 } | |
| 1097 | |
| 1098 static vector unsigned char __ATTRS_o_ai | |
| 1099 vec_vandc(vector unsigned char a, vector unsigned char b) | |
| 1100 { | |
| 1101 return a & ~b; | |
| 1102 } | |
| 1103 | |
| 1104 static vector unsigned char __ATTRS_o_ai | |
| 1105 vec_vandc(vector bool char a, vector unsigned char b) | |
| 1106 { | |
| 1107 return (vector unsigned char)a & ~b; | |
| 1108 } | |
| 1109 | |
| 1110 static vector unsigned char __ATTRS_o_ai | |
| 1111 vec_vandc(vector unsigned char a, vector bool char b) | |
| 1112 { | |
| 1113 return a & ~(vector unsigned char)b; | |
| 1114 } | |
| 1115 | |
| 1116 static vector bool char __ATTRS_o_ai | |
| 1117 vec_vandc(vector bool char a, vector bool char b) | |
| 1118 { | |
| 1119 return a & ~b; | |
| 1120 } | |
| 1121 | |
| 1122 static vector short __ATTRS_o_ai | |
| 1123 vec_vandc(vector short a, vector short b) | |
| 1124 { | |
| 1125 return a & ~b; | |
| 1126 } | |
| 1127 | |
| 1128 static vector short __ATTRS_o_ai | |
| 1129 vec_vandc(vector bool short a, vector short b) | |
| 1130 { | |
| 1131 return (vector short)a & ~b; | |
| 1132 } | |
| 1133 | |
| 1134 static vector short __ATTRS_o_ai | |
| 1135 vec_vandc(vector short a, vector bool short b) | |
| 1136 { | |
| 1137 return a & ~(vector short)b; | |
| 1138 } | |
| 1139 | |
| 1140 static vector unsigned short __ATTRS_o_ai | |
| 1141 vec_vandc(vector unsigned short a, vector unsigned short b) | |
| 1142 { | |
| 1143 return a & ~b; | |
| 1144 } | |
| 1145 | |
| 1146 static vector unsigned short __ATTRS_o_ai | |
| 1147 vec_vandc(vector bool short a, vector unsigned short b) | |
| 1148 { | |
| 1149 return (vector unsigned short)a & ~b; | |
| 1150 } | |
| 1151 | |
| 1152 static vector unsigned short __ATTRS_o_ai | |
| 1153 vec_vandc(vector unsigned short a, vector bool short b) | |
| 1154 { | |
| 1155 return a & ~(vector unsigned short)b; | |
| 1156 } | |
| 1157 | |
| 1158 static vector bool short __ATTRS_o_ai | |
| 1159 vec_vandc(vector bool short a, vector bool short b) | |
| 1160 { | |
| 1161 return a & ~b; | |
| 1162 } | |
| 1163 | |
| 1164 static vector int __ATTRS_o_ai | |
| 1165 vec_vandc(vector int a, vector int b) | |
| 1166 { | |
| 1167 return a & ~b; | |
| 1168 } | |
| 1169 | |
| 1170 static vector int __ATTRS_o_ai | |
| 1171 vec_vandc(vector bool int a, vector int b) | |
| 1172 { | |
| 1173 return (vector int)a & ~b; | |
| 1174 } | |
| 1175 | |
| 1176 static vector int __ATTRS_o_ai | |
| 1177 vec_vandc(vector int a, vector bool int b) | |
| 1178 { | |
| 1179 return a & ~(vector int)b; | |
| 1180 } | |
| 1181 | |
| 1182 static vector unsigned int __ATTRS_o_ai | |
| 1183 vec_vandc(vector unsigned int a, vector unsigned int b) | |
| 1184 { | |
| 1185 return a & ~b; | |
| 1186 } | |
| 1187 | |
| 1188 static vector unsigned int __ATTRS_o_ai | |
| 1189 vec_vandc(vector bool int a, vector unsigned int b) | |
| 1190 { | |
| 1191 return (vector unsigned int)a & ~b; | |
| 1192 } | |
| 1193 | |
| 1194 static vector unsigned int __ATTRS_o_ai | |
| 1195 vec_vandc(vector unsigned int a, vector bool int b) | |
| 1196 { | |
| 1197 return a & ~(vector unsigned int)b; | |
| 1198 } | |
| 1199 | |
| 1200 static vector bool int __ATTRS_o_ai | |
| 1201 vec_vandc(vector bool int a, vector bool int b) | |
| 1202 { | |
| 1203 return a & ~b; | |
| 1204 } | |
| 1205 | |
| 1206 static vector float __ATTRS_o_ai | |
| 1207 vec_vandc(vector float a, vector float b) | |
| 1208 { | |
| 1209 vector unsigned int res = (vector unsigned int)a & ~(vector unsigned int)b; | |
| 1210 return (vector float)res; | |
| 1211 } | |
| 1212 | |
| 1213 static vector float __ATTRS_o_ai | |
| 1214 vec_vandc(vector bool int a, vector float b) | |
| 1215 { | |
| 1216 vector unsigned int res = (vector unsigned int)a & ~(vector unsigned int)b; | |
| 1217 return (vector float)res; | |
| 1218 } | |
| 1219 | |
| 1220 static vector float __ATTRS_o_ai | |
| 1221 vec_vandc(vector float a, vector bool int b) | |
| 1222 { | |
| 1223 vector unsigned int res = (vector unsigned int)a & ~(vector unsigned int)b; | |
| 1224 return (vector float)res; | |
| 1225 } | |
| 1226 | |
| 1227 /* vec_avg */ | |
| 1228 | |
| 1229 static vector signed char __ATTRS_o_ai | |
| 1230 vec_avg(vector signed char a, vector signed char b) | |
| 1231 { | |
| 1232 return __builtin_altivec_vavgsb(a, b); | |
| 1233 } | |
| 1234 | |
| 1235 static vector unsigned char __ATTRS_o_ai | |
| 1236 vec_avg(vector unsigned char a, vector unsigned char b) | |
| 1237 { | |
| 1238 return __builtin_altivec_vavgub(a, b); | |
| 1239 } | |
| 1240 | |
| 1241 static vector short __ATTRS_o_ai | |
| 1242 vec_avg(vector short a, vector short b) | |
| 1243 { | |
| 1244 return __builtin_altivec_vavgsh(a, b); | |
| 1245 } | |
| 1246 | |
| 1247 static vector unsigned short __ATTRS_o_ai | |
| 1248 vec_avg(vector unsigned short a, vector unsigned short b) | |
| 1249 { | |
| 1250 return __builtin_altivec_vavguh(a, b); | |
| 1251 } | |
| 1252 | |
| 1253 static vector int __ATTRS_o_ai | |
| 1254 vec_avg(vector int a, vector int b) | |
| 1255 { | |
| 1256 return __builtin_altivec_vavgsw(a, b); | |
| 1257 } | |
| 1258 | |
| 1259 static vector unsigned int __ATTRS_o_ai | |
| 1260 vec_avg(vector unsigned int a, vector unsigned int b) | |
| 1261 { | |
| 1262 return __builtin_altivec_vavguw(a, b); | |
| 1263 } | |
| 1264 | |
| 1265 /* vec_vavgsb */ | |
| 1266 | |
| 1267 static vector signed char __attribute__((__always_inline__)) | |
| 1268 vec_vavgsb(vector signed char a, vector signed char b) | |
| 1269 { | |
| 1270 return __builtin_altivec_vavgsb(a, b); | |
| 1271 } | |
| 1272 | |
| 1273 /* vec_vavgub */ | |
| 1274 | |
| 1275 static vector unsigned char __attribute__((__always_inline__)) | |
| 1276 vec_vavgub(vector unsigned char a, vector unsigned char b) | |
| 1277 { | |
| 1278 return __builtin_altivec_vavgub(a, b); | |
| 1279 } | |
| 1280 | |
| 1281 /* vec_vavgsh */ | |
| 1282 | |
| 1283 static vector short __attribute__((__always_inline__)) | |
| 1284 vec_vavgsh(vector short a, vector short b) | |
| 1285 { | |
| 1286 return __builtin_altivec_vavgsh(a, b); | |
| 1287 } | |
| 1288 | |
| 1289 /* vec_vavguh */ | |
| 1290 | |
| 1291 static vector unsigned short __attribute__((__always_inline__)) | |
| 1292 vec_vavguh(vector unsigned short a, vector unsigned short b) | |
| 1293 { | |
| 1294 return __builtin_altivec_vavguh(a, b); | |
| 1295 } | |
| 1296 | |
| 1297 /* vec_vavgsw */ | |
| 1298 | |
| 1299 static vector int __attribute__((__always_inline__)) | |
| 1300 vec_vavgsw(vector int a, vector int b) | |
| 1301 { | |
| 1302 return __builtin_altivec_vavgsw(a, b); | |
| 1303 } | |
| 1304 | |
| 1305 /* vec_vavguw */ | |
| 1306 | |
| 1307 static vector unsigned int __attribute__((__always_inline__)) | |
| 1308 vec_vavguw(vector unsigned int a, vector unsigned int b) | |
| 1309 { | |
| 1310 return __builtin_altivec_vavguw(a, b); | |
| 1311 } | |
| 1312 | |
| 1313 /* vec_ceil */ | |
| 1314 | |
| 1315 static vector float __attribute__((__always_inline__)) | |
| 1316 vec_ceil(vector float a) | |
| 1317 { | |
| 1318 return __builtin_altivec_vrfip(a); | |
| 1319 } | |
| 1320 | |
| 1321 /* vec_vrfip */ | |
| 1322 | |
| 1323 static vector float __attribute__((__always_inline__)) | |
| 1324 vec_vrfip(vector float a) | |
| 1325 { | |
| 1326 return __builtin_altivec_vrfip(a); | |
| 1327 } | |
| 1328 | |
| 1329 /* vec_cmpb */ | |
| 1330 | |
| 1331 static vector int __attribute__((__always_inline__)) | |
| 1332 vec_cmpb(vector float a, vector float b) | |
| 1333 { | |
| 1334 return __builtin_altivec_vcmpbfp(a, b); | |
| 1335 } | |
| 1336 | |
| 1337 /* vec_vcmpbfp */ | |
| 1338 | |
| 1339 static vector int __attribute__((__always_inline__)) | |
| 1340 vec_vcmpbfp(vector float a, vector float b) | |
| 1341 { | |
| 1342 return __builtin_altivec_vcmpbfp(a, b); | |
| 1343 } | |
| 1344 | |
| 1345 /* vec_cmpeq */ | |
| 1346 | |
| 1347 static vector bool char __ATTRS_o_ai | |
| 1348 vec_cmpeq(vector signed char a, vector signed char b) | |
| 1349 { | |
| 1350 return (vector bool char) | |
| 1351 __builtin_altivec_vcmpequb((vector char)a, (vector char)b); | |
| 1352 } | |
| 1353 | |
| 1354 static vector bool char __ATTRS_o_ai | |
| 1355 vec_cmpeq(vector unsigned char a, vector unsigned char b) | |
| 1356 { | |
| 1357 return (vector bool char) | |
| 1358 __builtin_altivec_vcmpequb((vector char)a, (vector char)b); | |
| 1359 } | |
| 1360 | |
| 1361 static vector bool short __ATTRS_o_ai | |
| 1362 vec_cmpeq(vector short a, vector short b) | |
| 1363 { | |
| 1364 return (vector bool short)__builtin_altivec_vcmpequh(a, b); | |
| 1365 } | |
| 1366 | |
| 1367 static vector bool short __ATTRS_o_ai | |
| 1368 vec_cmpeq(vector unsigned short a, vector unsigned short b) | |
| 1369 { | |
| 1370 return (vector bool short) | |
| 1371 __builtin_altivec_vcmpequh((vector short)a, (vector short)b); | |
| 1372 } | |
| 1373 | |
| 1374 static vector bool int __ATTRS_o_ai | |
| 1375 vec_cmpeq(vector int a, vector int b) | |
| 1376 { | |
| 1377 return (vector bool int)__builtin_altivec_vcmpequw(a, b); | |
| 1378 } | |
| 1379 | |
| 1380 static vector bool int __ATTRS_o_ai | |
| 1381 vec_cmpeq(vector unsigned int a, vector unsigned int b) | |
| 1382 { | |
| 1383 return (vector bool int) | |
| 1384 __builtin_altivec_vcmpequw((vector int)a, (vector int)b); | |
| 1385 } | |
| 1386 | |
| 1387 static vector bool int __ATTRS_o_ai | |
| 1388 vec_cmpeq(vector float a, vector float b) | |
| 1389 { | |
| 1390 return (vector bool int)__builtin_altivec_vcmpeqfp(a, b); | |
| 1391 } | |
| 1392 | |
| 1393 /* vec_cmpge */ | |
| 1394 | |
| 1395 static vector bool int __attribute__((__always_inline__)) | |
| 1396 vec_cmpge(vector float a, vector float b) | |
| 1397 { | |
| 1398 return (vector bool int)__builtin_altivec_vcmpgefp(a, b); | |
| 1399 } | |
| 1400 | |
| 1401 /* vec_vcmpgefp */ | |
| 1402 | |
| 1403 static vector bool int __attribute__((__always_inline__)) | |
| 1404 vec_vcmpgefp(vector float a, vector float b) | |
| 1405 { | |
| 1406 return (vector bool int)__builtin_altivec_vcmpgefp(a, b); | |
| 1407 } | |
| 1408 | |
| 1409 /* vec_cmpgt */ | |
| 1410 | |
| 1411 static vector bool char __ATTRS_o_ai | |
| 1412 vec_cmpgt(vector signed char a, vector signed char b) | |
| 1413 { | |
| 1414 return (vector bool char)__builtin_altivec_vcmpgtsb(a, b); | |
| 1415 } | |
| 1416 | |
| 1417 static vector bool char __ATTRS_o_ai | |
| 1418 vec_cmpgt(vector unsigned char a, vector unsigned char b) | |
| 1419 { | |
| 1420 return (vector bool char)__builtin_altivec_vcmpgtub(a, b); | |
| 1421 } | |
| 1422 | |
| 1423 static vector bool short __ATTRS_o_ai | |
| 1424 vec_cmpgt(vector short a, vector short b) | |
| 1425 { | |
| 1426 return (vector bool short)__builtin_altivec_vcmpgtsh(a, b); | |
| 1427 } | |
| 1428 | |
| 1429 static vector bool short __ATTRS_o_ai | |
| 1430 vec_cmpgt(vector unsigned short a, vector unsigned short b) | |
| 1431 { | |
| 1432 return (vector bool short)__builtin_altivec_vcmpgtuh(a, b); | |
| 1433 } | |
| 1434 | |
| 1435 static vector bool int __ATTRS_o_ai | |
| 1436 vec_cmpgt(vector int a, vector int b) | |
| 1437 { | |
| 1438 return (vector bool int)__builtin_altivec_vcmpgtsw(a, b); | |
| 1439 } | |
| 1440 | |
| 1441 static vector bool int __ATTRS_o_ai | |
| 1442 vec_cmpgt(vector unsigned int a, vector unsigned int b) | |
| 1443 { | |
| 1444 return (vector bool int)__builtin_altivec_vcmpgtuw(a, b); | |
| 1445 } | |
| 1446 | |
| 1447 static vector bool int __ATTRS_o_ai | |
| 1448 vec_cmpgt(vector float a, vector float b) | |
| 1449 { | |
| 1450 return (vector bool int)__builtin_altivec_vcmpgtfp(a, b); | |
| 1451 } | |
| 1452 | |
| 1453 /* vec_vcmpgtsb */ | |
| 1454 | |
| 1455 static vector bool char __attribute__((__always_inline__)) | |
| 1456 vec_vcmpgtsb(vector signed char a, vector signed char b) | |
| 1457 { | |
| 1458 return (vector bool char)__builtin_altivec_vcmpgtsb(a, b); | |
| 1459 } | |
| 1460 | |
| 1461 /* vec_vcmpgtub */ | |
| 1462 | |
| 1463 static vector bool char __attribute__((__always_inline__)) | |
| 1464 vec_vcmpgtub(vector unsigned char a, vector unsigned char b) | |
| 1465 { | |
| 1466 return (vector bool char)__builtin_altivec_vcmpgtub(a, b); | |
| 1467 } | |
| 1468 | |
| 1469 /* vec_vcmpgtsh */ | |
| 1470 | |
| 1471 static vector bool short __attribute__((__always_inline__)) | |
| 1472 vec_vcmpgtsh(vector short a, vector short b) | |
| 1473 { | |
| 1474 return (vector bool short)__builtin_altivec_vcmpgtsh(a, b); | |
| 1475 } | |
| 1476 | |
| 1477 /* vec_vcmpgtuh */ | |
| 1478 | |
| 1479 static vector bool short __attribute__((__always_inline__)) | |
| 1480 vec_vcmpgtuh(vector unsigned short a, vector unsigned short b) | |
| 1481 { | |
| 1482 return (vector bool short)__builtin_altivec_vcmpgtuh(a, b); | |
| 1483 } | |
| 1484 | |
| 1485 /* vec_vcmpgtsw */ | |
| 1486 | |
| 1487 static vector bool int __attribute__((__always_inline__)) | |
| 1488 vec_vcmpgtsw(vector int a, vector int b) | |
| 1489 { | |
| 1490 return (vector bool int)__builtin_altivec_vcmpgtsw(a, b); | |
| 1491 } | |
| 1492 | |
| 1493 /* vec_vcmpgtuw */ | |
| 1494 | |
| 1495 static vector bool int __attribute__((__always_inline__)) | |
| 1496 vec_vcmpgtuw(vector unsigned int a, vector unsigned int b) | |
| 1497 { | |
| 1498 return (vector bool int)__builtin_altivec_vcmpgtuw(a, b); | |
| 1499 } | |
| 1500 | |
| 1501 /* vec_vcmpgtfp */ | |
| 1502 | |
| 1503 static vector bool int __attribute__((__always_inline__)) | |
| 1504 vec_vcmpgtfp(vector float a, vector float b) | |
| 1505 { | |
| 1506 return (vector bool int)__builtin_altivec_vcmpgtfp(a, b); | |
| 1507 } | |
| 1508 | |
| 1509 /* vec_cmple */ | |
| 1510 | |
| 1511 static vector bool int __attribute__((__always_inline__)) | |
| 1512 vec_cmple(vector float a, vector float b) | |
| 1513 { | |
| 1514 return (vector bool int)__builtin_altivec_vcmpgefp(b, a); | |
| 1515 } | |
| 1516 | |
| 1517 /* vec_cmplt */ | |
| 1518 | |
| 1519 static vector bool char __ATTRS_o_ai | |
| 1520 vec_cmplt(vector signed char a, vector signed char b) | |
| 1521 { | |
| 1522 return (vector bool char)__builtin_altivec_vcmpgtsb(b, a); | |
| 1523 } | |
| 1524 | |
| 1525 static vector bool char __ATTRS_o_ai | |
| 1526 vec_cmplt(vector unsigned char a, vector unsigned char b) | |
| 1527 { | |
| 1528 return (vector bool char)__builtin_altivec_vcmpgtub(b, a); | |
| 1529 } | |
| 1530 | |
| 1531 static vector bool short __ATTRS_o_ai | |
| 1532 vec_cmplt(vector short a, vector short b) | |
| 1533 { | |
| 1534 return (vector bool short)__builtin_altivec_vcmpgtsh(b, a); | |
| 1535 } | |
| 1536 | |
| 1537 static vector bool short __ATTRS_o_ai | |
| 1538 vec_cmplt(vector unsigned short a, vector unsigned short b) | |
| 1539 { | |
| 1540 return (vector bool short)__builtin_altivec_vcmpgtuh(b, a); | |
| 1541 } | |
| 1542 | |
| 1543 static vector bool int __ATTRS_o_ai | |
| 1544 vec_cmplt(vector int a, vector int b) | |
| 1545 { | |
| 1546 return (vector bool int)__builtin_altivec_vcmpgtsw(b, a); | |
| 1547 } | |
| 1548 | |
| 1549 static vector bool int __ATTRS_o_ai | |
| 1550 vec_cmplt(vector unsigned int a, vector unsigned int b) | |
| 1551 { | |
| 1552 return (vector bool int)__builtin_altivec_vcmpgtuw(b, a); | |
| 1553 } | |
| 1554 | |
| 1555 static vector bool int __ATTRS_o_ai | |
| 1556 vec_cmplt(vector float a, vector float b) | |
| 1557 { | |
| 1558 return (vector bool int)__builtin_altivec_vcmpgtfp(b, a); | |
| 1559 } | |
| 1560 | |
| 1561 /* vec_ctf */ | |
| 1562 | |
| 1563 static vector float __ATTRS_o_ai | |
| 1564 vec_ctf(vector int a, int b) | |
| 1565 { | |
| 1566 return __builtin_altivec_vcfsx(a, b); | |
| 1567 } | |
| 1568 | |
| 1569 static vector float __ATTRS_o_ai | |
| 1570 vec_ctf(vector unsigned int a, int b) | |
| 1571 { | |
| 1572 return __builtin_altivec_vcfux((vector int)a, b); | |
| 1573 } | |
| 1574 | |
| 1575 /* vec_vcfsx */ | |
| 1576 | |
| 1577 static vector float __attribute__((__always_inline__)) | |
| 1578 vec_vcfsx(vector int a, int b) | |
| 1579 { | |
| 1580 return __builtin_altivec_vcfsx(a, b); | |
| 1581 } | |
| 1582 | |
| 1583 /* vec_vcfux */ | |
| 1584 | |
| 1585 static vector float __attribute__((__always_inline__)) | |
| 1586 vec_vcfux(vector unsigned int a, int b) | |
| 1587 { | |
| 1588 return __builtin_altivec_vcfux((vector int)a, b); | |
| 1589 } | |
| 1590 | |
| 1591 /* vec_cts */ | |
| 1592 | |
| 1593 static vector int __attribute__((__always_inline__)) | |
| 1594 vec_cts(vector float a, int b) | |
| 1595 { | |
| 1596 return __builtin_altivec_vctsxs(a, b); | |
| 1597 } | |
| 1598 | |
| 1599 /* vec_vctsxs */ | |
| 1600 | |
| 1601 static vector int __attribute__((__always_inline__)) | |
| 1602 vec_vctsxs(vector float a, int b) | |
| 1603 { | |
| 1604 return __builtin_altivec_vctsxs(a, b); | |
| 1605 } | |
| 1606 | |
| 1607 /* vec_ctu */ | |
| 1608 | |
| 1609 static vector unsigned int __attribute__((__always_inline__)) | |
| 1610 vec_ctu(vector float a, int b) | |
| 1611 { | |
| 1612 return __builtin_altivec_vctuxs(a, b); | |
| 1613 } | |
| 1614 | |
| 1615 /* vec_vctuxs */ | |
| 1616 | |
| 1617 static vector unsigned int __attribute__((__always_inline__)) | |
| 1618 vec_vctuxs(vector float a, int b) | |
| 1619 { | |
| 1620 return __builtin_altivec_vctuxs(a, b); | |
| 1621 } | |
| 1622 | |
| 1623 /* vec_dss */ | |
| 1624 | |
| 1625 static void __attribute__((__always_inline__)) | |
| 1626 vec_dss(int a) | |
| 1627 { | |
| 1628 __builtin_altivec_dss(a); | |
| 1629 } | |
| 1630 | |
| 1631 /* vec_dssall */ | |
| 1632 | |
| 1633 static void __attribute__((__always_inline__)) | |
| 1634 vec_dssall(void) | |
| 1635 { | |
| 1636 __builtin_altivec_dssall(); | |
| 1637 } | |
| 1638 | |
| 1639 /* vec_dst */ | |
| 1640 | |
| 1641 static void __attribute__((__always_inline__)) | |
| 1642 vec_dst(const void *a, int b, int c) | |
| 1643 { | |
| 1644 __builtin_altivec_dst(a, b, c); | |
| 1645 } | |
| 1646 | |
| 1647 /* vec_dstst */ | |
| 1648 | |
| 1649 static void __attribute__((__always_inline__)) | |
| 1650 vec_dstst(const void *a, int b, int c) | |
| 1651 { | |
| 1652 __builtin_altivec_dstst(a, b, c); | |
| 1653 } | |
| 1654 | |
| 1655 /* vec_dststt */ | |
| 1656 | |
| 1657 static void __attribute__((__always_inline__)) | |
| 1658 vec_dststt(const void *a, int b, int c) | |
| 1659 { | |
| 1660 __builtin_altivec_dststt(a, b, c); | |
| 1661 } | |
| 1662 | |
| 1663 /* vec_dstt */ | |
| 1664 | |
| 1665 static void __attribute__((__always_inline__)) | |
| 1666 vec_dstt(const void *a, int b, int c) | |
| 1667 { | |
| 1668 __builtin_altivec_dstt(a, b, c); | |
| 1669 } | |
| 1670 | |
| 1671 /* vec_expte */ | |
| 1672 | |
| 1673 static vector float __attribute__((__always_inline__)) | |
| 1674 vec_expte(vector float a) | |
| 1675 { | |
| 1676 return __builtin_altivec_vexptefp(a); | |
| 1677 } | |
| 1678 | |
| 1679 /* vec_vexptefp */ | |
| 1680 | |
| 1681 static vector float __attribute__((__always_inline__)) | |
| 1682 vec_vexptefp(vector float a) | |
| 1683 { | |
| 1684 return __builtin_altivec_vexptefp(a); | |
| 1685 } | |
| 1686 | |
| 1687 /* vec_floor */ | |
| 1688 | |
| 1689 static vector float __attribute__((__always_inline__)) | |
| 1690 vec_floor(vector float a) | |
| 1691 { | |
| 1692 return __builtin_altivec_vrfim(a); | |
| 1693 } | |
| 1694 | |
| 1695 /* vec_vrfim */ | |
| 1696 | |
| 1697 static vector float __attribute__((__always_inline__)) | |
| 1698 vec_vrfim(vector float a) | |
| 1699 { | |
| 1700 return __builtin_altivec_vrfim(a); | |
| 1701 } | |
| 1702 | |
| 1703 /* vec_ld */ | |
| 1704 | |
| 1705 static vector signed char __ATTRS_o_ai | |
| 1706 vec_ld(int a, const vector signed char *b) | |
| 1707 { | |
| 1708 return (vector signed char)__builtin_altivec_lvx(a, b); | |
| 1709 } | |
| 1710 | |
| 1711 static vector signed char __ATTRS_o_ai | |
| 1712 vec_ld(int a, const signed char *b) | |
| 1713 { | |
| 1714 return (vector signed char)__builtin_altivec_lvx(a, b); | |
| 1715 } | |
| 1716 | |
| 1717 static vector unsigned char __ATTRS_o_ai | |
| 1718 vec_ld(int a, const vector unsigned char *b) | |
| 1719 { | |
| 1720 return (vector unsigned char)__builtin_altivec_lvx(a, b); | |
| 1721 } | |
| 1722 | |
| 1723 static vector unsigned char __ATTRS_o_ai | |
| 1724 vec_ld(int a, const unsigned char *b) | |
| 1725 { | |
| 1726 return (vector unsigned char)__builtin_altivec_lvx(a, b); | |
| 1727 } | |
| 1728 | |
| 1729 static vector bool char __ATTRS_o_ai | |
| 1730 vec_ld(int a, const vector bool char *b) | |
| 1731 { | |
| 1732 return (vector bool char)__builtin_altivec_lvx(a, b); | |
| 1733 } | |
| 1734 | |
| 1735 static vector short __ATTRS_o_ai | |
| 1736 vec_ld(int a, const vector short *b) | |
| 1737 { | |
| 1738 return (vector short)__builtin_altivec_lvx(a, b); | |
| 1739 } | |
| 1740 | |
| 1741 static vector short __ATTRS_o_ai | |
| 1742 vec_ld(int a, const short *b) | |
| 1743 { | |
| 1744 return (vector short)__builtin_altivec_lvx(a, b); | |
| 1745 } | |
| 1746 | |
| 1747 static vector unsigned short __ATTRS_o_ai | |
| 1748 vec_ld(int a, const vector unsigned short *b) | |
| 1749 { | |
| 1750 return (vector unsigned short)__builtin_altivec_lvx(a, b); | |
| 1751 } | |
| 1752 | |
| 1753 static vector unsigned short __ATTRS_o_ai | |
| 1754 vec_ld(int a, const unsigned short *b) | |
| 1755 { | |
| 1756 return (vector unsigned short)__builtin_altivec_lvx(a, b); | |
| 1757 } | |
| 1758 | |
| 1759 static vector bool short __ATTRS_o_ai | |
| 1760 vec_ld(int a, const vector bool short *b) | |
| 1761 { | |
| 1762 return (vector bool short)__builtin_altivec_lvx(a, b); | |
| 1763 } | |
| 1764 | |
| 1765 static vector pixel __ATTRS_o_ai | |
| 1766 vec_ld(int a, const vector pixel *b) | |
| 1767 { | |
| 1768 return (vector pixel)__builtin_altivec_lvx(a, b); | |
| 1769 } | |
| 1770 | |
| 1771 static vector int __ATTRS_o_ai | |
| 1772 vec_ld(int a, const vector int *b) | |
| 1773 { | |
| 1774 return (vector int)__builtin_altivec_lvx(a, b); | |
| 1775 } | |
| 1776 | |
| 1777 static vector int __ATTRS_o_ai | |
| 1778 vec_ld(int a, const int *b) | |
| 1779 { | |
| 1780 return (vector int)__builtin_altivec_lvx(a, b); | |
| 1781 } | |
| 1782 | |
| 1783 static vector unsigned int __ATTRS_o_ai | |
| 1784 vec_ld(int a, const vector unsigned int *b) | |
| 1785 { | |
| 1786 return (vector unsigned int)__builtin_altivec_lvx(a, b); | |
| 1787 } | |
| 1788 | |
| 1789 static vector unsigned int __ATTRS_o_ai | |
| 1790 vec_ld(int a, const unsigned int *b) | |
| 1791 { | |
| 1792 return (vector unsigned int)__builtin_altivec_lvx(a, b); | |
| 1793 } | |
| 1794 | |
| 1795 static vector bool int __ATTRS_o_ai | |
| 1796 vec_ld(int a, const vector bool int *b) | |
| 1797 { | |
| 1798 return (vector bool int)__builtin_altivec_lvx(a, b); | |
| 1799 } | |
| 1800 | |
| 1801 static vector float __ATTRS_o_ai | |
| 1802 vec_ld(int a, const vector float *b) | |
| 1803 { | |
| 1804 return (vector float)__builtin_altivec_lvx(a, b); | |
| 1805 } | |
| 1806 | |
| 1807 static vector float __ATTRS_o_ai | |
| 1808 vec_ld(int a, const float *b) | |
| 1809 { | |
| 1810 return (vector float)__builtin_altivec_lvx(a, b); | |
| 1811 } | |
| 1812 | |
| 1813 /* vec_lvx */ | |
| 1814 | |
| 1815 static vector signed char __ATTRS_o_ai | |
| 1816 vec_lvx(int a, const vector signed char *b) | |
| 1817 { | |
| 1818 return (vector signed char)__builtin_altivec_lvx(a, b); | |
| 1819 } | |
| 1820 | |
| 1821 static vector signed char __ATTRS_o_ai | |
| 1822 vec_lvx(int a, const signed char *b) | |
| 1823 { | |
| 1824 return (vector signed char)__builtin_altivec_lvx(a, b); | |
| 1825 } | |
| 1826 | |
| 1827 static vector unsigned char __ATTRS_o_ai | |
| 1828 vec_lvx(int a, const vector unsigned char *b) | |
| 1829 { | |
| 1830 return (vector unsigned char)__builtin_altivec_lvx(a, b); | |
| 1831 } | |
| 1832 | |
| 1833 static vector unsigned char __ATTRS_o_ai | |
| 1834 vec_lvx(int a, const unsigned char *b) | |
| 1835 { | |
| 1836 return (vector unsigned char)__builtin_altivec_lvx(a, b); | |
| 1837 } | |
| 1838 | |
| 1839 static vector bool char __ATTRS_o_ai | |
| 1840 vec_lvx(int a, const vector bool char *b) | |
| 1841 { | |
| 1842 return (vector bool char)__builtin_altivec_lvx(a, b); | |
| 1843 } | |
| 1844 | |
| 1845 static vector short __ATTRS_o_ai | |
| 1846 vec_lvx(int a, const vector short *b) | |
| 1847 { | |
| 1848 return (vector short)__builtin_altivec_lvx(a, b); | |
| 1849 } | |
| 1850 | |
| 1851 static vector short __ATTRS_o_ai | |
| 1852 vec_lvx(int a, const short *b) | |
| 1853 { | |
| 1854 return (vector short)__builtin_altivec_lvx(a, b); | |
| 1855 } | |
| 1856 | |
| 1857 static vector unsigned short __ATTRS_o_ai | |
| 1858 vec_lvx(int a, const vector unsigned short *b) | |
| 1859 { | |
| 1860 return (vector unsigned short)__builtin_altivec_lvx(a, b); | |
| 1861 } | |
| 1862 | |
| 1863 static vector unsigned short __ATTRS_o_ai | |
| 1864 vec_lvx(int a, const unsigned short *b) | |
| 1865 { | |
| 1866 return (vector unsigned short)__builtin_altivec_lvx(a, b); | |
| 1867 } | |
| 1868 | |
| 1869 static vector bool short __ATTRS_o_ai | |
| 1870 vec_lvx(int a, const vector bool short *b) | |
| 1871 { | |
| 1872 return (vector bool short)__builtin_altivec_lvx(a, b); | |
| 1873 } | |
| 1874 | |
| 1875 static vector pixel __ATTRS_o_ai | |
| 1876 vec_lvx(int a, const vector pixel *b) | |
| 1877 { | |
| 1878 return (vector pixel)__builtin_altivec_lvx(a, b); | |
| 1879 } | |
| 1880 | |
| 1881 static vector int __ATTRS_o_ai | |
| 1882 vec_lvx(int a, const vector int *b) | |
| 1883 { | |
| 1884 return (vector int)__builtin_altivec_lvx(a, b); | |
| 1885 } | |
| 1886 | |
| 1887 static vector int __ATTRS_o_ai | |
| 1888 vec_lvx(int a, const int *b) | |
| 1889 { | |
| 1890 return (vector int)__builtin_altivec_lvx(a, b); | |
| 1891 } | |
| 1892 | |
| 1893 static vector unsigned int __ATTRS_o_ai | |
| 1894 vec_lvx(int a, const vector unsigned int *b) | |
| 1895 { | |
| 1896 return (vector unsigned int)__builtin_altivec_lvx(a, b); | |
| 1897 } | |
| 1898 | |
| 1899 static vector unsigned int __ATTRS_o_ai | |
| 1900 vec_lvx(int a, const unsigned int *b) | |
| 1901 { | |
| 1902 return (vector unsigned int)__builtin_altivec_lvx(a, b); | |
| 1903 } | |
| 1904 | |
| 1905 static vector bool int __ATTRS_o_ai | |
| 1906 vec_lvx(int a, const vector bool int *b) | |
| 1907 { | |
| 1908 return (vector bool int)__builtin_altivec_lvx(a, b); | |
| 1909 } | |
| 1910 | |
| 1911 static vector float __ATTRS_o_ai | |
| 1912 vec_lvx(int a, const vector float *b) | |
| 1913 { | |
| 1914 return (vector float)__builtin_altivec_lvx(a, b); | |
| 1915 } | |
| 1916 | |
| 1917 static vector float __ATTRS_o_ai | |
| 1918 vec_lvx(int a, const float *b) | |
| 1919 { | |
| 1920 return (vector float)__builtin_altivec_lvx(a, b); | |
| 1921 } | |
| 1922 | |
| 1923 /* vec_lde */ | |
| 1924 | |
| 1925 static vector signed char __ATTRS_o_ai | |
| 1926 vec_lde(int a, const vector signed char *b) | |
| 1927 { | |
| 1928 return (vector signed char)__builtin_altivec_lvebx(a, b); | |
| 1929 } | |
| 1930 | |
| 1931 static vector unsigned char __ATTRS_o_ai | |
| 1932 vec_lde(int a, const vector unsigned char *b) | |
| 1933 { | |
| 1934 return (vector unsigned char)__builtin_altivec_lvebx(a, b); | |
| 1935 } | |
| 1936 | |
| 1937 static vector short __ATTRS_o_ai | |
| 1938 vec_lde(int a, const vector short *b) | |
| 1939 { | |
| 1940 return (vector short)__builtin_altivec_lvehx(a, b); | |
| 1941 } | |
| 1942 | |
| 1943 static vector unsigned short __ATTRS_o_ai | |
| 1944 vec_lde(int a, const vector unsigned short *b) | |
| 1945 { | |
| 1946 return (vector unsigned short)__builtin_altivec_lvehx(a, b); | |
| 1947 } | |
| 1948 | |
| 1949 static vector int __ATTRS_o_ai | |
| 1950 vec_lde(int a, const vector int *b) | |
| 1951 { | |
| 1952 return (vector int)__builtin_altivec_lvewx(a, b); | |
| 1953 } | |
| 1954 | |
| 1955 static vector unsigned int __ATTRS_o_ai | |
| 1956 vec_lde(int a, const vector unsigned int *b) | |
| 1957 { | |
| 1958 return (vector unsigned int)__builtin_altivec_lvewx(a, b); | |
| 1959 } | |
| 1960 | |
| 1961 static vector float __ATTRS_o_ai | |
| 1962 vec_lde(int a, const vector float *b) | |
| 1963 { | |
| 1964 return (vector float)__builtin_altivec_lvewx(a, b); | |
| 1965 } | |
| 1966 | |
| 1967 /* vec_lvebx */ | |
| 1968 | |
| 1969 static vector signed char __ATTRS_o_ai | |
| 1970 vec_lvebx(int a, const vector signed char *b) | |
| 1971 { | |
| 1972 return (vector signed char)__builtin_altivec_lvebx(a, b); | |
| 1973 } | |
| 1974 | |
| 1975 static vector unsigned char __ATTRS_o_ai | |
| 1976 vec_lvebx(int a, const vector unsigned char *b) | |
| 1977 { | |
| 1978 return (vector unsigned char)__builtin_altivec_lvebx(a, b); | |
| 1979 } | |
| 1980 | |
| 1981 /* vec_lvehx */ | |
| 1982 | |
| 1983 static vector short __ATTRS_o_ai | |
| 1984 vec_lvehx(int a, const vector short *b) | |
| 1985 { | |
| 1986 return (vector short)__builtin_altivec_lvehx(a, b); | |
| 1987 } | |
| 1988 | |
| 1989 static vector unsigned short __ATTRS_o_ai | |
| 1990 vec_lvehx(int a, const vector unsigned short *b) | |
| 1991 { | |
| 1992 return (vector unsigned short)__builtin_altivec_lvehx(a, b); | |
| 1993 } | |
| 1994 | |
| 1995 /* vec_lvewx */ | |
| 1996 | |
| 1997 static vector int __ATTRS_o_ai | |
| 1998 vec_lvewx(int a, const vector int *b) | |
| 1999 { | |
| 2000 return (vector int)__builtin_altivec_lvewx(a, b); | |
| 2001 } | |
| 2002 | |
| 2003 static vector unsigned int __ATTRS_o_ai | |
| 2004 vec_lvewx(int a, const vector unsigned int *b) | |
| 2005 { | |
| 2006 return (vector unsigned int)__builtin_altivec_lvewx(a, b); | |
| 2007 } | |
| 2008 | |
| 2009 static vector float __ATTRS_o_ai | |
| 2010 vec_lvewx(int a, const vector float *b) | |
| 2011 { | |
| 2012 return (vector float)__builtin_altivec_lvewx(a, b); | |
| 2013 } | |
| 2014 | |
| 2015 /* vec_ldl */ | |
| 2016 | |
| 2017 static vector signed char __ATTRS_o_ai | |
| 2018 vec_ldl(int a, const vector signed char *b) | |
| 2019 { | |
| 2020 return (vector signed char)__builtin_altivec_lvxl(a, b); | |
| 2021 } | |
| 2022 | |
| 2023 static vector signed char __ATTRS_o_ai | |
| 2024 vec_ldl(int a, const signed char *b) | |
| 2025 { | |
| 2026 return (vector signed char)__builtin_altivec_lvxl(a, b); | |
| 2027 } | |
| 2028 | |
| 2029 static vector unsigned char __ATTRS_o_ai | |
| 2030 vec_ldl(int a, const vector unsigned char *b) | |
| 2031 { | |
| 2032 return (vector unsigned char)__builtin_altivec_lvxl(a, b); | |
| 2033 } | |
| 2034 | |
| 2035 static vector unsigned char __ATTRS_o_ai | |
| 2036 vec_ldl(int a, const unsigned char *b) | |
| 2037 { | |
| 2038 return (vector unsigned char)__builtin_altivec_lvxl(a, b); | |
| 2039 } | |
| 2040 | |
| 2041 static vector bool char __ATTRS_o_ai | |
| 2042 vec_ldl(int a, const vector bool char *b) | |
| 2043 { | |
| 2044 return (vector bool char)__builtin_altivec_lvxl(a, b); | |
| 2045 } | |
| 2046 | |
| 2047 static vector short __ATTRS_o_ai | |
| 2048 vec_ldl(int a, const vector short *b) | |
| 2049 { | |
| 2050 return (vector short)__builtin_altivec_lvxl(a, b); | |
| 2051 } | |
| 2052 | |
| 2053 static vector short __ATTRS_o_ai | |
| 2054 vec_ldl(int a, const short *b) | |
| 2055 { | |
| 2056 return (vector short)__builtin_altivec_lvxl(a, b); | |
| 2057 } | |
| 2058 | |
| 2059 static vector unsigned short __ATTRS_o_ai | |
| 2060 vec_ldl(int a, const vector unsigned short *b) | |
| 2061 { | |
| 2062 return (vector unsigned short)__builtin_altivec_lvxl(a, b); | |
| 2063 } | |
| 2064 | |
| 2065 static vector unsigned short __ATTRS_o_ai | |
| 2066 vec_ldl(int a, const unsigned short *b) | |
| 2067 { | |
| 2068 return (vector unsigned short)__builtin_altivec_lvxl(a, b); | |
| 2069 } | |
| 2070 | |
| 2071 static vector bool short __ATTRS_o_ai | |
| 2072 vec_ldl(int a, const vector bool short *b) | |
| 2073 { | |
| 2074 return (vector bool short)__builtin_altivec_lvxl(a, b); | |
| 2075 } | |
| 2076 | |
| 2077 static vector pixel __ATTRS_o_ai | |
| 2078 vec_ldl(int a, const vector pixel *b) | |
| 2079 { | |
| 2080 return (vector pixel short)__builtin_altivec_lvxl(a, b); | |
| 2081 } | |
| 2082 | |
| 2083 static vector int __ATTRS_o_ai | |
| 2084 vec_ldl(int a, const vector int *b) | |
| 2085 { | |
| 2086 return (vector int)__builtin_altivec_lvxl(a, b); | |
| 2087 } | |
| 2088 | |
| 2089 static vector int __ATTRS_o_ai | |
| 2090 vec_ldl(int a, const int *b) | |
| 2091 { | |
| 2092 return (vector int)__builtin_altivec_lvxl(a, b); | |
| 2093 } | |
| 2094 | |
| 2095 static vector unsigned int __ATTRS_o_ai | |
| 2096 vec_ldl(int a, const vector unsigned int *b) | |
| 2097 { | |
| 2098 return (vector unsigned int)__builtin_altivec_lvxl(a, b); | |
| 2099 } | |
| 2100 | |
| 2101 static vector unsigned int __ATTRS_o_ai | |
| 2102 vec_ldl(int a, const unsigned int *b) | |
| 2103 { | |
| 2104 return (vector unsigned int)__builtin_altivec_lvxl(a, b); | |
| 2105 } | |
| 2106 | |
| 2107 static vector bool int __ATTRS_o_ai | |
| 2108 vec_ldl(int a, const vector bool int *b) | |
| 2109 { | |
| 2110 return (vector bool int)__builtin_altivec_lvxl(a, b); | |
| 2111 } | |
| 2112 | |
| 2113 static vector float __ATTRS_o_ai | |
| 2114 vec_ldl(int a, const vector float *b) | |
| 2115 { | |
| 2116 return (vector float)__builtin_altivec_lvxl(a, b); | |
| 2117 } | |
| 2118 | |
| 2119 static vector float __ATTRS_o_ai | |
| 2120 vec_ldl(int a, const float *b) | |
| 2121 { | |
| 2122 return (vector float)__builtin_altivec_lvxl(a, b); | |
| 2123 } | |
| 2124 | |
| 2125 /* vec_lvxl */ | |
| 2126 | |
| 2127 static vector signed char __ATTRS_o_ai | |
| 2128 vec_lvxl(int a, const vector signed char *b) | |
| 2129 { | |
| 2130 return (vector signed char)__builtin_altivec_lvxl(a, b); | |
| 2131 } | |
| 2132 | |
| 2133 static vector signed char __ATTRS_o_ai | |
| 2134 vec_lvxl(int a, const signed char *b) | |
| 2135 { | |
| 2136 return (vector signed char)__builtin_altivec_lvxl(a, b); | |
| 2137 } | |
| 2138 | |
| 2139 static vector unsigned char __ATTRS_o_ai | |
| 2140 vec_lvxl(int a, const vector unsigned char *b) | |
| 2141 { | |
| 2142 return (vector unsigned char)__builtin_altivec_lvxl(a, b); | |
| 2143 } | |
| 2144 | |
| 2145 static vector unsigned char __ATTRS_o_ai | |
| 2146 vec_lvxl(int a, const unsigned char *b) | |
| 2147 { | |
| 2148 return (vector unsigned char)__builtin_altivec_lvxl(a, b); | |
| 2149 } | |
| 2150 | |
| 2151 static vector bool char __ATTRS_o_ai | |
| 2152 vec_lvxl(int a, const vector bool char *b) | |
| 2153 { | |
| 2154 return (vector bool char)__builtin_altivec_lvxl(a, b); | |
| 2155 } | |
| 2156 | |
| 2157 static vector short __ATTRS_o_ai | |
| 2158 vec_lvxl(int a, const vector short *b) | |
| 2159 { | |
| 2160 return (vector short)__builtin_altivec_lvxl(a, b); | |
| 2161 } | |
| 2162 | |
| 2163 static vector short __ATTRS_o_ai | |
| 2164 vec_lvxl(int a, const short *b) | |
| 2165 { | |
| 2166 return (vector short)__builtin_altivec_lvxl(a, b); | |
| 2167 } | |
| 2168 | |
| 2169 static vector unsigned short __ATTRS_o_ai | |
| 2170 vec_lvxl(int a, const vector unsigned short *b) | |
| 2171 { | |
| 2172 return (vector unsigned short)__builtin_altivec_lvxl(a, b); | |
| 2173 } | |
| 2174 | |
| 2175 static vector unsigned short __ATTRS_o_ai | |
| 2176 vec_lvxl(int a, const unsigned short *b) | |
| 2177 { | |
| 2178 return (vector unsigned short)__builtin_altivec_lvxl(a, b); | |
| 2179 } | |
| 2180 | |
| 2181 static vector bool short __ATTRS_o_ai | |
| 2182 vec_lvxl(int a, const vector bool short *b) | |
| 2183 { | |
| 2184 return (vector bool short)__builtin_altivec_lvxl(a, b); | |
| 2185 } | |
| 2186 | |
| 2187 static vector pixel __ATTRS_o_ai | |
| 2188 vec_lvxl(int a, const vector pixel *b) | |
| 2189 { | |
| 2190 return (vector pixel)__builtin_altivec_lvxl(a, b); | |
| 2191 } | |
| 2192 | |
| 2193 static vector int __ATTRS_o_ai | |
| 2194 vec_lvxl(int a, const vector int *b) | |
| 2195 { | |
| 2196 return (vector int)__builtin_altivec_lvxl(a, b); | |
| 2197 } | |
| 2198 | |
| 2199 static vector int __ATTRS_o_ai | |
| 2200 vec_lvxl(int a, const int *b) | |
| 2201 { | |
| 2202 return (vector int)__builtin_altivec_lvxl(a, b); | |
| 2203 } | |
| 2204 | |
| 2205 static vector unsigned int __ATTRS_o_ai | |
| 2206 vec_lvxl(int a, const vector unsigned int *b) | |
| 2207 { | |
| 2208 return (vector unsigned int)__builtin_altivec_lvxl(a, b); | |
| 2209 } | |
| 2210 | |
| 2211 static vector unsigned int __ATTRS_o_ai | |
| 2212 vec_lvxl(int a, const unsigned int *b) | |
| 2213 { | |
| 2214 return (vector unsigned int)__builtin_altivec_lvxl(a, b); | |
| 2215 } | |
| 2216 | |
| 2217 static vector bool int __ATTRS_o_ai | |
| 2218 vec_lvxl(int a, const vector bool int *b) | |
| 2219 { | |
| 2220 return (vector bool int)__builtin_altivec_lvxl(a, b); | |
| 2221 } | |
| 2222 | |
| 2223 static vector float __ATTRS_o_ai | |
| 2224 vec_lvxl(int a, const vector float *b) | |
| 2225 { | |
| 2226 return (vector float)__builtin_altivec_lvxl(a, b); | |
| 2227 } | |
| 2228 | |
| 2229 static vector float __ATTRS_o_ai | |
| 2230 vec_lvxl(int a, const float *b) | |
| 2231 { | |
| 2232 return (vector float)__builtin_altivec_lvxl(a, b); | |
| 2233 } | |
| 2234 | |
| 2235 /* vec_loge */ | |
| 2236 | |
| 2237 static vector float __attribute__((__always_inline__)) | |
| 2238 vec_loge(vector float a) | |
| 2239 { | |
| 2240 return __builtin_altivec_vlogefp(a); | |
| 2241 } | |
| 2242 | |
| 2243 /* vec_vlogefp */ | |
| 2244 | |
| 2245 static vector float __attribute__((__always_inline__)) | |
| 2246 vec_vlogefp(vector float a) | |
| 2247 { | |
| 2248 return __builtin_altivec_vlogefp(a); | |
| 2249 } | |
| 2250 | |
| 2251 /* vec_lvsl */ | |
| 2252 | |
| 2253 static vector unsigned char __ATTRS_o_ai | |
| 2254 vec_lvsl(int a, const signed char *b) | |
| 2255 { | |
| 2256 return (vector unsigned char)__builtin_altivec_lvsl(a, b); | |
| 2257 } | |
| 2258 | |
| 2259 static vector unsigned char __ATTRS_o_ai | |
| 2260 vec_lvsl(int a, const unsigned char *b) | |
| 2261 { | |
| 2262 return (vector unsigned char)__builtin_altivec_lvsl(a, b); | |
| 2263 } | |
| 2264 | |
| 2265 static vector unsigned char __ATTRS_o_ai | |
| 2266 vec_lvsl(int a, const short *b) | |
| 2267 { | |
| 2268 return (vector unsigned char)__builtin_altivec_lvsl(a, b); | |
| 2269 } | |
| 2270 | |
| 2271 static vector unsigned char __ATTRS_o_ai | |
| 2272 vec_lvsl(int a, const unsigned short *b) | |
| 2273 { | |
| 2274 return (vector unsigned char)__builtin_altivec_lvsl(a, b); | |
| 2275 } | |
| 2276 | |
| 2277 static vector unsigned char __ATTRS_o_ai | |
| 2278 vec_lvsl(int a, const int *b) | |
| 2279 { | |
| 2280 return (vector unsigned char)__builtin_altivec_lvsl(a, b); | |
| 2281 } | |
| 2282 | |
| 2283 static vector unsigned char __ATTRS_o_ai | |
| 2284 vec_lvsl(int a, const unsigned int *b) | |
| 2285 { | |
| 2286 return (vector unsigned char)__builtin_altivec_lvsl(a, b); | |
| 2287 } | |
| 2288 | |
| 2289 static vector unsigned char __ATTRS_o_ai | |
| 2290 vec_lvsl(int a, const float *b) | |
| 2291 { | |
| 2292 return (vector unsigned char)__builtin_altivec_lvsl(a, b); | |
| 2293 } | |
| 2294 | |
| 2295 /* vec_lvsr */ | |
| 2296 | |
| 2297 static vector unsigned char __ATTRS_o_ai | |
| 2298 vec_lvsr(int a, const signed char *b) | |
| 2299 { | |
| 2300 return (vector unsigned char)__builtin_altivec_lvsr(a, b); | |
| 2301 } | |
| 2302 | |
| 2303 static vector unsigned char __ATTRS_o_ai | |
| 2304 vec_lvsr(int a, const unsigned char *b) | |
| 2305 { | |
| 2306 return (vector unsigned char)__builtin_altivec_lvsr(a, b); | |
| 2307 } | |
| 2308 | |
| 2309 static vector unsigned char __ATTRS_o_ai | |
| 2310 vec_lvsr(int a, const short *b) | |
| 2311 { | |
| 2312 return (vector unsigned char)__builtin_altivec_lvsr(a, b); | |
| 2313 } | |
| 2314 | |
| 2315 static vector unsigned char __ATTRS_o_ai | |
| 2316 vec_lvsr(int a, const unsigned short *b) | |
| 2317 { | |
| 2318 return (vector unsigned char)__builtin_altivec_lvsr(a, b); | |
| 2319 } | |
| 2320 | |
| 2321 static vector unsigned char __ATTRS_o_ai | |
| 2322 vec_lvsr(int a, const int *b) | |
| 2323 { | |
| 2324 return (vector unsigned char)__builtin_altivec_lvsr(a, b); | |
| 2325 } | |
| 2326 | |
| 2327 static vector unsigned char __ATTRS_o_ai | |
| 2328 vec_lvsr(int a, const unsigned int *b) | |
| 2329 { | |
| 2330 return (vector unsigned char)__builtin_altivec_lvsr(a, b); | |
| 2331 } | |
| 2332 | |
| 2333 static vector unsigned char __ATTRS_o_ai | |
| 2334 vec_lvsr(int a, const float *b) | |
| 2335 { | |
| 2336 return (vector unsigned char)__builtin_altivec_lvsr(a, b); | |
| 2337 } | |
| 2338 | |
| 2339 /* vec_madd */ | |
| 2340 | |
| 2341 static vector float __attribute__((__always_inline__)) | |
| 2342 vec_madd(vector float a, vector float b, vector float c) | |
| 2343 { | |
| 2344 return __builtin_altivec_vmaddfp(a, b, c); | |
| 2345 } | |
| 2346 | |
| 2347 /* vec_vmaddfp */ | |
| 2348 | |
| 2349 static vector float __attribute__((__always_inline__)) | |
| 2350 vec_vmaddfp(vector float a, vector float b, vector float c) | |
| 2351 { | |
| 2352 return __builtin_altivec_vmaddfp(a, b, c); | |
| 2353 } | |
| 2354 | |
| 2355 /* vec_madds */ | |
| 2356 | |
| 2357 static vector signed short __attribute__((__always_inline__)) | |
| 2358 vec_madds(vector signed short a, vector signed short b, vector signed short c) | |
| 2359 { | |
| 2360 return __builtin_altivec_vmhaddshs(a, b, c); | |
| 2361 } | |
| 2362 | |
| 2363 /* vec_vmhaddshs */ | |
| 2364 static vector signed short __attribute__((__always_inline__)) | |
| 2365 vec_vmhaddshs(vector signed short a, | |
| 2366 vector signed short b, | |
| 2367 vector signed short c) | |
| 2368 { | |
| 2369 return __builtin_altivec_vmhaddshs(a, b, c); | |
| 2370 } | |
| 2371 | |
| 2372 /* vec_max */ | |
| 2373 | |
| 2374 static vector signed char __ATTRS_o_ai | |
| 2375 vec_max(vector signed char a, vector signed char b) | |
| 2376 { | |
| 2377 return __builtin_altivec_vmaxsb(a, b); | |
| 2378 } | |
| 2379 | |
| 2380 static vector signed char __ATTRS_o_ai | |
| 2381 vec_max(vector bool char a, vector signed char b) | |
| 2382 { | |
| 2383 return __builtin_altivec_vmaxsb((vector signed char)a, b); | |
| 2384 } | |
| 2385 | |
| 2386 static vector signed char __ATTRS_o_ai | |
| 2387 vec_max(vector signed char a, vector bool char b) | |
| 2388 { | |
| 2389 return __builtin_altivec_vmaxsb(a, (vector signed char)b); | |
| 2390 } | |
| 2391 | |
| 2392 static vector unsigned char __ATTRS_o_ai | |
| 2393 vec_max(vector unsigned char a, vector unsigned char b) | |
| 2394 { | |
| 2395 return __builtin_altivec_vmaxub(a, b); | |
| 2396 } | |
| 2397 | |
| 2398 static vector unsigned char __ATTRS_o_ai | |
| 2399 vec_max(vector bool char a, vector unsigned char b) | |
| 2400 { | |
| 2401 return __builtin_altivec_vmaxub((vector unsigned char)a, b); | |
| 2402 } | |
| 2403 | |
| 2404 static vector unsigned char __ATTRS_o_ai | |
| 2405 vec_max(vector unsigned char a, vector bool char b) | |
| 2406 { | |
| 2407 return __builtin_altivec_vmaxub(a, (vector unsigned char)b); | |
| 2408 } | |
| 2409 | |
| 2410 static vector short __ATTRS_o_ai | |
| 2411 vec_max(vector short a, vector short b) | |
| 2412 { | |
| 2413 return __builtin_altivec_vmaxsh(a, b); | |
| 2414 } | |
| 2415 | |
| 2416 static vector short __ATTRS_o_ai | |
| 2417 vec_max(vector bool short a, vector short b) | |
| 2418 { | |
| 2419 return __builtin_altivec_vmaxsh((vector short)a, b); | |
| 2420 } | |
| 2421 | |
| 2422 static vector short __ATTRS_o_ai | |
| 2423 vec_max(vector short a, vector bool short b) | |
| 2424 { | |
| 2425 return __builtin_altivec_vmaxsh(a, (vector short)b); | |
| 2426 } | |
| 2427 | |
| 2428 static vector unsigned short __ATTRS_o_ai | |
| 2429 vec_max(vector unsigned short a, vector unsigned short b) | |
| 2430 { | |
| 2431 return __builtin_altivec_vmaxuh(a, b); | |
| 2432 } | |
| 2433 | |
| 2434 static vector unsigned short __ATTRS_o_ai | |
| 2435 vec_max(vector bool short a, vector unsigned short b) | |
| 2436 { | |
| 2437 return __builtin_altivec_vmaxuh((vector unsigned short)a, b); | |
| 2438 } | |
| 2439 | |
| 2440 static vector unsigned short __ATTRS_o_ai | |
| 2441 vec_max(vector unsigned short a, vector bool short b) | |
| 2442 { | |
| 2443 return __builtin_altivec_vmaxuh(a, (vector unsigned short)b); | |
| 2444 } | |
| 2445 | |
| 2446 static vector int __ATTRS_o_ai | |
| 2447 vec_max(vector int a, vector int b) | |
| 2448 { | |
| 2449 return __builtin_altivec_vmaxsw(a, b); | |
| 2450 } | |
| 2451 | |
| 2452 static vector int __ATTRS_o_ai | |
| 2453 vec_max(vector bool int a, vector int b) | |
| 2454 { | |
| 2455 return __builtin_altivec_vmaxsw((vector int)a, b); | |
| 2456 } | |
| 2457 | |
| 2458 static vector int __ATTRS_o_ai | |
| 2459 vec_max(vector int a, vector bool int b) | |
| 2460 { | |
| 2461 return __builtin_altivec_vmaxsw(a, (vector int)b); | |
| 2462 } | |
| 2463 | |
| 2464 static vector unsigned int __ATTRS_o_ai | |
| 2465 vec_max(vector unsigned int a, vector unsigned int b) | |
| 2466 { | |
| 2467 return __builtin_altivec_vmaxuw(a, b); | |
| 2468 } | |
| 2469 | |
| 2470 static vector unsigned int __ATTRS_o_ai | |
| 2471 vec_max(vector bool int a, vector unsigned int b) | |
| 2472 { | |
| 2473 return __builtin_altivec_vmaxuw((vector unsigned int)a, b); | |
| 2474 } | |
| 2475 | |
| 2476 static vector unsigned int __ATTRS_o_ai | |
| 2477 vec_max(vector unsigned int a, vector bool int b) | |
| 2478 { | |
| 2479 return __builtin_altivec_vmaxuw(a, (vector unsigned int)b); | |
| 2480 } | |
| 2481 | |
| 2482 static vector float __ATTRS_o_ai | |
| 2483 vec_max(vector float a, vector float b) | |
| 2484 { | |
| 2485 return __builtin_altivec_vmaxfp(a, b); | |
| 2486 } | |
| 2487 | |
| 2488 /* vec_vmaxsb */ | |
| 2489 | |
| 2490 static vector signed char __ATTRS_o_ai | |
| 2491 vec_vmaxsb(vector signed char a, vector signed char b) | |
| 2492 { | |
| 2493 return __builtin_altivec_vmaxsb(a, b); | |
| 2494 } | |
| 2495 | |
| 2496 static vector signed char __ATTRS_o_ai | |
| 2497 vec_vmaxsb(vector bool char a, vector signed char b) | |
| 2498 { | |
| 2499 return __builtin_altivec_vmaxsb((vector signed char)a, b); | |
| 2500 } | |
| 2501 | |
| 2502 static vector signed char __ATTRS_o_ai | |
| 2503 vec_vmaxsb(vector signed char a, vector bool char b) | |
| 2504 { | |
| 2505 return __builtin_altivec_vmaxsb(a, (vector signed char)b); | |
| 2506 } | |
| 2507 | |
| 2508 /* vec_vmaxub */ | |
| 2509 | |
| 2510 static vector unsigned char __ATTRS_o_ai | |
| 2511 vec_vmaxub(vector unsigned char a, vector unsigned char b) | |
| 2512 { | |
| 2513 return __builtin_altivec_vmaxub(a, b); | |
| 2514 } | |
| 2515 | |
| 2516 static vector unsigned char __ATTRS_o_ai | |
| 2517 vec_vmaxub(vector bool char a, vector unsigned char b) | |
| 2518 { | |
| 2519 return __builtin_altivec_vmaxub((vector unsigned char)a, b); | |
| 2520 } | |
| 2521 | |
| 2522 static vector unsigned char __ATTRS_o_ai | |
| 2523 vec_vmaxub(vector unsigned char a, vector bool char b) | |
| 2524 { | |
| 2525 return __builtin_altivec_vmaxub(a, (vector unsigned char)b); | |
| 2526 } | |
| 2527 | |
| 2528 /* vec_vmaxsh */ | |
| 2529 | |
| 2530 static vector short __ATTRS_o_ai | |
| 2531 vec_vmaxsh(vector short a, vector short b) | |
| 2532 { | |
| 2533 return __builtin_altivec_vmaxsh(a, b); | |
| 2534 } | |
| 2535 | |
| 2536 static vector short __ATTRS_o_ai | |
| 2537 vec_vmaxsh(vector bool short a, vector short b) | |
| 2538 { | |
| 2539 return __builtin_altivec_vmaxsh((vector short)a, b); | |
| 2540 } | |
| 2541 | |
| 2542 static vector short __ATTRS_o_ai | |
| 2543 vec_vmaxsh(vector short a, vector bool short b) | |
| 2544 { | |
| 2545 return __builtin_altivec_vmaxsh(a, (vector short)b); | |
| 2546 } | |
| 2547 | |
| 2548 /* vec_vmaxuh */ | |
| 2549 | |
| 2550 static vector unsigned short __ATTRS_o_ai | |
| 2551 vec_vmaxuh(vector unsigned short a, vector unsigned short b) | |
| 2552 { | |
| 2553 return __builtin_altivec_vmaxuh(a, b); | |
| 2554 } | |
| 2555 | |
| 2556 static vector unsigned short __ATTRS_o_ai | |
| 2557 vec_vmaxuh(vector bool short a, vector unsigned short b) | |
| 2558 { | |
| 2559 return __builtin_altivec_vmaxuh((vector unsigned short)a, b); | |
| 2560 } | |
| 2561 | |
| 2562 static vector unsigned short __ATTRS_o_ai | |
| 2563 vec_vmaxuh(vector unsigned short a, vector bool short b) | |
| 2564 { | |
| 2565 return __builtin_altivec_vmaxuh(a, (vector unsigned short)b); | |
| 2566 } | |
| 2567 | |
| 2568 /* vec_vmaxsw */ | |
| 2569 | |
| 2570 static vector int __ATTRS_o_ai | |
| 2571 vec_vmaxsw(vector int a, vector int b) | |
| 2572 { | |
| 2573 return __builtin_altivec_vmaxsw(a, b); | |
| 2574 } | |
| 2575 | |
| 2576 static vector int __ATTRS_o_ai | |
| 2577 vec_vmaxsw(vector bool int a, vector int b) | |
| 2578 { | |
| 2579 return __builtin_altivec_vmaxsw((vector int)a, b); | |
| 2580 } | |
| 2581 | |
| 2582 static vector int __ATTRS_o_ai | |
| 2583 vec_vmaxsw(vector int a, vector bool int b) | |
| 2584 { | |
| 2585 return __builtin_altivec_vmaxsw(a, (vector int)b); | |
| 2586 } | |
| 2587 | |
| 2588 /* vec_vmaxuw */ | |
| 2589 | |
| 2590 static vector unsigned int __ATTRS_o_ai | |
| 2591 vec_vmaxuw(vector unsigned int a, vector unsigned int b) | |
| 2592 { | |
| 2593 return __builtin_altivec_vmaxuw(a, b); | |
| 2594 } | |
| 2595 | |
| 2596 static vector unsigned int __ATTRS_o_ai | |
| 2597 vec_vmaxuw(vector bool int a, vector unsigned int b) | |
| 2598 { | |
| 2599 return __builtin_altivec_vmaxuw((vector unsigned int)a, b); | |
| 2600 } | |
| 2601 | |
| 2602 static vector unsigned int __ATTRS_o_ai | |
| 2603 vec_vmaxuw(vector unsigned int a, vector bool int b) | |
| 2604 { | |
| 2605 return __builtin_altivec_vmaxuw(a, (vector unsigned int)b); | |
| 2606 } | |
| 2607 | |
| 2608 /* vec_vmaxfp */ | |
| 2609 | |
| 2610 static vector float __attribute__((__always_inline__)) | |
| 2611 vec_vmaxfp(vector float a, vector float b) | |
| 2612 { | |
| 2613 return __builtin_altivec_vmaxfp(a, b); | |
| 2614 } | |
| 2615 | |
| 2616 /* vec_mergeh */ | |
| 2617 | |
| 2618 static vector signed char __ATTRS_o_ai | |
| 2619 vec_mergeh(vector signed char a, vector signed char b) | |
| 2620 { | |
| 2621 return vec_perm(a, b, (vector unsigned char) | |
| 2622 (0x00, 0x10, 0x01, 0x11, 0x02, 0x12, 0x03, 0x13, | |
| 2623 0x04, 0x14, 0x05, 0x15, 0x06, 0x16, 0x07, 0x17)); | |
| 2624 } | |
| 2625 | |
| 2626 static vector unsigned char __ATTRS_o_ai | |
| 2627 vec_mergeh(vector unsigned char a, vector unsigned char b) | |
| 2628 { | |
| 2629 return vec_perm(a, b, (vector unsigned char) | |
| 2630 (0x00, 0x10, 0x01, 0x11, 0x02, 0x12, 0x03, 0x13, | |
| 2631 0x04, 0x14, 0x05, 0x15, 0x06, 0x16, 0x07, 0x17)); | |
| 2632 } | |
| 2633 | |
| 2634 static vector bool char __ATTRS_o_ai | |
| 2635 vec_mergeh(vector bool char a, vector bool char b) | |
| 2636 { | |
| 2637 return vec_perm(a, b, (vector unsigned char) | |
| 2638 (0x00, 0x10, 0x01, 0x11, 0x02, 0x12, 0x03, 0x13, | |
| 2639 0x04, 0x14, 0x05, 0x15, 0x06, 0x16, 0x07, 0x17)); | |
| 2640 } | |
| 2641 | |
| 2642 static vector short __ATTRS_o_ai | |
| 2643 vec_mergeh(vector short a, vector short b) | |
| 2644 { | |
| 2645 return vec_perm(a, b, (vector unsigned char) | |
| 2646 (0x00, 0x01, 0x10, 0x11, 0x02, 0x03, 0x12, 0x13, | |
| 2647 0x04, 0x05, 0x14, 0x15, 0x06, 0x07, 0x16, 0x17)); | |
| 2648 } | |
| 2649 | |
| 2650 static vector unsigned short __ATTRS_o_ai | |
| 2651 vec_mergeh(vector unsigned short a, vector unsigned short b) | |
| 2652 { | |
| 2653 return vec_perm(a, b, (vector unsigned char) | |
| 2654 (0x00, 0x01, 0x10, 0x11, 0x02, 0x03, 0x12, 0x13, | |
| 2655 0x04, 0x05, 0x14, 0x15, 0x06, 0x07, 0x16, 0x17)); | |
| 2656 } | |
| 2657 | |
| 2658 static vector bool short __ATTRS_o_ai | |
| 2659 vec_mergeh(vector bool short a, vector bool short b) | |
| 2660 { | |
| 2661 return vec_perm(a, b, (vector unsigned char) | |
| 2662 (0x00, 0x01, 0x10, 0x11, 0x02, 0x03, 0x12, 0x13, | |
| 2663 0x04, 0x05, 0x14, 0x15, 0x06, 0x07, 0x16, 0x17)); | |
| 2664 } | |
| 2665 | |
| 2666 static vector pixel __ATTRS_o_ai | |
| 2667 vec_mergeh(vector pixel a, vector pixel b) | |
| 2668 { | |
| 2669 return vec_perm(a, b, (vector unsigned char) | |
| 2670 (0x00, 0x01, 0x10, 0x11, 0x02, 0x03, 0x12, 0x13, | |
| 2671 0x04, 0x05, 0x14, 0x15, 0x06, 0x07, 0x16, 0x17)); | |
| 2672 } | |
| 2673 | |
| 2674 static vector int __ATTRS_o_ai | |
| 2675 vec_mergeh(vector int a, vector int b) | |
| 2676 { | |
| 2677 return vec_perm(a, b, (vector unsigned char) | |
| 2678 (0x00, 0x01, 0x02, 0x03, 0x10, 0x11, 0x12, 0x13, | |
| 2679 0x04, 0x05, 0x06, 0x07, 0x14, 0x15, 0x16, 0x17)); | |
| 2680 } | |
| 2681 | |
| 2682 static vector unsigned int __ATTRS_o_ai | |
| 2683 vec_mergeh(vector unsigned int a, vector unsigned int b) | |
| 2684 { | |
| 2685 return vec_perm(a, b, (vector unsigned char) | |
| 2686 (0x00, 0x01, 0x02, 0x03, 0x10, 0x11, 0x12, 0x13, | |
| 2687 0x04, 0x05, 0x06, 0x07, 0x14, 0x15, 0x16, 0x17)); | |
| 2688 } | |
| 2689 | |
| 2690 static vector bool int __ATTRS_o_ai | |
| 2691 vec_mergeh(vector bool int a, vector bool int b) | |
| 2692 { | |
| 2693 return vec_perm(a, b, (vector unsigned char) | |
| 2694 (0x00, 0x01, 0x02, 0x03, 0x10, 0x11, 0x12, 0x13, | |
| 2695 0x04, 0x05, 0x06, 0x07, 0x14, 0x15, 0x16, 0x17)); | |
| 2696 } | |
| 2697 | |
| 2698 static vector float __ATTRS_o_ai | |
| 2699 vec_mergeh(vector float a, vector float b) | |
| 2700 { | |
| 2701 return vec_perm(a, b, (vector unsigned char) | |
| 2702 (0x00, 0x01, 0x02, 0x03, 0x10, 0x11, 0x12, 0x13, | |
| 2703 0x04, 0x05, 0x06, 0x07, 0x14, 0x15, 0x16, 0x17)); | |
| 2704 } | |
| 2705 | |
| 2706 /* vec_vmrghb */ | |
| 2707 | |
| 2708 #define __builtin_altivec_vmrghb vec_vmrghb | |
| 2709 | |
| 2710 static vector signed char __ATTRS_o_ai | |
| 2711 vec_vmrghb(vector signed char a, vector signed char b) | |
| 2712 { | |
| 2713 return vec_perm(a, b, (vector unsigned char) | |
| 2714 (0x00, 0x10, 0x01, 0x11, 0x02, 0x12, 0x03, 0x13, | |
| 2715 0x04, 0x14, 0x05, 0x15, 0x06, 0x16, 0x07, 0x17)); | |
| 2716 } | |
| 2717 | |
| 2718 static vector unsigned char __ATTRS_o_ai | |
| 2719 vec_vmrghb(vector unsigned char a, vector unsigned char b) | |
| 2720 { | |
| 2721 return vec_perm(a, b, (vector unsigned char) | |
| 2722 (0x00, 0x10, 0x01, 0x11, 0x02, 0x12, 0x03, 0x13, | |
| 2723 0x04, 0x14, 0x05, 0x15, 0x06, 0x16, 0x07, 0x17)); | |
| 2724 } | |
| 2725 | |
| 2726 static vector bool char __ATTRS_o_ai | |
| 2727 vec_vmrghb(vector bool char a, vector bool char b) | |
| 2728 { | |
| 2729 return vec_perm(a, b, (vector unsigned char) | |
| 2730 (0x00, 0x10, 0x01, 0x11, 0x02, 0x12, 0x03, 0x13, | |
| 2731 0x04, 0x14, 0x05, 0x15, 0x06, 0x16, 0x07, 0x17)); | |
| 2732 } | |
| 2733 | |
| 2734 /* vec_vmrghh */ | |
| 2735 | |
| 2736 #define __builtin_altivec_vmrghh vec_vmrghh | |
| 2737 | |
| 2738 static vector short __ATTRS_o_ai | |
| 2739 vec_vmrghh(vector short a, vector short b) | |
| 2740 { | |
| 2741 return vec_perm(a, b, (vector unsigned char) | |
| 2742 (0x00, 0x01, 0x10, 0x11, 0x02, 0x03, 0x12, 0x13, | |
| 2743 0x04, 0x05, 0x14, 0x15, 0x06, 0x07, 0x16, 0x17)); | |
| 2744 } | |
| 2745 | |
| 2746 static vector unsigned short __ATTRS_o_ai | |
| 2747 vec_vmrghh(vector unsigned short a, vector unsigned short b) | |
| 2748 { | |
| 2749 return vec_perm(a, b, (vector unsigned char) | |
| 2750 (0x00, 0x01, 0x10, 0x11, 0x02, 0x03, 0x12, 0x13, | |
| 2751 0x04, 0x05, 0x14, 0x15, 0x06, 0x07, 0x16, 0x17)); | |
| 2752 } | |
| 2753 | |
| 2754 static vector bool short __ATTRS_o_ai | |
| 2755 vec_vmrghh(vector bool short a, vector bool short b) | |
| 2756 { | |
| 2757 return vec_perm(a, b, (vector unsigned char) | |
| 2758 (0x00, 0x01, 0x10, 0x11, 0x02, 0x03, 0x12, 0x13, | |
| 2759 0x04, 0x05, 0x14, 0x15, 0x06, 0x07, 0x16, 0x17)); | |
| 2760 } | |
| 2761 | |
| 2762 static vector pixel __ATTRS_o_ai | |
| 2763 vec_vmrghh(vector pixel a, vector pixel b) | |
| 2764 { | |
| 2765 return vec_perm(a, b, (vector unsigned char) | |
| 2766 (0x00, 0x01, 0x10, 0x11, 0x02, 0x03, 0x12, 0x13, | |
| 2767 0x04, 0x05, 0x14, 0x15, 0x06, 0x07, 0x16, 0x17)); | |
| 2768 } | |
| 2769 | |
| 2770 /* vec_vmrghw */ | |
| 2771 | |
| 2772 #define __builtin_altivec_vmrghw vec_vmrghw | |
| 2773 | |
| 2774 static vector int __ATTRS_o_ai | |
| 2775 vec_vmrghw(vector int a, vector int b) | |
| 2776 { | |
| 2777 return vec_perm(a, b, (vector unsigned char) | |
| 2778 (0x00, 0x01, 0x02, 0x03, 0x10, 0x11, 0x12, 0x13, | |
| 2779 0x04, 0x05, 0x06, 0x07, 0x14, 0x15, 0x16, 0x17)); | |
| 2780 } | |
| 2781 | |
| 2782 static vector unsigned int __ATTRS_o_ai | |
| 2783 vec_vmrghw(vector unsigned int a, vector unsigned int b) | |
| 2784 { | |
| 2785 return vec_perm(a, b, (vector unsigned char) | |
| 2786 (0x00, 0x01, 0x02, 0x03, 0x10, 0x11, 0x12, 0x13, | |
| 2787 0x04, 0x05, 0x06, 0x07, 0x14, 0x15, 0x16, 0x17)); | |
| 2788 } | |
| 2789 | |
| 2790 static vector bool int __ATTRS_o_ai | |
| 2791 vec_vmrghw(vector bool int a, vector bool int b) | |
| 2792 { | |
| 2793 return vec_perm(a, b, (vector unsigned char) | |
| 2794 (0x00, 0x01, 0x02, 0x03, 0x10, 0x11, 0x12, 0x13, | |
| 2795 0x04, 0x05, 0x06, 0x07, 0x14, 0x15, 0x16, 0x17)); | |
| 2796 } | |
| 2797 | |
| 2798 static vector float __ATTRS_o_ai | |
| 2799 vec_vmrghw(vector float a, vector float b) | |
| 2800 { | |
| 2801 return vec_perm(a, b, (vector unsigned char) | |
| 2802 (0x00, 0x01, 0x02, 0x03, 0x10, 0x11, 0x12, 0x13, | |
| 2803 0x04, 0x05, 0x06, 0x07, 0x14, 0x15, 0x16, 0x17)); | |
| 2804 } | |
| 2805 | |
| 2806 /* vec_mergel */ | |
| 2807 | |
| 2808 static vector signed char __ATTRS_o_ai | |
| 2809 vec_mergel(vector signed char a, vector signed char b) | |
| 2810 { | |
| 2811 return vec_perm(a, b, (vector unsigned char) | |
| 2812 (0x08, 0x18, 0x09, 0x19, 0x0A, 0x1A, 0x0B, 0x1B, | |
| 2813 0x0C, 0x1C, 0x0D, 0x1D, 0x0E, 0x1E, 0x0F, 0x1F)); | |
| 2814 } | |
| 2815 | |
| 2816 static vector unsigned char __ATTRS_o_ai | |
| 2817 vec_mergel(vector unsigned char a, vector unsigned char b) | |
| 2818 { | |
| 2819 return vec_perm(a, b, (vector unsigned char) | |
| 2820 (0x08, 0x18, 0x09, 0x19, 0x0A, 0x1A, 0x0B, 0x1B, | |
| 2821 0x0C, 0x1C, 0x0D, 0x1D, 0x0E, 0x1E, 0x0F, 0x1F)); | |
| 2822 } | |
| 2823 | |
| 2824 static vector bool char __ATTRS_o_ai | |
| 2825 vec_mergel(vector bool char a, vector bool char b) | |
| 2826 { | |
| 2827 return vec_perm(a, b, (vector unsigned char) | |
| 2828 (0x08, 0x18, 0x09, 0x19, 0x0A, 0x1A, 0x0B, 0x1B, | |
| 2829 0x0C, 0x1C, 0x0D, 0x1D, 0x0E, 0x1E, 0x0F, 0x1F)); | |
| 2830 } | |
| 2831 | |
| 2832 static vector short __ATTRS_o_ai | |
| 2833 vec_mergel(vector short a, vector short b) | |
| 2834 { | |
| 2835 return vec_perm(a, b, (vector unsigned char) | |
| 2836 (0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B, 0x1A, 0x1B, | |
| 2837 0x0C, 0x0D, 0x1C, 0x1D, 0x0E, 0x0F, 0x1E, 0x1F)); | |
| 2838 } | |
| 2839 | |
| 2840 static vector unsigned short __ATTRS_o_ai | |
| 2841 vec_mergel(vector unsigned short a, vector unsigned short b) | |
| 2842 { | |
| 2843 return vec_perm(a, b, (vector unsigned char) | |
| 2844 (0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B, 0x1A, 0x1B, | |
| 2845 0x0C, 0x0D, 0x1C, 0x1D, 0x0E, 0x0F, 0x1E, 0x1F)); | |
| 2846 } | |
| 2847 | |
| 2848 static vector bool short __ATTRS_o_ai | |
| 2849 vec_mergel(vector bool short a, vector bool short b) | |
| 2850 { | |
| 2851 return vec_perm(a, b, (vector unsigned char) | |
| 2852 (0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B, 0x1A, 0x1B, | |
| 2853 0x0C, 0x0D, 0x1C, 0x1D, 0x0E, 0x0F, 0x1E, 0x1F)); | |
| 2854 } | |
| 2855 | |
| 2856 static vector pixel __ATTRS_o_ai | |
| 2857 vec_mergel(vector pixel a, vector pixel b) | |
| 2858 { | |
| 2859 return vec_perm(a, b, (vector unsigned char) | |
| 2860 (0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B, 0x1A, 0x1B, | |
| 2861 0x0C, 0x0D, 0x1C, 0x1D, 0x0E, 0x0F, 0x1E, 0x1F)); | |
| 2862 } | |
| 2863 | |
| 2864 static vector int __ATTRS_o_ai | |
| 2865 vec_mergel(vector int a, vector int b) | |
| 2866 { | |
| 2867 return vec_perm(a, b, (vector unsigned char) | |
| 2868 (0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19, 0x1A, 0x1B, | |
| 2869 0x0C, 0x0D, 0x0E, 0x0F, 0x1C, 0x1D, 0x1E, 0x1F)); | |
| 2870 } | |
| 2871 | |
| 2872 static vector unsigned int __ATTRS_o_ai | |
| 2873 vec_mergel(vector unsigned int a, vector unsigned int b) | |
| 2874 { | |
| 2875 return vec_perm(a, b, (vector unsigned char) | |
| 2876 (0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19, 0x1A, 0x1B, | |
| 2877 0x0C, 0x0D, 0x0E, 0x0F, 0x1C, 0x1D, 0x1E, 0x1F)); | |
| 2878 } | |
| 2879 | |
| 2880 static vector bool int __ATTRS_o_ai | |
| 2881 vec_mergel(vector bool int a, vector bool int b) | |
| 2882 { | |
| 2883 return vec_perm(a, b, (vector unsigned char) | |
| 2884 (0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19, 0x1A, 0x1B, | |
| 2885 0x0C, 0x0D, 0x0E, 0x0F, 0x1C, 0x1D, 0x1E, 0x1F)); | |
| 2886 } | |
| 2887 | |
| 2888 static vector float __ATTRS_o_ai | |
| 2889 vec_mergel(vector float a, vector float b) | |
| 2890 { | |
| 2891 return vec_perm(a, b, (vector unsigned char) | |
| 2892 (0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19, 0x1A, 0x1B, | |
| 2893 0x0C, 0x0D, 0x0E, 0x0F, 0x1C, 0x1D, 0x1E, 0x1F)); | |
| 2894 } | |
| 2895 | |
| 2896 /* vec_vmrglb */ | |
| 2897 | |
| 2898 #define __builtin_altivec_vmrglb vec_vmrglb | |
| 2899 | |
| 2900 static vector signed char __ATTRS_o_ai | |
| 2901 vec_vmrglb(vector signed char a, vector signed char b) | |
| 2902 { | |
| 2903 return vec_perm(a, b, (vector unsigned char) | |
| 2904 (0x08, 0x18, 0x09, 0x19, 0x0A, 0x1A, 0x0B, 0x1B, | |
| 2905 0x0C, 0x1C, 0x0D, 0x1D, 0x0E, 0x1E, 0x0F, 0x1F)); | |
| 2906 } | |
| 2907 | |
| 2908 static vector unsigned char __ATTRS_o_ai | |
| 2909 vec_vmrglb(vector unsigned char a, vector unsigned char b) | |
| 2910 { | |
| 2911 return vec_perm(a, b, (vector unsigned char) | |
| 2912 (0x08, 0x18, 0x09, 0x19, 0x0A, 0x1A, 0x0B, 0x1B, | |
| 2913 0x0C, 0x1C, 0x0D, 0x1D, 0x0E, 0x1E, 0x0F, 0x1F)); | |
| 2914 } | |
| 2915 | |
| 2916 static vector bool char __ATTRS_o_ai | |
| 2917 vec_vmrglb(vector bool char a, vector bool char b) | |
| 2918 { | |
| 2919 return vec_perm(a, b, (vector unsigned char) | |
| 2920 (0x08, 0x18, 0x09, 0x19, 0x0A, 0x1A, 0x0B, 0x1B, | |
| 2921 0x0C, 0x1C, 0x0D, 0x1D, 0x0E, 0x1E, 0x0F, 0x1F)); | |
| 2922 } | |
| 2923 | |
| 2924 /* vec_vmrglh */ | |
| 2925 | |
| 2926 #define __builtin_altivec_vmrglh vec_vmrglh | |
| 2927 | |
| 2928 static vector short __ATTRS_o_ai | |
| 2929 vec_vmrglh(vector short a, vector short b) | |
| 2930 { | |
| 2931 return vec_perm(a, b, (vector unsigned char) | |
| 2932 (0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B, 0x1A, 0x1B, | |
| 2933 0x0C, 0x0D, 0x1C, 0x1D, 0x0E, 0x0F, 0x1E, 0x1F)); | |
| 2934 } | |
| 2935 | |
| 2936 static vector unsigned short __ATTRS_o_ai | |
| 2937 vec_vmrglh(vector unsigned short a, vector unsigned short b) | |
| 2938 { | |
| 2939 return vec_perm(a, b, (vector unsigned char) | |
| 2940 (0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B, 0x1A, 0x1B, | |
| 2941 0x0C, 0x0D, 0x1C, 0x1D, 0x0E, 0x0F, 0x1E, 0x1F)); | |
| 2942 } | |
| 2943 | |
| 2944 static vector bool short __ATTRS_o_ai | |
| 2945 vec_vmrglh(vector bool short a, vector bool short b) | |
| 2946 { | |
| 2947 return vec_perm(a, b, (vector unsigned char) | |
| 2948 (0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B, 0x1A, 0x1B, | |
| 2949 0x0C, 0x0D, 0x1C, 0x1D, 0x0E, 0x0F, 0x1E, 0x1F)); | |
| 2950 } | |
| 2951 | |
| 2952 static vector pixel __ATTRS_o_ai | |
| 2953 vec_vmrglh(vector pixel a, vector pixel b) | |
| 2954 { | |
| 2955 return vec_perm(a, b, (vector unsigned char) | |
| 2956 (0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B, 0x1A, 0x1B, | |
| 2957 0x0C, 0x0D, 0x1C, 0x1D, 0x0E, 0x0F, 0x1E, 0x1F)); | |
| 2958 } | |
| 2959 | |
| 2960 /* vec_vmrglw */ | |
| 2961 | |
| 2962 #define __builtin_altivec_vmrglw vec_vmrglw | |
| 2963 | |
| 2964 static vector int __ATTRS_o_ai | |
| 2965 vec_vmrglw(vector int a, vector int b) | |
| 2966 { | |
| 2967 return vec_perm(a, b, (vector unsigned char) | |
| 2968 (0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19, 0x1A, 0x1B, | |
| 2969 0x0C, 0x0D, 0x0E, 0x0F, 0x1C, 0x1D, 0x1E, 0x1F)); | |
| 2970 } | |
| 2971 | |
| 2972 static vector unsigned int __ATTRS_o_ai | |
| 2973 vec_vmrglw(vector unsigned int a, vector unsigned int b) | |
| 2974 { | |
| 2975 return vec_perm(a, b, (vector unsigned char) | |
| 2976 (0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19, 0x1A, 0x1B, | |
| 2977 0x0C, 0x0D, 0x0E, 0x0F, 0x1C, 0x1D, 0x1E, 0x1F)); | |
| 2978 } | |
| 2979 | |
| 2980 static vector bool int __ATTRS_o_ai | |
| 2981 vec_vmrglw(vector bool int a, vector bool int b) | |
| 2982 { | |
| 2983 return vec_perm(a, b, (vector unsigned char) | |
| 2984 (0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19, 0x1A, 0x1B, | |
| 2985 0x0C, 0x0D, 0x0E, 0x0F, 0x1C, 0x1D, 0x1E, 0x1F)); | |
| 2986 } | |
| 2987 | |
| 2988 static vector float __ATTRS_o_ai | |
| 2989 vec_vmrglw(vector float a, vector float b) | |
| 2990 { | |
| 2991 return vec_perm(a, b, (vector unsigned char) | |
| 2992 (0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19, 0x1A, 0x1B, | |
| 2993 0x0C, 0x0D, 0x0E, 0x0F, 0x1C, 0x1D, 0x1E, 0x1F)); | |
| 2994 } | |
| 2995 | |
| 2996 /* vec_mfvscr */ | |
| 2997 | |
| 2998 static vector unsigned short __attribute__((__always_inline__)) | |
| 2999 vec_mfvscr(void) | |
| 3000 { | |
| 3001 return __builtin_altivec_mfvscr(); | |
| 3002 } | |
| 3003 | |
| 3004 /* vec_min */ | |
| 3005 | |
| 3006 static vector signed char __ATTRS_o_ai | |
| 3007 vec_min(vector signed char a, vector signed char b) | |
| 3008 { | |
| 3009 return __builtin_altivec_vminsb(a, b); | |
| 3010 } | |
| 3011 | |
| 3012 static vector signed char __ATTRS_o_ai | |
| 3013 vec_min(vector bool char a, vector signed char b) | |
| 3014 { | |
| 3015 return __builtin_altivec_vminsb((vector signed char)a, b); | |
| 3016 } | |
| 3017 | |
| 3018 static vector signed char __ATTRS_o_ai | |
| 3019 vec_min(vector signed char a, vector bool char b) | |
| 3020 { | |
| 3021 return __builtin_altivec_vminsb(a, (vector signed char)b); | |
| 3022 } | |
| 3023 | |
| 3024 static vector unsigned char __ATTRS_o_ai | |
| 3025 vec_min(vector unsigned char a, vector unsigned char b) | |
| 3026 { | |
| 3027 return __builtin_altivec_vminub(a, b); | |
| 3028 } | |
| 3029 | |
| 3030 static vector unsigned char __ATTRS_o_ai | |
| 3031 vec_min(vector bool char a, vector unsigned char b) | |
| 3032 { | |
| 3033 return __builtin_altivec_vminub((vector unsigned char)a, b); | |
| 3034 } | |
| 3035 | |
| 3036 static vector unsigned char __ATTRS_o_ai | |
| 3037 vec_min(vector unsigned char a, vector bool char b) | |
| 3038 { | |
| 3039 return __builtin_altivec_vminub(a, (vector unsigned char)b); | |
| 3040 } | |
| 3041 | |
| 3042 static vector short __ATTRS_o_ai | |
| 3043 vec_min(vector short a, vector short b) | |
| 3044 { | |
| 3045 return __builtin_altivec_vminsh(a, b); | |
| 3046 } | |
| 3047 | |
| 3048 static vector short __ATTRS_o_ai | |
| 3049 vec_min(vector bool short a, vector short b) | |
| 3050 { | |
| 3051 return __builtin_altivec_vminsh((vector short)a, b); | |
| 3052 } | |
| 3053 | |
| 3054 static vector short __ATTRS_o_ai | |
| 3055 vec_min(vector short a, vector bool short b) | |
| 3056 { | |
| 3057 return __builtin_altivec_vminsh(a, (vector short)b); | |
| 3058 } | |
| 3059 | |
| 3060 static vector unsigned short __ATTRS_o_ai | |
| 3061 vec_min(vector unsigned short a, vector unsigned short b) | |
| 3062 { | |
| 3063 return __builtin_altivec_vminuh(a, b); | |
| 3064 } | |
| 3065 | |
| 3066 static vector unsigned short __ATTRS_o_ai | |
| 3067 vec_min(vector bool short a, vector unsigned short b) | |
| 3068 { | |
| 3069 return __builtin_altivec_vminuh((vector unsigned short)a, b); | |
| 3070 } | |
| 3071 | |
| 3072 static vector unsigned short __ATTRS_o_ai | |
| 3073 vec_min(vector unsigned short a, vector bool short b) | |
| 3074 { | |
| 3075 return __builtin_altivec_vminuh(a, (vector unsigned short)b); | |
| 3076 } | |
| 3077 | |
| 3078 static vector int __ATTRS_o_ai | |
| 3079 vec_min(vector int a, vector int b) | |
| 3080 { | |
| 3081 return __builtin_altivec_vminsw(a, b); | |
| 3082 } | |
| 3083 | |
| 3084 static vector int __ATTRS_o_ai | |
| 3085 vec_min(vector bool int a, vector int b) | |
| 3086 { | |
| 3087 return __builtin_altivec_vminsw((vector int)a, b); | |
| 3088 } | |
| 3089 | |
| 3090 static vector int __ATTRS_o_ai | |
| 3091 vec_min(vector int a, vector bool int b) | |
| 3092 { | |
| 3093 return __builtin_altivec_vminsw(a, (vector int)b); | |
| 3094 } | |
| 3095 | |
| 3096 static vector unsigned int __ATTRS_o_ai | |
| 3097 vec_min(vector unsigned int a, vector unsigned int b) | |
| 3098 { | |
| 3099 return __builtin_altivec_vminuw(a, b); | |
| 3100 } | |
| 3101 | |
| 3102 static vector unsigned int __ATTRS_o_ai | |
| 3103 vec_min(vector bool int a, vector unsigned int b) | |
| 3104 { | |
| 3105 return __builtin_altivec_vminuw((vector unsigned int)a, b); | |
| 3106 } | |
| 3107 | |
| 3108 static vector unsigned int __ATTRS_o_ai | |
| 3109 vec_min(vector unsigned int a, vector bool int b) | |
| 3110 { | |
| 3111 return __builtin_altivec_vminuw(a, (vector unsigned int)b); | |
| 3112 } | |
| 3113 | |
| 3114 static vector float __ATTRS_o_ai | |
| 3115 vec_min(vector float a, vector float b) | |
| 3116 { | |
| 3117 return __builtin_altivec_vminfp(a, b); | |
| 3118 } | |
| 3119 | |
| 3120 /* vec_vminsb */ | |
| 3121 | |
| 3122 static vector signed char __ATTRS_o_ai | |
| 3123 vec_vminsb(vector signed char a, vector signed char b) | |
| 3124 { | |
| 3125 return __builtin_altivec_vminsb(a, b); | |
| 3126 } | |
| 3127 | |
| 3128 static vector signed char __ATTRS_o_ai | |
| 3129 vec_vminsb(vector bool char a, vector signed char b) | |
| 3130 { | |
| 3131 return __builtin_altivec_vminsb((vector signed char)a, b); | |
| 3132 } | |
| 3133 | |
| 3134 static vector signed char __ATTRS_o_ai | |
| 3135 vec_vminsb(vector signed char a, vector bool char b) | |
| 3136 { | |
| 3137 return __builtin_altivec_vminsb(a, (vector signed char)b); | |
| 3138 } | |
| 3139 | |
| 3140 /* vec_vminub */ | |
| 3141 | |
| 3142 static vector unsigned char __ATTRS_o_ai | |
| 3143 vec_vminub(vector unsigned char a, vector unsigned char b) | |
| 3144 { | |
| 3145 return __builtin_altivec_vminub(a, b); | |
| 3146 } | |
| 3147 | |
| 3148 static vector unsigned char __ATTRS_o_ai | |
| 3149 vec_vminub(vector bool char a, vector unsigned char b) | |
| 3150 { | |
| 3151 return __builtin_altivec_vminub((vector unsigned char)a, b); | |
| 3152 } | |
| 3153 | |
| 3154 static vector unsigned char __ATTRS_o_ai | |
| 3155 vec_vminub(vector unsigned char a, vector bool char b) | |
| 3156 { | |
| 3157 return __builtin_altivec_vminub(a, (vector unsigned char)b); | |
| 3158 } | |
| 3159 | |
| 3160 /* vec_vminsh */ | |
| 3161 | |
| 3162 static vector short __ATTRS_o_ai | |
| 3163 vec_vminsh(vector short a, vector short b) | |
| 3164 { | |
| 3165 return __builtin_altivec_vminsh(a, b); | |
| 3166 } | |
| 3167 | |
| 3168 static vector short __ATTRS_o_ai | |
| 3169 vec_vminsh(vector bool short a, vector short b) | |
| 3170 { | |
| 3171 return __builtin_altivec_vminsh((vector short)a, b); | |
| 3172 } | |
| 3173 | |
| 3174 static vector short __ATTRS_o_ai | |
| 3175 vec_vminsh(vector short a, vector bool short b) | |
| 3176 { | |
| 3177 return __builtin_altivec_vminsh(a, (vector short)b); | |
| 3178 } | |
| 3179 | |
| 3180 /* vec_vminuh */ | |
| 3181 | |
| 3182 static vector unsigned short __ATTRS_o_ai | |
| 3183 vec_vminuh(vector unsigned short a, vector unsigned short b) | |
| 3184 { | |
| 3185 return __builtin_altivec_vminuh(a, b); | |
| 3186 } | |
| 3187 | |
| 3188 static vector unsigned short __ATTRS_o_ai | |
| 3189 vec_vminuh(vector bool short a, vector unsigned short b) | |
| 3190 { | |
| 3191 return __builtin_altivec_vminuh((vector unsigned short)a, b); | |
| 3192 } | |
| 3193 | |
| 3194 static vector unsigned short __ATTRS_o_ai | |
| 3195 vec_vminuh(vector unsigned short a, vector bool short b) | |
| 3196 { | |
| 3197 return __builtin_altivec_vminuh(a, (vector unsigned short)b); | |
| 3198 } | |
| 3199 | |
| 3200 /* vec_vminsw */ | |
| 3201 | |
| 3202 static vector int __ATTRS_o_ai | |
| 3203 vec_vminsw(vector int a, vector int b) | |
| 3204 { | |
| 3205 return __builtin_altivec_vminsw(a, b); | |
| 3206 } | |
| 3207 | |
| 3208 static vector int __ATTRS_o_ai | |
| 3209 vec_vminsw(vector bool int a, vector int b) | |
| 3210 { | |
| 3211 return __builtin_altivec_vminsw((vector int)a, b); | |
| 3212 } | |
| 3213 | |
| 3214 static vector int __ATTRS_o_ai | |
| 3215 vec_vminsw(vector int a, vector bool int b) | |
| 3216 { | |
| 3217 return __builtin_altivec_vminsw(a, (vector int)b); | |
| 3218 } | |
| 3219 | |
| 3220 /* vec_vminuw */ | |
| 3221 | |
| 3222 static vector unsigned int __ATTRS_o_ai | |
| 3223 vec_vminuw(vector unsigned int a, vector unsigned int b) | |
| 3224 { | |
| 3225 return __builtin_altivec_vminuw(a, b); | |
| 3226 } | |
| 3227 | |
| 3228 static vector unsigned int __ATTRS_o_ai | |
| 3229 vec_vminuw(vector bool int a, vector unsigned int b) | |
| 3230 { | |
| 3231 return __builtin_altivec_vminuw((vector unsigned int)a, b); | |
| 3232 } | |
| 3233 | |
| 3234 static vector unsigned int __ATTRS_o_ai | |
| 3235 vec_vminuw(vector unsigned int a, vector bool int b) | |
| 3236 { | |
| 3237 return __builtin_altivec_vminuw(a, (vector unsigned int)b); | |
| 3238 } | |
| 3239 | |
| 3240 /* vec_vminfp */ | |
| 3241 | |
| 3242 static vector float __attribute__((__always_inline__)) | |
| 3243 vec_vminfp(vector float a, vector float b) | |
| 3244 { | |
| 3245 return __builtin_altivec_vminfp(a, b); | |
| 3246 } | |
| 3247 | |
| 3248 /* vec_mladd */ | |
| 3249 | |
| 3250 #define __builtin_altivec_vmladduhm vec_mladd | |
| 3251 | |
| 3252 static vector short __ATTRS_o_ai | |
| 3253 vec_mladd(vector short a, vector short b, vector short c) | |
| 3254 { | |
| 3255 return a * b + c; | |
| 3256 } | |
| 3257 | |
| 3258 static vector short __ATTRS_o_ai | |
| 3259 vec_mladd(vector short a, vector unsigned short b, vector unsigned short c) | |
| 3260 { | |
| 3261 return a * (vector short)b + (vector short)c; | |
| 3262 } | |
| 3263 | |
| 3264 static vector short __ATTRS_o_ai | |
| 3265 vec_mladd(vector unsigned short a, vector short b, vector short c) | |
| 3266 { | |
| 3267 return (vector short)a * b + c; | |
| 3268 } | |
| 3269 | |
| 3270 static vector unsigned short __ATTRS_o_ai | |
| 3271 vec_mladd(vector unsigned short a, | |
| 3272 vector unsigned short b, | |
| 3273 vector unsigned short c) | |
| 3274 { | |
| 3275 return a * b + c; | |
| 3276 } | |
| 3277 | |
| 3278 /* vec_vmladduhm */ | |
| 3279 | |
| 3280 static vector short __ATTRS_o_ai | |
| 3281 vec_vmladduhm(vector short a, vector short b, vector short c) | |
| 3282 { | |
| 3283 return a * b + c; | |
| 3284 } | |
| 3285 | |
| 3286 static vector short __ATTRS_o_ai | |
| 3287 vec_vmladduhm(vector short a, vector unsigned short b, vector unsigned short c) | |
| 3288 { | |
| 3289 return a * (vector short)b + (vector short)c; | |
| 3290 } | |
| 3291 | |
| 3292 static vector short __ATTRS_o_ai | |
| 3293 vec_vmladduhm(vector unsigned short a, vector short b, vector short c) | |
| 3294 { | |
| 3295 return (vector short)a * b + c; | |
| 3296 } | |
| 3297 | |
| 3298 static vector unsigned short __ATTRS_o_ai | |
| 3299 vec_vmladduhm(vector unsigned short a, | |
| 3300 vector unsigned short b, | |
| 3301 vector unsigned short c) | |
| 3302 { | |
| 3303 return a * b + c; | |
| 3304 } | |
| 3305 | |
| 3306 /* vec_mradds */ | |
| 3307 | |
| 3308 static vector short __attribute__((__always_inline__)) | |
| 3309 vec_mradds(vector short a, vector short b, vector short c) | |
| 3310 { | |
| 3311 return __builtin_altivec_vmhraddshs(a, b, c); | |
| 3312 } | |
| 3313 | |
| 3314 /* vec_vmhraddshs */ | |
| 3315 | |
| 3316 static vector short __attribute__((__always_inline__)) | |
| 3317 vec_vmhraddshs(vector short a, vector short b, vector short c) | |
| 3318 { | |
| 3319 return __builtin_altivec_vmhraddshs(a, b, c); | |
| 3320 } | |
| 3321 | |
| 3322 /* vec_msum */ | |
| 3323 | |
| 3324 static vector int __ATTRS_o_ai | |
| 3325 vec_msum(vector signed char a, vector unsigned char b, vector int c) | |
| 3326 { | |
| 3327 return __builtin_altivec_vmsummbm(a, b, c); | |
| 3328 } | |
| 3329 | |
| 3330 static vector unsigned int __ATTRS_o_ai | |
| 3331 vec_msum(vector unsigned char a, vector unsigned char b, vector unsigned int c) | |
| 3332 { | |
| 3333 return __builtin_altivec_vmsumubm(a, b, c); | |
| 3334 } | |
| 3335 | |
| 3336 static vector int __ATTRS_o_ai | |
| 3337 vec_msum(vector short a, vector short b, vector int c) | |
| 3338 { | |
| 3339 return __builtin_altivec_vmsumshm(a, b, c); | |
| 3340 } | |
| 3341 | |
| 3342 static vector unsigned int __ATTRS_o_ai | |
| 3343 vec_msum(vector unsigned short a, | |
| 3344 vector unsigned short b, | |
| 3345 vector unsigned int c) | |
| 3346 { | |
| 3347 return __builtin_altivec_vmsumuhm(a, b, c); | |
| 3348 } | |
| 3349 | |
| 3350 /* vec_vmsummbm */ | |
| 3351 | |
| 3352 static vector int __attribute__((__always_inline__)) | |
| 3353 vec_vmsummbm(vector signed char a, vector unsigned char b, vector int c) | |
| 3354 { | |
| 3355 return __builtin_altivec_vmsummbm(a, b, c); | |
| 3356 } | |
| 3357 | |
| 3358 /* vec_vmsumubm */ | |
| 3359 | |
| 3360 static vector unsigned int __attribute__((__always_inline__)) | |
| 3361 vec_vmsumubm(vector unsigned char a, | |
| 3362 vector unsigned char b, | |
| 3363 vector unsigned int c) | |
| 3364 { | |
| 3365 return __builtin_altivec_vmsumubm(a, b, c); | |
| 3366 } | |
| 3367 | |
| 3368 /* vec_vmsumshm */ | |
| 3369 | |
| 3370 static vector int __attribute__((__always_inline__)) | |
| 3371 vec_vmsumshm(vector short a, vector short b, vector int c) | |
| 3372 { | |
| 3373 return __builtin_altivec_vmsumshm(a, b, c); | |
| 3374 } | |
| 3375 | |
| 3376 /* vec_vmsumuhm */ | |
| 3377 | |
| 3378 static vector unsigned int __attribute__((__always_inline__)) | |
| 3379 vec_vmsumuhm(vector unsigned short a, | |
| 3380 vector unsigned short b, | |
| 3381 vector unsigned int c) | |
| 3382 { | |
| 3383 return __builtin_altivec_vmsumuhm(a, b, c); | |
| 3384 } | |
| 3385 | |
| 3386 /* vec_msums */ | |
| 3387 | |
| 3388 static vector int __ATTRS_o_ai | |
| 3389 vec_msums(vector short a, vector short b, vector int c) | |
| 3390 { | |
| 3391 return __builtin_altivec_vmsumshs(a, b, c); | |
| 3392 } | |
| 3393 | |
| 3394 static vector unsigned int __ATTRS_o_ai | |
| 3395 vec_msums(vector unsigned short a, | |
| 3396 vector unsigned short b, | |
| 3397 vector unsigned int c) | |
| 3398 { | |
| 3399 return __builtin_altivec_vmsumuhs(a, b, c); | |
| 3400 } | |
| 3401 | |
| 3402 /* vec_vmsumshs */ | |
| 3403 | |
| 3404 static vector int __attribute__((__always_inline__)) | |
| 3405 vec_vmsumshs(vector short a, vector short b, vector int c) | |
| 3406 { | |
| 3407 return __builtin_altivec_vmsumshs(a, b, c); | |
| 3408 } | |
| 3409 | |
| 3410 /* vec_vmsumuhs */ | |
| 3411 | |
| 3412 static vector unsigned int __attribute__((__always_inline__)) | |
| 3413 vec_vmsumuhs(vector unsigned short a, | |
| 3414 vector unsigned short b, | |
| 3415 vector unsigned int c) | |
| 3416 { | |
| 3417 return __builtin_altivec_vmsumuhs(a, b, c); | |
| 3418 } | |
| 3419 | |
| 3420 /* vec_mtvscr */ | |
| 3421 | |
| 3422 static void __ATTRS_o_ai | |
| 3423 vec_mtvscr(vector signed char a) | |
| 3424 { | |
| 3425 __builtin_altivec_mtvscr((vector int)a); | |
| 3426 } | |
| 3427 | |
| 3428 static void __ATTRS_o_ai | |
| 3429 vec_mtvscr(vector unsigned char a) | |
| 3430 { | |
| 3431 __builtin_altivec_mtvscr((vector int)a); | |
| 3432 } | |
| 3433 | |
| 3434 static void __ATTRS_o_ai | |
| 3435 vec_mtvscr(vector bool char a) | |
| 3436 { | |
| 3437 __builtin_altivec_mtvscr((vector int)a); | |
| 3438 } | |
| 3439 | |
| 3440 static void __ATTRS_o_ai | |
| 3441 vec_mtvscr(vector short a) | |
| 3442 { | |
| 3443 __builtin_altivec_mtvscr((vector int)a); | |
| 3444 } | |
| 3445 | |
| 3446 static void __ATTRS_o_ai | |
| 3447 vec_mtvscr(vector unsigned short a) | |
| 3448 { | |
| 3449 __builtin_altivec_mtvscr((vector int)a); | |
| 3450 } | |
| 3451 | |
| 3452 static void __ATTRS_o_ai | |
| 3453 vec_mtvscr(vector bool short a) | |
| 3454 { | |
| 3455 __builtin_altivec_mtvscr((vector int)a); | |
| 3456 } | |
| 3457 | |
| 3458 static void __ATTRS_o_ai | |
| 3459 vec_mtvscr(vector pixel a) | |
| 3460 { | |
| 3461 __builtin_altivec_mtvscr((vector int)a); | |
| 3462 } | |
| 3463 | |
| 3464 static void __ATTRS_o_ai | |
| 3465 vec_mtvscr(vector int a) | |
| 3466 { | |
| 3467 __builtin_altivec_mtvscr((vector int)a); | |
| 3468 } | |
| 3469 | |
| 3470 static void __ATTRS_o_ai | |
| 3471 vec_mtvscr(vector unsigned int a) | |
| 3472 { | |
| 3473 __builtin_altivec_mtvscr((vector int)a); | |
| 3474 } | |
| 3475 | |
| 3476 static void __ATTRS_o_ai | |
| 3477 vec_mtvscr(vector bool int a) | |
| 3478 { | |
| 3479 __builtin_altivec_mtvscr((vector int)a); | |
| 3480 } | |
| 3481 | |
| 3482 static void __ATTRS_o_ai | |
| 3483 vec_mtvscr(vector float a) | |
| 3484 { | |
| 3485 __builtin_altivec_mtvscr((vector int)a); | |
| 3486 } | |
| 3487 | |
| 3488 /* vec_mule */ | |
| 3489 | |
| 3490 static vector short __ATTRS_o_ai | |
| 3491 vec_mule(vector signed char a, vector signed char b) | |
| 3492 { | |
| 3493 return __builtin_altivec_vmulesb(a, b); | |
| 3494 } | |
| 3495 | |
| 3496 static vector unsigned short __ATTRS_o_ai | |
| 3497 vec_mule(vector unsigned char a, vector unsigned char b) | |
| 3498 { | |
| 3499 return __builtin_altivec_vmuleub(a, b); | |
| 3500 } | |
| 3501 | |
| 3502 static vector int __ATTRS_o_ai | |
| 3503 vec_mule(vector short a, vector short b) | |
| 3504 { | |
| 3505 return __builtin_altivec_vmulesh(a, b); | |
| 3506 } | |
| 3507 | |
| 3508 static vector unsigned int __ATTRS_o_ai | |
| 3509 vec_mule(vector unsigned short a, vector unsigned short b) | |
| 3510 { | |
| 3511 return __builtin_altivec_vmuleuh(a, b); | |
| 3512 } | |
| 3513 | |
| 3514 /* vec_vmulesb */ | |
| 3515 | |
| 3516 static vector short __attribute__((__always_inline__)) | |
| 3517 vec_vmulesb(vector signed char a, vector signed char b) | |
| 3518 { | |
| 3519 return __builtin_altivec_vmulesb(a, b); | |
| 3520 } | |
| 3521 | |
| 3522 /* vec_vmuleub */ | |
| 3523 | |
| 3524 static vector unsigned short __attribute__((__always_inline__)) | |
| 3525 vec_vmuleub(vector unsigned char a, vector unsigned char b) | |
| 3526 { | |
| 3527 return __builtin_altivec_vmuleub(a, b); | |
| 3528 } | |
| 3529 | |
| 3530 /* vec_vmulesh */ | |
| 3531 | |
| 3532 static vector int __attribute__((__always_inline__)) | |
| 3533 vec_vmulesh(vector short a, vector short b) | |
| 3534 { | |
| 3535 return __builtin_altivec_vmulesh(a, b); | |
| 3536 } | |
| 3537 | |
| 3538 /* vec_vmuleuh */ | |
| 3539 | |
| 3540 static vector unsigned int __attribute__((__always_inline__)) | |
| 3541 vec_vmuleuh(vector unsigned short a, vector unsigned short b) | |
| 3542 { | |
| 3543 return __builtin_altivec_vmuleuh(a, b); | |
| 3544 } | |
| 3545 | |
| 3546 /* vec_mulo */ | |
| 3547 | |
| 3548 static vector short __ATTRS_o_ai | |
| 3549 vec_mulo(vector signed char a, vector signed char b) | |
| 3550 { | |
| 3551 return __builtin_altivec_vmulosb(a, b); | |
| 3552 } | |
| 3553 | |
| 3554 static vector unsigned short __ATTRS_o_ai | |
| 3555 vec_mulo(vector unsigned char a, vector unsigned char b) | |
| 3556 { | |
| 3557 return __builtin_altivec_vmuloub(a, b); | |
| 3558 } | |
| 3559 | |
| 3560 static vector int __ATTRS_o_ai | |
| 3561 vec_mulo(vector short a, vector short b) | |
| 3562 { | |
| 3563 return __builtin_altivec_vmulosh(a, b); | |
| 3564 } | |
| 3565 | |
| 3566 static vector unsigned int __ATTRS_o_ai | |
| 3567 vec_mulo(vector unsigned short a, vector unsigned short b) | |
| 3568 { | |
| 3569 return __builtin_altivec_vmulouh(a, b); | |
| 3570 } | |
| 3571 | |
| 3572 /* vec_vmulosb */ | |
| 3573 | |
| 3574 static vector short __attribute__((__always_inline__)) | |
| 3575 vec_vmulosb(vector signed char a, vector signed char b) | |
| 3576 { | |
| 3577 return __builtin_altivec_vmulosb(a, b); | |
| 3578 } | |
| 3579 | |
| 3580 /* vec_vmuloub */ | |
| 3581 | |
| 3582 static vector unsigned short __attribute__((__always_inline__)) | |
| 3583 vec_vmuloub(vector unsigned char a, vector unsigned char b) | |
| 3584 { | |
| 3585 return __builtin_altivec_vmuloub(a, b); | |
| 3586 } | |
| 3587 | |
| 3588 /* vec_vmulosh */ | |
| 3589 | |
| 3590 static vector int __attribute__((__always_inline__)) | |
| 3591 vec_vmulosh(vector short a, vector short b) | |
| 3592 { | |
| 3593 return __builtin_altivec_vmulosh(a, b); | |
| 3594 } | |
| 3595 | |
| 3596 /* vec_vmulouh */ | |
| 3597 | |
| 3598 static vector unsigned int __attribute__((__always_inline__)) | |
| 3599 vec_vmulouh(vector unsigned short a, vector unsigned short b) | |
| 3600 { | |
| 3601 return __builtin_altivec_vmulouh(a, b); | |
| 3602 } | |
| 3603 | |
| 3604 /* vec_nmsub */ | |
| 3605 | |
| 3606 static vector float __attribute__((__always_inline__)) | |
| 3607 vec_nmsub(vector float a, vector float b, vector float c) | |
| 3608 { | |
| 3609 return __builtin_altivec_vnmsubfp(a, b, c); | |
| 3610 } | |
| 3611 | |
| 3612 /* vec_vnmsubfp */ | |
| 3613 | |
| 3614 static vector float __attribute__((__always_inline__)) | |
| 3615 vec_vnmsubfp(vector float a, vector float b, vector float c) | |
| 3616 { | |
| 3617 return __builtin_altivec_vnmsubfp(a, b, c); | |
| 3618 } | |
| 3619 | |
| 3620 /* vec_nor */ | |
| 3621 | |
| 3622 #define __builtin_altivec_vnor vec_nor | |
| 3623 | |
| 3624 static vector signed char __ATTRS_o_ai | |
| 3625 vec_nor(vector signed char a, vector signed char b) | |
| 3626 { | |
| 3627 return ~(a | b); | |
| 3628 } | |
| 3629 | |
| 3630 static vector unsigned char __ATTRS_o_ai | |
| 3631 vec_nor(vector unsigned char a, vector unsigned char b) | |
| 3632 { | |
| 3633 return ~(a | b); | |
| 3634 } | |
| 3635 | |
| 3636 static vector bool char __ATTRS_o_ai | |
| 3637 vec_nor(vector bool char a, vector bool char b) | |
| 3638 { | |
| 3639 return ~(a | b); | |
| 3640 } | |
| 3641 | |
| 3642 static vector short __ATTRS_o_ai | |
| 3643 vec_nor(vector short a, vector short b) | |
| 3644 { | |
| 3645 return ~(a | b); | |
| 3646 } | |
| 3647 | |
| 3648 static vector unsigned short __ATTRS_o_ai | |
| 3649 vec_nor(vector unsigned short a, vector unsigned short b) | |
| 3650 { | |
| 3651 return ~(a | b); | |
| 3652 } | |
| 3653 | |
| 3654 static vector bool short __ATTRS_o_ai | |
| 3655 vec_nor(vector bool short a, vector bool short b) | |
| 3656 { | |
| 3657 return ~(a | b); | |
| 3658 } | |
| 3659 | |
| 3660 static vector int __ATTRS_o_ai | |
| 3661 vec_nor(vector int a, vector int b) | |
| 3662 { | |
| 3663 return ~(a | b); | |
| 3664 } | |
| 3665 | |
| 3666 static vector unsigned int __ATTRS_o_ai | |
| 3667 vec_nor(vector unsigned int a, vector unsigned int b) | |
| 3668 { | |
| 3669 return ~(a | b); | |
| 3670 } | |
| 3671 | |
| 3672 static vector bool int __ATTRS_o_ai | |
| 3673 vec_nor(vector bool int a, vector bool int b) | |
| 3674 { | |
| 3675 return ~(a | b); | |
| 3676 } | |
| 3677 | |
| 3678 static vector float __ATTRS_o_ai | |
| 3679 vec_nor(vector float a, vector float b) | |
| 3680 { | |
| 3681 vector unsigned int res = ~((vector unsigned int)a | (vector unsigned int)b); | |
| 3682 return (vector float)res; | |
| 3683 } | |
| 3684 | |
| 3685 /* vec_vnor */ | |
| 3686 | |
| 3687 static vector signed char __ATTRS_o_ai | |
| 3688 vec_vnor(vector signed char a, vector signed char b) | |
| 3689 { | |
| 3690 return ~(a | b); | |
| 3691 } | |
| 3692 | |
| 3693 static vector unsigned char __ATTRS_o_ai | |
| 3694 vec_vnor(vector unsigned char a, vector unsigned char b) | |
| 3695 { | |
| 3696 return ~(a | b); | |
| 3697 } | |
| 3698 | |
| 3699 static vector bool char __ATTRS_o_ai | |
| 3700 vec_vnor(vector bool char a, vector bool char b) | |
| 3701 { | |
| 3702 return ~(a | b); | |
| 3703 } | |
| 3704 | |
| 3705 static vector short __ATTRS_o_ai | |
| 3706 vec_vnor(vector short a, vector short b) | |
| 3707 { | |
| 3708 return ~(a | b); | |
| 3709 } | |
| 3710 | |
| 3711 static vector unsigned short __ATTRS_o_ai | |
| 3712 vec_vnor(vector unsigned short a, vector unsigned short b) | |
| 3713 { | |
| 3714 return ~(a | b); | |
| 3715 } | |
| 3716 | |
| 3717 static vector bool short __ATTRS_o_ai | |
| 3718 vec_vnor(vector bool short a, vector bool short b) | |
| 3719 { | |
| 3720 return ~(a | b); | |
| 3721 } | |
| 3722 | |
| 3723 static vector int __ATTRS_o_ai | |
| 3724 vec_vnor(vector int a, vector int b) | |
| 3725 { | |
| 3726 return ~(a | b); | |
| 3727 } | |
| 3728 | |
| 3729 static vector unsigned int __ATTRS_o_ai | |
| 3730 vec_vnor(vector unsigned int a, vector unsigned int b) | |
| 3731 { | |
| 3732 return ~(a | b); | |
| 3733 } | |
| 3734 | |
| 3735 static vector bool int __ATTRS_o_ai | |
| 3736 vec_vnor(vector bool int a, vector bool int b) | |
| 3737 { | |
| 3738 return ~(a | b); | |
| 3739 } | |
| 3740 | |
| 3741 static vector float __ATTRS_o_ai | |
| 3742 vec_vnor(vector float a, vector float b) | |
| 3743 { | |
| 3744 vector unsigned int res = ~((vector unsigned int)a | (vector unsigned int)b); | |
| 3745 return (vector float)res; | |
| 3746 } | |
| 3747 | |
| 3748 /* vec_or */ | |
| 3749 | |
| 3750 #define __builtin_altivec_vor vec_or | |
| 3751 | |
| 3752 static vector signed char __ATTRS_o_ai | |
| 3753 vec_or(vector signed char a, vector signed char b) | |
| 3754 { | |
| 3755 return a | b; | |
| 3756 } | |
| 3757 | |
| 3758 static vector signed char __ATTRS_o_ai | |
| 3759 vec_or(vector bool char a, vector signed char b) | |
| 3760 { | |
| 3761 return (vector signed char)a | b; | |
| 3762 } | |
| 3763 | |
| 3764 static vector signed char __ATTRS_o_ai | |
| 3765 vec_or(vector signed char a, vector bool char b) | |
| 3766 { | |
| 3767 return a | (vector signed char)b; | |
| 3768 } | |
| 3769 | |
| 3770 static vector unsigned char __ATTRS_o_ai | |
| 3771 vec_or(vector unsigned char a, vector unsigned char b) | |
| 3772 { | |
| 3773 return a | b; | |
| 3774 } | |
| 3775 | |
| 3776 static vector unsigned char __ATTRS_o_ai | |
| 3777 vec_or(vector bool char a, vector unsigned char b) | |
| 3778 { | |
| 3779 return (vector unsigned char)a | b; | |
| 3780 } | |
| 3781 | |
| 3782 static vector unsigned char __ATTRS_o_ai | |
| 3783 vec_or(vector unsigned char a, vector bool char b) | |
| 3784 { | |
| 3785 return a | (vector unsigned char)b; | |
| 3786 } | |
| 3787 | |
| 3788 static vector bool char __ATTRS_o_ai | |
| 3789 vec_or(vector bool char a, vector bool char b) | |
| 3790 { | |
| 3791 return a | b; | |
| 3792 } | |
| 3793 | |
| 3794 static vector short __ATTRS_o_ai | |
| 3795 vec_or(vector short a, vector short b) | |
| 3796 { | |
| 3797 return a | b; | |
| 3798 } | |
| 3799 | |
| 3800 static vector short __ATTRS_o_ai | |
| 3801 vec_or(vector bool short a, vector short b) | |
| 3802 { | |
| 3803 return (vector short)a | b; | |
| 3804 } | |
| 3805 | |
| 3806 static vector short __ATTRS_o_ai | |
| 3807 vec_or(vector short a, vector bool short b) | |
| 3808 { | |
| 3809 return a | (vector short)b; | |
| 3810 } | |
| 3811 | |
| 3812 static vector unsigned short __ATTRS_o_ai | |
| 3813 vec_or(vector unsigned short a, vector unsigned short b) | |
| 3814 { | |
| 3815 return a | b; | |
| 3816 } | |
| 3817 | |
| 3818 static vector unsigned short __ATTRS_o_ai | |
| 3819 vec_or(vector bool short a, vector unsigned short b) | |
| 3820 { | |
| 3821 return (vector unsigned short)a | b; | |
| 3822 } | |
| 3823 | |
| 3824 static vector unsigned short __ATTRS_o_ai | |
| 3825 vec_or(vector unsigned short a, vector bool short b) | |
| 3826 { | |
| 3827 return a | (vector unsigned short)b; | |
| 3828 } | |
| 3829 | |
| 3830 static vector bool short __ATTRS_o_ai | |
| 3831 vec_or(vector bool short a, vector bool short b) | |
| 3832 { | |
| 3833 return a | b; | |
| 3834 } | |
| 3835 | |
| 3836 static vector int __ATTRS_o_ai | |
| 3837 vec_or(vector int a, vector int b) | |
| 3838 { | |
| 3839 return a | b; | |
| 3840 } | |
| 3841 | |
| 3842 static vector int __ATTRS_o_ai | |
| 3843 vec_or(vector bool int a, vector int b) | |
| 3844 { | |
| 3845 return (vector int)a | b; | |
| 3846 } | |
| 3847 | |
| 3848 static vector int __ATTRS_o_ai | |
| 3849 vec_or(vector int a, vector bool int b) | |
| 3850 { | |
| 3851 return a | (vector int)b; | |
| 3852 } | |
| 3853 | |
| 3854 static vector unsigned int __ATTRS_o_ai | |
| 3855 vec_or(vector unsigned int a, vector unsigned int b) | |
| 3856 { | |
| 3857 return a | b; | |
| 3858 } | |
| 3859 | |
| 3860 static vector unsigned int __ATTRS_o_ai | |
| 3861 vec_or(vector bool int a, vector unsigned int b) | |
| 3862 { | |
| 3863 return (vector unsigned int)a | b; | |
| 3864 } | |
| 3865 | |
| 3866 static vector unsigned int __ATTRS_o_ai | |
| 3867 vec_or(vector unsigned int a, vector bool int b) | |
| 3868 { | |
| 3869 return a | (vector unsigned int)b; | |
| 3870 } | |
| 3871 | |
| 3872 static vector bool int __ATTRS_o_ai | |
| 3873 vec_or(vector bool int a, vector bool int b) | |
| 3874 { | |
| 3875 return a | b; | |
| 3876 } | |
| 3877 | |
| 3878 static vector float __ATTRS_o_ai | |
| 3879 vec_or(vector float a, vector float b) | |
| 3880 { | |
| 3881 vector unsigned int res = (vector unsigned int)a | (vector unsigned int)b; | |
| 3882 return (vector float)res; | |
| 3883 } | |
| 3884 | |
| 3885 static vector float __ATTRS_o_ai | |
| 3886 vec_or(vector bool int a, vector float b) | |
| 3887 { | |
| 3888 vector unsigned int res = (vector unsigned int)a | (vector unsigned int)b; | |
| 3889 return (vector float)res; | |
| 3890 } | |
| 3891 | |
| 3892 static vector float __ATTRS_o_ai | |
| 3893 vec_or(vector float a, vector bool int b) | |
| 3894 { | |
| 3895 vector unsigned int res = (vector unsigned int)a | (vector unsigned int)b; | |
| 3896 return (vector float)res; | |
| 3897 } | |
| 3898 | |
| 3899 /* vec_vor */ | |
| 3900 | |
| 3901 static vector signed char __ATTRS_o_ai | |
| 3902 vec_vor(vector signed char a, vector signed char b) | |
| 3903 { | |
| 3904 return a | b; | |
| 3905 } | |
| 3906 | |
| 3907 static vector signed char __ATTRS_o_ai | |
| 3908 vec_vor(vector bool char a, vector signed char b) | |
| 3909 { | |
| 3910 return (vector signed char)a | b; | |
| 3911 } | |
| 3912 | |
| 3913 static vector signed char __ATTRS_o_ai | |
| 3914 vec_vor(vector signed char a, vector bool char b) | |
| 3915 { | |
| 3916 return a | (vector signed char)b; | |
| 3917 } | |
| 3918 | |
| 3919 static vector unsigned char __ATTRS_o_ai | |
| 3920 vec_vor(vector unsigned char a, vector unsigned char b) | |
| 3921 { | |
| 3922 return a | b; | |
| 3923 } | |
| 3924 | |
| 3925 static vector unsigned char __ATTRS_o_ai | |
| 3926 vec_vor(vector bool char a, vector unsigned char b) | |
| 3927 { | |
| 3928 return (vector unsigned char)a | b; | |
| 3929 } | |
| 3930 | |
| 3931 static vector unsigned char __ATTRS_o_ai | |
| 3932 vec_vor(vector unsigned char a, vector bool char b) | |
| 3933 { | |
| 3934 return a | (vector unsigned char)b; | |
| 3935 } | |
| 3936 | |
| 3937 static vector bool char __ATTRS_o_ai | |
| 3938 vec_vor(vector bool char a, vector bool char b) | |
| 3939 { | |
| 3940 return a | b; | |
| 3941 } | |
| 3942 | |
| 3943 static vector short __ATTRS_o_ai | |
| 3944 vec_vor(vector short a, vector short b) | |
| 3945 { | |
| 3946 return a | b; | |
| 3947 } | |
| 3948 | |
| 3949 static vector short __ATTRS_o_ai | |
| 3950 vec_vor(vector bool short a, vector short b) | |
| 3951 { | |
| 3952 return (vector short)a | b; | |
| 3953 } | |
| 3954 | |
| 3955 static vector short __ATTRS_o_ai | |
| 3956 vec_vor(vector short a, vector bool short b) | |
| 3957 { | |
| 3958 return a | (vector short)b; | |
| 3959 } | |
| 3960 | |
| 3961 static vector unsigned short __ATTRS_o_ai | |
| 3962 vec_vor(vector unsigned short a, vector unsigned short b) | |
| 3963 { | |
| 3964 return a | b; | |
| 3965 } | |
| 3966 | |
| 3967 static vector unsigned short __ATTRS_o_ai | |
| 3968 vec_vor(vector bool short a, vector unsigned short b) | |
| 3969 { | |
| 3970 return (vector unsigned short)a | b; | |
| 3971 } | |
| 3972 | |
| 3973 static vector unsigned short __ATTRS_o_ai | |
| 3974 vec_vor(vector unsigned short a, vector bool short b) | |
| 3975 { | |
| 3976 return a | (vector unsigned short)b; | |
| 3977 } | |
| 3978 | |
| 3979 static vector bool short __ATTRS_o_ai | |
| 3980 vec_vor(vector bool short a, vector bool short b) | |
| 3981 { | |
| 3982 return a | b; | |
| 3983 } | |
| 3984 | |
| 3985 static vector int __ATTRS_o_ai | |
| 3986 vec_vor(vector int a, vector int b) | |
| 3987 { | |
| 3988 return a | b; | |
| 3989 } | |
| 3990 | |
| 3991 static vector int __ATTRS_o_ai | |
| 3992 vec_vor(vector bool int a, vector int b) | |
| 3993 { | |
| 3994 return (vector int)a | b; | |
| 3995 } | |
| 3996 | |
| 3997 static vector int __ATTRS_o_ai | |
| 3998 vec_vor(vector int a, vector bool int b) | |
| 3999 { | |
| 4000 return a | (vector int)b; | |
| 4001 } | |
| 4002 | |
| 4003 static vector unsigned int __ATTRS_o_ai | |
| 4004 vec_vor(vector unsigned int a, vector unsigned int b) | |
| 4005 { | |
| 4006 return a | b; | |
| 4007 } | |
| 4008 | |
| 4009 static vector unsigned int __ATTRS_o_ai | |
| 4010 vec_vor(vector bool int a, vector unsigned int b) | |
| 4011 { | |
| 4012 return (vector unsigned int)a | b; | |
| 4013 } | |
| 4014 | |
| 4015 static vector unsigned int __ATTRS_o_ai | |
| 4016 vec_vor(vector unsigned int a, vector bool int b) | |
| 4017 { | |
| 4018 return a | (vector unsigned int)b; | |
| 4019 } | |
| 4020 | |
| 4021 static vector bool int __ATTRS_o_ai | |
| 4022 vec_vor(vector bool int a, vector bool int b) | |
| 4023 { | |
| 4024 return a | b; | |
| 4025 } | |
| 4026 | |
| 4027 static vector float __ATTRS_o_ai | |
| 4028 vec_vor(vector float a, vector float b) | |
| 4029 { | |
| 4030 vector unsigned int res = (vector unsigned int)a | (vector unsigned int)b; | |
| 4031 return (vector float)res; | |
| 4032 } | |
| 4033 | |
| 4034 static vector float __ATTRS_o_ai | |
| 4035 vec_vor(vector bool int a, vector float b) | |
| 4036 { | |
| 4037 vector unsigned int res = (vector unsigned int)a | (vector unsigned int)b; | |
| 4038 return (vector float)res; | |
| 4039 } | |
| 4040 | |
| 4041 static vector float __ATTRS_o_ai | |
| 4042 vec_vor(vector float a, vector bool int b) | |
| 4043 { | |
| 4044 vector unsigned int res = (vector unsigned int)a | (vector unsigned int)b; | |
| 4045 return (vector float)res; | |
| 4046 } | |
| 4047 | |
| 4048 /* vec_pack */ | |
| 4049 | |
| 4050 static vector signed char __ATTRS_o_ai | |
| 4051 vec_pack(vector signed short a, vector signed short b) | |
| 4052 { | |
| 4053 return (vector signed char)vec_perm(a, b, (vector unsigned char) | |
| 4054 (0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F, | |
| 4055 0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F)); | |
| 4056 } | |
| 4057 | |
| 4058 static vector unsigned char __ATTRS_o_ai | |
| 4059 vec_pack(vector unsigned short a, vector unsigned short b) | |
| 4060 { | |
| 4061 return (vector unsigned char)vec_perm(a, b, (vector unsigned char) | |
| 4062 (0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F, | |
| 4063 0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F)); | |
| 4064 } | |
| 4065 | |
| 4066 static vector bool char __ATTRS_o_ai | |
| 4067 vec_pack(vector bool short a, vector bool short b) | |
| 4068 { | |
| 4069 return (vector bool char)vec_perm(a, b, (vector unsigned char) | |
| 4070 (0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F, | |
| 4071 0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F)); | |
| 4072 } | |
| 4073 | |
| 4074 static vector short __ATTRS_o_ai | |
| 4075 vec_pack(vector int a, vector int b) | |
| 4076 { | |
| 4077 return (vector short)vec_perm(a, b, (vector unsigned char) | |
| 4078 (0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F, | |
| 4079 0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F)); | |
| 4080 } | |
| 4081 | |
| 4082 static vector unsigned short __ATTRS_o_ai | |
| 4083 vec_pack(vector unsigned int a, vector unsigned int b) | |
| 4084 { | |
| 4085 return (vector unsigned short)vec_perm(a, b, (vector unsigned char) | |
| 4086 (0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F, | |
| 4087 0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F)); | |
| 4088 } | |
| 4089 | |
| 4090 static vector bool short __ATTRS_o_ai | |
| 4091 vec_pack(vector bool int a, vector bool int b) | |
| 4092 { | |
| 4093 return (vector bool short)vec_perm(a, b, (vector unsigned char) | |
| 4094 (0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F, | |
| 4095 0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F)); | |
| 4096 } | |
| 4097 | |
| 4098 /* vec_vpkuhum */ | |
| 4099 | |
| 4100 #define __builtin_altivec_vpkuhum vec_vpkuhum | |
| 4101 | |
| 4102 static vector signed char __ATTRS_o_ai | |
| 4103 vec_vpkuhum(vector signed short a, vector signed short b) | |
| 4104 { | |
| 4105 return (vector signed char)vec_perm(a, b, (vector unsigned char) | |
| 4106 (0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F, | |
| 4107 0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F)); | |
| 4108 } | |
| 4109 | |
| 4110 static vector unsigned char __ATTRS_o_ai | |
| 4111 vec_vpkuhum(vector unsigned short a, vector unsigned short b) | |
| 4112 { | |
| 4113 return (vector unsigned char)vec_perm(a, b, (vector unsigned char) | |
| 4114 (0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F, | |
| 4115 0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F)); | |
| 4116 } | |
| 4117 | |
| 4118 static vector bool char __ATTRS_o_ai | |
| 4119 vec_vpkuhum(vector bool short a, vector bool short b) | |
| 4120 { | |
| 4121 return (vector bool char)vec_perm(a, b, (vector unsigned char) | |
| 4122 (0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F, | |
| 4123 0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F)); | |
| 4124 } | |
| 4125 | |
| 4126 /* vec_vpkuwum */ | |
| 4127 | |
| 4128 #define __builtin_altivec_vpkuwum vec_vpkuwum | |
| 4129 | |
| 4130 static vector short __ATTRS_o_ai | |
| 4131 vec_vpkuwum(vector int a, vector int b) | |
| 4132 { | |
| 4133 return (vector short)vec_perm(a, b, (vector unsigned char) | |
| 4134 (0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F, | |
| 4135 0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F)); | |
| 4136 } | |
| 4137 | |
| 4138 static vector unsigned short __ATTRS_o_ai | |
| 4139 vec_vpkuwum(vector unsigned int a, vector unsigned int b) | |
| 4140 { | |
| 4141 return (vector unsigned short)vec_perm(a, b, (vector unsigned char) | |
| 4142 (0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F, | |
| 4143 0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F)); | |
| 4144 } | |
| 4145 | |
| 4146 static vector bool short __ATTRS_o_ai | |
| 4147 vec_vpkuwum(vector bool int a, vector bool int b) | |
| 4148 { | |
| 4149 return (vector bool short)vec_perm(a, b, (vector unsigned char) | |
| 4150 (0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F, | |
| 4151 0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F)); | |
| 4152 } | |
| 4153 | |
| 4154 /* vec_packpx */ | |
| 4155 | |
| 4156 static vector pixel __attribute__((__always_inline__)) | |
| 4157 vec_packpx(vector unsigned int a, vector unsigned int b) | |
| 4158 { | |
| 4159 return (vector pixel)__builtin_altivec_vpkpx(a, b); | |
| 4160 } | |
| 4161 | |
| 4162 /* vec_vpkpx */ | |
| 4163 | |
| 4164 static vector pixel __attribute__((__always_inline__)) | |
| 4165 vec_vpkpx(vector unsigned int a, vector unsigned int b) | |
| 4166 { | |
| 4167 return (vector pixel)__builtin_altivec_vpkpx(a, b); | |
| 4168 } | |
| 4169 | |
| 4170 /* vec_packs */ | |
| 4171 | |
| 4172 static vector signed char __ATTRS_o_ai | |
| 4173 vec_packs(vector short a, vector short b) | |
| 4174 { | |
| 4175 return __builtin_altivec_vpkshss(a, b); | |
| 4176 } | |
| 4177 | |
| 4178 static vector unsigned char __ATTRS_o_ai | |
| 4179 vec_packs(vector unsigned short a, vector unsigned short b) | |
| 4180 { | |
| 4181 return __builtin_altivec_vpkuhus(a, b); | |
| 4182 } | |
| 4183 | |
| 4184 static vector signed short __ATTRS_o_ai | |
| 4185 vec_packs(vector int a, vector int b) | |
| 4186 { | |
| 4187 return __builtin_altivec_vpkswss(a, b); | |
| 4188 } | |
| 4189 | |
| 4190 static vector unsigned short __ATTRS_o_ai | |
| 4191 vec_packs(vector unsigned int a, vector unsigned int b) | |
| 4192 { | |
| 4193 return __builtin_altivec_vpkuwus(a, b); | |
| 4194 } | |
| 4195 | |
| 4196 /* vec_vpkshss */ | |
| 4197 | |
| 4198 static vector signed char __attribute__((__always_inline__)) | |
| 4199 vec_vpkshss(vector short a, vector short b) | |
| 4200 { | |
| 4201 return __builtin_altivec_vpkshss(a, b); | |
| 4202 } | |
| 4203 | |
| 4204 /* vec_vpkuhus */ | |
| 4205 | |
| 4206 static vector unsigned char __attribute__((__always_inline__)) | |
| 4207 vec_vpkuhus(vector unsigned short a, vector unsigned short b) | |
| 4208 { | |
| 4209 return __builtin_altivec_vpkuhus(a, b); | |
| 4210 } | |
| 4211 | |
| 4212 /* vec_vpkswss */ | |
| 4213 | |
| 4214 static vector signed short __attribute__((__always_inline__)) | |
| 4215 vec_vpkswss(vector int a, vector int b) | |
| 4216 { | |
| 4217 return __builtin_altivec_vpkswss(a, b); | |
| 4218 } | |
| 4219 | |
| 4220 /* vec_vpkuwus */ | |
| 4221 | |
| 4222 static vector unsigned short __attribute__((__always_inline__)) | |
| 4223 vec_vpkuwus(vector unsigned int a, vector unsigned int b) | |
| 4224 { | |
| 4225 return __builtin_altivec_vpkuwus(a, b); | |
| 4226 } | |
| 4227 | |
| 4228 /* vec_packsu */ | |
| 4229 | |
| 4230 static vector unsigned char __ATTRS_o_ai | |
| 4231 vec_packsu(vector short a, vector short b) | |
| 4232 { | |
| 4233 return __builtin_altivec_vpkshus(a, b); | |
| 4234 } | |
| 4235 | |
| 4236 static vector unsigned char __ATTRS_o_ai | |
| 4237 vec_packsu(vector unsigned short a, vector unsigned short b) | |
| 4238 { | |
| 4239 return __builtin_altivec_vpkuhus(a, b); | |
| 4240 } | |
| 4241 | |
| 4242 static vector unsigned short __ATTRS_o_ai | |
| 4243 vec_packsu(vector int a, vector int b) | |
| 4244 { | |
| 4245 return __builtin_altivec_vpkswus(a, b); | |
| 4246 } | |
| 4247 | |
| 4248 static vector unsigned short __ATTRS_o_ai | |
| 4249 vec_packsu(vector unsigned int a, vector unsigned int b) | |
| 4250 { | |
| 4251 return __builtin_altivec_vpkuwus(a, b); | |
| 4252 } | |
| 4253 | |
| 4254 /* vec_vpkshus */ | |
| 4255 | |
| 4256 static vector unsigned char __ATTRS_o_ai | |
| 4257 vec_vpkshus(vector short a, vector short b) | |
| 4258 { | |
| 4259 return __builtin_altivec_vpkshus(a, b); | |
| 4260 } | |
| 4261 | |
| 4262 static vector unsigned char __ATTRS_o_ai | |
| 4263 vec_vpkshus(vector unsigned short a, vector unsigned short b) | |
| 4264 { | |
| 4265 return __builtin_altivec_vpkuhus(a, b); | |
| 4266 } | |
| 4267 | |
| 4268 /* vec_vpkswus */ | |
| 4269 | |
| 4270 static vector unsigned short __ATTRS_o_ai | |
| 4271 vec_vpkswus(vector int a, vector int b) | |
| 4272 { | |
| 4273 return __builtin_altivec_vpkswus(a, b); | |
| 4274 } | |
| 4275 | |
| 4276 static vector unsigned short __ATTRS_o_ai | |
| 4277 vec_vpkswus(vector unsigned int a, vector unsigned int b) | |
| 4278 { | |
| 4279 return __builtin_altivec_vpkuwus(a, b); | |
| 4280 } | |
| 4281 | |
| 4282 /* vec_perm */ | |
| 4283 | |
| 4284 vector signed char __ATTRS_o_ai | |
| 4285 vec_perm(vector signed char a, vector signed char b, vector unsigned char c) | |
| 4286 { | |
| 4287 return (vector signed char) | |
| 4288 __builtin_altivec_vperm_4si((vector int)a, (vector int)b, c); | |
| 4289 } | |
| 4290 | |
| 4291 vector unsigned char __ATTRS_o_ai | |
| 4292 vec_perm(vector unsigned char a, | |
| 4293 vector unsigned char b, | |
| 4294 vector unsigned char c) | |
| 4295 { | |
| 4296 return (vector unsigned char) | |
| 4297 __builtin_altivec_vperm_4si((vector int)a, (vector int)b, c); | |
| 4298 } | |
| 4299 | |
| 4300 vector bool char __ATTRS_o_ai | |
| 4301 vec_perm(vector bool char a, vector bool char b, vector unsigned char c) | |
| 4302 { | |
| 4303 return (vector bool char) | |
| 4304 __builtin_altivec_vperm_4si((vector int)a, (vector int)b, c); | |
| 4305 } | |
| 4306 | |
| 4307 vector short __ATTRS_o_ai | |
| 4308 vec_perm(vector short a, vector short b, vector unsigned char c) | |
| 4309 { | |
| 4310 return (vector short) | |
| 4311 __builtin_altivec_vperm_4si((vector int)a, (vector int)b, c); | |
| 4312 } | |
| 4313 | |
| 4314 vector unsigned short __ATTRS_o_ai | |
| 4315 vec_perm(vector unsigned short a, | |
| 4316 vector unsigned short b, | |
| 4317 vector unsigned char c) | |
| 4318 { | |
| 4319 return (vector unsigned short) | |
| 4320 __builtin_altivec_vperm_4si((vector int)a, (vector int)b, c); | |
| 4321 } | |
| 4322 | |
| 4323 vector bool short __ATTRS_o_ai | |
| 4324 vec_perm(vector bool short a, vector bool short b, vector unsigned char c) | |
| 4325 { | |
| 4326 return (vector bool short) | |
| 4327 __builtin_altivec_vperm_4si((vector int)a, (vector int)b, c); | |
| 4328 } | |
| 4329 | |
| 4330 vector pixel __ATTRS_o_ai | |
| 4331 vec_perm(vector pixel a, vector pixel b, vector unsigned char c) | |
| 4332 { | |
| 4333 return (vector pixel) | |
| 4334 __builtin_altivec_vperm_4si((vector int)a, (vector int)b, c); | |
| 4335 } | |
| 4336 | |
| 4337 vector int __ATTRS_o_ai | |
| 4338 vec_perm(vector int a, vector int b, vector unsigned char c) | |
| 4339 { | |
| 4340 return (vector int)__builtin_altivec_vperm_4si(a, b, c); | |
| 4341 } | |
| 4342 | |
| 4343 vector unsigned int __ATTRS_o_ai | |
| 4344 vec_perm(vector unsigned int a, vector unsigned int b, vector unsigned char c) | |
| 4345 { | |
| 4346 return (vector unsigned int) | |
| 4347 __builtin_altivec_vperm_4si((vector int)a, (vector int)b, c); | |
| 4348 } | |
| 4349 | |
| 4350 vector bool int __ATTRS_o_ai | |
| 4351 vec_perm(vector bool int a, vector bool int b, vector unsigned char c) | |
| 4352 { | |
| 4353 return (vector bool int) | |
| 4354 __builtin_altivec_vperm_4si((vector int)a, (vector int)b, c); | |
| 4355 } | |
| 4356 | |
| 4357 vector float __ATTRS_o_ai | |
| 4358 vec_perm(vector float a, vector float b, vector unsigned char c) | |
| 4359 { | |
| 4360 return (vector float) | |
| 4361 __builtin_altivec_vperm_4si((vector int)a, (vector int)b, c); | |
| 4362 } | |
| 4363 | |
| 4364 /* vec_vperm */ | |
| 4365 | |
| 4366 vector signed char __ATTRS_o_ai | |
| 4367 vec_vperm(vector signed char a, vector signed char b, vector unsigned char c) | |
| 4368 { | |
| 4369 return (vector signed char) | |
| 4370 __builtin_altivec_vperm_4si((vector int)a, (vector int)b, c); | |
| 4371 } | |
| 4372 | |
| 4373 vector unsigned char __ATTRS_o_ai | |
| 4374 vec_vperm(vector unsigned char a, | |
| 4375 vector unsigned char b, | |
| 4376 vector unsigned char c) | |
| 4377 { | |
| 4378 return (vector unsigned char) | |
| 4379 __builtin_altivec_vperm_4si((vector int)a, (vector int)b, c); | |
| 4380 } | |
| 4381 | |
| 4382 vector bool char __ATTRS_o_ai | |
| 4383 vec_vperm(vector bool char a, vector bool char b, vector unsigned char c) | |
| 4384 { | |
| 4385 return (vector bool char) | |
| 4386 __builtin_altivec_vperm_4si((vector int)a, (vector int)b, c); | |
| 4387 } | |
| 4388 | |
| 4389 vector short __ATTRS_o_ai | |
| 4390 vec_vperm(vector short a, vector short b, vector unsigned char c) | |
| 4391 { | |
| 4392 return (vector short) | |
| 4393 __builtin_altivec_vperm_4si((vector int)a, (vector int)b, c); | |
| 4394 } | |
| 4395 | |
| 4396 vector unsigned short __ATTRS_o_ai | |
| 4397 vec_vperm(vector unsigned short a, | |
| 4398 vector unsigned short b, | |
| 4399 vector unsigned char c) | |
| 4400 { | |
| 4401 return (vector unsigned short) | |
| 4402 __builtin_altivec_vperm_4si((vector int)a, (vector int)b, c); | |
| 4403 } | |
| 4404 | |
| 4405 vector bool short __ATTRS_o_ai | |
| 4406 vec_vperm(vector bool short a, vector bool short b, vector unsigned char c) | |
| 4407 { | |
| 4408 return (vector bool short) | |
| 4409 __builtin_altivec_vperm_4si((vector int)a, (vector int)b, c); | |
| 4410 } | |
| 4411 | |
| 4412 vector pixel __ATTRS_o_ai | |
| 4413 vec_vperm(vector pixel a, vector pixel b, vector unsigned char c) | |
| 4414 { | |
| 4415 return (vector pixel) | |
| 4416 __builtin_altivec_vperm_4si((vector int)a, (vector int)b, c); | |
| 4417 } | |
| 4418 | |
| 4419 vector int __ATTRS_o_ai | |
| 4420 vec_vperm(vector int a, vector int b, vector unsigned char c) | |
| 4421 { | |
| 4422 return (vector int)__builtin_altivec_vperm_4si(a, b, c); | |
| 4423 } | |
| 4424 | |
| 4425 vector unsigned int __ATTRS_o_ai | |
| 4426 vec_vperm(vector unsigned int a, vector unsigned int b, vector unsigned char c) | |
| 4427 { | |
| 4428 return (vector unsigned int) | |
| 4429 __builtin_altivec_vperm_4si((vector int)a, (vector int)b, c); | |
| 4430 } | |
| 4431 | |
| 4432 vector bool int __ATTRS_o_ai | |
| 4433 vec_vperm(vector bool int a, vector bool int b, vector unsigned char c) | |
| 4434 { | |
| 4435 return (vector bool int) | |
| 4436 __builtin_altivec_vperm_4si((vector int)a, (vector int)b, c); | |
| 4437 } | |
| 4438 | |
| 4439 vector float __ATTRS_o_ai | |
| 4440 vec_vperm(vector float a, vector float b, vector unsigned char c) | |
| 4441 { | |
| 4442 return (vector float) | |
| 4443 __builtin_altivec_vperm_4si((vector int)a, (vector int)b, c); | |
| 4444 } | |
| 4445 | |
| 4446 /* vec_re */ | |
| 4447 | |
| 4448 vector float __attribute__((__always_inline__)) | |
| 4449 vec_re(vector float a) | |
| 4450 { | |
| 4451 return __builtin_altivec_vrefp(a); | |
| 4452 } | |
| 4453 | |
| 4454 /* vec_vrefp */ | |
| 4455 | |
| 4456 vector float __attribute__((__always_inline__)) | |
| 4457 vec_vrefp(vector float a) | |
| 4458 { | |
| 4459 return __builtin_altivec_vrefp(a); | |
| 4460 } | |
| 4461 | |
| 4462 /* vec_rl */ | |
| 4463 | |
| 4464 static vector signed char __ATTRS_o_ai | |
| 4465 vec_rl(vector signed char a, vector unsigned char b) | |
| 4466 { | |
| 4467 return (vector signed char)__builtin_altivec_vrlb((vector char)a, b); | |
| 4468 } | |
| 4469 | |
| 4470 static vector unsigned char __ATTRS_o_ai | |
| 4471 vec_rl(vector unsigned char a, vector unsigned char b) | |
| 4472 { | |
| 4473 return (vector unsigned char)__builtin_altivec_vrlb((vector char)a, b); | |
| 4474 } | |
| 4475 | |
| 4476 static vector short __ATTRS_o_ai | |
| 4477 vec_rl(vector short a, vector unsigned short b) | |
| 4478 { | |
| 4479 return __builtin_altivec_vrlh(a, b); | |
| 4480 } | |
| 4481 | |
| 4482 static vector unsigned short __ATTRS_o_ai | |
| 4483 vec_rl(vector unsigned short a, vector unsigned short b) | |
| 4484 { | |
| 4485 return (vector unsigned short)__builtin_altivec_vrlh((vector short)a, b); | |
| 4486 } | |
| 4487 | |
| 4488 static vector int __ATTRS_o_ai | |
| 4489 vec_rl(vector int a, vector unsigned int b) | |
| 4490 { | |
| 4491 return __builtin_altivec_vrlw(a, b); | |
| 4492 } | |
| 4493 | |
| 4494 static vector unsigned int __ATTRS_o_ai | |
| 4495 vec_rl(vector unsigned int a, vector unsigned int b) | |
| 4496 { | |
| 4497 return (vector unsigned int)__builtin_altivec_vrlw((vector int)a, b); | |
| 4498 } | |
| 4499 | |
| 4500 /* vec_vrlb */ | |
| 4501 | |
| 4502 static vector signed char __ATTRS_o_ai | |
| 4503 vec_vrlb(vector signed char a, vector unsigned char b) | |
| 4504 { | |
| 4505 return (vector signed char)__builtin_altivec_vrlb((vector char)a, b); | |
| 4506 } | |
| 4507 | |
| 4508 static vector unsigned char __ATTRS_o_ai | |
| 4509 vec_vrlb(vector unsigned char a, vector unsigned char b) | |
| 4510 { | |
| 4511 return (vector unsigned char)__builtin_altivec_vrlb((vector char)a, b); | |
| 4512 } | |
| 4513 | |
| 4514 /* vec_vrlh */ | |
| 4515 | |
| 4516 static vector short __ATTRS_o_ai | |
| 4517 vec_vrlh(vector short a, vector unsigned short b) | |
| 4518 { | |
| 4519 return __builtin_altivec_vrlh(a, b); | |
| 4520 } | |
| 4521 | |
| 4522 static vector unsigned short __ATTRS_o_ai | |
| 4523 vec_vrlh(vector unsigned short a, vector unsigned short b) | |
| 4524 { | |
| 4525 return (vector unsigned short)__builtin_altivec_vrlh((vector short)a, b); | |
| 4526 } | |
| 4527 | |
| 4528 /* vec_vrlw */ | |
| 4529 | |
| 4530 static vector int __ATTRS_o_ai | |
| 4531 vec_vrlw(vector int a, vector unsigned int b) | |
| 4532 { | |
| 4533 return __builtin_altivec_vrlw(a, b); | |
| 4534 } | |
| 4535 | |
| 4536 static vector unsigned int __ATTRS_o_ai | |
| 4537 vec_vrlw(vector unsigned int a, vector unsigned int b) | |
| 4538 { | |
| 4539 return (vector unsigned int)__builtin_altivec_vrlw((vector int)a, b); | |
| 4540 } | |
| 4541 | |
| 4542 /* vec_round */ | |
| 4543 | |
| 4544 static vector float __attribute__((__always_inline__)) | |
| 4545 vec_round(vector float a) | |
| 4546 { | |
| 4547 return __builtin_altivec_vrfin(a); | |
| 4548 } | |
| 4549 | |
| 4550 /* vec_vrfin */ | |
| 4551 | |
| 4552 static vector float __attribute__((__always_inline__)) | |
| 4553 vec_vrfin(vector float a) | |
| 4554 { | |
| 4555 return __builtin_altivec_vrfin(a); | |
| 4556 } | |
| 4557 | |
| 4558 /* vec_rsqrte */ | |
| 4559 | |
| 4560 static __vector float __attribute__((__always_inline__)) | |
| 4561 vec_rsqrte(vector float a) | |
| 4562 { | |
| 4563 return __builtin_altivec_vrsqrtefp(a); | |
| 4564 } | |
| 4565 | |
| 4566 /* vec_vrsqrtefp */ | |
| 4567 | |
| 4568 static __vector float __attribute__((__always_inline__)) | |
| 4569 vec_vrsqrtefp(vector float a) | |
| 4570 { | |
| 4571 return __builtin_altivec_vrsqrtefp(a); | |
| 4572 } | |
| 4573 | |
| 4574 /* vec_sel */ | |
| 4575 | |
| 4576 #define __builtin_altivec_vsel_4si vec_sel | |
| 4577 | |
| 4578 static vector signed char __ATTRS_o_ai | |
| 4579 vec_sel(vector signed char a, vector signed char b, vector unsigned char c) | |
| 4580 { | |
| 4581 return (a & ~(vector signed char)c) | (b & (vector signed char)c); | |
| 4582 } | |
| 4583 | |
| 4584 static vector signed char __ATTRS_o_ai | |
| 4585 vec_sel(vector signed char a, vector signed char b, vector bool char c) | |
| 4586 { | |
| 4587 return (a & ~(vector signed char)c) | (b & (vector signed char)c); | |
| 4588 } | |
| 4589 | |
| 4590 static vector unsigned char __ATTRS_o_ai | |
| 4591 vec_sel(vector unsigned char a, vector unsigned char b, vector unsigned char c) | |
| 4592 { | |
| 4593 return (a & ~c) | (b & c); | |
| 4594 } | |
| 4595 | |
| 4596 static vector unsigned char __ATTRS_o_ai | |
| 4597 vec_sel(vector unsigned char a, vector unsigned char b, vector bool char c) | |
| 4598 { | |
| 4599 return (a & ~(vector unsigned char)c) | (b & (vector unsigned char)c); | |
| 4600 } | |
| 4601 | |
| 4602 static vector bool char __ATTRS_o_ai | |
| 4603 vec_sel(vector bool char a, vector bool char b, vector unsigned char c) | |
| 4604 { | |
| 4605 return (a & ~(vector bool char)c) | (b & (vector bool char)c); | |
| 4606 } | |
| 4607 | |
| 4608 static vector bool char __ATTRS_o_ai | |
| 4609 vec_sel(vector bool char a, vector bool char b, vector bool char c) | |
| 4610 { | |
| 4611 return (a & ~c) | (b & c); | |
| 4612 } | |
| 4613 | |
| 4614 static vector short __ATTRS_o_ai | |
| 4615 vec_sel(vector short a, vector short b, vector unsigned short c) | |
| 4616 { | |
| 4617 return (a & ~(vector short)c) | (b & (vector short)c); | |
| 4618 } | |
| 4619 | |
| 4620 static vector short __ATTRS_o_ai | |
| 4621 vec_sel(vector short a, vector short b, vector bool short c) | |
| 4622 { | |
| 4623 return (a & ~(vector short)c) | (b & (vector short)c); | |
| 4624 } | |
| 4625 | |
| 4626 static vector unsigned short __ATTRS_o_ai | |
| 4627 vec_sel(vector unsigned short a, | |
| 4628 vector unsigned short b, | |
| 4629 vector unsigned short c) | |
| 4630 { | |
| 4631 return (a & ~c) | (b & c); | |
| 4632 } | |
| 4633 | |
| 4634 static vector unsigned short __ATTRS_o_ai | |
| 4635 vec_sel(vector unsigned short a, vector unsigned short b, vector bool short c) | |
| 4636 { | |
| 4637 return (a & ~(vector unsigned short)c) | (b & (vector unsigned short)c); | |
| 4638 } | |
| 4639 | |
| 4640 static vector bool short __ATTRS_o_ai | |
| 4641 vec_sel(vector bool short a, vector bool short b, vector unsigned short c) | |
| 4642 { | |
| 4643 return (a & ~(vector bool short)c) | (b & (vector bool short)c); | |
| 4644 } | |
| 4645 | |
| 4646 static vector bool short __ATTRS_o_ai | |
| 4647 vec_sel(vector bool short a, vector bool short b, vector bool short c) | |
| 4648 { | |
| 4649 return (a & ~c) | (b & c); | |
| 4650 } | |
| 4651 | |
| 4652 static vector int __ATTRS_o_ai | |
| 4653 vec_sel(vector int a, vector int b, vector unsigned int c) | |
| 4654 { | |
| 4655 return (a & ~(vector int)c) | (b & (vector int)c); | |
| 4656 } | |
| 4657 | |
| 4658 static vector int __ATTRS_o_ai | |
| 4659 vec_sel(vector int a, vector int b, vector bool int c) | |
| 4660 { | |
| 4661 return (a & ~(vector int)c) | (b & (vector int)c); | |
| 4662 } | |
| 4663 | |
| 4664 static vector unsigned int __ATTRS_o_ai | |
| 4665 vec_sel(vector unsigned int a, vector unsigned int b, vector unsigned int c) | |
| 4666 { | |
| 4667 return (a & ~c) | (b & c); | |
| 4668 } | |
| 4669 | |
| 4670 static vector unsigned int __ATTRS_o_ai | |
| 4671 vec_sel(vector unsigned int a, vector unsigned int b, vector bool int c) | |
| 4672 { | |
| 4673 return (a & ~(vector unsigned int)c) | (b & (vector unsigned int)c); | |
| 4674 } | |
| 4675 | |
| 4676 static vector bool int __ATTRS_o_ai | |
| 4677 vec_sel(vector bool int a, vector bool int b, vector unsigned int c) | |
| 4678 { | |
| 4679 return (a & ~(vector bool int)c) | (b & (vector bool int)c); | |
| 4680 } | |
| 4681 | |
| 4682 static vector bool int __ATTRS_o_ai | |
| 4683 vec_sel(vector bool int a, vector bool int b, vector bool int c) | |
| 4684 { | |
| 4685 return (a & ~c) | (b & c); | |
| 4686 } | |
| 4687 | |
| 4688 static vector float __ATTRS_o_ai | |
| 4689 vec_sel(vector float a, vector float b, vector unsigned int c) | |
| 4690 { | |
| 4691 vector int res = ((vector int)a & ~(vector int)c) | |
| 4692 | ((vector int)b & (vector int)c); | |
| 4693 return (vector float)res; | |
| 4694 } | |
| 4695 | |
| 4696 static vector float __ATTRS_o_ai | |
| 4697 vec_sel(vector float a, vector float b, vector bool int c) | |
| 4698 { | |
| 4699 vector int res = ((vector int)a & ~(vector int)c) | |
| 4700 | ((vector int)b & (vector int)c); | |
| 4701 return (vector float)res; | |
| 4702 } | |
| 4703 | |
| 4704 /* vec_vsel */ | |
| 4705 | |
| 4706 static vector signed char __ATTRS_o_ai | |
| 4707 vec_vsel(vector signed char a, vector signed char b, vector unsigned char c) | |
| 4708 { | |
| 4709 return (a & ~(vector signed char)c) | (b & (vector signed char)c); | |
| 4710 } | |
| 4711 | |
| 4712 static vector signed char __ATTRS_o_ai | |
| 4713 vec_vsel(vector signed char a, vector signed char b, vector bool char c) | |
| 4714 { | |
| 4715 return (a & ~(vector signed char)c) | (b & (vector signed char)c); | |
| 4716 } | |
| 4717 | |
| 4718 static vector unsigned char __ATTRS_o_ai | |
| 4719 vec_vsel(vector unsigned char a, vector unsigned char b, vector unsigned char c) | |
| 4720 { | |
| 4721 return (a & ~c) | (b & c); | |
| 4722 } | |
| 4723 | |
| 4724 static vector unsigned char __ATTRS_o_ai | |
| 4725 vec_vsel(vector unsigned char a, vector unsigned char b, vector bool char c) | |
| 4726 { | |
| 4727 return (a & ~(vector unsigned char)c) | (b & (vector unsigned char)c); | |
| 4728 } | |
| 4729 | |
| 4730 static vector bool char __ATTRS_o_ai | |
| 4731 vec_vsel(vector bool char a, vector bool char b, vector unsigned char c) | |
| 4732 { | |
| 4733 return (a & ~(vector bool char)c) | (b & (vector bool char)c); | |
| 4734 } | |
| 4735 | |
| 4736 static vector bool char __ATTRS_o_ai | |
| 4737 vec_vsel(vector bool char a, vector bool char b, vector bool char c) | |
| 4738 { | |
| 4739 return (a & ~c) | (b & c); | |
| 4740 } | |
| 4741 | |
| 4742 static vector short __ATTRS_o_ai | |
| 4743 vec_vsel(vector short a, vector short b, vector unsigned short c) | |
| 4744 { | |
| 4745 return (a & ~(vector short)c) | (b & (vector short)c); | |
| 4746 } | |
| 4747 | |
| 4748 static vector short __ATTRS_o_ai | |
| 4749 vec_vsel(vector short a, vector short b, vector bool short c) | |
| 4750 { | |
| 4751 return (a & ~(vector short)c) | (b & (vector short)c); | |
| 4752 } | |
| 4753 | |
| 4754 static vector unsigned short __ATTRS_o_ai | |
| 4755 vec_vsel(vector unsigned short a, | |
| 4756 vector unsigned short b, | |
| 4757 vector unsigned short c) | |
| 4758 { | |
| 4759 return (a & ~c) | (b & c); | |
| 4760 } | |
| 4761 | |
| 4762 static vector unsigned short __ATTRS_o_ai | |
| 4763 vec_vsel(vector unsigned short a, vector unsigned short b, vector bool short c) | |
| 4764 { | |
| 4765 return (a & ~(vector unsigned short)c) | (b & (vector unsigned short)c); | |
| 4766 } | |
| 4767 | |
| 4768 static vector bool short __ATTRS_o_ai | |
| 4769 vec_vsel(vector bool short a, vector bool short b, vector unsigned short c) | |
| 4770 { | |
| 4771 return (a & ~(vector bool short)c) | (b & (vector bool short)c); | |
| 4772 } | |
| 4773 | |
| 4774 static vector bool short __ATTRS_o_ai | |
| 4775 vec_vsel(vector bool short a, vector bool short b, vector bool short c) | |
| 4776 { | |
| 4777 return (a & ~c) | (b & c); | |
| 4778 } | |
| 4779 | |
| 4780 static vector int __ATTRS_o_ai | |
| 4781 vec_vsel(vector int a, vector int b, vector unsigned int c) | |
| 4782 { | |
| 4783 return (a & ~(vector int)c) | (b & (vector int)c); | |
| 4784 } | |
| 4785 | |
| 4786 static vector int __ATTRS_o_ai | |
| 4787 vec_vsel(vector int a, vector int b, vector bool int c) | |
| 4788 { | |
| 4789 return (a & ~(vector int)c) | (b & (vector int)c); | |
| 4790 } | |
| 4791 | |
| 4792 static vector unsigned int __ATTRS_o_ai | |
| 4793 vec_vsel(vector unsigned int a, vector unsigned int b, vector unsigned int c) | |
| 4794 { | |
| 4795 return (a & ~c) | (b & c); | |
| 4796 } | |
| 4797 | |
| 4798 static vector unsigned int __ATTRS_o_ai | |
| 4799 vec_vsel(vector unsigned int a, vector unsigned int b, vector bool int c) | |
| 4800 { | |
| 4801 return (a & ~(vector unsigned int)c) | (b & (vector unsigned int)c); | |
| 4802 } | |
| 4803 | |
| 4804 static vector bool int __ATTRS_o_ai | |
| 4805 vec_vsel(vector bool int a, vector bool int b, vector unsigned int c) | |
| 4806 { | |
| 4807 return (a & ~(vector bool int)c) | (b & (vector bool int)c); | |
| 4808 } | |
| 4809 | |
| 4810 static vector bool int __ATTRS_o_ai | |
| 4811 vec_vsel(vector bool int a, vector bool int b, vector bool int c) | |
| 4812 { | |
| 4813 return (a & ~c) | (b & c); | |
| 4814 } | |
| 4815 | |
| 4816 static vector float __ATTRS_o_ai | |
| 4817 vec_vsel(vector float a, vector float b, vector unsigned int c) | |
| 4818 { | |
| 4819 vector int res = ((vector int)a & ~(vector int)c) | |
| 4820 | ((vector int)b & (vector int)c); | |
| 4821 return (vector float)res; | |
| 4822 } | |
| 4823 | |
| 4824 static vector float __ATTRS_o_ai | |
| 4825 vec_vsel(vector float a, vector float b, vector bool int c) | |
| 4826 { | |
| 4827 vector int res = ((vector int)a & ~(vector int)c) | |
| 4828 | ((vector int)b & (vector int)c); | |
| 4829 return (vector float)res; | |
| 4830 } | |
| 4831 | |
| 4832 /* vec_sl */ | |
| 4833 | |
| 4834 static vector signed char __ATTRS_o_ai | |
| 4835 vec_sl(vector signed char a, vector unsigned char b) | |
| 4836 { | |
| 4837 return a << (vector signed char)b; | |
| 4838 } | |
| 4839 | |
| 4840 static vector unsigned char __ATTRS_o_ai | |
| 4841 vec_sl(vector unsigned char a, vector unsigned char b) | |
| 4842 { | |
| 4843 return a << b; | |
| 4844 } | |
| 4845 | |
| 4846 static vector short __ATTRS_o_ai | |
| 4847 vec_sl(vector short a, vector unsigned short b) | |
| 4848 { | |
| 4849 return a << (vector short)b; | |
| 4850 } | |
| 4851 | |
| 4852 static vector unsigned short __ATTRS_o_ai | |
| 4853 vec_sl(vector unsigned short a, vector unsigned short b) | |
| 4854 { | |
| 4855 return a << b; | |
| 4856 } | |
| 4857 | |
| 4858 static vector int __ATTRS_o_ai | |
| 4859 vec_sl(vector int a, vector unsigned int b) | |
| 4860 { | |
| 4861 return a << (vector int)b; | |
| 4862 } | |
| 4863 | |
| 4864 static vector unsigned int __ATTRS_o_ai | |
| 4865 vec_sl(vector unsigned int a, vector unsigned int b) | |
| 4866 { | |
| 4867 return a << b; | |
| 4868 } | |
| 4869 | |
| 4870 /* vec_vslb */ | |
| 4871 | |
| 4872 #define __builtin_altivec_vslb vec_vslb | |
| 4873 | |
| 4874 static vector signed char __ATTRS_o_ai | |
| 4875 vec_vslb(vector signed char a, vector unsigned char b) | |
| 4876 { | |
| 4877 return vec_sl(a, b); | |
| 4878 } | |
| 4879 | |
| 4880 static vector unsigned char __ATTRS_o_ai | |
| 4881 vec_vslb(vector unsigned char a, vector unsigned char b) | |
| 4882 { | |
| 4883 return vec_sl(a, b); | |
| 4884 } | |
| 4885 | |
| 4886 /* vec_vslh */ | |
| 4887 | |
| 4888 #define __builtin_altivec_vslh vec_vslh | |
| 4889 | |
| 4890 static vector short __ATTRS_o_ai | |
| 4891 vec_vslh(vector short a, vector unsigned short b) | |
| 4892 { | |
| 4893 return vec_sl(a, b); | |
| 4894 } | |
| 4895 | |
| 4896 static vector unsigned short __ATTRS_o_ai | |
| 4897 vec_vslh(vector unsigned short a, vector unsigned short b) | |
| 4898 { | |
| 4899 return vec_sl(a, b); | |
| 4900 } | |
| 4901 | |
| 4902 /* vec_vslw */ | |
| 4903 | |
| 4904 #define __builtin_altivec_vslw vec_vslw | |
| 4905 | |
| 4906 static vector int __ATTRS_o_ai | |
| 4907 vec_vslw(vector int a, vector unsigned int b) | |
| 4908 { | |
| 4909 return vec_sl(a, b); | |
| 4910 } | |
| 4911 | |
| 4912 static vector unsigned int __ATTRS_o_ai | |
| 4913 vec_vslw(vector unsigned int a, vector unsigned int b) | |
| 4914 { | |
| 4915 return vec_sl(a, b); | |
| 4916 } | |
| 4917 | |
| 4918 /* vec_sld */ | |
| 4919 | |
| 4920 #define __builtin_altivec_vsldoi_4si vec_sld | |
| 4921 | |
| 4922 static vector signed char __ATTRS_o_ai | |
| 4923 vec_sld(vector signed char a, vector signed char b, unsigned char c) | |
| 4924 { | |
| 4925 return vec_perm(a, b, (vector unsigned char) | |
| 4926 (c, c+1, c+2, c+3, c+4, c+5, c+6, c+7, | |
| 4927 c+8, c+9, c+10, c+11, c+12, c+13, c+14, c+15)); | |
| 4928 } | |
| 4929 | |
| 4930 static vector unsigned char __ATTRS_o_ai | |
| 4931 vec_sld(vector unsigned char a, vector unsigned char b, unsigned char c) | |
| 4932 { | |
| 4933 return vec_perm(a, b, (vector unsigned char) | |
| 4934 (c, c+1, c+2, c+3, c+4, c+5, c+6, c+7, | |
| 4935 c+8, c+9, c+10, c+11, c+12, c+13, c+14, c+15)); | |
| 4936 } | |
| 4937 | |
| 4938 static vector short __ATTRS_o_ai | |
| 4939 vec_sld(vector short a, vector short b, unsigned char c) | |
| 4940 { | |
| 4941 return vec_perm(a, b, (vector unsigned char) | |
| 4942 (c, c+1, c+2, c+3, c+4, c+5, c+6, c+7, | |
| 4943 c+8, c+9, c+10, c+11, c+12, c+13, c+14, c+15)); | |
| 4944 } | |
| 4945 | |
| 4946 static vector unsigned short __ATTRS_o_ai | |
| 4947 vec_sld(vector unsigned short a, vector unsigned short b, unsigned char c) | |
| 4948 { | |
| 4949 return vec_perm(a, b, (vector unsigned char) | |
| 4950 (c, c+1, c+2, c+3, c+4, c+5, c+6, c+7, | |
| 4951 c+8, c+9, c+10, c+11, c+12, c+13, c+14, c+15)); | |
| 4952 } | |
| 4953 | |
| 4954 static vector pixel __ATTRS_o_ai | |
| 4955 vec_sld(vector pixel a, vector pixel b, unsigned char c) | |
| 4956 { | |
| 4957 return vec_perm(a, b, (vector unsigned char) | |
| 4958 (c, c+1, c+2, c+3, c+4, c+5, c+6, c+7, | |
| 4959 c+8, c+9, c+10, c+11, c+12, c+13, c+14, c+15)); | |
| 4960 } | |
| 4961 | |
| 4962 static vector int __ATTRS_o_ai | |
| 4963 vec_sld(vector int a, vector int b, unsigned char c) | |
| 4964 { | |
| 4965 return vec_perm(a, b, (vector unsigned char) | |
| 4966 (c, c+1, c+2, c+3, c+4, c+5, c+6, c+7, | |
| 4967 c+8, c+9, c+10, c+11, c+12, c+13, c+14, c+15)); | |
| 4968 } | |
| 4969 | |
| 4970 static vector unsigned int __ATTRS_o_ai | |
| 4971 vec_sld(vector unsigned int a, vector unsigned int b, unsigned char c) | |
| 4972 { | |
| 4973 return vec_perm(a, b, (vector unsigned char) | |
| 4974 (c, c+1, c+2, c+3, c+4, c+5, c+6, c+7, | |
| 4975 c+8, c+9, c+10, c+11, c+12, c+13, c+14, c+15)); | |
| 4976 } | |
| 4977 | |
| 4978 static vector float __ATTRS_o_ai | |
| 4979 vec_sld(vector float a, vector float b, unsigned char c) | |
| 4980 { | |
| 4981 return vec_perm(a, b, (vector unsigned char) | |
| 4982 (c, c+1, c+2, c+3, c+4, c+5, c+6, c+7, | |
| 4983 c+8, c+9, c+10, c+11, c+12, c+13, c+14, c+15)); | |
| 4984 } | |
| 4985 | |
| 4986 /* vec_vsldoi */ | |
| 4987 | |
| 4988 static vector signed char __ATTRS_o_ai | |
| 4989 vec_vsldoi(vector signed char a, vector signed char b, unsigned char c) | |
| 4990 { | |
| 4991 return vec_perm(a, b, (vector unsigned char) | |
| 4992 (c, c+1, c+2, c+3, c+4, c+5, c+6, c+7, | |
| 4993 c+8, c+9, c+10, c+11, c+12, c+13, c+14, c+15)); | |
| 4994 } | |
| 4995 | |
| 4996 static vector unsigned char __ATTRS_o_ai | |
| 4997 vec_vsldoi(vector unsigned char a, vector unsigned char b, unsigned char c) | |
| 4998 { | |
| 4999 return vec_perm(a, b, (vector unsigned char) | |
| 5000 (c, c+1, c+2, c+3, c+4, c+5, c+6, c+7, | |
| 5001 c+8, c+9, c+10, c+11, c+12, c+13, c+14, c+15)); | |
| 5002 } | |
| 5003 | |
| 5004 static vector short __ATTRS_o_ai | |
| 5005 vec_vsldoi(vector short a, vector short b, unsigned char c) | |
| 5006 { | |
| 5007 return vec_perm(a, b, (vector unsigned char) | |
| 5008 (c, c+1, c+2, c+3, c+4, c+5, c+6, c+7, | |
| 5009 c+8, c+9, c+10, c+11, c+12, c+13, c+14, c+15)); | |
| 5010 } | |
| 5011 | |
| 5012 static vector unsigned short __ATTRS_o_ai | |
| 5013 vec_vsldoi(vector unsigned short a, vector unsigned short b, unsigned char c) | |
| 5014 { | |
| 5015 return vec_perm(a, b, (vector unsigned char) | |
| 5016 (c, c+1, c+2, c+3, c+4, c+5, c+6, c+7, | |
| 5017 c+8, c+9, c+10, c+11, c+12, c+13, c+14, c+15)); | |
| 5018 } | |
| 5019 | |
| 5020 static vector pixel __ATTRS_o_ai | |
| 5021 vec_vsldoi(vector pixel a, vector pixel b, unsigned char c) | |
| 5022 { | |
| 5023 return vec_perm(a, b, (vector unsigned char) | |
| 5024 (c, c+1, c+2, c+3, c+4, c+5, c+6, c+7, | |
| 5025 c+8, c+9, c+10, c+11, c+12, c+13, c+14, c+15)); | |
| 5026 } | |
| 5027 | |
| 5028 static vector int __ATTRS_o_ai | |
| 5029 vec_vsldoi(vector int a, vector int b, unsigned char c) | |
| 5030 { | |
| 5031 return vec_perm(a, b, (vector unsigned char) | |
| 5032 (c, c+1, c+2, c+3, c+4, c+5, c+6, c+7, | |
| 5033 c+8, c+9, c+10, c+11, c+12, c+13, c+14, c+15)); | |
| 5034 } | |
| 5035 | |
| 5036 static vector unsigned int __ATTRS_o_ai | |
| 5037 vec_vsldoi(vector unsigned int a, vector unsigned int b, unsigned char c) | |
| 5038 { | |
| 5039 return vec_perm(a, b, (vector unsigned char) | |
| 5040 (c, c+1, c+2, c+3, c+4, c+5, c+6, c+7, | |
| 5041 c+8, c+9, c+10, c+11, c+12, c+13, c+14, c+15)); | |
| 5042 } | |
| 5043 | |
| 5044 static vector float __ATTRS_o_ai | |
| 5045 vec_vsldoi(vector float a, vector float b, unsigned char c) | |
| 5046 { | |
| 5047 return vec_perm(a, b, (vector unsigned char) | |
| 5048 (c, c+1, c+2, c+3, c+4, c+5, c+6, c+7, | |
| 5049 c+8, c+9, c+10, c+11, c+12, c+13, c+14, c+15)); | |
| 5050 } | |
| 5051 | |
| 5052 /* vec_sll */ | |
| 5053 | |
| 5054 static vector signed char __ATTRS_o_ai | |
| 5055 vec_sll(vector signed char a, vector unsigned char b) | |
| 5056 { | |
| 5057 return (vector signed char) | |
| 5058 __builtin_altivec_vsl((vector int)a, (vector int)b); | |
| 5059 } | |
| 5060 | |
| 5061 static vector signed char __ATTRS_o_ai | |
| 5062 vec_sll(vector signed char a, vector unsigned short b) | |
| 5063 { | |
| 5064 return (vector signed char) | |
| 5065 __builtin_altivec_vsl((vector int)a, (vector int)b); | |
| 5066 } | |
| 5067 | |
| 5068 static vector signed char __ATTRS_o_ai | |
| 5069 vec_sll(vector signed char a, vector unsigned int b) | |
| 5070 { | |
| 5071 return (vector signed char) | |
| 5072 __builtin_altivec_vsl((vector int)a, (vector int)b); | |
| 5073 } | |
| 5074 | |
| 5075 static vector unsigned char __ATTRS_o_ai | |
| 5076 vec_sll(vector unsigned char a, vector unsigned char b) | |
| 5077 { | |
| 5078 return (vector unsigned char) | |
| 5079 __builtin_altivec_vsl((vector int)a, (vector int)b); | |
| 5080 } | |
| 5081 | |
| 5082 static vector unsigned char __ATTRS_o_ai | |
| 5083 vec_sll(vector unsigned char a, vector unsigned short b) | |
| 5084 { | |
| 5085 return (vector unsigned char) | |
| 5086 __builtin_altivec_vsl((vector int)a, (vector int)b); | |
| 5087 } | |
| 5088 | |
| 5089 static vector unsigned char __ATTRS_o_ai | |
| 5090 vec_sll(vector unsigned char a, vector unsigned int b) | |
| 5091 { | |
| 5092 return (vector unsigned char) | |
| 5093 __builtin_altivec_vsl((vector int)a, (vector int)b); | |
| 5094 } | |
| 5095 | |
| 5096 static vector bool char __ATTRS_o_ai | |
| 5097 vec_sll(vector bool char a, vector unsigned char b) | |
| 5098 { | |
| 5099 return (vector bool char)__builtin_altivec_vsl((vector int)a, (vector int)b); | |
| 5100 } | |
| 5101 | |
| 5102 static vector bool char __ATTRS_o_ai | |
| 5103 vec_sll(vector bool char a, vector unsigned short b) | |
| 5104 { | |
| 5105 return (vector bool char)__builtin_altivec_vsl((vector int)a, (vector int)b); | |
| 5106 } | |
| 5107 | |
| 5108 static vector bool char __ATTRS_o_ai | |
| 5109 vec_sll(vector bool char a, vector unsigned int b) | |
| 5110 { | |
| 5111 return (vector bool char)__builtin_altivec_vsl((vector int)a, (vector int)b); | |
| 5112 } | |
| 5113 | |
| 5114 static vector short __ATTRS_o_ai | |
| 5115 vec_sll(vector short a, vector unsigned char b) | |
| 5116 { | |
| 5117 return (vector short)__builtin_altivec_vsl((vector int)a, (vector int)b); | |
| 5118 } | |
| 5119 | |
| 5120 static vector short __ATTRS_o_ai | |
| 5121 vec_sll(vector short a, vector unsigned short b) | |
| 5122 { | |
| 5123 return (vector short)__builtin_altivec_vsl((vector int)a, (vector int)b); | |
| 5124 } | |
| 5125 | |
| 5126 static vector short __ATTRS_o_ai | |
| 5127 vec_sll(vector short a, vector unsigned int b) | |
| 5128 { | |
| 5129 return (vector short)__builtin_altivec_vsl((vector int)a, (vector int)b); | |
| 5130 } | |
| 5131 | |
| 5132 static vector unsigned short __ATTRS_o_ai | |
| 5133 vec_sll(vector unsigned short a, vector unsigned char b) | |
| 5134 { | |
| 5135 return (vector unsigned short) | |
| 5136 __builtin_altivec_vsl((vector int)a, (vector int)b); | |
| 5137 } | |
| 5138 | |
| 5139 static vector unsigned short __ATTRS_o_ai | |
| 5140 vec_sll(vector unsigned short a, vector unsigned short b) | |
| 5141 { | |
| 5142 return (vector unsigned short) | |
| 5143 __builtin_altivec_vsl((vector int)a, (vector int)b); | |
| 5144 } | |
| 5145 | |
| 5146 static vector unsigned short __ATTRS_o_ai | |
| 5147 vec_sll(vector unsigned short a, vector unsigned int b) | |
| 5148 { | |
| 5149 return (vector unsigned short) | |
| 5150 __builtin_altivec_vsl((vector int)a, (vector int)b); | |
| 5151 } | |
| 5152 | |
| 5153 static vector bool short __ATTRS_o_ai | |
| 5154 vec_sll(vector bool short a, vector unsigned char b) | |
| 5155 { | |
| 5156 return (vector bool short)__builtin_altivec_vsl((vector int)a, (vector int)b); | |
| 5157 } | |
| 5158 | |
| 5159 static vector bool short __ATTRS_o_ai | |
| 5160 vec_sll(vector bool short a, vector unsigned short b) | |
| 5161 { | |
| 5162 return (vector bool short)__builtin_altivec_vsl((vector int)a, (vector int)b); | |
| 5163 } | |
| 5164 | |
| 5165 static vector bool short __ATTRS_o_ai | |
| 5166 vec_sll(vector bool short a, vector unsigned int b) | |
| 5167 { | |
| 5168 return (vector bool short)__builtin_altivec_vsl((vector int)a, (vector int)b); | |
| 5169 } | |
| 5170 | |
| 5171 static vector pixel __ATTRS_o_ai | |
| 5172 vec_sll(vector pixel a, vector unsigned char b) | |
| 5173 { | |
| 5174 return (vector pixel)__builtin_altivec_vsl((vector int)a, (vector int)b); | |
| 5175 } | |
| 5176 | |
| 5177 static vector pixel __ATTRS_o_ai | |
| 5178 vec_sll(vector pixel a, vector unsigned short b) | |
| 5179 { | |
| 5180 return (vector pixel)__builtin_altivec_vsl((vector int)a, (vector int)b); | |
| 5181 } | |
| 5182 | |
| 5183 static vector pixel __ATTRS_o_ai | |
| 5184 vec_sll(vector pixel a, vector unsigned int b) | |
| 5185 { | |
| 5186 return (vector pixel)__builtin_altivec_vsl((vector int)a, (vector int)b); | |
| 5187 } | |
| 5188 | |
| 5189 static vector int __ATTRS_o_ai | |
| 5190 vec_sll(vector int a, vector unsigned char b) | |
| 5191 { | |
| 5192 return (vector int)__builtin_altivec_vsl(a, (vector int)b); | |
| 5193 } | |
| 5194 | |
| 5195 static vector int __ATTRS_o_ai | |
| 5196 vec_sll(vector int a, vector unsigned short b) | |
| 5197 { | |
| 5198 return (vector int)__builtin_altivec_vsl(a, (vector int)b); | |
| 5199 } | |
| 5200 | |
| 5201 static vector int __ATTRS_o_ai | |
| 5202 vec_sll(vector int a, vector unsigned int b) | |
| 5203 { | |
| 5204 return (vector int)__builtin_altivec_vsl(a, (vector int)b); | |
| 5205 } | |
| 5206 | |
| 5207 static vector unsigned int __ATTRS_o_ai | |
| 5208 vec_sll(vector unsigned int a, vector unsigned char b) | |
| 5209 { | |
| 5210 return (vector unsigned int) | |
| 5211 __builtin_altivec_vsl((vector int)a, (vector int)b); | |
| 5212 } | |
| 5213 | |
| 5214 static vector unsigned int __ATTRS_o_ai | |
| 5215 vec_sll(vector unsigned int a, vector unsigned short b) | |
| 5216 { | |
| 5217 return (vector unsigned int) | |
| 5218 __builtin_altivec_vsl((vector int)a, (vector int)b); | |
| 5219 } | |
| 5220 | |
| 5221 static vector unsigned int __ATTRS_o_ai | |
| 5222 vec_sll(vector unsigned int a, vector unsigned int b) | |
| 5223 { | |
| 5224 return (vector unsigned int) | |
| 5225 __builtin_altivec_vsl((vector int)a, (vector int)b); | |
| 5226 } | |
| 5227 | |
| 5228 static vector bool int __ATTRS_o_ai | |
| 5229 vec_sll(vector bool int a, vector unsigned char b) | |
| 5230 { | |
| 5231 return (vector bool int)__builtin_altivec_vsl((vector int)a, (vector int)b); | |
| 5232 } | |
| 5233 | |
| 5234 static vector bool int __ATTRS_o_ai | |
| 5235 vec_sll(vector bool int a, vector unsigned short b) | |
| 5236 { | |
| 5237 return (vector bool int)__builtin_altivec_vsl((vector int)a, (vector int)b); | |
| 5238 } | |
| 5239 | |
| 5240 static vector bool int __ATTRS_o_ai | |
| 5241 vec_sll(vector bool int a, vector unsigned int b) | |
| 5242 { | |
| 5243 return (vector bool int)__builtin_altivec_vsl((vector int)a, (vector int)b); | |
| 5244 } | |
| 5245 | |
| 5246 /* vec_vsl */ | |
| 5247 | |
| 5248 static vector signed char __ATTRS_o_ai | |
| 5249 vec_vsl(vector signed char a, vector unsigned char b) | |
| 5250 { | |
| 5251 return (vector signed char) | |
| 5252 __builtin_altivec_vsl((vector int)a, (vector int)b); | |
| 5253 } | |
| 5254 | |
| 5255 static vector signed char __ATTRS_o_ai | |
| 5256 vec_vsl(vector signed char a, vector unsigned short b) | |
| 5257 { | |
| 5258 return (vector signed char) | |
| 5259 __builtin_altivec_vsl((vector int)a, (vector int)b); | |
| 5260 } | |
| 5261 | |
| 5262 static vector signed char __ATTRS_o_ai | |
| 5263 vec_vsl(vector signed char a, vector unsigned int b) | |
| 5264 { | |
| 5265 return (vector signed char) | |
| 5266 __builtin_altivec_vsl((vector int)a, (vector int)b); | |
| 5267 } | |
| 5268 | |
| 5269 static vector unsigned char __ATTRS_o_ai | |
| 5270 vec_vsl(vector unsigned char a, vector unsigned char b) | |
| 5271 { | |
| 5272 return (vector unsigned char) | |
| 5273 __builtin_altivec_vsl((vector int)a, (vector int)b); | |
| 5274 } | |
| 5275 | |
| 5276 static vector unsigned char __ATTRS_o_ai | |
| 5277 vec_vsl(vector unsigned char a, vector unsigned short b) | |
| 5278 { | |
| 5279 return (vector unsigned char) | |
| 5280 __builtin_altivec_vsl((vector int)a, (vector int)b); | |
| 5281 } | |
| 5282 | |
| 5283 static vector unsigned char __ATTRS_o_ai | |
| 5284 vec_vsl(vector unsigned char a, vector unsigned int b) | |
| 5285 { | |
| 5286 return (vector unsigned char) | |
| 5287 __builtin_altivec_vsl((vector int)a, (vector int)b); | |
| 5288 } | |
| 5289 | |
| 5290 static vector bool char __ATTRS_o_ai | |
| 5291 vec_vsl(vector bool char a, vector unsigned char b) | |
| 5292 { | |
| 5293 return (vector bool char)__builtin_altivec_vsl((vector int)a, (vector int)b); | |
| 5294 } | |
| 5295 | |
| 5296 static vector bool char __ATTRS_o_ai | |
| 5297 vec_vsl(vector bool char a, vector unsigned short b) | |
| 5298 { | |
| 5299 return (vector bool char)__builtin_altivec_vsl((vector int)a, (vector int)b); | |
| 5300 } | |
| 5301 | |
| 5302 static vector bool char __ATTRS_o_ai | |
| 5303 vec_vsl(vector bool char a, vector unsigned int b) | |
| 5304 { | |
| 5305 return (vector bool char)__builtin_altivec_vsl((vector int)a, (vector int)b); | |
| 5306 } | |
| 5307 | |
| 5308 static vector short __ATTRS_o_ai | |
| 5309 vec_vsl(vector short a, vector unsigned char b) | |
| 5310 { | |
| 5311 return (vector short)__builtin_altivec_vsl((vector int)a, (vector int)b); | |
| 5312 } | |
| 5313 | |
| 5314 static vector short __ATTRS_o_ai | |
| 5315 vec_vsl(vector short a, vector unsigned short b) | |
| 5316 { | |
| 5317 return (vector short)__builtin_altivec_vsl((vector int)a, (vector int)b); | |
| 5318 } | |
| 5319 | |
| 5320 static vector short __ATTRS_o_ai | |
| 5321 vec_vsl(vector short a, vector unsigned int b) | |
| 5322 { | |
| 5323 return (vector short)__builtin_altivec_vsl((vector int)a, (vector int)b); | |
| 5324 } | |
| 5325 | |
| 5326 static vector unsigned short __ATTRS_o_ai | |
| 5327 vec_vsl(vector unsigned short a, vector unsigned char b) | |
| 5328 { | |
| 5329 return (vector unsigned short) | |
| 5330 __builtin_altivec_vsl((vector int)a, (vector int)b); | |
| 5331 } | |
| 5332 | |
| 5333 static vector unsigned short __ATTRS_o_ai | |
| 5334 vec_vsl(vector unsigned short a, vector unsigned short b) | |
| 5335 { | |
| 5336 return (vector unsigned short) | |
| 5337 __builtin_altivec_vsl((vector int)a, (vector int)b); | |
| 5338 } | |
| 5339 | |
| 5340 static vector unsigned short __ATTRS_o_ai | |
| 5341 vec_vsl(vector unsigned short a, vector unsigned int b) | |
| 5342 { | |
| 5343 return (vector unsigned short) | |
| 5344 __builtin_altivec_vsl((vector int)a, (vector int)b); | |
| 5345 } | |
| 5346 | |
| 5347 static vector bool short __ATTRS_o_ai | |
| 5348 vec_vsl(vector bool short a, vector unsigned char b) | |
| 5349 { | |
| 5350 return (vector bool short)__builtin_altivec_vsl((vector int)a, (vector int)b); | |
| 5351 } | |
| 5352 | |
| 5353 static vector bool short __ATTRS_o_ai | |
| 5354 vec_vsl(vector bool short a, vector unsigned short b) | |
| 5355 { | |
| 5356 return (vector bool short)__builtin_altivec_vsl((vector int)a, (vector int)b); | |
| 5357 } | |
| 5358 | |
| 5359 static vector bool short __ATTRS_o_ai | |
| 5360 vec_vsl(vector bool short a, vector unsigned int b) | |
| 5361 { | |
| 5362 return (vector bool short)__builtin_altivec_vsl((vector int)a, (vector int)b); | |
| 5363 } | |
| 5364 | |
| 5365 static vector pixel __ATTRS_o_ai | |
| 5366 vec_vsl(vector pixel a, vector unsigned char b) | |
| 5367 { | |
| 5368 return (vector pixel)__builtin_altivec_vsl((vector int)a, (vector int)b); | |
| 5369 } | |
| 5370 | |
| 5371 static vector pixel __ATTRS_o_ai | |
| 5372 vec_vsl(vector pixel a, vector unsigned short b) | |
| 5373 { | |
| 5374 return (vector pixel)__builtin_altivec_vsl((vector int)a, (vector int)b); | |
| 5375 } | |
| 5376 | |
| 5377 static vector pixel __ATTRS_o_ai | |
| 5378 vec_vsl(vector pixel a, vector unsigned int b) | |
| 5379 { | |
| 5380 return (vector pixel)__builtin_altivec_vsl((vector int)a, (vector int)b); | |
| 5381 } | |
| 5382 | |
| 5383 static vector int __ATTRS_o_ai | |
| 5384 vec_vsl(vector int a, vector unsigned char b) | |
| 5385 { | |
| 5386 return (vector int)__builtin_altivec_vsl(a, (vector int)b); | |
| 5387 } | |
| 5388 | |
| 5389 static vector int __ATTRS_o_ai | |
| 5390 vec_vsl(vector int a, vector unsigned short b) | |
| 5391 { | |
| 5392 return (vector int)__builtin_altivec_vsl(a, (vector int)b); | |
| 5393 } | |
| 5394 | |
| 5395 static vector int __ATTRS_o_ai | |
| 5396 vec_vsl(vector int a, vector unsigned int b) | |
| 5397 { | |
| 5398 return (vector int)__builtin_altivec_vsl(a, (vector int)b); | |
| 5399 } | |
| 5400 | |
| 5401 static vector unsigned int __ATTRS_o_ai | |
| 5402 vec_vsl(vector unsigned int a, vector unsigned char b) | |
| 5403 { | |
| 5404 return (vector unsigned int) | |
| 5405 __builtin_altivec_vsl((vector int)a, (vector int)b); | |
| 5406 } | |
| 5407 | |
| 5408 static vector unsigned int __ATTRS_o_ai | |
| 5409 vec_vsl(vector unsigned int a, vector unsigned short b) | |
| 5410 { | |
| 5411 return (vector unsigned int) | |
| 5412 __builtin_altivec_vsl((vector int)a, (vector int)b); | |
| 5413 } | |
| 5414 | |
| 5415 static vector unsigned int __ATTRS_o_ai | |
| 5416 vec_vsl(vector unsigned int a, vector unsigned int b) | |
| 5417 { | |
| 5418 return (vector unsigned int) | |
| 5419 __builtin_altivec_vsl((vector int)a, (vector int)b); | |
| 5420 } | |
| 5421 | |
| 5422 static vector bool int __ATTRS_o_ai | |
| 5423 vec_vsl(vector bool int a, vector unsigned char b) | |
| 5424 { | |
| 5425 return (vector bool int)__builtin_altivec_vsl((vector int)a, (vector int)b); | |
| 5426 } | |
| 5427 | |
| 5428 static vector bool int __ATTRS_o_ai | |
| 5429 vec_vsl(vector bool int a, vector unsigned short b) | |
| 5430 { | |
| 5431 return (vector bool int)__builtin_altivec_vsl((vector int)a, (vector int)b); | |
| 5432 } | |
| 5433 | |
| 5434 static vector bool int __ATTRS_o_ai | |
| 5435 vec_vsl(vector bool int a, vector unsigned int b) | |
| 5436 { | |
| 5437 return (vector bool int)__builtin_altivec_vsl((vector int)a, (vector int)b); | |
| 5438 } | |
| 5439 | |
| 5440 /* vec_slo */ | |
| 5441 | |
| 5442 static vector signed char __ATTRS_o_ai | |
| 5443 vec_slo(vector signed char a, vector signed char b) | |
| 5444 { | |
| 5445 return (vector signed char) | |
| 5446 __builtin_altivec_vslo((vector int)a, (vector int)b); | |
| 5447 } | |
| 5448 | |
| 5449 static vector signed char __ATTRS_o_ai | |
| 5450 vec_slo(vector signed char a, vector unsigned char b) | |
| 5451 { | |
| 5452 return (vector signed char) | |
| 5453 __builtin_altivec_vslo((vector int)a, (vector int)b); | |
| 5454 } | |
| 5455 | |
| 5456 static vector unsigned char __ATTRS_o_ai | |
| 5457 vec_slo(vector unsigned char a, vector signed char b) | |
| 5458 { | |
| 5459 return (vector unsigned char) | |
| 5460 __builtin_altivec_vslo((vector int)a, (vector int)b); | |
| 5461 } | |
| 5462 | |
| 5463 static vector unsigned char __ATTRS_o_ai | |
| 5464 vec_slo(vector unsigned char a, vector unsigned char b) | |
| 5465 { | |
| 5466 return (vector unsigned char) | |
| 5467 __builtin_altivec_vslo((vector int)a, (vector int)b); | |
| 5468 } | |
| 5469 | |
| 5470 static vector short __ATTRS_o_ai | |
| 5471 vec_slo(vector short a, vector signed char b) | |
| 5472 { | |
| 5473 return (vector short)__builtin_altivec_vslo((vector int)a, (vector int)b); | |
| 5474 } | |
| 5475 | |
| 5476 static vector short __ATTRS_o_ai | |
| 5477 vec_slo(vector short a, vector unsigned char b) | |
| 5478 { | |
| 5479 return (vector short)__builtin_altivec_vslo((vector int)a, (vector int)b); | |
| 5480 } | |
| 5481 | |
| 5482 static vector unsigned short __ATTRS_o_ai | |
| 5483 vec_slo(vector unsigned short a, vector signed char b) | |
| 5484 { | |
| 5485 return (vector unsigned short) | |
| 5486 __builtin_altivec_vslo((vector int)a, (vector int)b); | |
| 5487 } | |
| 5488 | |
| 5489 static vector unsigned short __ATTRS_o_ai | |
| 5490 vec_slo(vector unsigned short a, vector unsigned char b) | |
| 5491 { | |
| 5492 return (vector unsigned short) | |
| 5493 __builtin_altivec_vslo((vector int)a, (vector int)b); | |
| 5494 } | |
| 5495 | |
| 5496 static vector pixel __ATTRS_o_ai | |
| 5497 vec_slo(vector pixel a, vector signed char b) | |
| 5498 { | |
| 5499 return (vector pixel)__builtin_altivec_vslo((vector int)a, (vector int)b); | |
| 5500 } | |
| 5501 | |
| 5502 static vector pixel __ATTRS_o_ai | |
| 5503 vec_slo(vector pixel a, vector unsigned char b) | |
| 5504 { | |
| 5505 return (vector pixel)__builtin_altivec_vslo((vector int)a, (vector int)b); | |
| 5506 } | |
| 5507 | |
| 5508 static vector int __ATTRS_o_ai | |
| 5509 vec_slo(vector int a, vector signed char b) | |
| 5510 { | |
| 5511 return (vector int)__builtin_altivec_vslo(a, (vector int)b); | |
| 5512 } | |
| 5513 | |
| 5514 static vector int __ATTRS_o_ai | |
| 5515 vec_slo(vector int a, vector unsigned char b) | |
| 5516 { | |
| 5517 return (vector int)__builtin_altivec_vslo(a, (vector int)b); | |
| 5518 } | |
| 5519 | |
| 5520 static vector unsigned int __ATTRS_o_ai | |
| 5521 vec_slo(vector unsigned int a, vector signed char b) | |
| 5522 { | |
| 5523 return (vector unsigned int) | |
| 5524 __builtin_altivec_vslo((vector int)a, (vector int)b); | |
| 5525 } | |
| 5526 | |
| 5527 static vector unsigned int __ATTRS_o_ai | |
| 5528 vec_slo(vector unsigned int a, vector unsigned char b) | |
| 5529 { | |
| 5530 return (vector unsigned int) | |
| 5531 __builtin_altivec_vslo((vector int)a, (vector int)b); | |
| 5532 } | |
| 5533 | |
| 5534 static vector float __ATTRS_o_ai | |
| 5535 vec_slo(vector float a, vector signed char b) | |
| 5536 { | |
| 5537 return (vector float)__builtin_altivec_vslo((vector int)a, (vector int)b); | |
| 5538 } | |
| 5539 | |
| 5540 static vector float __ATTRS_o_ai | |
| 5541 vec_slo(vector float a, vector unsigned char b) | |
| 5542 { | |
| 5543 return (vector float)__builtin_altivec_vslo((vector int)a, (vector int)b); | |
| 5544 } | |
| 5545 | |
| 5546 /* vec_vslo */ | |
| 5547 | |
| 5548 static vector signed char __ATTRS_o_ai | |
| 5549 vec_vslo(vector signed char a, vector signed char b) | |
| 5550 { | |
| 5551 return (vector signed char) | |
| 5552 __builtin_altivec_vslo((vector int)a, (vector int)b); | |
| 5553 } | |
| 5554 | |
| 5555 static vector signed char __ATTRS_o_ai | |
| 5556 vec_vslo(vector signed char a, vector unsigned char b) | |
| 5557 { | |
| 5558 return (vector signed char) | |
| 5559 __builtin_altivec_vslo((vector int)a, (vector int)b); | |
| 5560 } | |
| 5561 | |
| 5562 static vector unsigned char __ATTRS_o_ai | |
| 5563 vec_vslo(vector unsigned char a, vector signed char b) | |
| 5564 { | |
| 5565 return (vector unsigned char) | |
| 5566 __builtin_altivec_vslo((vector int)a, (vector int)b); | |
| 5567 } | |
| 5568 | |
| 5569 static vector unsigned char __ATTRS_o_ai | |
| 5570 vec_vslo(vector unsigned char a, vector unsigned char b) | |
| 5571 { | |
| 5572 return (vector unsigned char) | |
| 5573 __builtin_altivec_vslo((vector int)a, (vector int)b); | |
| 5574 } | |
| 5575 | |
| 5576 static vector short __ATTRS_o_ai | |
| 5577 vec_vslo(vector short a, vector signed char b) | |
| 5578 { | |
| 5579 return (vector short)__builtin_altivec_vslo((vector int)a, (vector int)b); | |
| 5580 } | |
| 5581 | |
| 5582 static vector short __ATTRS_o_ai | |
| 5583 vec_vslo(vector short a, vector unsigned char b) | |
| 5584 { | |
| 5585 return (vector short)__builtin_altivec_vslo((vector int)a, (vector int)b); | |
| 5586 } | |
| 5587 | |
| 5588 static vector unsigned short __ATTRS_o_ai | |
| 5589 vec_vslo(vector unsigned short a, vector signed char b) | |
| 5590 { | |
| 5591 return (vector unsigned short) | |
| 5592 __builtin_altivec_vslo((vector int)a, (vector int)b); | |
| 5593 } | |
| 5594 | |
| 5595 static vector unsigned short __ATTRS_o_ai | |
| 5596 vec_vslo(vector unsigned short a, vector unsigned char b) | |
| 5597 { | |
| 5598 return (vector unsigned short) | |
| 5599 __builtin_altivec_vslo((vector int)a, (vector int)b); | |
| 5600 } | |
| 5601 | |
| 5602 static vector pixel __ATTRS_o_ai | |
| 5603 vec_vslo(vector pixel a, vector signed char b) | |
| 5604 { | |
| 5605 return (vector pixel)__builtin_altivec_vslo((vector int)a, (vector int)b); | |
| 5606 } | |
| 5607 | |
| 5608 static vector pixel __ATTRS_o_ai | |
| 5609 vec_vslo(vector pixel a, vector unsigned char b) | |
| 5610 { | |
| 5611 return (vector pixel)__builtin_altivec_vslo((vector int)a, (vector int)b); | |
| 5612 } | |
| 5613 | |
| 5614 static vector int __ATTRS_o_ai | |
| 5615 vec_vslo(vector int a, vector signed char b) | |
| 5616 { | |
| 5617 return (vector int)__builtin_altivec_vslo(a, (vector int)b); | |
| 5618 } | |
| 5619 | |
| 5620 static vector int __ATTRS_o_ai | |
| 5621 vec_vslo(vector int a, vector unsigned char b) | |
| 5622 { | |
| 5623 return (vector int)__builtin_altivec_vslo(a, (vector int)b); | |
| 5624 } | |
| 5625 | |
| 5626 static vector unsigned int __ATTRS_o_ai | |
| 5627 vec_vslo(vector unsigned int a, vector signed char b) | |
| 5628 { | |
| 5629 return (vector unsigned int) | |
| 5630 __builtin_altivec_vslo((vector int)a, (vector int)b); | |
| 5631 } | |
| 5632 | |
| 5633 static vector unsigned int __ATTRS_o_ai | |
| 5634 vec_vslo(vector unsigned int a, vector unsigned char b) | |
| 5635 { | |
| 5636 return (vector unsigned int) | |
| 5637 __builtin_altivec_vslo((vector int)a, (vector int)b); | |
| 5638 } | |
| 5639 | |
| 5640 static vector float __ATTRS_o_ai | |
| 5641 vec_vslo(vector float a, vector signed char b) | |
| 5642 { | |
| 5643 return (vector float)__builtin_altivec_vslo((vector int)a, (vector int)b); | |
| 5644 } | |
| 5645 | |
| 5646 static vector float __ATTRS_o_ai | |
| 5647 vec_vslo(vector float a, vector unsigned char b) | |
| 5648 { | |
| 5649 return (vector float)__builtin_altivec_vslo((vector int)a, (vector int)b); | |
| 5650 } | |
| 5651 | |
| 5652 /* vec_splat */ | |
| 5653 | |
| 5654 static vector signed char __ATTRS_o_ai | |
| 5655 vec_splat(vector signed char a, unsigned char b) | |
| 5656 { | |
| 5657 return vec_perm(a, a, (vector unsigned char)(b)); | |
| 5658 } | |
| 5659 | |
| 5660 static vector unsigned char __ATTRS_o_ai | |
| 5661 vec_splat(vector unsigned char a, unsigned char b) | |
| 5662 { | |
| 5663 return vec_perm(a, a, (vector unsigned char)(b)); | |
| 5664 } | |
| 5665 | |
| 5666 static vector bool char __ATTRS_o_ai | |
| 5667 vec_splat(vector bool char a, unsigned char b) | |
| 5668 { | |
| 5669 return vec_perm(a, a, (vector unsigned char)(b)); | |
| 5670 } | |
| 5671 | |
| 5672 static vector short __ATTRS_o_ai | |
| 5673 vec_splat(vector short a, unsigned char b) | |
| 5674 { | |
| 5675 b *= 2; | |
| 5676 unsigned char b1=b+1; | |
| 5677 return vec_perm(a, a, (vector unsigned char) | |
| 5678 (b, b1, b, b1, b, b1, b, b1, b, b1, b, b1, b, b1, b, b1)); | |
| 5679 } | |
| 5680 | |
| 5681 static vector unsigned short __ATTRS_o_ai | |
| 5682 vec_splat(vector unsigned short a, unsigned char b) | |
| 5683 { | |
| 5684 b *= 2; | |
| 5685 unsigned char b1=b+1; | |
| 5686 return vec_perm(a, a, (vector unsigned char) | |
| 5687 (b, b1, b, b1, b, b1, b, b1, b, b1, b, b1, b, b1, b, b1)); | |
| 5688 } | |
| 5689 | |
| 5690 static vector bool short __ATTRS_o_ai | |
| 5691 vec_splat(vector bool short a, unsigned char b) | |
| 5692 { | |
| 5693 b *= 2; | |
| 5694 unsigned char b1=b+1; | |
| 5695 return vec_perm(a, a, (vector unsigned char) | |
| 5696 (b, b1, b, b1, b, b1, b, b1, b, b1, b, b1, b, b1, b, b1)); | |
| 5697 } | |
| 5698 | |
| 5699 static vector pixel __ATTRS_o_ai | |
| 5700 vec_splat(vector pixel a, unsigned char b) | |
| 5701 { | |
| 5702 b *= 2; | |
| 5703 unsigned char b1=b+1; | |
| 5704 return vec_perm(a, a, (vector unsigned char) | |
| 5705 (b, b1, b, b1, b, b1, b, b1, b, b1, b, b1, b, b1, b, b1)); | |
| 5706 } | |
| 5707 | |
| 5708 static vector int __ATTRS_o_ai | |
| 5709 vec_splat(vector int a, unsigned char b) | |
| 5710 { | |
| 5711 b *= 4; | |
| 5712 unsigned char b1=b+1, b2=b+2, b3=b+3; | |
| 5713 return vec_perm(a, a, (vector unsigned char) | |
| 5714 (b, b1, b2, b3, b, b1, b2, b3, b, b1, b2, b3, b, b1, b2, b3)); | |
| 5715 } | |
| 5716 | |
| 5717 static vector unsigned int __ATTRS_o_ai | |
| 5718 vec_splat(vector unsigned int a, unsigned char b) | |
| 5719 { | |
| 5720 b *= 4; | |
| 5721 unsigned char b1=b+1, b2=b+2, b3=b+3; | |
| 5722 return vec_perm(a, a, (vector unsigned char) | |
| 5723 (b, b1, b2, b3, b, b1, b2, b3, b, b1, b2, b3, b, b1, b2, b3)); | |
| 5724 } | |
| 5725 | |
| 5726 static vector bool int __ATTRS_o_ai | |
| 5727 vec_splat(vector bool int a, unsigned char b) | |
| 5728 { | |
| 5729 b *= 4; | |
| 5730 unsigned char b1=b+1, b2=b+2, b3=b+3; | |
| 5731 return vec_perm(a, a, (vector unsigned char) | |
| 5732 (b, b1, b2, b3, b, b1, b2, b3, b, b1, b2, b3, b, b1, b2, b3)); | |
| 5733 } | |
| 5734 | |
| 5735 static vector float __ATTRS_o_ai | |
| 5736 vec_splat(vector float a, unsigned char b) | |
| 5737 { | |
| 5738 b *= 4; | |
| 5739 unsigned char b1=b+1, b2=b+2, b3=b+3; | |
| 5740 return vec_perm(a, a, (vector unsigned char) | |
| 5741 (b, b1, b2, b3, b, b1, b2, b3, b, b1, b2, b3, b, b1, b2, b3)); | |
| 5742 } | |
| 5743 | |
| 5744 /* vec_vspltb */ | |
| 5745 | |
| 5746 #define __builtin_altivec_vspltb vec_vspltb | |
| 5747 | |
| 5748 static vector signed char __ATTRS_o_ai | |
| 5749 vec_vspltb(vector signed char a, unsigned char b) | |
| 5750 { | |
| 5751 return vec_perm(a, a, (vector unsigned char)(b)); | |
| 5752 } | |
| 5753 | |
| 5754 static vector unsigned char __ATTRS_o_ai | |
| 5755 vec_vspltb(vector unsigned char a, unsigned char b) | |
| 5756 { | |
| 5757 return vec_perm(a, a, (vector unsigned char)(b)); | |
| 5758 } | |
| 5759 | |
| 5760 static vector bool char __ATTRS_o_ai | |
| 5761 vec_vspltb(vector bool char a, unsigned char b) | |
| 5762 { | |
| 5763 return vec_perm(a, a, (vector unsigned char)(b)); | |
| 5764 } | |
| 5765 | |
| 5766 /* vec_vsplth */ | |
| 5767 | |
| 5768 #define __builtin_altivec_vsplth vec_vsplth | |
| 5769 | |
| 5770 static vector short __ATTRS_o_ai | |
| 5771 vec_vsplth(vector short a, unsigned char b) | |
| 5772 { | |
| 5773 b *= 2; | |
| 5774 unsigned char b1=b+1; | |
| 5775 return vec_perm(a, a, (vector unsigned char) | |
| 5776 (b, b1, b, b1, b, b1, b, b1, b, b1, b, b1, b, b1, b, b1)); | |
| 5777 } | |
| 5778 | |
| 5779 static vector unsigned short __ATTRS_o_ai | |
| 5780 vec_vsplth(vector unsigned short a, unsigned char b) | |
| 5781 { | |
| 5782 b *= 2; | |
| 5783 unsigned char b1=b+1; | |
| 5784 return vec_perm(a, a, (vector unsigned char) | |
| 5785 (b, b1, b, b1, b, b1, b, b1, b, b1, b, b1, b, b1, b, b1)); | |
| 5786 } | |
| 5787 | |
| 5788 static vector bool short __ATTRS_o_ai | |
| 5789 vec_vsplth(vector bool short a, unsigned char b) | |
| 5790 { | |
| 5791 b *= 2; | |
| 5792 unsigned char b1=b+1; | |
| 5793 return vec_perm(a, a, (vector unsigned char) | |
| 5794 (b, b1, b, b1, b, b1, b, b1, b, b1, b, b1, b, b1, b, b1)); | |
| 5795 } | |
| 5796 | |
| 5797 static vector pixel __ATTRS_o_ai | |
| 5798 vec_vsplth(vector pixel a, unsigned char b) | |
| 5799 { | |
| 5800 b *= 2; | |
| 5801 unsigned char b1=b+1; | |
| 5802 return vec_perm(a, a, (vector unsigned char) | |
| 5803 (b, b1, b, b1, b, b1, b, b1, b, b1, b, b1, b, b1, b, b1)); | |
| 5804 } | |
| 5805 | |
| 5806 /* vec_vspltw */ | |
| 5807 | |
| 5808 #define __builtin_altivec_vspltw vec_vspltw | |
| 5809 | |
| 5810 static vector int __ATTRS_o_ai | |
| 5811 vec_vspltw(vector int a, unsigned char b) | |
| 5812 { | |
| 5813 b *= 4; | |
| 5814 unsigned char b1=b+1, b2=b+2, b3=b+3; | |
| 5815 return vec_perm(a, a, (vector unsigned char) | |
| 5816 (b, b1, b2, b3, b, b1, b2, b3, b, b1, b2, b3, b, b1, b2, b3)); | |
| 5817 } | |
| 5818 | |
| 5819 static vector unsigned int __ATTRS_o_ai | |
| 5820 vec_vspltw(vector unsigned int a, unsigned char b) | |
| 5821 { | |
| 5822 b *= 4; | |
| 5823 unsigned char b1=b+1, b2=b+2, b3=b+3; | |
| 5824 return vec_perm(a, a, (vector unsigned char) | |
| 5825 (b, b1, b2, b3, b, b1, b2, b3, b, b1, b2, b3, b, b1, b2, b3)); | |
| 5826 } | |
| 5827 | |
| 5828 static vector bool int __ATTRS_o_ai | |
| 5829 vec_vspltw(vector bool int a, unsigned char b) | |
| 5830 { | |
| 5831 b *= 4; | |
| 5832 unsigned char b1=b+1, b2=b+2, b3=b+3; | |
| 5833 return vec_perm(a, a, (vector unsigned char) | |
| 5834 (b, b1, b2, b3, b, b1, b2, b3, b, b1, b2, b3, b, b1, b2, b3)); | |
| 5835 } | |
| 5836 | |
| 5837 static vector float __ATTRS_o_ai | |
| 5838 vec_vspltw(vector float a, unsigned char b) | |
| 5839 { | |
| 5840 b *= 4; | |
| 5841 unsigned char b1=b+1, b2=b+2, b3=b+3; | |
| 5842 return vec_perm(a, a, (vector unsigned char) | |
| 5843 (b, b1, b2, b3, b, b1, b2, b3, b, b1, b2, b3, b, b1, b2, b3)); | |
| 5844 } | |
| 5845 | |
| 5846 /* vec_splat_s8 */ | |
| 5847 | |
| 5848 #define __builtin_altivec_vspltisb vec_splat_s8 | |
| 5849 | |
| 5850 // FIXME: parameter should be treated as 5-bit signed literal | |
| 5851 static vector signed char __ATTRS_o_ai | |
| 5852 vec_splat_s8(signed char a) | |
| 5853 { | |
| 5854 return (vector signed char)(a); | |
| 5855 } | |
| 5856 | |
| 5857 /* vec_vspltisb */ | |
| 5858 | |
| 5859 // FIXME: parameter should be treated as 5-bit signed literal | |
| 5860 static vector signed char __ATTRS_o_ai | |
| 5861 vec_vspltisb(signed char a) | |
| 5862 { | |
| 5863 return (vector signed char)(a); | |
| 5864 } | |
| 5865 | |
| 5866 /* vec_splat_s16 */ | |
| 5867 | |
| 5868 #define __builtin_altivec_vspltish vec_splat_s16 | |
| 5869 | |
| 5870 // FIXME: parameter should be treated as 5-bit signed literal | |
| 5871 static vector short __ATTRS_o_ai | |
| 5872 vec_splat_s16(signed char a) | |
| 5873 { | |
| 5874 return (vector short)(a); | |
| 5875 } | |
| 5876 | |
| 5877 /* vec_vspltish */ | |
| 5878 | |
| 5879 // FIXME: parameter should be treated as 5-bit signed literal | |
| 5880 static vector short __ATTRS_o_ai | |
| 5881 vec_vspltish(signed char a) | |
| 5882 { | |
| 5883 return (vector short)(a); | |
| 5884 } | |
| 5885 | |
| 5886 /* vec_splat_s32 */ | |
| 5887 | |
| 5888 #define __builtin_altivec_vspltisw vec_splat_s32 | |
| 5889 | |
| 5890 // FIXME: parameter should be treated as 5-bit signed literal | |
| 5891 static vector int __ATTRS_o_ai | |
| 5892 vec_splat_s32(signed char a) | |
| 5893 { | |
| 5894 return (vector int)(a); | |
| 5895 } | |
| 5896 | |
| 5897 /* vec_vspltisw */ | |
| 5898 | |
| 5899 // FIXME: parameter should be treated as 5-bit signed literal | |
| 5900 static vector int __ATTRS_o_ai | |
| 5901 vec_vspltisw(signed char a) | |
| 5902 { | |
| 5903 return (vector int)(a); | |
| 5904 } | |
| 5905 | |
| 5906 /* vec_splat_u8 */ | |
| 5907 | |
| 5908 // FIXME: parameter should be treated as 5-bit signed literal | |
| 5909 static vector unsigned char __ATTRS_o_ai | |
| 5910 vec_splat_u8(unsigned char a) | |
| 5911 { | |
| 5912 return (vector unsigned char)(a); | |
| 5913 } | |
| 5914 | |
| 5915 /* vec_splat_u16 */ | |
| 5916 | |
| 5917 // FIXME: parameter should be treated as 5-bit signed literal | |
| 5918 static vector unsigned short __ATTRS_o_ai | |
| 5919 vec_splat_u16(signed char a) | |
| 5920 { | |
| 5921 return (vector unsigned short)(a); | |
| 5922 } | |
| 5923 | |
| 5924 /* vec_splat_u32 */ | |
| 5925 | |
| 5926 // FIXME: parameter should be treated as 5-bit signed literal | |
| 5927 static vector unsigned int __ATTRS_o_ai | |
| 5928 vec_splat_u32(signed char a) | |
| 5929 { | |
| 5930 return (vector unsigned int)(a); | |
| 5931 } | |
| 5932 | |
| 5933 /* vec_sr */ | |
| 5934 | |
| 5935 static vector signed char __ATTRS_o_ai | |
| 5936 vec_sr(vector signed char a, vector unsigned char b) | |
| 5937 { | |
| 5938 return a >> (vector signed char)b; | |
| 5939 } | |
| 5940 | |
| 5941 static vector unsigned char __ATTRS_o_ai | |
| 5942 vec_sr(vector unsigned char a, vector unsigned char b) | |
| 5943 { | |
| 5944 return a >> b; | |
| 5945 } | |
| 5946 | |
| 5947 static vector short __ATTRS_o_ai | |
| 5948 vec_sr(vector short a, vector unsigned short b) | |
| 5949 { | |
| 5950 return a >> (vector short)b; | |
| 5951 } | |
| 5952 | |
| 5953 static vector unsigned short __ATTRS_o_ai | |
| 5954 vec_sr(vector unsigned short a, vector unsigned short b) | |
| 5955 { | |
| 5956 return a >> b; | |
| 5957 } | |
| 5958 | |
| 5959 static vector int __ATTRS_o_ai | |
| 5960 vec_sr(vector int a, vector unsigned int b) | |
| 5961 { | |
| 5962 return a >> (vector int)b; | |
| 5963 } | |
| 5964 | |
| 5965 static vector unsigned int __ATTRS_o_ai | |
| 5966 vec_sr(vector unsigned int a, vector unsigned int b) | |
| 5967 { | |
| 5968 return a >> b; | |
| 5969 } | |
| 5970 | |
| 5971 /* vec_vsrb */ | |
| 5972 | |
| 5973 #define __builtin_altivec_vsrb vec_vsrb | |
| 5974 | |
| 5975 static vector signed char __ATTRS_o_ai | |
| 5976 vec_vsrb(vector signed char a, vector unsigned char b) | |
| 5977 { | |
| 5978 return a >> (vector signed char)b; | |
| 5979 } | |
| 5980 | |
| 5981 static vector unsigned char __ATTRS_o_ai | |
| 5982 vec_vsrb(vector unsigned char a, vector unsigned char b) | |
| 5983 { | |
| 5984 return a >> b; | |
| 5985 } | |
| 5986 | |
| 5987 /* vec_vsrh */ | |
| 5988 | |
| 5989 #define __builtin_altivec_vsrh vec_vsrh | |
| 5990 | |
| 5991 static vector short __ATTRS_o_ai | |
| 5992 vec_vsrh(vector short a, vector unsigned short b) | |
| 5993 { | |
| 5994 return a >> (vector short)b; | |
| 5995 } | |
| 5996 | |
| 5997 static vector unsigned short __ATTRS_o_ai | |
| 5998 vec_vsrh(vector unsigned short a, vector unsigned short b) | |
| 5999 { | |
| 6000 return a >> b; | |
| 6001 } | |
| 6002 | |
| 6003 /* vec_vsrw */ | |
| 6004 | |
| 6005 #define __builtin_altivec_vsrw vec_vsrw | |
| 6006 | |
| 6007 static vector int __ATTRS_o_ai | |
| 6008 vec_vsrw(vector int a, vector unsigned int b) | |
| 6009 { | |
| 6010 return a >> (vector int)b; | |
| 6011 } | |
| 6012 | |
| 6013 static vector unsigned int __ATTRS_o_ai | |
| 6014 vec_vsrw(vector unsigned int a, vector unsigned int b) | |
| 6015 { | |
| 6016 return a >> b; | |
| 6017 } | |
| 6018 | |
| 6019 /* vec_sra */ | |
| 6020 | |
| 6021 static vector signed char __ATTRS_o_ai | |
| 6022 vec_sra(vector signed char a, vector unsigned char b) | |
| 6023 { | |
| 6024 return (vector signed char)__builtin_altivec_vsrab((vector char)a, b); | |
| 6025 } | |
| 6026 | |
| 6027 static vector unsigned char __ATTRS_o_ai | |
| 6028 vec_sra(vector unsigned char a, vector unsigned char b) | |
| 6029 { | |
| 6030 return (vector unsigned char)__builtin_altivec_vsrab((vector char)a, b); | |
| 6031 } | |
| 6032 | |
| 6033 static vector short __ATTRS_o_ai | |
| 6034 vec_sra(vector short a, vector unsigned short b) | |
| 6035 { | |
| 6036 return __builtin_altivec_vsrah(a, (vector unsigned short)b); | |
| 6037 } | |
| 6038 | |
| 6039 static vector unsigned short __ATTRS_o_ai | |
| 6040 vec_sra(vector unsigned short a, vector unsigned short b) | |
| 6041 { | |
| 6042 return (vector unsigned short)__builtin_altivec_vsrah((vector short)a, b); | |
| 6043 } | |
| 6044 | |
| 6045 static vector int __ATTRS_o_ai | |
| 6046 vec_sra(vector int a, vector unsigned int b) | |
| 6047 { | |
| 6048 return __builtin_altivec_vsraw(a, b); | |
| 6049 } | |
| 6050 | |
| 6051 static vector unsigned int __ATTRS_o_ai | |
| 6052 vec_sra(vector unsigned int a, vector unsigned int b) | |
| 6053 { | |
| 6054 return (vector unsigned int)__builtin_altivec_vsraw((vector int)a, b); | |
| 6055 } | |
| 6056 | |
| 6057 /* vec_vsrab */ | |
| 6058 | |
| 6059 static vector signed char __ATTRS_o_ai | |
| 6060 vec_vsrab(vector signed char a, vector unsigned char b) | |
| 6061 { | |
| 6062 return (vector signed char)__builtin_altivec_vsrab((vector char)a, b); | |
| 6063 } | |
| 6064 | |
| 6065 static vector unsigned char __ATTRS_o_ai | |
| 6066 vec_vsrab(vector unsigned char a, vector unsigned char b) | |
| 6067 { | |
| 6068 return (vector unsigned char)__builtin_altivec_vsrab((vector char)a, b); | |
| 6069 } | |
| 6070 | |
| 6071 /* vec_vsrah */ | |
| 6072 | |
| 6073 static vector short __ATTRS_o_ai | |
| 6074 vec_vsrah(vector short a, vector unsigned short b) | |
| 6075 { | |
| 6076 return __builtin_altivec_vsrah(a, (vector unsigned short)b); | |
| 6077 } | |
| 6078 | |
| 6079 static vector unsigned short __ATTRS_o_ai | |
| 6080 vec_vsrah(vector unsigned short a, vector unsigned short b) | |
| 6081 { | |
| 6082 return (vector unsigned short)__builtin_altivec_vsrah((vector short)a, b); | |
| 6083 } | |
| 6084 | |
| 6085 /* vec_vsraw */ | |
| 6086 | |
| 6087 static vector int __ATTRS_o_ai | |
| 6088 vec_vsraw(vector int a, vector unsigned int b) | |
| 6089 { | |
| 6090 return __builtin_altivec_vsraw(a, b); | |
| 6091 } | |
| 6092 | |
| 6093 static vector unsigned int __ATTRS_o_ai | |
| 6094 vec_vsraw(vector unsigned int a, vector unsigned int b) | |
| 6095 { | |
| 6096 return (vector unsigned int)__builtin_altivec_vsraw((vector int)a, b); | |
| 6097 } | |
| 6098 | |
| 6099 /* vec_srl */ | |
| 6100 | |
| 6101 static vector signed char __ATTRS_o_ai | |
| 6102 vec_srl(vector signed char a, vector unsigned char b) | |
| 6103 { | |
| 6104 return (vector signed char) | |
| 6105 __builtin_altivec_vsr((vector int)a, (vector int)b); | |
| 6106 } | |
| 6107 | |
| 6108 static vector signed char __ATTRS_o_ai | |
| 6109 vec_srl(vector signed char a, vector unsigned short b) | |
| 6110 { | |
| 6111 return (vector signed char) | |
| 6112 __builtin_altivec_vsr((vector int)a, (vector int)b); | |
| 6113 } | |
| 6114 | |
| 6115 static vector signed char __ATTRS_o_ai | |
| 6116 vec_srl(vector signed char a, vector unsigned int b) | |
| 6117 { | |
| 6118 return (vector signed char) | |
| 6119 __builtin_altivec_vsr((vector int)a, (vector int)b); | |
| 6120 } | |
| 6121 | |
| 6122 static vector unsigned char __ATTRS_o_ai | |
| 6123 vec_srl(vector unsigned char a, vector unsigned char b) | |
| 6124 { | |
| 6125 return (vector unsigned char) | |
| 6126 __builtin_altivec_vsr((vector int)a, (vector int)b); | |
| 6127 } | |
| 6128 | |
| 6129 static vector unsigned char __ATTRS_o_ai | |
| 6130 vec_srl(vector unsigned char a, vector unsigned short b) | |
| 6131 { | |
| 6132 return (vector unsigned char) | |
| 6133 __builtin_altivec_vsr((vector int)a, (vector int)b); | |
| 6134 } | |
| 6135 | |
| 6136 static vector unsigned char __ATTRS_o_ai | |
| 6137 vec_srl(vector unsigned char a, vector unsigned int b) | |
| 6138 { | |
| 6139 return (vector unsigned char) | |
| 6140 __builtin_altivec_vsr((vector int)a, (vector int)b); | |
| 6141 } | |
| 6142 | |
| 6143 static vector bool char __ATTRS_o_ai | |
| 6144 vec_srl(vector bool char a, vector unsigned char b) | |
| 6145 { | |
| 6146 return (vector bool char)__builtin_altivec_vsr((vector int)a, (vector int)b); | |
| 6147 } | |
| 6148 | |
| 6149 static vector bool char __ATTRS_o_ai | |
| 6150 vec_srl(vector bool char a, vector unsigned short b) | |
| 6151 { | |
| 6152 return (vector bool char)__builtin_altivec_vsr((vector int)a, (vector int)b); | |
| 6153 } | |
| 6154 | |
| 6155 static vector bool char __ATTRS_o_ai | |
| 6156 vec_srl(vector bool char a, vector unsigned int b) | |
| 6157 { | |
| 6158 return (vector bool char)__builtin_altivec_vsr((vector int)a, (vector int)b); | |
| 6159 } | |
| 6160 | |
| 6161 static vector short __ATTRS_o_ai | |
| 6162 vec_srl(vector short a, vector unsigned char b) | |
| 6163 { | |
| 6164 return (vector short)__builtin_altivec_vsr((vector int)a, (vector int)b); | |
| 6165 } | |
| 6166 | |
| 6167 static vector short __ATTRS_o_ai | |
| 6168 vec_srl(vector short a, vector unsigned short b) | |
| 6169 { | |
| 6170 return (vector short)__builtin_altivec_vsr((vector int)a, (vector int)b); | |
| 6171 } | |
| 6172 | |
| 6173 static vector short __ATTRS_o_ai | |
| 6174 vec_srl(vector short a, vector unsigned int b) | |
| 6175 { | |
| 6176 return (vector short)__builtin_altivec_vsr((vector int)a, (vector int)b); | |
| 6177 } | |
| 6178 | |
| 6179 static vector unsigned short __ATTRS_o_ai | |
| 6180 vec_srl(vector unsigned short a, vector unsigned char b) | |
| 6181 { | |
| 6182 return (vector unsigned short) | |
| 6183 __builtin_altivec_vsr((vector int)a, (vector int)b); | |
| 6184 } | |
| 6185 | |
| 6186 static vector unsigned short __ATTRS_o_ai | |
| 6187 vec_srl(vector unsigned short a, vector unsigned short b) | |
| 6188 { | |
| 6189 return (vector unsigned short) | |
| 6190 __builtin_altivec_vsr((vector int)a, (vector int)b); | |
| 6191 } | |
| 6192 | |
| 6193 static vector unsigned short __ATTRS_o_ai | |
| 6194 vec_srl(vector unsigned short a, vector unsigned int b) | |
| 6195 { | |
| 6196 return (vector unsigned short) | |
| 6197 __builtin_altivec_vsr((vector int)a, (vector int)b); | |
| 6198 } | |
| 6199 | |
| 6200 static vector bool short __ATTRS_o_ai | |
| 6201 vec_srl(vector bool short a, vector unsigned char b) | |
| 6202 { | |
| 6203 return (vector bool short)__builtin_altivec_vsr((vector int)a, (vector int)b); | |
| 6204 } | |
| 6205 | |
| 6206 static vector bool short __ATTRS_o_ai | |
| 6207 vec_srl(vector bool short a, vector unsigned short b) | |
| 6208 { | |
| 6209 return (vector bool short)__builtin_altivec_vsr((vector int)a, (vector int)b); | |
| 6210 } | |
| 6211 | |
| 6212 static vector bool short __ATTRS_o_ai | |
| 6213 vec_srl(vector bool short a, vector unsigned int b) | |
| 6214 { | |
| 6215 return (vector bool short)__builtin_altivec_vsr((vector int)a, (vector int)b); | |
| 6216 } | |
| 6217 | |
| 6218 static vector pixel __ATTRS_o_ai | |
| 6219 vec_srl(vector pixel a, vector unsigned char b) | |
| 6220 { | |
| 6221 return (vector pixel)__builtin_altivec_vsr((vector int)a, (vector int)b); | |
| 6222 } | |
| 6223 | |
| 6224 static vector pixel __ATTRS_o_ai | |
| 6225 vec_srl(vector pixel a, vector unsigned short b) | |
| 6226 { | |
| 6227 return (vector pixel)__builtin_altivec_vsr((vector int)a, (vector int)b); | |
| 6228 } | |
| 6229 | |
| 6230 static vector pixel __ATTRS_o_ai | |
| 6231 vec_srl(vector pixel a, vector unsigned int b) | |
| 6232 { | |
| 6233 return (vector pixel)__builtin_altivec_vsr((vector int)a, (vector int)b); | |
| 6234 } | |
| 6235 | |
| 6236 static vector int __ATTRS_o_ai | |
| 6237 vec_srl(vector int a, vector unsigned char b) | |
| 6238 { | |
| 6239 return (vector int)__builtin_altivec_vsr(a, (vector int)b); | |
| 6240 } | |
| 6241 | |
| 6242 static vector int __ATTRS_o_ai | |
| 6243 vec_srl(vector int a, vector unsigned short b) | |
| 6244 { | |
| 6245 return (vector int)__builtin_altivec_vsr(a, (vector int)b); | |
| 6246 } | |
| 6247 | |
| 6248 static vector int __ATTRS_o_ai | |
| 6249 vec_srl(vector int a, vector unsigned int b) | |
| 6250 { | |
| 6251 return (vector int)__builtin_altivec_vsr(a, (vector int)b); | |
| 6252 } | |
| 6253 | |
| 6254 static vector unsigned int __ATTRS_o_ai | |
| 6255 vec_srl(vector unsigned int a, vector unsigned char b) | |
| 6256 { | |
| 6257 return (vector unsigned int) | |
| 6258 __builtin_altivec_vsr((vector int)a, (vector int)b); | |
| 6259 } | |
| 6260 | |
| 6261 static vector unsigned int __ATTRS_o_ai | |
| 6262 vec_srl(vector unsigned int a, vector unsigned short b) | |
| 6263 { | |
| 6264 return (vector unsigned int) | |
| 6265 __builtin_altivec_vsr((vector int)a, (vector int)b); | |
| 6266 } | |
| 6267 | |
| 6268 static vector unsigned int __ATTRS_o_ai | |
| 6269 vec_srl(vector unsigned int a, vector unsigned int b) | |
| 6270 { | |
| 6271 return (vector unsigned int) | |
| 6272 __builtin_altivec_vsr((vector int)a, (vector int)b); | |
| 6273 } | |
| 6274 | |
| 6275 static vector bool int __ATTRS_o_ai | |
| 6276 vec_srl(vector bool int a, vector unsigned char b) | |
| 6277 { | |
| 6278 return (vector bool int)__builtin_altivec_vsr((vector int)a, (vector int)b); | |
| 6279 } | |
| 6280 | |
| 6281 static vector bool int __ATTRS_o_ai | |
| 6282 vec_srl(vector bool int a, vector unsigned short b) | |
| 6283 { | |
| 6284 return (vector bool int)__builtin_altivec_vsr((vector int)a, (vector int)b); | |
| 6285 } | |
| 6286 | |
| 6287 static vector bool int __ATTRS_o_ai | |
| 6288 vec_srl(vector bool int a, vector unsigned int b) | |
| 6289 { | |
| 6290 return (vector bool int)__builtin_altivec_vsr((vector int)a, (vector int)b); | |
| 6291 } | |
| 6292 | |
| 6293 /* vec_vsr */ | |
| 6294 | |
| 6295 static vector signed char __ATTRS_o_ai | |
| 6296 vec_vsr(vector signed char a, vector unsigned char b) | |
| 6297 { | |
| 6298 return (vector signed char) | |
| 6299 __builtin_altivec_vsr((vector int)a, (vector int)b); | |
| 6300 } | |
| 6301 | |
| 6302 static vector signed char __ATTRS_o_ai | |
| 6303 vec_vsr(vector signed char a, vector unsigned short b) | |
| 6304 { | |
| 6305 return (vector signed char) | |
| 6306 __builtin_altivec_vsr((vector int)a, (vector int)b); | |
| 6307 } | |
| 6308 | |
| 6309 static vector signed char __ATTRS_o_ai | |
| 6310 vec_vsr(vector signed char a, vector unsigned int b) | |
| 6311 { | |
| 6312 return (vector signed char) | |
| 6313 __builtin_altivec_vsr((vector int)a, (vector int)b); | |
| 6314 } | |
| 6315 | |
| 6316 static vector unsigned char __ATTRS_o_ai | |
| 6317 vec_vsr(vector unsigned char a, vector unsigned char b) | |
| 6318 { | |
| 6319 return (vector unsigned char) | |
| 6320 __builtin_altivec_vsr((vector int)a, (vector int)b); | |
| 6321 } | |
| 6322 | |
| 6323 static vector unsigned char __ATTRS_o_ai | |
| 6324 vec_vsr(vector unsigned char a, vector unsigned short b) | |
| 6325 { | |
| 6326 return (vector unsigned char) | |
| 6327 __builtin_altivec_vsr((vector int)a, (vector int)b); | |
| 6328 } | |
| 6329 | |
| 6330 static vector unsigned char __ATTRS_o_ai | |
| 6331 vec_vsr(vector unsigned char a, vector unsigned int b) | |
| 6332 { | |
| 6333 return (vector unsigned char) | |
| 6334 __builtin_altivec_vsr((vector int)a, (vector int)b); | |
| 6335 } | |
| 6336 | |
| 6337 static vector bool char __ATTRS_o_ai | |
| 6338 vec_vsr(vector bool char a, vector unsigned char b) | |
| 6339 { | |
| 6340 return (vector bool char)__builtin_altivec_vsr((vector int)a, (vector int)b); | |
| 6341 } | |
| 6342 | |
| 6343 static vector bool char __ATTRS_o_ai | |
| 6344 vec_vsr(vector bool char a, vector unsigned short b) | |
| 6345 { | |
| 6346 return (vector bool char)__builtin_altivec_vsr((vector int)a, (vector int)b); | |
| 6347 } | |
| 6348 | |
| 6349 static vector bool char __ATTRS_o_ai | |
| 6350 vec_vsr(vector bool char a, vector unsigned int b) | |
| 6351 { | |
| 6352 return (vector bool char)__builtin_altivec_vsr((vector int)a, (vector int)b); | |
| 6353 } | |
| 6354 | |
| 6355 static vector short __ATTRS_o_ai | |
| 6356 vec_vsr(vector short a, vector unsigned char b) | |
| 6357 { | |
| 6358 return (vector short)__builtin_altivec_vsr((vector int)a, (vector int)b); | |
| 6359 } | |
| 6360 | |
| 6361 static vector short __ATTRS_o_ai | |
| 6362 vec_vsr(vector short a, vector unsigned short b) | |
| 6363 { | |
| 6364 return (vector short)__builtin_altivec_vsr((vector int)a, (vector int)b); | |
| 6365 } | |
| 6366 | |
| 6367 static vector short __ATTRS_o_ai | |
| 6368 vec_vsr(vector short a, vector unsigned int b) | |
| 6369 { | |
| 6370 return (vector short)__builtin_altivec_vsr((vector int)a, (vector int)b); | |
| 6371 } | |
| 6372 | |
| 6373 static vector unsigned short __ATTRS_o_ai | |
| 6374 vec_vsr(vector unsigned short a, vector unsigned char b) | |
| 6375 { | |
| 6376 return (vector unsigned short) | |
| 6377 __builtin_altivec_vsr((vector int)a, (vector int)b); | |
| 6378 } | |
| 6379 | |
| 6380 static vector unsigned short __ATTRS_o_ai | |
| 6381 vec_vsr(vector unsigned short a, vector unsigned short b) | |
| 6382 { | |
| 6383 return (vector unsigned short) | |
| 6384 __builtin_altivec_vsr((vector int)a, (vector int)b); | |
| 6385 } | |
| 6386 | |
| 6387 static vector unsigned short __ATTRS_o_ai | |
| 6388 vec_vsr(vector unsigned short a, vector unsigned int b) | |
| 6389 { | |
| 6390 return (vector unsigned short) | |
| 6391 __builtin_altivec_vsr((vector int)a, (vector int)b); | |
| 6392 } | |
| 6393 | |
| 6394 static vector bool short __ATTRS_o_ai | |
| 6395 vec_vsr(vector bool short a, vector unsigned char b) | |
| 6396 { | |
| 6397 return (vector bool short)__builtin_altivec_vsr((vector int)a, (vector int)b); | |
| 6398 } | |
| 6399 | |
| 6400 static vector bool short __ATTRS_o_ai | |
| 6401 vec_vsr(vector bool short a, vector unsigned short b) | |
| 6402 { | |
| 6403 return (vector bool short)__builtin_altivec_vsr((vector int)a, (vector int)b); | |
| 6404 } | |
| 6405 | |
| 6406 static vector bool short __ATTRS_o_ai | |
| 6407 vec_vsr(vector bool short a, vector unsigned int b) | |
| 6408 { | |
| 6409 return (vector bool short)__builtin_altivec_vsr((vector int)a, (vector int)b); | |
| 6410 } | |
| 6411 | |
| 6412 static vector pixel __ATTRS_o_ai | |
| 6413 vec_vsr(vector pixel a, vector unsigned char b) | |
| 6414 { | |
| 6415 return (vector pixel)__builtin_altivec_vsr((vector int)a, (vector int)b); | |
| 6416 } | |
| 6417 | |
| 6418 static vector pixel __ATTRS_o_ai | |
| 6419 vec_vsr(vector pixel a, vector unsigned short b) | |
| 6420 { | |
| 6421 return (vector pixel)__builtin_altivec_vsr((vector int)a, (vector int)b); | |
| 6422 } | |
| 6423 | |
| 6424 static vector pixel __ATTRS_o_ai | |
| 6425 vec_vsr(vector pixel a, vector unsigned int b) | |
| 6426 { | |
| 6427 return (vector pixel)__builtin_altivec_vsr((vector int)a, (vector int)b); | |
| 6428 } | |
| 6429 | |
| 6430 static vector int __ATTRS_o_ai | |
| 6431 vec_vsr(vector int a, vector unsigned char b) | |
| 6432 { | |
| 6433 return (vector int)__builtin_altivec_vsr(a, (vector int)b); | |
| 6434 } | |
| 6435 | |
| 6436 static vector int __ATTRS_o_ai | |
| 6437 vec_vsr(vector int a, vector unsigned short b) | |
| 6438 { | |
| 6439 return (vector int)__builtin_altivec_vsr(a, (vector int)b); | |
| 6440 } | |
| 6441 | |
| 6442 static vector int __ATTRS_o_ai | |
| 6443 vec_vsr(vector int a, vector unsigned int b) | |
| 6444 { | |
| 6445 return (vector int)__builtin_altivec_vsr(a, (vector int)b); | |
| 6446 } | |
| 6447 | |
| 6448 static vector unsigned int __ATTRS_o_ai | |
| 6449 vec_vsr(vector unsigned int a, vector unsigned char b) | |
| 6450 { | |
| 6451 return (vector unsigned int) | |
| 6452 __builtin_altivec_vsr((vector int)a, (vector int)b); | |
| 6453 } | |
| 6454 | |
| 6455 static vector unsigned int __ATTRS_o_ai | |
| 6456 vec_vsr(vector unsigned int a, vector unsigned short b) | |
| 6457 { | |
| 6458 return (vector unsigned int) | |
| 6459 __builtin_altivec_vsr((vector int)a, (vector int)b); | |
| 6460 } | |
| 6461 | |
| 6462 static vector unsigned int __ATTRS_o_ai | |
| 6463 vec_vsr(vector unsigned int a, vector unsigned int b) | |
| 6464 { | |
| 6465 return (vector unsigned int) | |
| 6466 __builtin_altivec_vsr((vector int)a, (vector int)b); | |
| 6467 } | |
| 6468 | |
| 6469 static vector bool int __ATTRS_o_ai | |
| 6470 vec_vsr(vector bool int a, vector unsigned char b) | |
| 6471 { | |
| 6472 return (vector bool int)__builtin_altivec_vsr((vector int)a, (vector int)b); | |
| 6473 } | |
| 6474 | |
| 6475 static vector bool int __ATTRS_o_ai | |
| 6476 vec_vsr(vector bool int a, vector unsigned short b) | |
| 6477 { | |
| 6478 return (vector bool int)__builtin_altivec_vsr((vector int)a, (vector int)b); | |
| 6479 } | |
| 6480 | |
| 6481 static vector bool int __ATTRS_o_ai | |
| 6482 vec_vsr(vector bool int a, vector unsigned int b) | |
| 6483 { | |
| 6484 return (vector bool int)__builtin_altivec_vsr((vector int)a, (vector int)b); | |
| 6485 } | |
| 6486 | |
| 6487 /* vec_sro */ | |
| 6488 | |
| 6489 static vector signed char __ATTRS_o_ai | |
| 6490 vec_sro(vector signed char a, vector signed char b) | |
| 6491 { | |
| 6492 return (vector signed char) | |
| 6493 __builtin_altivec_vsro((vector int)a, (vector int)b); | |
| 6494 } | |
| 6495 | |
| 6496 static vector signed char __ATTRS_o_ai | |
| 6497 vec_sro(vector signed char a, vector unsigned char b) | |
| 6498 { | |
| 6499 return (vector signed char) | |
| 6500 __builtin_altivec_vsro((vector int)a, (vector int)b); | |
| 6501 } | |
| 6502 | |
| 6503 static vector unsigned char __ATTRS_o_ai | |
| 6504 vec_sro(vector unsigned char a, vector signed char b) | |
| 6505 { | |
| 6506 return (vector unsigned char) | |
| 6507 __builtin_altivec_vsro((vector int)a, (vector int)b); | |
| 6508 } | |
| 6509 | |
| 6510 static vector unsigned char __ATTRS_o_ai | |
| 6511 vec_sro(vector unsigned char a, vector unsigned char b) | |
| 6512 { | |
| 6513 return (vector unsigned char) | |
| 6514 __builtin_altivec_vsro((vector int)a, (vector int)b); | |
| 6515 } | |
| 6516 | |
| 6517 static vector short __ATTRS_o_ai | |
| 6518 vec_sro(vector short a, vector signed char b) | |
| 6519 { | |
| 6520 return (vector short)__builtin_altivec_vsro((vector int)a, (vector int)b); | |
| 6521 } | |
| 6522 | |
| 6523 static vector short __ATTRS_o_ai | |
| 6524 vec_sro(vector short a, vector unsigned char b) | |
| 6525 { | |
| 6526 return (vector short)__builtin_altivec_vsro((vector int)a, (vector int)b); | |
| 6527 } | |
| 6528 | |
| 6529 static vector unsigned short __ATTRS_o_ai | |
| 6530 vec_sro(vector unsigned short a, vector signed char b) | |
| 6531 { | |
| 6532 return (vector unsigned short) | |
| 6533 __builtin_altivec_vsro((vector int)a, (vector int)b); | |
| 6534 } | |
| 6535 | |
| 6536 static vector unsigned short __ATTRS_o_ai | |
| 6537 vec_sro(vector unsigned short a, vector unsigned char b) | |
| 6538 { | |
| 6539 return (vector unsigned short) | |
| 6540 __builtin_altivec_vsro((vector int)a, (vector int)b); | |
| 6541 } | |
| 6542 | |
| 6543 static vector pixel __ATTRS_o_ai | |
| 6544 vec_sro(vector pixel a, vector signed char b) | |
| 6545 { | |
| 6546 return (vector pixel)__builtin_altivec_vsro((vector int)a, (vector int)b); | |
| 6547 } | |
| 6548 | |
| 6549 static vector pixel __ATTRS_o_ai | |
| 6550 vec_sro(vector pixel a, vector unsigned char b) | |
| 6551 { | |
| 6552 return (vector pixel)__builtin_altivec_vsro((vector int)a, (vector int)b); | |
| 6553 } | |
| 6554 | |
| 6555 static vector int __ATTRS_o_ai | |
| 6556 vec_sro(vector int a, vector signed char b) | |
| 6557 { | |
| 6558 return (vector int)__builtin_altivec_vsro(a, (vector int)b); | |
| 6559 } | |
| 6560 | |
| 6561 static vector int __ATTRS_o_ai | |
| 6562 vec_sro(vector int a, vector unsigned char b) | |
| 6563 { | |
| 6564 return (vector int)__builtin_altivec_vsro(a, (vector int)b); | |
| 6565 } | |
| 6566 | |
| 6567 static vector unsigned int __ATTRS_o_ai | |
| 6568 vec_sro(vector unsigned int a, vector signed char b) | |
| 6569 { | |
| 6570 return (vector unsigned int) | |
| 6571 __builtin_altivec_vsro((vector int)a, (vector int)b); | |
| 6572 } | |
| 6573 | |
| 6574 static vector unsigned int __ATTRS_o_ai | |
| 6575 vec_sro(vector unsigned int a, vector unsigned char b) | |
| 6576 { | |
| 6577 return (vector unsigned int) | |
| 6578 __builtin_altivec_vsro((vector int)a, (vector int)b); | |
| 6579 } | |
| 6580 | |
| 6581 static vector float __ATTRS_o_ai | |
| 6582 vec_sro(vector float a, vector signed char b) | |
| 6583 { | |
| 6584 return (vector float)__builtin_altivec_vsro((vector int)a, (vector int)b); | |
| 6585 } | |
| 6586 | |
| 6587 static vector float __ATTRS_o_ai | |
| 6588 vec_sro(vector float a, vector unsigned char b) | |
| 6589 { | |
| 6590 return (vector float)__builtin_altivec_vsro((vector int)a, (vector int)b); | |
| 6591 } | |
| 6592 | |
| 6593 /* vec_vsro */ | |
| 6594 | |
| 6595 static vector signed char __ATTRS_o_ai | |
| 6596 vec_vsro(vector signed char a, vector signed char b) | |
| 6597 { | |
| 6598 return (vector signed char) | |
| 6599 __builtin_altivec_vsro((vector int)a, (vector int)b); | |
| 6600 } | |
| 6601 | |
| 6602 static vector signed char __ATTRS_o_ai | |
| 6603 vec_vsro(vector signed char a, vector unsigned char b) | |
| 6604 { | |
| 6605 return (vector signed char) | |
| 6606 __builtin_altivec_vsro((vector int)a, (vector int)b); | |
| 6607 } | |
| 6608 | |
| 6609 static vector unsigned char __ATTRS_o_ai | |
| 6610 vec_vsro(vector unsigned char a, vector signed char b) | |
| 6611 { | |
| 6612 return (vector unsigned char) | |
| 6613 __builtin_altivec_vsro((vector int)a, (vector int)b); | |
| 6614 } | |
| 6615 | |
| 6616 static vector unsigned char __ATTRS_o_ai | |
| 6617 vec_vsro(vector unsigned char a, vector unsigned char b) | |
| 6618 { | |
| 6619 return (vector unsigned char) | |
| 6620 __builtin_altivec_vsro((vector int)a, (vector int)b); | |
| 6621 } | |
| 6622 | |
| 6623 static vector short __ATTRS_o_ai | |
| 6624 vec_vsro(vector short a, vector signed char b) | |
| 6625 { | |
| 6626 return (vector short)__builtin_altivec_vsro((vector int)a, (vector int)b); | |
| 6627 } | |
| 6628 | |
| 6629 static vector short __ATTRS_o_ai | |
| 6630 vec_vsro(vector short a, vector unsigned char b) | |
| 6631 { | |
| 6632 return (vector short)__builtin_altivec_vsro((vector int)a, (vector int)b); | |
| 6633 } | |
| 6634 | |
| 6635 static vector unsigned short __ATTRS_o_ai | |
| 6636 vec_vsro(vector unsigned short a, vector signed char b) | |
| 6637 { | |
| 6638 return (vector unsigned short) | |
| 6639 __builtin_altivec_vsro((vector int)a, (vector int)b); | |
| 6640 } | |
| 6641 | |
| 6642 static vector unsigned short __ATTRS_o_ai | |
| 6643 vec_vsro(vector unsigned short a, vector unsigned char b) | |
| 6644 { | |
| 6645 return (vector unsigned short) | |
| 6646 __builtin_altivec_vsro((vector int)a, (vector int)b); | |
| 6647 } | |
| 6648 | |
| 6649 static vector pixel __ATTRS_o_ai | |
| 6650 vec_vsro(vector pixel a, vector signed char b) | |
| 6651 { | |
| 6652 return (vector pixel)__builtin_altivec_vsro((vector int)a, (vector int)b); | |
| 6653 } | |
| 6654 | |
| 6655 static vector pixel __ATTRS_o_ai | |
| 6656 vec_vsro(vector pixel a, vector unsigned char b) | |
| 6657 { | |
| 6658 return (vector pixel)__builtin_altivec_vsro((vector int)a, (vector int)b); | |
| 6659 } | |
| 6660 | |
| 6661 static vector int __ATTRS_o_ai | |
| 6662 vec_vsro(vector int a, vector signed char b) | |
| 6663 { | |
| 6664 return (vector int)__builtin_altivec_vsro(a, (vector int)b); | |
| 6665 } | |
| 6666 | |
| 6667 static vector int __ATTRS_o_ai | |
| 6668 vec_vsro(vector int a, vector unsigned char b) | |
| 6669 { | |
| 6670 return (vector int)__builtin_altivec_vsro(a, (vector int)b); | |
| 6671 } | |
| 6672 | |
| 6673 static vector unsigned int __ATTRS_o_ai | |
| 6674 vec_vsro(vector unsigned int a, vector signed char b) | |
| 6675 { | |
| 6676 return (vector unsigned int) | |
| 6677 __builtin_altivec_vsro((vector int)a, (vector int)b); | |
| 6678 } | |
| 6679 | |
| 6680 static vector unsigned int __ATTRS_o_ai | |
| 6681 vec_vsro(vector unsigned int a, vector unsigned char b) | |
| 6682 { | |
| 6683 return (vector unsigned int) | |
| 6684 __builtin_altivec_vsro((vector int)a, (vector int)b); | |
| 6685 } | |
| 6686 | |
| 6687 static vector float __ATTRS_o_ai | |
| 6688 vec_vsro(vector float a, vector signed char b) | |
| 6689 { | |
| 6690 return (vector float)__builtin_altivec_vsro((vector int)a, (vector int)b); | |
| 6691 } | |
| 6692 | |
| 6693 static vector float __ATTRS_o_ai | |
| 6694 vec_vsro(vector float a, vector unsigned char b) | |
| 6695 { | |
| 6696 return (vector float)__builtin_altivec_vsro((vector int)a, (vector int)b); | |
| 6697 } | |
| 6698 | |
| 6699 /* vec_st */ | |
| 6700 | |
| 6701 static void __ATTRS_o_ai | |
| 6702 vec_st(vector signed char a, int b, vector signed char *c) | |
| 6703 { | |
| 6704 __builtin_altivec_stvx((vector int)a, b, c); | |
| 6705 } | |
| 6706 | |
| 6707 static void __ATTRS_o_ai | |
| 6708 vec_st(vector signed char a, int b, signed char *c) | |
| 6709 { | |
| 6710 __builtin_altivec_stvx((vector int)a, b, c); | |
| 6711 } | |
| 6712 | |
| 6713 static void __ATTRS_o_ai | |
| 6714 vec_st(vector unsigned char a, int b, vector unsigned char *c) | |
| 6715 { | |
| 6716 __builtin_altivec_stvx((vector int)a, b, c); | |
| 6717 } | |
| 6718 | |
| 6719 static void __ATTRS_o_ai | |
| 6720 vec_st(vector unsigned char a, int b, unsigned char *c) | |
| 6721 { | |
| 6722 __builtin_altivec_stvx((vector int)a, b, c); | |
| 6723 } | |
| 6724 | |
| 6725 static void __ATTRS_o_ai | |
| 6726 vec_st(vector bool char a, int b, signed char *c) | |
| 6727 { | |
| 6728 __builtin_altivec_stvx((vector int)a, b, c); | |
| 6729 } | |
| 6730 | |
| 6731 static void __ATTRS_o_ai | |
| 6732 vec_st(vector bool char a, int b, unsigned char *c) | |
| 6733 { | |
| 6734 __builtin_altivec_stvx((vector int)a, b, c); | |
| 6735 } | |
| 6736 | |
| 6737 static void __ATTRS_o_ai | |
| 6738 vec_st(vector bool char a, int b, vector bool char *c) | |
| 6739 { | |
| 6740 __builtin_altivec_stvx((vector int)a, b, c); | |
| 6741 } | |
| 6742 | |
| 6743 static void __ATTRS_o_ai | |
| 6744 vec_st(vector short a, int b, vector short *c) | |
| 6745 { | |
| 6746 __builtin_altivec_stvx((vector int)a, b, c); | |
| 6747 } | |
| 6748 | |
| 6749 static void __ATTRS_o_ai | |
| 6750 vec_st(vector short a, int b, short *c) | |
| 6751 { | |
| 6752 __builtin_altivec_stvx((vector int)a, b, c); | |
| 6753 } | |
| 6754 | |
| 6755 static void __ATTRS_o_ai | |
| 6756 vec_st(vector unsigned short a, int b, vector unsigned short *c) | |
| 6757 { | |
| 6758 __builtin_altivec_stvx((vector int)a, b, c); | |
| 6759 } | |
| 6760 | |
| 6761 static void __ATTRS_o_ai | |
| 6762 vec_st(vector unsigned short a, int b, unsigned short *c) | |
| 6763 { | |
| 6764 __builtin_altivec_stvx((vector int)a, b, c); | |
| 6765 } | |
| 6766 | |
| 6767 static void __ATTRS_o_ai | |
| 6768 vec_st(vector bool short a, int b, short *c) | |
| 6769 { | |
| 6770 __builtin_altivec_stvx((vector int)a, b, c); | |
| 6771 } | |
| 6772 | |
| 6773 static void __ATTRS_o_ai | |
| 6774 vec_st(vector bool short a, int b, unsigned short *c) | |
| 6775 { | |
| 6776 __builtin_altivec_stvx((vector int)a, b, c); | |
| 6777 } | |
| 6778 | |
| 6779 static void __ATTRS_o_ai | |
| 6780 vec_st(vector bool short a, int b, vector bool short *c) | |
| 6781 { | |
| 6782 __builtin_altivec_stvx((vector int)a, b, c); | |
| 6783 } | |
| 6784 | |
| 6785 static void __ATTRS_o_ai | |
| 6786 vec_st(vector pixel a, int b, short *c) | |
| 6787 { | |
| 6788 __builtin_altivec_stvx((vector int)a, b, c); | |
| 6789 } | |
| 6790 | |
| 6791 static void __ATTRS_o_ai | |
| 6792 vec_st(vector pixel a, int b, unsigned short *c) | |
| 6793 { | |
| 6794 __builtin_altivec_stvx((vector int)a, b, c); | |
| 6795 } | |
| 6796 | |
| 6797 static void __ATTRS_o_ai | |
| 6798 vec_st(vector pixel a, int b, vector pixel *c) | |
| 6799 { | |
| 6800 __builtin_altivec_stvx((vector int)a, b, c); | |
| 6801 } | |
| 6802 | |
| 6803 static void __ATTRS_o_ai | |
| 6804 vec_st(vector int a, int b, vector int *c) | |
| 6805 { | |
| 6806 __builtin_altivec_stvx(a, b, c); | |
| 6807 } | |
| 6808 | |
| 6809 static void __ATTRS_o_ai | |
| 6810 vec_st(vector int a, int b, int *c) | |
| 6811 { | |
| 6812 __builtin_altivec_stvx(a, b, c); | |
| 6813 } | |
| 6814 | |
| 6815 static void __ATTRS_o_ai | |
| 6816 vec_st(vector unsigned int a, int b, vector unsigned int *c) | |
| 6817 { | |
| 6818 __builtin_altivec_stvx((vector int)a, b, c); | |
| 6819 } | |
| 6820 | |
| 6821 static void __ATTRS_o_ai | |
| 6822 vec_st(vector unsigned int a, int b, unsigned int *c) | |
| 6823 { | |
| 6824 __builtin_altivec_stvx((vector int)a, b, c); | |
| 6825 } | |
| 6826 | |
| 6827 static void __ATTRS_o_ai | |
| 6828 vec_st(vector bool int a, int b, int *c) | |
| 6829 { | |
| 6830 __builtin_altivec_stvx((vector int)a, b, c); | |
| 6831 } | |
| 6832 | |
| 6833 static void __ATTRS_o_ai | |
| 6834 vec_st(vector bool int a, int b, unsigned int *c) | |
| 6835 { | |
| 6836 __builtin_altivec_stvx((vector int)a, b, c); | |
| 6837 } | |
| 6838 | |
| 6839 static void __ATTRS_o_ai | |
| 6840 vec_st(vector bool int a, int b, vector bool int *c) | |
| 6841 { | |
| 6842 __builtin_altivec_stvx((vector int)a, b, c); | |
| 6843 } | |
| 6844 | |
| 6845 static void __ATTRS_o_ai | |
| 6846 vec_st(vector float a, int b, vector float *c) | |
| 6847 { | |
| 6848 __builtin_altivec_stvx((vector int)a, b, c); | |
| 6849 } | |
| 6850 | |
| 6851 static void __ATTRS_o_ai | |
| 6852 vec_st(vector float a, int b, float *c) | |
| 6853 { | |
| 6854 __builtin_altivec_stvx((vector int)a, b, c); | |
| 6855 } | |
| 6856 | |
| 6857 /* vec_stvx */ | |
| 6858 | |
| 6859 static void __ATTRS_o_ai | |
| 6860 vec_stvx(vector signed char a, int b, vector signed char *c) | |
| 6861 { | |
| 6862 __builtin_altivec_stvx((vector int)a, b, c); | |
| 6863 } | |
| 6864 | |
| 6865 static void __ATTRS_o_ai | |
| 6866 vec_stvx(vector signed char a, int b, signed char *c) | |
| 6867 { | |
| 6868 __builtin_altivec_stvx((vector int)a, b, c); | |
| 6869 } | |
| 6870 | |
| 6871 static void __ATTRS_o_ai | |
| 6872 vec_stvx(vector unsigned char a, int b, vector unsigned char *c) | |
| 6873 { | |
| 6874 __builtin_altivec_stvx((vector int)a, b, c); | |
| 6875 } | |
| 6876 | |
| 6877 static void __ATTRS_o_ai | |
| 6878 vec_stvx(vector unsigned char a, int b, unsigned char *c) | |
| 6879 { | |
| 6880 __builtin_altivec_stvx((vector int)a, b, c); | |
| 6881 } | |
| 6882 | |
| 6883 static void __ATTRS_o_ai | |
| 6884 vec_stvx(vector bool char a, int b, signed char *c) | |
| 6885 { | |
| 6886 __builtin_altivec_stvx((vector int)a, b, c); | |
| 6887 } | |
| 6888 | |
| 6889 static void __ATTRS_o_ai | |
| 6890 vec_stvx(vector bool char a, int b, unsigned char *c) | |
| 6891 { | |
| 6892 __builtin_altivec_stvx((vector int)a, b, c); | |
| 6893 } | |
| 6894 | |
| 6895 static void __ATTRS_o_ai | |
| 6896 vec_stvx(vector bool char a, int b, vector bool char *c) | |
| 6897 { | |
| 6898 __builtin_altivec_stvx((vector int)a, b, c); | |
| 6899 } | |
| 6900 | |
| 6901 static void __ATTRS_o_ai | |
| 6902 vec_stvx(vector short a, int b, vector short *c) | |
| 6903 { | |
| 6904 __builtin_altivec_stvx((vector int)a, b, c); | |
| 6905 } | |
| 6906 | |
| 6907 static void __ATTRS_o_ai | |
| 6908 vec_stvx(vector short a, int b, short *c) | |
| 6909 { | |
| 6910 __builtin_altivec_stvx((vector int)a, b, c); | |
| 6911 } | |
| 6912 | |
| 6913 static void __ATTRS_o_ai | |
| 6914 vec_stvx(vector unsigned short a, int b, vector unsigned short *c) | |
| 6915 { | |
| 6916 __builtin_altivec_stvx((vector int)a, b, c); | |
| 6917 } | |
| 6918 | |
| 6919 static void __ATTRS_o_ai | |
| 6920 vec_stvx(vector unsigned short a, int b, unsigned short *c) | |
| 6921 { | |
| 6922 __builtin_altivec_stvx((vector int)a, b, c); | |
| 6923 } | |
| 6924 | |
| 6925 static void __ATTRS_o_ai | |
| 6926 vec_stvx(vector bool short a, int b, short *c) | |
| 6927 { | |
| 6928 __builtin_altivec_stvx((vector int)a, b, c); | |
| 6929 } | |
| 6930 | |
| 6931 static void __ATTRS_o_ai | |
| 6932 vec_stvx(vector bool short a, int b, unsigned short *c) | |
| 6933 { | |
| 6934 __builtin_altivec_stvx((vector int)a, b, c); | |
| 6935 } | |
| 6936 | |
| 6937 static void __ATTRS_o_ai | |
| 6938 vec_stvx(vector bool short a, int b, vector bool short *c) | |
| 6939 { | |
| 6940 __builtin_altivec_stvx((vector int)a, b, c); | |
| 6941 } | |
| 6942 | |
| 6943 static void __ATTRS_o_ai | |
| 6944 vec_stvx(vector pixel a, int b, short *c) | |
| 6945 { | |
| 6946 __builtin_altivec_stvx((vector int)a, b, c); | |
| 6947 } | |
| 6948 | |
| 6949 static void __ATTRS_o_ai | |
| 6950 vec_stvx(vector pixel a, int b, unsigned short *c) | |
| 6951 { | |
| 6952 __builtin_altivec_stvx((vector int)a, b, c); | |
| 6953 } | |
| 6954 | |
| 6955 static void __ATTRS_o_ai | |
| 6956 vec_stvx(vector pixel a, int b, vector pixel *c) | |
| 6957 { | |
| 6958 __builtin_altivec_stvx((vector int)a, b, c); | |
| 6959 } | |
| 6960 | |
| 6961 static void __ATTRS_o_ai | |
| 6962 vec_stvx(vector int a, int b, vector int *c) | |
| 6963 { | |
| 6964 __builtin_altivec_stvx(a, b, c); | |
| 6965 } | |
| 6966 | |
| 6967 static void __ATTRS_o_ai | |
| 6968 vec_stvx(vector int a, int b, int *c) | |
| 6969 { | |
| 6970 __builtin_altivec_stvx(a, b, c); | |
| 6971 } | |
| 6972 | |
| 6973 static void __ATTRS_o_ai | |
| 6974 vec_stvx(vector unsigned int a, int b, vector unsigned int *c) | |
| 6975 { | |
| 6976 __builtin_altivec_stvx((vector int)a, b, c); | |
| 6977 } | |
| 6978 | |
| 6979 static void __ATTRS_o_ai | |
| 6980 vec_stvx(vector unsigned int a, int b, unsigned int *c) | |
| 6981 { | |
| 6982 __builtin_altivec_stvx((vector int)a, b, c); | |
| 6983 } | |
| 6984 | |
| 6985 static void __ATTRS_o_ai | |
| 6986 vec_stvx(vector bool int a, int b, int *c) | |
| 6987 { | |
| 6988 __builtin_altivec_stvx((vector int)a, b, c); | |
| 6989 } | |
| 6990 | |
| 6991 static void __ATTRS_o_ai | |
| 6992 vec_stvx(vector bool int a, int b, unsigned int *c) | |
| 6993 { | |
| 6994 __builtin_altivec_stvx((vector int)a, b, c); | |
| 6995 } | |
| 6996 | |
| 6997 static void __ATTRS_o_ai | |
| 6998 vec_stvx(vector bool int a, int b, vector bool int *c) | |
| 6999 { | |
| 7000 __builtin_altivec_stvx((vector int)a, b, c); | |
| 7001 } | |
| 7002 | |
| 7003 static void __ATTRS_o_ai | |
| 7004 vec_stvx(vector float a, int b, vector float *c) | |
| 7005 { | |
| 7006 __builtin_altivec_stvx((vector int)a, b, c); | |
| 7007 } | |
| 7008 | |
| 7009 static void __ATTRS_o_ai | |
| 7010 vec_stvx(vector float a, int b, float *c) | |
| 7011 { | |
| 7012 __builtin_altivec_stvx((vector int)a, b, c); | |
| 7013 } | |
| 7014 | |
| 7015 /* vec_ste */ | |
| 7016 | |
| 7017 static void __ATTRS_o_ai | |
| 7018 vec_ste(vector signed char a, int b, signed char *c) | |
| 7019 { | |
| 7020 __builtin_altivec_stvebx((vector char)a, b, c); | |
| 7021 } | |
| 7022 | |
| 7023 static void __ATTRS_o_ai | |
| 7024 vec_ste(vector unsigned char a, int b, unsigned char *c) | |
| 7025 { | |
| 7026 __builtin_altivec_stvebx((vector char)a, b, c); | |
| 7027 } | |
| 7028 | |
| 7029 static void __ATTRS_o_ai | |
| 7030 vec_ste(vector bool char a, int b, signed char *c) | |
| 7031 { | |
| 7032 __builtin_altivec_stvebx((vector char)a, b, c); | |
| 7033 } | |
| 7034 | |
| 7035 static void __ATTRS_o_ai | |
| 7036 vec_ste(vector bool char a, int b, unsigned char *c) | |
| 7037 { | |
| 7038 __builtin_altivec_stvebx((vector char)a, b, c); | |
| 7039 } | |
| 7040 | |
| 7041 static void __ATTRS_o_ai | |
| 7042 vec_ste(vector short a, int b, short *c) | |
| 7043 { | |
| 7044 __builtin_altivec_stvehx(a, b, c); | |
| 7045 } | |
| 7046 | |
| 7047 static void __ATTRS_o_ai | |
| 7048 vec_ste(vector unsigned short a, int b, unsigned short *c) | |
| 7049 { | |
| 7050 __builtin_altivec_stvehx((vector short)a, b, c); | |
| 7051 } | |
| 7052 | |
| 7053 static void __ATTRS_o_ai | |
| 7054 vec_ste(vector bool short a, int b, short *c) | |
| 7055 { | |
| 7056 __builtin_altivec_stvehx((vector short)a, b, c); | |
| 7057 } | |
| 7058 | |
| 7059 static void __ATTRS_o_ai | |
| 7060 vec_ste(vector bool short a, int b, unsigned short *c) | |
| 7061 { | |
| 7062 __builtin_altivec_stvehx((vector short)a, b, c); | |
| 7063 } | |
| 7064 | |
| 7065 static void __ATTRS_o_ai | |
| 7066 vec_ste(vector pixel a, int b, short *c) | |
| 7067 { | |
| 7068 __builtin_altivec_stvehx((vector short)a, b, c); | |
| 7069 } | |
| 7070 | |
| 7071 static void __ATTRS_o_ai | |
| 7072 vec_ste(vector pixel a, int b, unsigned short *c) | |
| 7073 { | |
| 7074 __builtin_altivec_stvehx((vector short)a, b, c); | |
| 7075 } | |
| 7076 | |
| 7077 static void __ATTRS_o_ai | |
| 7078 vec_ste(vector int a, int b, int *c) | |
| 7079 { | |
| 7080 __builtin_altivec_stvewx(a, b, c); | |
| 7081 } | |
| 7082 | |
| 7083 static void __ATTRS_o_ai | |
| 7084 vec_ste(vector unsigned int a, int b, unsigned int *c) | |
| 7085 { | |
| 7086 __builtin_altivec_stvewx((vector int)a, b, c); | |
| 7087 } | |
| 7088 | |
| 7089 static void __ATTRS_o_ai | |
| 7090 vec_ste(vector bool int a, int b, int *c) | |
| 7091 { | |
| 7092 __builtin_altivec_stvewx((vector int)a, b, c); | |
| 7093 } | |
| 7094 | |
| 7095 static void __ATTRS_o_ai | |
| 7096 vec_ste(vector bool int a, int b, unsigned int *c) | |
| 7097 { | |
| 7098 __builtin_altivec_stvewx((vector int)a, b, c); | |
| 7099 } | |
| 7100 | |
| 7101 static void __ATTRS_o_ai | |
| 7102 vec_ste(vector float a, int b, float *c) | |
| 7103 { | |
| 7104 __builtin_altivec_stvewx((vector int)a, b, c); | |
| 7105 } | |
| 7106 | |
| 7107 /* vec_stvebx */ | |
| 7108 | |
| 7109 static void __ATTRS_o_ai | |
| 7110 vec_stvebx(vector signed char a, int b, signed char *c) | |
| 7111 { | |
| 7112 __builtin_altivec_stvebx((vector char)a, b, c); | |
| 7113 } | |
| 7114 | |
| 7115 static void __ATTRS_o_ai | |
| 7116 vec_stvebx(vector unsigned char a, int b, unsigned char *c) | |
| 7117 { | |
| 7118 __builtin_altivec_stvebx((vector char)a, b, c); | |
| 7119 } | |
| 7120 | |
| 7121 static void __ATTRS_o_ai | |
| 7122 vec_stvebx(vector bool char a, int b, signed char *c) | |
| 7123 { | |
| 7124 __builtin_altivec_stvebx((vector char)a, b, c); | |
| 7125 } | |
| 7126 | |
| 7127 static void __ATTRS_o_ai | |
| 7128 vec_stvebx(vector bool char a, int b, unsigned char *c) | |
| 7129 { | |
| 7130 __builtin_altivec_stvebx((vector char)a, b, c); | |
| 7131 } | |
| 7132 | |
| 7133 /* vec_stvehx */ | |
| 7134 | |
| 7135 static void __ATTRS_o_ai | |
| 7136 vec_stvehx(vector short a, int b, short *c) | |
| 7137 { | |
| 7138 __builtin_altivec_stvehx(a, b, c); | |
| 7139 } | |
| 7140 | |
| 7141 static void __ATTRS_o_ai | |
| 7142 vec_stvehx(vector unsigned short a, int b, unsigned short *c) | |
| 7143 { | |
| 7144 __builtin_altivec_stvehx((vector short)a, b, c); | |
| 7145 } | |
| 7146 | |
| 7147 static void __ATTRS_o_ai | |
| 7148 vec_stvehx(vector bool short a, int b, short *c) | |
| 7149 { | |
| 7150 __builtin_altivec_stvehx((vector short)a, b, c); | |
| 7151 } | |
| 7152 | |
| 7153 static void __ATTRS_o_ai | |
| 7154 vec_stvehx(vector bool short a, int b, unsigned short *c) | |
| 7155 { | |
| 7156 __builtin_altivec_stvehx((vector short)a, b, c); | |
| 7157 } | |
| 7158 | |
| 7159 static void __ATTRS_o_ai | |
| 7160 vec_stvehx(vector pixel a, int b, short *c) | |
| 7161 { | |
| 7162 __builtin_altivec_stvehx((vector short)a, b, c); | |
| 7163 } | |
| 7164 | |
| 7165 static void __ATTRS_o_ai | |
| 7166 vec_stvehx(vector pixel a, int b, unsigned short *c) | |
| 7167 { | |
| 7168 __builtin_altivec_stvehx((vector short)a, b, c); | |
| 7169 } | |
| 7170 | |
| 7171 /* vec_stvewx */ | |
| 7172 | |
| 7173 static void __ATTRS_o_ai | |
| 7174 vec_stvewx(vector int a, int b, int *c) | |
| 7175 { | |
| 7176 __builtin_altivec_stvewx(a, b, c); | |
| 7177 } | |
| 7178 | |
| 7179 static void __ATTRS_o_ai | |
| 7180 vec_stvewx(vector unsigned int a, int b, unsigned int *c) | |
| 7181 { | |
| 7182 __builtin_altivec_stvewx((vector int)a, b, c); | |
| 7183 } | |
| 7184 | |
| 7185 static void __ATTRS_o_ai | |
| 7186 vec_stvewx(vector bool int a, int b, int *c) | |
| 7187 { | |
| 7188 __builtin_altivec_stvewx((vector int)a, b, c); | |
| 7189 } | |
| 7190 | |
| 7191 static void __ATTRS_o_ai | |
| 7192 vec_stvewx(vector bool int a, int b, unsigned int *c) | |
| 7193 { | |
| 7194 __builtin_altivec_stvewx((vector int)a, b, c); | |
| 7195 } | |
| 7196 | |
| 7197 static void __ATTRS_o_ai | |
| 7198 vec_stvewx(vector float a, int b, float *c) | |
| 7199 { | |
| 7200 __builtin_altivec_stvewx((vector int)a, b, c); | |
| 7201 } | |
| 7202 | |
| 7203 /* vec_stl */ | |
| 7204 | |
| 7205 static void __ATTRS_o_ai | |
| 7206 vec_stl(vector signed char a, int b, vector signed char *c) | |
| 7207 { | |
| 7208 __builtin_altivec_stvxl((vector int)a, b, c); | |
| 7209 } | |
| 7210 | |
| 7211 static void __ATTRS_o_ai | |
| 7212 vec_stl(vector signed char a, int b, signed char *c) | |
| 7213 { | |
| 7214 __builtin_altivec_stvxl((vector int)a, b, c); | |
| 7215 } | |
| 7216 | |
| 7217 static void __ATTRS_o_ai | |
| 7218 vec_stl(vector unsigned char a, int b, vector unsigned char *c) | |
| 7219 { | |
| 7220 __builtin_altivec_stvxl((vector int)a, b, c); | |
| 7221 } | |
| 7222 | |
| 7223 static void __ATTRS_o_ai | |
| 7224 vec_stl(vector unsigned char a, int b, unsigned char *c) | |
| 7225 { | |
| 7226 __builtin_altivec_stvxl((vector int)a, b, c); | |
| 7227 } | |
| 7228 | |
| 7229 static void __ATTRS_o_ai | |
| 7230 vec_stl(vector bool char a, int b, signed char *c) | |
| 7231 { | |
| 7232 __builtin_altivec_stvxl((vector int)a, b, c); | |
| 7233 } | |
| 7234 | |
| 7235 static void __ATTRS_o_ai | |
| 7236 vec_stl(vector bool char a, int b, unsigned char *c) | |
| 7237 { | |
| 7238 __builtin_altivec_stvxl((vector int)a, b, c); | |
| 7239 } | |
| 7240 | |
| 7241 static void __ATTRS_o_ai | |
| 7242 vec_stl(vector bool char a, int b, vector bool char *c) | |
| 7243 { | |
| 7244 __builtin_altivec_stvxl((vector int)a, b, c); | |
| 7245 } | |
| 7246 | |
| 7247 static void __ATTRS_o_ai | |
| 7248 vec_stl(vector short a, int b, vector short *c) | |
| 7249 { | |
| 7250 __builtin_altivec_stvxl((vector int)a, b, c); | |
| 7251 } | |
| 7252 | |
| 7253 static void __ATTRS_o_ai | |
| 7254 vec_stl(vector short a, int b, short *c) | |
| 7255 { | |
| 7256 __builtin_altivec_stvxl((vector int)a, b, c); | |
| 7257 } | |
| 7258 | |
| 7259 static void __ATTRS_o_ai | |
| 7260 vec_stl(vector unsigned short a, int b, vector unsigned short *c) | |
| 7261 { | |
| 7262 __builtin_altivec_stvxl((vector int)a, b, c); | |
| 7263 } | |
| 7264 | |
| 7265 static void __ATTRS_o_ai | |
| 7266 vec_stl(vector unsigned short a, int b, unsigned short *c) | |
| 7267 { | |
| 7268 __builtin_altivec_stvxl((vector int)a, b, c); | |
| 7269 } | |
| 7270 | |
| 7271 static void __ATTRS_o_ai | |
| 7272 vec_stl(vector bool short a, int b, short *c) | |
| 7273 { | |
| 7274 __builtin_altivec_stvxl((vector int)a, b, c); | |
| 7275 } | |
| 7276 | |
| 7277 static void __ATTRS_o_ai | |
| 7278 vec_stl(vector bool short a, int b, unsigned short *c) | |
| 7279 { | |
| 7280 __builtin_altivec_stvxl((vector int)a, b, c); | |
| 7281 } | |
| 7282 | |
| 7283 static void __ATTRS_o_ai | |
| 7284 vec_stl(vector bool short a, int b, vector bool short *c) | |
| 7285 { | |
| 7286 __builtin_altivec_stvxl((vector int)a, b, c); | |
| 7287 } | |
| 7288 | |
| 7289 static void __ATTRS_o_ai | |
| 7290 vec_stl(vector pixel a, int b, short *c) | |
| 7291 { | |
| 7292 __builtin_altivec_stvxl((vector int)a, b, c); | |
| 7293 } | |
| 7294 | |
| 7295 static void __ATTRS_o_ai | |
| 7296 vec_stl(vector pixel a, int b, unsigned short *c) | |
| 7297 { | |
| 7298 __builtin_altivec_stvxl((vector int)a, b, c); | |
| 7299 } | |
| 7300 | |
| 7301 static void __ATTRS_o_ai | |
| 7302 vec_stl(vector pixel a, int b, vector pixel *c) | |
| 7303 { | |
| 7304 __builtin_altivec_stvxl((vector int)a, b, c); | |
| 7305 } | |
| 7306 | |
| 7307 static void __ATTRS_o_ai | |
| 7308 vec_stl(vector int a, int b, vector int *c) | |
| 7309 { | |
| 7310 __builtin_altivec_stvxl(a, b, c); | |
| 7311 } | |
| 7312 | |
| 7313 static void __ATTRS_o_ai | |
| 7314 vec_stl(vector int a, int b, int *c) | |
| 7315 { | |
| 7316 __builtin_altivec_stvxl(a, b, c); | |
| 7317 } | |
| 7318 | |
| 7319 static void __ATTRS_o_ai | |
| 7320 vec_stl(vector unsigned int a, int b, vector unsigned int *c) | |
| 7321 { | |
| 7322 __builtin_altivec_stvxl((vector int)a, b, c); | |
| 7323 } | |
| 7324 | |
| 7325 static void __ATTRS_o_ai | |
| 7326 vec_stl(vector unsigned int a, int b, unsigned int *c) | |
| 7327 { | |
| 7328 __builtin_altivec_stvxl((vector int)a, b, c); | |
| 7329 } | |
| 7330 | |
| 7331 static void __ATTRS_o_ai | |
| 7332 vec_stl(vector bool int a, int b, int *c) | |
| 7333 { | |
| 7334 __builtin_altivec_stvxl((vector int)a, b, c); | |
| 7335 } | |
| 7336 | |
| 7337 static void __ATTRS_o_ai | |
| 7338 vec_stl(vector bool int a, int b, unsigned int *c) | |
| 7339 { | |
| 7340 __builtin_altivec_stvxl((vector int)a, b, c); | |
| 7341 } | |
| 7342 | |
| 7343 static void __ATTRS_o_ai | |
| 7344 vec_stl(vector bool int a, int b, vector bool int *c) | |
| 7345 { | |
| 7346 __builtin_altivec_stvxl((vector int)a, b, c); | |
| 7347 } | |
| 7348 | |
| 7349 static void __ATTRS_o_ai | |
| 7350 vec_stl(vector float a, int b, vector float *c) | |
| 7351 { | |
| 7352 __builtin_altivec_stvxl((vector int)a, b, c); | |
| 7353 } | |
| 7354 | |
| 7355 static void __ATTRS_o_ai | |
| 7356 vec_stl(vector float a, int b, float *c) | |
| 7357 { | |
| 7358 __builtin_altivec_stvxl((vector int)a, b, c); | |
| 7359 } | |
| 7360 | |
| 7361 /* vec_stvxl */ | |
| 7362 | |
| 7363 static void __ATTRS_o_ai | |
| 7364 vec_stvxl(vector signed char a, int b, vector signed char *c) | |
| 7365 { | |
| 7366 __builtin_altivec_stvxl((vector int)a, b, c); | |
| 7367 } | |
| 7368 | |
| 7369 static void __ATTRS_o_ai | |
| 7370 vec_stvxl(vector signed char a, int b, signed char *c) | |
| 7371 { | |
| 7372 __builtin_altivec_stvxl((vector int)a, b, c); | |
| 7373 } | |
| 7374 | |
| 7375 static void __ATTRS_o_ai | |
| 7376 vec_stvxl(vector unsigned char a, int b, vector unsigned char *c) | |
| 7377 { | |
| 7378 __builtin_altivec_stvxl((vector int)a, b, c); | |
| 7379 } | |
| 7380 | |
| 7381 static void __ATTRS_o_ai | |
| 7382 vec_stvxl(vector unsigned char a, int b, unsigned char *c) | |
| 7383 { | |
| 7384 __builtin_altivec_stvxl((vector int)a, b, c); | |
| 7385 } | |
| 7386 | |
| 7387 static void __ATTRS_o_ai | |
| 7388 vec_stvxl(vector bool char a, int b, signed char *c) | |
| 7389 { | |
| 7390 __builtin_altivec_stvxl((vector int)a, b, c); | |
| 7391 } | |
| 7392 | |
| 7393 static void __ATTRS_o_ai | |
| 7394 vec_stvxl(vector bool char a, int b, unsigned char *c) | |
| 7395 { | |
| 7396 __builtin_altivec_stvxl((vector int)a, b, c); | |
| 7397 } | |
| 7398 | |
| 7399 static void __ATTRS_o_ai | |
| 7400 vec_stvxl(vector bool char a, int b, vector bool char *c) | |
| 7401 { | |
| 7402 __builtin_altivec_stvxl((vector int)a, b, c); | |
| 7403 } | |
| 7404 | |
| 7405 static void __ATTRS_o_ai | |
| 7406 vec_stvxl(vector short a, int b, vector short *c) | |
| 7407 { | |
| 7408 __builtin_altivec_stvxl((vector int)a, b, c); | |
| 7409 } | |
| 7410 | |
| 7411 static void __ATTRS_o_ai | |
| 7412 vec_stvxl(vector short a, int b, short *c) | |
| 7413 { | |
| 7414 __builtin_altivec_stvxl((vector int)a, b, c); | |
| 7415 } | |
| 7416 | |
| 7417 static void __ATTRS_o_ai | |
| 7418 vec_stvxl(vector unsigned short a, int b, vector unsigned short *c) | |
| 7419 { | |
| 7420 __builtin_altivec_stvxl((vector int)a, b, c); | |
| 7421 } | |
| 7422 | |
| 7423 static void __ATTRS_o_ai | |
| 7424 vec_stvxl(vector unsigned short a, int b, unsigned short *c) | |
| 7425 { | |
| 7426 __builtin_altivec_stvxl((vector int)a, b, c); | |
| 7427 } | |
| 7428 | |
| 7429 static void __ATTRS_o_ai | |
| 7430 vec_stvxl(vector bool short a, int b, short *c) | |
| 7431 { | |
| 7432 __builtin_altivec_stvxl((vector int)a, b, c); | |
| 7433 } | |
| 7434 | |
| 7435 static void __ATTRS_o_ai | |
| 7436 vec_stvxl(vector bool short a, int b, unsigned short *c) | |
| 7437 { | |
| 7438 __builtin_altivec_stvxl((vector int)a, b, c); | |
| 7439 } | |
| 7440 | |
| 7441 static void __ATTRS_o_ai | |
| 7442 vec_stvxl(vector bool short a, int b, vector bool short *c) | |
| 7443 { | |
| 7444 __builtin_altivec_stvxl((vector int)a, b, c); | |
| 7445 } | |
| 7446 | |
| 7447 static void __ATTRS_o_ai | |
| 7448 vec_stvxl(vector pixel a, int b, short *c) | |
| 7449 { | |
| 7450 __builtin_altivec_stvxl((vector int)a, b, c); | |
| 7451 } | |
| 7452 | |
| 7453 static void __ATTRS_o_ai | |
| 7454 vec_stvxl(vector pixel a, int b, unsigned short *c) | |
| 7455 { | |
| 7456 __builtin_altivec_stvxl((vector int)a, b, c); | |
| 7457 } | |
| 7458 | |
| 7459 static void __ATTRS_o_ai | |
| 7460 vec_stvxl(vector pixel a, int b, vector pixel *c) | |
| 7461 { | |
| 7462 __builtin_altivec_stvxl((vector int)a, b, c); | |
| 7463 } | |
| 7464 | |
| 7465 static void __ATTRS_o_ai | |
| 7466 vec_stvxl(vector int a, int b, vector int *c) | |
| 7467 { | |
| 7468 __builtin_altivec_stvxl(a, b, c); | |
| 7469 } | |
| 7470 | |
| 7471 static void __ATTRS_o_ai | |
| 7472 vec_stvxl(vector int a, int b, int *c) | |
| 7473 { | |
| 7474 __builtin_altivec_stvxl(a, b, c); | |
| 7475 } | |
| 7476 | |
| 7477 static void __ATTRS_o_ai | |
| 7478 vec_stvxl(vector unsigned int a, int b, vector unsigned int *c) | |
| 7479 { | |
| 7480 __builtin_altivec_stvxl((vector int)a, b, c); | |
| 7481 } | |
| 7482 | |
| 7483 static void __ATTRS_o_ai | |
| 7484 vec_stvxl(vector unsigned int a, int b, unsigned int *c) | |
| 7485 { | |
| 7486 __builtin_altivec_stvxl((vector int)a, b, c); | |
| 7487 } | |
| 7488 | |
| 7489 static void __ATTRS_o_ai | |
| 7490 vec_stvxl(vector bool int a, int b, int *c) | |
| 7491 { | |
| 7492 __builtin_altivec_stvxl((vector int)a, b, c); | |
| 7493 } | |
| 7494 | |
| 7495 static void __ATTRS_o_ai | |
| 7496 vec_stvxl(vector bool int a, int b, unsigned int *c) | |
| 7497 { | |
| 7498 __builtin_altivec_stvxl((vector int)a, b, c); | |
| 7499 } | |
| 7500 | |
| 7501 static void __ATTRS_o_ai | |
| 7502 vec_stvxl(vector bool int a, int b, vector bool int *c) | |
| 7503 { | |
| 7504 __builtin_altivec_stvxl((vector int)a, b, c); | |
| 7505 } | |
| 7506 | |
| 7507 static void __ATTRS_o_ai | |
| 7508 vec_stvxl(vector float a, int b, vector float *c) | |
| 7509 { | |
| 7510 __builtin_altivec_stvxl((vector int)a, b, c); | |
| 7511 } | |
| 7512 | |
| 7513 static void __ATTRS_o_ai | |
| 7514 vec_stvxl(vector float a, int b, float *c) | |
| 7515 { | |
| 7516 __builtin_altivec_stvxl((vector int)a, b, c); | |
| 7517 } | |
| 7518 | |
| 7519 /* vec_sub */ | |
| 7520 | |
| 7521 static vector signed char __ATTRS_o_ai | |
| 7522 vec_sub(vector signed char a, vector signed char b) | |
| 7523 { | |
| 7524 return a - b; | |
| 7525 } | |
| 7526 | |
| 7527 static vector signed char __ATTRS_o_ai | |
| 7528 vec_sub(vector bool char a, vector signed char b) | |
| 7529 { | |
| 7530 return (vector signed char)a - b; | |
| 7531 } | |
| 7532 | |
| 7533 static vector signed char __ATTRS_o_ai | |
| 7534 vec_sub(vector signed char a, vector bool char b) | |
| 7535 { | |
| 7536 return a - (vector signed char)b; | |
| 7537 } | |
| 7538 | |
| 7539 static vector unsigned char __ATTRS_o_ai | |
| 7540 vec_sub(vector unsigned char a, vector unsigned char b) | |
| 7541 { | |
| 7542 return a - b; | |
| 7543 } | |
| 7544 | |
| 7545 static vector unsigned char __ATTRS_o_ai | |
| 7546 vec_sub(vector bool char a, vector unsigned char b) | |
| 7547 { | |
| 7548 return (vector unsigned char)a - b; | |
| 7549 } | |
| 7550 | |
| 7551 static vector unsigned char __ATTRS_o_ai | |
| 7552 vec_sub(vector unsigned char a, vector bool char b) | |
| 7553 { | |
| 7554 return a - (vector unsigned char)b; | |
| 7555 } | |
| 7556 | |
| 7557 static vector short __ATTRS_o_ai | |
| 7558 vec_sub(vector short a, vector short b) | |
| 7559 { | |
| 7560 return a - b; | |
| 7561 } | |
| 7562 | |
| 7563 static vector short __ATTRS_o_ai | |
| 7564 vec_sub(vector bool short a, vector short b) | |
| 7565 { | |
| 7566 return (vector short)a - b; | |
| 7567 } | |
| 7568 | |
| 7569 static vector short __ATTRS_o_ai | |
| 7570 vec_sub(vector short a, vector bool short b) | |
| 7571 { | |
| 7572 return a - (vector short)b; | |
| 7573 } | |
| 7574 | |
| 7575 static vector unsigned short __ATTRS_o_ai | |
| 7576 vec_sub(vector unsigned short a, vector unsigned short b) | |
| 7577 { | |
| 7578 return a - b; | |
| 7579 } | |
| 7580 | |
| 7581 static vector unsigned short __ATTRS_o_ai | |
| 7582 vec_sub(vector bool short a, vector unsigned short b) | |
| 7583 { | |
| 7584 return (vector unsigned short)a - b; | |
| 7585 } | |
| 7586 | |
| 7587 static vector unsigned short __ATTRS_o_ai | |
| 7588 vec_sub(vector unsigned short a, vector bool short b) | |
| 7589 { | |
| 7590 return a - (vector unsigned short)b; | |
| 7591 } | |
| 7592 | |
| 7593 static vector int __ATTRS_o_ai | |
| 7594 vec_sub(vector int a, vector int b) | |
| 7595 { | |
| 7596 return a - b; | |
| 7597 } | |
| 7598 | |
| 7599 static vector int __ATTRS_o_ai | |
| 7600 vec_sub(vector bool int a, vector int b) | |
| 7601 { | |
| 7602 return (vector int)a - b; | |
| 7603 } | |
| 7604 | |
| 7605 static vector int __ATTRS_o_ai | |
| 7606 vec_sub(vector int a, vector bool int b) | |
| 7607 { | |
| 7608 return a - (vector int)b; | |
| 7609 } | |
| 7610 | |
| 7611 static vector unsigned int __ATTRS_o_ai | |
| 7612 vec_sub(vector unsigned int a, vector unsigned int b) | |
| 7613 { | |
| 7614 return a - b; | |
| 7615 } | |
| 7616 | |
| 7617 static vector unsigned int __ATTRS_o_ai | |
| 7618 vec_sub(vector bool int a, vector unsigned int b) | |
| 7619 { | |
| 7620 return (vector unsigned int)a - b; | |
| 7621 } | |
| 7622 | |
| 7623 static vector unsigned int __ATTRS_o_ai | |
| 7624 vec_sub(vector unsigned int a, vector bool int b) | |
| 7625 { | |
| 7626 return a - (vector unsigned int)b; | |
| 7627 } | |
| 7628 | |
| 7629 static vector float __ATTRS_o_ai | |
| 7630 vec_sub(vector float a, vector float b) | |
| 7631 { | |
| 7632 return a - b; | |
| 7633 } | |
| 7634 | |
| 7635 /* vec_vsububm */ | |
| 7636 | |
| 7637 #define __builtin_altivec_vsububm vec_vsububm | |
| 7638 | |
| 7639 static vector signed char __ATTRS_o_ai | |
| 7640 vec_vsububm(vector signed char a, vector signed char b) | |
| 7641 { | |
| 7642 return a - b; | |
| 7643 } | |
| 7644 | |
| 7645 static vector signed char __ATTRS_o_ai | |
| 7646 vec_vsububm(vector bool char a, vector signed char b) | |
| 7647 { | |
| 7648 return (vector signed char)a - b; | |
| 7649 } | |
| 7650 | |
| 7651 static vector signed char __ATTRS_o_ai | |
| 7652 vec_vsububm(vector signed char a, vector bool char b) | |
| 7653 { | |
| 7654 return a - (vector signed char)b; | |
| 7655 } | |
| 7656 | |
| 7657 static vector unsigned char __ATTRS_o_ai | |
| 7658 vec_vsububm(vector unsigned char a, vector unsigned char b) | |
| 7659 { | |
| 7660 return a - b; | |
| 7661 } | |
| 7662 | |
| 7663 static vector unsigned char __ATTRS_o_ai | |
| 7664 vec_vsububm(vector bool char a, vector unsigned char b) | |
| 7665 { | |
| 7666 return (vector unsigned char)a - b; | |
| 7667 } | |
| 7668 | |
| 7669 static vector unsigned char __ATTRS_o_ai | |
| 7670 vec_vsububm(vector unsigned char a, vector bool char b) | |
| 7671 { | |
| 7672 return a - (vector unsigned char)b; | |
| 7673 } | |
| 7674 | |
| 7675 /* vec_vsubuhm */ | |
| 7676 | |
| 7677 #define __builtin_altivec_vsubuhm vec_vsubuhm | |
| 7678 | |
| 7679 static vector short __ATTRS_o_ai | |
| 7680 vec_vsubuhm(vector short a, vector short b) | |
| 7681 { | |
| 7682 return a - b; | |
| 7683 } | |
| 7684 | |
| 7685 static vector short __ATTRS_o_ai | |
| 7686 vec_vsubuhm(vector bool short a, vector short b) | |
| 7687 { | |
| 7688 return (vector short)a - b; | |
| 7689 } | |
| 7690 | |
| 7691 static vector short __ATTRS_o_ai | |
| 7692 vec_vsubuhm(vector short a, vector bool short b) | |
| 7693 { | |
| 7694 return a - (vector short)b; | |
| 7695 } | |
| 7696 | |
| 7697 static vector unsigned short __ATTRS_o_ai | |
| 7698 vec_vsubuhm(vector unsigned short a, vector unsigned short b) | |
| 7699 { | |
| 7700 return a - b; | |
| 7701 } | |
| 7702 | |
| 7703 static vector unsigned short __ATTRS_o_ai | |
| 7704 vec_vsubuhm(vector bool short a, vector unsigned short b) | |
| 7705 { | |
| 7706 return (vector unsigned short)a - b; | |
| 7707 } | |
| 7708 | |
| 7709 static vector unsigned short __ATTRS_o_ai | |
| 7710 vec_vsubuhm(vector unsigned short a, vector bool short b) | |
| 7711 { | |
| 7712 return a - (vector unsigned short)b; | |
| 7713 } | |
| 7714 | |
| 7715 /* vec_vsubuwm */ | |
| 7716 | |
| 7717 #define __builtin_altivec_vsubuwm vec_vsubuwm | |
| 7718 | |
| 7719 static vector int __ATTRS_o_ai | |
| 7720 vec_vsubuwm(vector int a, vector int b) | |
| 7721 { | |
| 7722 return a - b; | |
| 7723 } | |
| 7724 | |
| 7725 static vector int __ATTRS_o_ai | |
| 7726 vec_vsubuwm(vector bool int a, vector int b) | |
| 7727 { | |
| 7728 return (vector int)a - b; | |
| 7729 } | |
| 7730 | |
| 7731 static vector int __ATTRS_o_ai | |
| 7732 vec_vsubuwm(vector int a, vector bool int b) | |
| 7733 { | |
| 7734 return a - (vector int)b; | |
| 7735 } | |
| 7736 | |
| 7737 static vector unsigned int __ATTRS_o_ai | |
| 7738 vec_vsubuwm(vector unsigned int a, vector unsigned int b) | |
| 7739 { | |
| 7740 return a - b; | |
| 7741 } | |
| 7742 | |
| 7743 static vector unsigned int __ATTRS_o_ai | |
| 7744 vec_vsubuwm(vector bool int a, vector unsigned int b) | |
| 7745 { | |
| 7746 return (vector unsigned int)a - b; | |
| 7747 } | |
| 7748 | |
| 7749 static vector unsigned int __ATTRS_o_ai | |
| 7750 vec_vsubuwm(vector unsigned int a, vector bool int b) | |
| 7751 { | |
| 7752 return a - (vector unsigned int)b; | |
| 7753 } | |
| 7754 | |
| 7755 /* vec_vsubfp */ | |
| 7756 | |
| 7757 #define __builtin_altivec_vsubfp vec_vsubfp | |
| 7758 | |
| 7759 static vector float __attribute__((__always_inline__)) | |
| 7760 vec_vsubfp(vector float a, vector float b) | |
| 7761 { | |
| 7762 return a - b; | |
| 7763 } | |
| 7764 | |
| 7765 /* vec_subc */ | |
| 7766 | |
| 7767 static vector unsigned int __attribute__((__always_inline__)) | |
| 7768 vec_subc(vector unsigned int a, vector unsigned int b) | |
| 7769 { | |
| 7770 return __builtin_altivec_vsubcuw(a, b); | |
| 7771 } | |
| 7772 | |
| 7773 /* vec_vsubcuw */ | |
| 7774 | |
| 7775 static vector unsigned int __attribute__((__always_inline__)) | |
| 7776 vec_vsubcuw(vector unsigned int a, vector unsigned int b) | |
| 7777 { | |
| 7778 return __builtin_altivec_vsubcuw(a, b); | |
| 7779 } | |
| 7780 | |
| 7781 /* vec_subs */ | |
| 7782 | |
| 7783 static vector signed char __ATTRS_o_ai | |
| 7784 vec_subs(vector signed char a, vector signed char b) | |
| 7785 { | |
| 7786 return __builtin_altivec_vsubsbs(a, b); | |
| 7787 } | |
| 7788 | |
| 7789 static vector signed char __ATTRS_o_ai | |
| 7790 vec_subs(vector bool char a, vector signed char b) | |
| 7791 { | |
| 7792 return __builtin_altivec_vsubsbs((vector signed char)a, b); | |
| 7793 } | |
| 7794 | |
| 7795 static vector signed char __ATTRS_o_ai | |
| 7796 vec_subs(vector signed char a, vector bool char b) | |
| 7797 { | |
| 7798 return __builtin_altivec_vsubsbs(a, (vector signed char)b); | |
| 7799 } | |
| 7800 | |
| 7801 static vector unsigned char __ATTRS_o_ai | |
| 7802 vec_subs(vector unsigned char a, vector unsigned char b) | |
| 7803 { | |
| 7804 return __builtin_altivec_vsububs(a, b); | |
| 7805 } | |
| 7806 | |
| 7807 static vector unsigned char __ATTRS_o_ai | |
| 7808 vec_subs(vector bool char a, vector unsigned char b) | |
| 7809 { | |
| 7810 return __builtin_altivec_vsububs((vector unsigned char)a, b); | |
| 7811 } | |
| 7812 | |
| 7813 static vector unsigned char __ATTRS_o_ai | |
| 7814 vec_subs(vector unsigned char a, vector bool char b) | |
| 7815 { | |
| 7816 return __builtin_altivec_vsububs(a, (vector unsigned char)b); | |
| 7817 } | |
| 7818 | |
| 7819 static vector short __ATTRS_o_ai | |
| 7820 vec_subs(vector short a, vector short b) | |
| 7821 { | |
| 7822 return __builtin_altivec_vsubshs(a, b); | |
| 7823 } | |
| 7824 | |
| 7825 static vector short __ATTRS_o_ai | |
| 7826 vec_subs(vector bool short a, vector short b) | |
| 7827 { | |
| 7828 return __builtin_altivec_vsubshs((vector short)a, b); | |
| 7829 } | |
| 7830 | |
| 7831 static vector short __ATTRS_o_ai | |
| 7832 vec_subs(vector short a, vector bool short b) | |
| 7833 { | |
| 7834 return __builtin_altivec_vsubshs(a, (vector short)b); | |
| 7835 } | |
| 7836 | |
| 7837 static vector unsigned short __ATTRS_o_ai | |
| 7838 vec_subs(vector unsigned short a, vector unsigned short b) | |
| 7839 { | |
| 7840 return __builtin_altivec_vsubuhs(a, b); | |
| 7841 } | |
| 7842 | |
| 7843 static vector unsigned short __ATTRS_o_ai | |
| 7844 vec_subs(vector bool short a, vector unsigned short b) | |
| 7845 { | |
| 7846 return __builtin_altivec_vsubuhs((vector unsigned short)a, b); | |
| 7847 } | |
| 7848 | |
| 7849 static vector unsigned short __ATTRS_o_ai | |
| 7850 vec_subs(vector unsigned short a, vector bool short b) | |
| 7851 { | |
| 7852 return __builtin_altivec_vsubuhs(a, (vector unsigned short)b); | |
| 7853 } | |
| 7854 | |
| 7855 static vector int __ATTRS_o_ai | |
| 7856 vec_subs(vector int a, vector int b) | |
| 7857 { | |
| 7858 return __builtin_altivec_vsubsws(a, b); | |
| 7859 } | |
| 7860 | |
| 7861 static vector int __ATTRS_o_ai | |
| 7862 vec_subs(vector bool int a, vector int b) | |
| 7863 { | |
| 7864 return __builtin_altivec_vsubsws((vector int)a, b); | |
| 7865 } | |
| 7866 | |
| 7867 static vector int __ATTRS_o_ai | |
| 7868 vec_subs(vector int a, vector bool int b) | |
| 7869 { | |
| 7870 return __builtin_altivec_vsubsws(a, (vector int)b); | |
| 7871 } | |
| 7872 | |
| 7873 static vector unsigned int __ATTRS_o_ai | |
| 7874 vec_subs(vector unsigned int a, vector unsigned int b) | |
| 7875 { | |
| 7876 return __builtin_altivec_vsubuws(a, b); | |
| 7877 } | |
| 7878 | |
| 7879 static vector unsigned int __ATTRS_o_ai | |
| 7880 vec_subs(vector bool int a, vector unsigned int b) | |
| 7881 { | |
| 7882 return __builtin_altivec_vsubuws((vector unsigned int)a, b); | |
| 7883 } | |
| 7884 | |
| 7885 static vector unsigned int __ATTRS_o_ai | |
| 7886 vec_subs(vector unsigned int a, vector bool int b) | |
| 7887 { | |
| 7888 return __builtin_altivec_vsubuws(a, (vector unsigned int)b); | |
| 7889 } | |
| 7890 | |
| 7891 /* vec_vsubsbs */ | |
| 7892 | |
| 7893 static vector signed char __ATTRS_o_ai | |
| 7894 vec_vsubsbs(vector signed char a, vector signed char b) | |
| 7895 { | |
| 7896 return __builtin_altivec_vsubsbs(a, b); | |
| 7897 } | |
| 7898 | |
| 7899 static vector signed char __ATTRS_o_ai | |
| 7900 vec_vsubsbs(vector bool char a, vector signed char b) | |
| 7901 { | |
| 7902 return __builtin_altivec_vsubsbs((vector signed char)a, b); | |
| 7903 } | |
| 7904 | |
| 7905 static vector signed char __ATTRS_o_ai | |
| 7906 vec_vsubsbs(vector signed char a, vector bool char b) | |
| 7907 { | |
| 7908 return __builtin_altivec_vsubsbs(a, (vector signed char)b); | |
| 7909 } | |
| 7910 | |
| 7911 /* vec_vsububs */ | |
| 7912 | |
| 7913 static vector unsigned char __ATTRS_o_ai | |
| 7914 vec_vsububs(vector unsigned char a, vector unsigned char b) | |
| 7915 { | |
| 7916 return __builtin_altivec_vsububs(a, b); | |
| 7917 } | |
| 7918 | |
| 7919 static vector unsigned char __ATTRS_o_ai | |
| 7920 vec_vsububs(vector bool char a, vector unsigned char b) | |
| 7921 { | |
| 7922 return __builtin_altivec_vsububs((vector unsigned char)a, b); | |
| 7923 } | |
| 7924 | |
| 7925 static vector unsigned char __ATTRS_o_ai | |
| 7926 vec_vsububs(vector unsigned char a, vector bool char b) | |
| 7927 { | |
| 7928 return __builtin_altivec_vsububs(a, (vector unsigned char)b); | |
| 7929 } | |
| 7930 | |
| 7931 /* vec_vsubshs */ | |
| 7932 | |
| 7933 static vector short __ATTRS_o_ai | |
| 7934 vec_vsubshs(vector short a, vector short b) | |
| 7935 { | |
| 7936 return __builtin_altivec_vsubshs(a, b); | |
| 7937 } | |
| 7938 | |
| 7939 static vector short __ATTRS_o_ai | |
| 7940 vec_vsubshs(vector bool short a, vector short b) | |
| 7941 { | |
| 7942 return __builtin_altivec_vsubshs((vector short)a, b); | |
| 7943 } | |
| 7944 | |
| 7945 static vector short __ATTRS_o_ai | |
| 7946 vec_vsubshs(vector short a, vector bool short b) | |
| 7947 { | |
| 7948 return __builtin_altivec_vsubshs(a, (vector short)b); | |
| 7949 } | |
| 7950 | |
| 7951 /* vec_vsubuhs */ | |
| 7952 | |
| 7953 static vector unsigned short __ATTRS_o_ai | |
| 7954 vec_vsubuhs(vector unsigned short a, vector unsigned short b) | |
| 7955 { | |
| 7956 return __builtin_altivec_vsubuhs(a, b); | |
| 7957 } | |
| 7958 | |
| 7959 static vector unsigned short __ATTRS_o_ai | |
| 7960 vec_vsubuhs(vector bool short a, vector unsigned short b) | |
| 7961 { | |
| 7962 return __builtin_altivec_vsubuhs((vector unsigned short)a, b); | |
| 7963 } | |
| 7964 | |
| 7965 static vector unsigned short __ATTRS_o_ai | |
| 7966 vec_vsubuhs(vector unsigned short a, vector bool short b) | |
| 7967 { | |
| 7968 return __builtin_altivec_vsubuhs(a, (vector unsigned short)b); | |
| 7969 } | |
| 7970 | |
| 7971 /* vec_vsubsws */ | |
| 7972 | |
| 7973 static vector int __ATTRS_o_ai | |
| 7974 vec_vsubsws(vector int a, vector int b) | |
| 7975 { | |
| 7976 return __builtin_altivec_vsubsws(a, b); | |
| 7977 } | |
| 7978 | |
| 7979 static vector int __ATTRS_o_ai | |
| 7980 vec_vsubsws(vector bool int a, vector int b) | |
| 7981 { | |
| 7982 return __builtin_altivec_vsubsws((vector int)a, b); | |
| 7983 } | |
| 7984 | |
| 7985 static vector int __ATTRS_o_ai | |
| 7986 vec_vsubsws(vector int a, vector bool int b) | |
| 7987 { | |
| 7988 return __builtin_altivec_vsubsws(a, (vector int)b); | |
| 7989 } | |
| 7990 | |
| 7991 /* vec_vsubuws */ | |
| 7992 | |
| 7993 static vector unsigned int __ATTRS_o_ai | |
| 7994 vec_vsubuws(vector unsigned int a, vector unsigned int b) | |
| 7995 { | |
| 7996 return __builtin_altivec_vsubuws(a, b); | |
| 7997 } | |
| 7998 | |
| 7999 static vector unsigned int __ATTRS_o_ai | |
| 8000 vec_vsubuws(vector bool int a, vector unsigned int b) | |
| 8001 { | |
| 8002 return __builtin_altivec_vsubuws((vector unsigned int)a, b); | |
| 8003 } | |
| 8004 | |
| 8005 static vector unsigned int __ATTRS_o_ai | |
| 8006 vec_vsubuws(vector unsigned int a, vector bool int b) | |
| 8007 { | |
| 8008 return __builtin_altivec_vsubuws(a, (vector unsigned int)b); | |
| 8009 } | |
| 8010 | |
| 8011 /* vec_sum4s */ | |
| 8012 | |
| 8013 static vector int __ATTRS_o_ai | |
| 8014 vec_sum4s(vector signed char a, vector int b) | |
| 8015 { | |
| 8016 return __builtin_altivec_vsum4sbs(a, b); | |
| 8017 } | |
| 8018 | |
| 8019 static vector unsigned int __ATTRS_o_ai | |
| 8020 vec_sum4s(vector unsigned char a, vector unsigned int b) | |
| 8021 { | |
| 8022 return __builtin_altivec_vsum4ubs(a, b); | |
| 8023 } | |
| 8024 | |
| 8025 static vector int __ATTRS_o_ai | |
| 8026 vec_sum4s(vector signed short a, vector int b) | |
| 8027 { | |
| 8028 return __builtin_altivec_vsum4shs(a, b); | |
| 8029 } | |
| 8030 | |
| 8031 /* vec_vsum4sbs */ | |
| 8032 | |
| 8033 static vector int __attribute__((__always_inline__)) | |
| 8034 vec_vsum4sbs(vector signed char a, vector int b) | |
| 8035 { | |
| 8036 return __builtin_altivec_vsum4sbs(a, b); | |
| 8037 } | |
| 8038 | |
| 8039 /* vec_vsum4ubs */ | |
| 8040 | |
| 8041 static vector unsigned int __attribute__((__always_inline__)) | |
| 8042 vec_vsum4ubs(vector unsigned char a, vector unsigned int b) | |
| 8043 { | |
| 8044 return __builtin_altivec_vsum4ubs(a, b); | |
| 8045 } | |
| 8046 | |
| 8047 /* vec_vsum4shs */ | |
| 8048 | |
| 8049 static vector int __attribute__((__always_inline__)) | |
| 8050 vec_vsum4shs(vector signed short a, vector int b) | |
| 8051 { | |
| 8052 return __builtin_altivec_vsum4shs(a, b); | |
| 8053 } | |
| 8054 | |
| 8055 /* vec_sum2s */ | |
| 8056 | |
| 8057 static vector signed int __attribute__((__always_inline__)) | |
| 8058 vec_sum2s(vector int a, vector int b) | |
| 8059 { | |
| 8060 return __builtin_altivec_vsum2sws(a, b); | |
| 8061 } | |
| 8062 | |
| 8063 /* vec_vsum2sws */ | |
| 8064 | |
| 8065 static vector signed int __attribute__((__always_inline__)) | |
| 8066 vec_vsum2sws(vector int a, vector int b) | |
| 8067 { | |
| 8068 return __builtin_altivec_vsum2sws(a, b); | |
| 8069 } | |
| 8070 | |
| 8071 /* vec_sums */ | |
| 8072 | |
| 8073 static vector signed int __attribute__((__always_inline__)) | |
| 8074 vec_sums(vector signed int a, vector signed int b) | |
| 8075 { | |
| 8076 return __builtin_altivec_vsumsws(a, b); | |
| 8077 } | |
| 8078 | |
| 8079 /* vec_vsumsws */ | |
| 8080 | |
| 8081 static vector signed int __attribute__((__always_inline__)) | |
| 8082 vec_vsumsws(vector signed int a, vector signed int b) | |
| 8083 { | |
| 8084 return __builtin_altivec_vsumsws(a, b); | |
| 8085 } | |
| 8086 | |
| 8087 /* vec_trunc */ | |
| 8088 | |
| 8089 static vector float __attribute__((__always_inline__)) | |
| 8090 vec_trunc(vector float a) | |
| 8091 { | |
| 8092 return __builtin_altivec_vrfiz(a); | |
| 8093 } | |
| 8094 | |
| 8095 /* vec_vrfiz */ | |
| 8096 | |
| 8097 static vector float __attribute__((__always_inline__)) | |
| 8098 vec_vrfiz(vector float a) | |
| 8099 { | |
| 8100 return __builtin_altivec_vrfiz(a); | |
| 8101 } | |
| 8102 | |
| 8103 /* vec_unpackh */ | |
| 8104 | |
| 8105 static vector short __ATTRS_o_ai | |
| 8106 vec_unpackh(vector signed char a) | |
| 8107 { | |
| 8108 return __builtin_altivec_vupkhsb((vector char)a); | |
| 8109 } | |
| 8110 | |
| 8111 static vector bool short __ATTRS_o_ai | |
| 8112 vec_unpackh(vector bool char a) | |
| 8113 { | |
| 8114 return (vector bool short)__builtin_altivec_vupkhsb((vector char)a); | |
| 8115 } | |
| 8116 | |
| 8117 static vector int __ATTRS_o_ai | |
| 8118 vec_unpackh(vector short a) | |
| 8119 { | |
| 8120 return __builtin_altivec_vupkhsh(a); | |
| 8121 } | |
| 8122 | |
| 8123 static vector bool int __ATTRS_o_ai | |
| 8124 vec_unpackh(vector bool short a) | |
| 8125 { | |
| 8126 return (vector bool int)__builtin_altivec_vupkhsh((vector short)a); | |
| 8127 } | |
| 8128 | |
| 8129 static vector unsigned int __ATTRS_o_ai | |
| 8130 vec_unpackh(vector pixel a) | |
| 8131 { | |
| 8132 return (vector unsigned int)__builtin_altivec_vupkhsh((vector short)a); | |
| 8133 } | |
| 8134 | |
| 8135 /* vec_vupkhsb */ | |
| 8136 | |
| 8137 static vector short __ATTRS_o_ai | |
| 8138 vec_vupkhsb(vector signed char a) | |
| 8139 { | |
| 8140 return __builtin_altivec_vupkhsb((vector char)a); | |
| 8141 } | |
| 8142 | |
| 8143 static vector bool short __ATTRS_o_ai | |
| 8144 vec_vupkhsb(vector bool char a) | |
| 8145 { | |
| 8146 return (vector bool short)__builtin_altivec_vupkhsb((vector char)a); | |
| 8147 } | |
| 8148 | |
| 8149 /* vec_vupkhsh */ | |
| 8150 | |
| 8151 static vector int __ATTRS_o_ai | |
| 8152 vec_vupkhsh(vector short a) | |
| 8153 { | |
| 8154 return __builtin_altivec_vupkhsh(a); | |
| 8155 } | |
| 8156 | |
| 8157 static vector bool int __ATTRS_o_ai | |
| 8158 vec_vupkhsh(vector bool short a) | |
| 8159 { | |
| 8160 return (vector bool int)__builtin_altivec_vupkhsh((vector short)a); | |
| 8161 } | |
| 8162 | |
| 8163 static vector unsigned int __ATTRS_o_ai | |
| 8164 vec_vupkhsh(vector pixel a) | |
| 8165 { | |
| 8166 return (vector unsigned int)__builtin_altivec_vupkhsh((vector short)a); | |
| 8167 } | |
| 8168 | |
| 8169 /* vec_unpackl */ | |
| 8170 | |
| 8171 static vector short __ATTRS_o_ai | |
| 8172 vec_unpackl(vector signed char a) | |
| 8173 { | |
| 8174 return __builtin_altivec_vupklsb((vector char)a); | |
| 8175 } | |
| 8176 | |
| 8177 static vector bool short __ATTRS_o_ai | |
| 8178 vec_unpackl(vector bool char a) | |
| 8179 { | |
| 8180 return (vector bool short)__builtin_altivec_vupklsb((vector char)a); | |
| 8181 } | |
| 8182 | |
| 8183 static vector int __ATTRS_o_ai | |
| 8184 vec_unpackl(vector short a) | |
| 8185 { | |
| 8186 return __builtin_altivec_vupklsh(a); | |
| 8187 } | |
| 8188 | |
| 8189 static vector bool int __ATTRS_o_ai | |
| 8190 vec_unpackl(vector bool short a) | |
| 8191 { | |
| 8192 return (vector bool int)__builtin_altivec_vupklsh((vector short)a); | |
| 8193 } | |
| 8194 | |
| 8195 static vector unsigned int __ATTRS_o_ai | |
| 8196 vec_unpackl(vector pixel a) | |
| 8197 { | |
| 8198 return (vector unsigned int)__builtin_altivec_vupklsh((vector short)a); | |
| 8199 } | |
| 8200 | |
| 8201 /* vec_vupklsb */ | |
| 8202 | |
| 8203 static vector short __ATTRS_o_ai | |
| 8204 vec_vupklsb(vector signed char a) | |
| 8205 { | |
| 8206 return __builtin_altivec_vupklsb((vector char)a); | |
| 8207 } | |
| 8208 | |
| 8209 static vector bool short __ATTRS_o_ai | |
| 8210 vec_vupklsb(vector bool char a) | |
| 8211 { | |
| 8212 return (vector bool short)__builtin_altivec_vupklsb((vector char)a); | |
| 8213 } | |
| 8214 | |
| 8215 /* vec_vupklsh */ | |
| 8216 | |
| 8217 static vector int __ATTRS_o_ai | |
| 8218 vec_vupklsh(vector short a) | |
| 8219 { | |
| 8220 return __builtin_altivec_vupklsh(a); | |
| 8221 } | |
| 8222 | |
| 8223 static vector bool int __ATTRS_o_ai | |
| 8224 vec_vupklsh(vector bool short a) | |
| 8225 { | |
| 8226 return (vector bool int)__builtin_altivec_vupklsh((vector short)a); | |
| 8227 } | |
| 8228 | |
| 8229 static vector unsigned int __ATTRS_o_ai | |
| 8230 vec_vupklsh(vector pixel a) | |
| 8231 { | |
| 8232 return (vector unsigned int)__builtin_altivec_vupklsh((vector short)a); | |
| 8233 } | |
| 8234 | |
| 8235 /* vec_xor */ | |
| 8236 | |
| 8237 #define __builtin_altivec_vxor vec_xor | |
| 8238 | |
| 8239 static vector signed char __ATTRS_o_ai | |
| 8240 vec_xor(vector signed char a, vector signed char b) | |
| 8241 { | |
| 8242 return a ^ b; | |
| 8243 } | |
| 8244 | |
| 8245 static vector signed char __ATTRS_o_ai | |
| 8246 vec_xor(vector bool char a, vector signed char b) | |
| 8247 { | |
| 8248 return (vector signed char)a ^ b; | |
| 8249 } | |
| 8250 | |
| 8251 static vector signed char __ATTRS_o_ai | |
| 8252 vec_xor(vector signed char a, vector bool char b) | |
| 8253 { | |
| 8254 return a ^ (vector signed char)b; | |
| 8255 } | |
| 8256 | |
| 8257 static vector unsigned char __ATTRS_o_ai | |
| 8258 vec_xor(vector unsigned char a, vector unsigned char b) | |
| 8259 { | |
| 8260 return a ^ b; | |
| 8261 } | |
| 8262 | |
| 8263 static vector unsigned char __ATTRS_o_ai | |
| 8264 vec_xor(vector bool char a, vector unsigned char b) | |
| 8265 { | |
| 8266 return (vector unsigned char)a ^ b; | |
| 8267 } | |
| 8268 | |
| 8269 static vector unsigned char __ATTRS_o_ai | |
| 8270 vec_xor(vector unsigned char a, vector bool char b) | |
| 8271 { | |
| 8272 return a ^ (vector unsigned char)b; | |
| 8273 } | |
| 8274 | |
| 8275 static vector bool char __ATTRS_o_ai | |
| 8276 vec_xor(vector bool char a, vector bool char b) | |
| 8277 { | |
| 8278 return a ^ b; | |
| 8279 } | |
| 8280 | |
| 8281 static vector short __ATTRS_o_ai | |
| 8282 vec_xor(vector short a, vector short b) | |
| 8283 { | |
| 8284 return a ^ b; | |
| 8285 } | |
| 8286 | |
| 8287 static vector short __ATTRS_o_ai | |
| 8288 vec_xor(vector bool short a, vector short b) | |
| 8289 { | |
| 8290 return (vector short)a ^ b; | |
| 8291 } | |
| 8292 | |
| 8293 static vector short __ATTRS_o_ai | |
| 8294 vec_xor(vector short a, vector bool short b) | |
| 8295 { | |
| 8296 return a ^ (vector short)b; | |
| 8297 } | |
| 8298 | |
| 8299 static vector unsigned short __ATTRS_o_ai | |
| 8300 vec_xor(vector unsigned short a, vector unsigned short b) | |
| 8301 { | |
| 8302 return a ^ b; | |
| 8303 } | |
| 8304 | |
| 8305 static vector unsigned short __ATTRS_o_ai | |
| 8306 vec_xor(vector bool short a, vector unsigned short b) | |
| 8307 { | |
| 8308 return (vector unsigned short)a ^ b; | |
| 8309 } | |
| 8310 | |
| 8311 static vector unsigned short __ATTRS_o_ai | |
| 8312 vec_xor(vector unsigned short a, vector bool short b) | |
| 8313 { | |
| 8314 return a ^ (vector unsigned short)b; | |
| 8315 } | |
| 8316 | |
| 8317 static vector bool short __ATTRS_o_ai | |
| 8318 vec_xor(vector bool short a, vector bool short b) | |
| 8319 { | |
| 8320 return a ^ b; | |
| 8321 } | |
| 8322 | |
| 8323 static vector int __ATTRS_o_ai | |
| 8324 vec_xor(vector int a, vector int b) | |
| 8325 { | |
| 8326 return a ^ b; | |
| 8327 } | |
| 8328 | |
| 8329 static vector int __ATTRS_o_ai | |
| 8330 vec_xor(vector bool int a, vector int b) | |
| 8331 { | |
| 8332 return (vector int)a ^ b; | |
| 8333 } | |
| 8334 | |
| 8335 static vector int __ATTRS_o_ai | |
| 8336 vec_xor(vector int a, vector bool int b) | |
| 8337 { | |
| 8338 return a ^ (vector int)b; | |
| 8339 } | |
| 8340 | |
| 8341 static vector unsigned int __ATTRS_o_ai | |
| 8342 vec_xor(vector unsigned int a, vector unsigned int b) | |
| 8343 { | |
| 8344 return a ^ b; | |
| 8345 } | |
| 8346 | |
| 8347 static vector unsigned int __ATTRS_o_ai | |
| 8348 vec_xor(vector bool int a, vector unsigned int b) | |
| 8349 { | |
| 8350 return (vector unsigned int)a ^ b; | |
| 8351 } | |
| 8352 | |
| 8353 static vector unsigned int __ATTRS_o_ai | |
| 8354 vec_xor(vector unsigned int a, vector bool int b) | |
| 8355 { | |
| 8356 return a ^ (vector unsigned int)b; | |
| 8357 } | |
| 8358 | |
| 8359 static vector bool int __ATTRS_o_ai | |
| 8360 vec_xor(vector bool int a, vector bool int b) | |
| 8361 { | |
| 8362 return a ^ b; | |
| 8363 } | |
| 8364 | |
| 8365 static vector float __ATTRS_o_ai | |
| 8366 vec_xor(vector float a, vector float b) | |
| 8367 { | |
| 8368 vector unsigned int res = (vector unsigned int)a ^ (vector unsigned int)b; | |
| 8369 return (vector float)res; | |
| 8370 } | |
| 8371 | |
| 8372 static vector float __ATTRS_o_ai | |
| 8373 vec_xor(vector bool int a, vector float b) | |
| 8374 { | |
| 8375 vector unsigned int res = (vector unsigned int)a ^ (vector unsigned int)b; | |
| 8376 return (vector float)res; | |
| 8377 } | |
| 8378 | |
| 8379 static vector float __ATTRS_o_ai | |
| 8380 vec_xor(vector float a, vector bool int b) | |
| 8381 { | |
| 8382 vector unsigned int res = (vector unsigned int)a ^ (vector unsigned int)b; | |
| 8383 return (vector float)res; | |
| 8384 } | |
| 8385 | |
| 8386 /* vec_vxor */ | |
| 8387 | |
| 8388 static vector signed char __ATTRS_o_ai | |
| 8389 vec_vxor(vector signed char a, vector signed char b) | |
| 8390 { | |
| 8391 return a ^ b; | |
| 8392 } | |
| 8393 | |
| 8394 static vector signed char __ATTRS_o_ai | |
| 8395 vec_vxor(vector bool char a, vector signed char b) | |
| 8396 { | |
| 8397 return (vector signed char)a ^ b; | |
| 8398 } | |
| 8399 | |
| 8400 static vector signed char __ATTRS_o_ai | |
| 8401 vec_vxor(vector signed char a, vector bool char b) | |
| 8402 { | |
| 8403 return a ^ (vector signed char)b; | |
| 8404 } | |
| 8405 | |
| 8406 static vector unsigned char __ATTRS_o_ai | |
| 8407 vec_vxor(vector unsigned char a, vector unsigned char b) | |
| 8408 { | |
| 8409 return a ^ b; | |
| 8410 } | |
| 8411 | |
| 8412 static vector unsigned char __ATTRS_o_ai | |
| 8413 vec_vxor(vector bool char a, vector unsigned char b) | |
| 8414 { | |
| 8415 return (vector unsigned char)a ^ b; | |
| 8416 } | |
| 8417 | |
| 8418 static vector unsigned char __ATTRS_o_ai | |
| 8419 vec_vxor(vector unsigned char a, vector bool char b) | |
| 8420 { | |
| 8421 return a ^ (vector unsigned char)b; | |
| 8422 } | |
| 8423 | |
| 8424 static vector bool char __ATTRS_o_ai | |
| 8425 vec_vxor(vector bool char a, vector bool char b) | |
| 8426 { | |
| 8427 return a ^ b; | |
| 8428 } | |
| 8429 | |
| 8430 static vector short __ATTRS_o_ai | |
| 8431 vec_vxor(vector short a, vector short b) | |
| 8432 { | |
| 8433 return a ^ b; | |
| 8434 } | |
| 8435 | |
| 8436 static vector short __ATTRS_o_ai | |
| 8437 vec_vxor(vector bool short a, vector short b) | |
| 8438 { | |
| 8439 return (vector short)a ^ b; | |
| 8440 } | |
| 8441 | |
| 8442 static vector short __ATTRS_o_ai | |
| 8443 vec_vxor(vector short a, vector bool short b) | |
| 8444 { | |
| 8445 return a ^ (vector short)b; | |
| 8446 } | |
| 8447 | |
| 8448 static vector unsigned short __ATTRS_o_ai | |
| 8449 vec_vxor(vector unsigned short a, vector unsigned short b) | |
| 8450 { | |
| 8451 return a ^ b; | |
| 8452 } | |
| 8453 | |
| 8454 static vector unsigned short __ATTRS_o_ai | |
| 8455 vec_vxor(vector bool short a, vector unsigned short b) | |
| 8456 { | |
| 8457 return (vector unsigned short)a ^ b; | |
| 8458 } | |
| 8459 | |
| 8460 static vector unsigned short __ATTRS_o_ai | |
| 8461 vec_vxor(vector unsigned short a, vector bool short b) | |
| 8462 { | |
| 8463 return a ^ (vector unsigned short)b; | |
| 8464 } | |
| 8465 | |
| 8466 static vector bool short __ATTRS_o_ai | |
| 8467 vec_vxor(vector bool short a, vector bool short b) | |
| 8468 { | |
| 8469 return a ^ b; | |
| 8470 } | |
| 8471 | |
| 8472 static vector int __ATTRS_o_ai | |
| 8473 vec_vxor(vector int a, vector int b) | |
| 8474 { | |
| 8475 return a ^ b; | |
| 8476 } | |
| 8477 | |
| 8478 static vector int __ATTRS_o_ai | |
| 8479 vec_vxor(vector bool int a, vector int b) | |
| 8480 { | |
| 8481 return (vector int)a ^ b; | |
| 8482 } | |
| 8483 | |
| 8484 static vector int __ATTRS_o_ai | |
| 8485 vec_vxor(vector int a, vector bool int b) | |
| 8486 { | |
| 8487 return a ^ (vector int)b; | |
| 8488 } | |
| 8489 | |
| 8490 static vector unsigned int __ATTRS_o_ai | |
| 8491 vec_vxor(vector unsigned int a, vector unsigned int b) | |
| 8492 { | |
| 8493 return a ^ b; | |
| 8494 } | |
| 8495 | |
| 8496 static vector unsigned int __ATTRS_o_ai | |
| 8497 vec_vxor(vector bool int a, vector unsigned int b) | |
| 8498 { | |
| 8499 return (vector unsigned int)a ^ b; | |
| 8500 } | |
| 8501 | |
| 8502 static vector unsigned int __ATTRS_o_ai | |
| 8503 vec_vxor(vector unsigned int a, vector bool int b) | |
| 8504 { | |
| 8505 return a ^ (vector unsigned int)b; | |
| 8506 } | |
| 8507 | |
| 8508 static vector bool int __ATTRS_o_ai | |
| 8509 vec_vxor(vector bool int a, vector bool int b) | |
| 8510 { | |
| 8511 return a ^ b; | |
| 8512 } | |
| 8513 | |
| 8514 static vector float __ATTRS_o_ai | |
| 8515 vec_vxor(vector float a, vector float b) | |
| 8516 { | |
| 8517 vector unsigned int res = (vector unsigned int)a ^ (vector unsigned int)b; | |
| 8518 return (vector float)res; | |
| 8519 } | |
| 8520 | |
| 8521 static vector float __ATTRS_o_ai | |
| 8522 vec_vxor(vector bool int a, vector float b) | |
| 8523 { | |
| 8524 vector unsigned int res = (vector unsigned int)a ^ (vector unsigned int)b; | |
| 8525 return (vector float)res; | |
| 8526 } | |
| 8527 | |
| 8528 static vector float __ATTRS_o_ai | |
| 8529 vec_vxor(vector float a, vector bool int b) | |
| 8530 { | |
| 8531 vector unsigned int res = (vector unsigned int)a ^ (vector unsigned int)b; | |
| 8532 return (vector float)res; | |
| 8533 } | |
| 8534 | |
| 8535 /* ------------------------ extensions for CBEA ----------------------------- */ | |
| 8536 | |
| 8537 /* vec_extract */ | |
| 8538 | |
| 8539 static signed char __ATTRS_o_ai | |
| 8540 vec_extract(vector signed char a, int b) | |
| 8541 { | |
| 8542 return a[b]; | |
| 8543 } | |
| 8544 | |
| 8545 static unsigned char __ATTRS_o_ai | |
| 8546 vec_extract(vector unsigned char a, int b) | |
| 8547 { | |
| 8548 return a[b]; | |
| 8549 } | |
| 8550 | |
| 8551 static short __ATTRS_o_ai | |
| 8552 vec_extract(vector short a, int b) | |
| 8553 { | |
| 8554 return a[b]; | |
| 8555 } | |
| 8556 | |
| 8557 static unsigned short __ATTRS_o_ai | |
| 8558 vec_extract(vector unsigned short a, int b) | |
| 8559 { | |
| 8560 return a[b]; | |
| 8561 } | |
| 8562 | |
| 8563 static int __ATTRS_o_ai | |
| 8564 vec_extract(vector int a, int b) | |
| 8565 { | |
| 8566 return a[b]; | |
| 8567 } | |
| 8568 | |
| 8569 static unsigned int __ATTRS_o_ai | |
| 8570 vec_extract(vector unsigned int a, int b) | |
| 8571 { | |
| 8572 return a[b]; | |
| 8573 } | |
| 8574 | |
| 8575 static float __ATTRS_o_ai | |
| 8576 vec_extract(vector float a, int b) | |
| 8577 { | |
| 8578 return a[b]; | |
| 8579 } | |
| 8580 | |
| 8581 /* vec_insert */ | |
| 8582 | |
| 8583 static vector signed char __ATTRS_o_ai | |
| 8584 vec_insert(signed char a, vector signed char b, int c) | |
| 8585 { | |
| 8586 b[c] = a; | |
| 8587 return b; | |
| 8588 } | |
| 8589 | |
| 8590 static vector unsigned char __ATTRS_o_ai | |
| 8591 vec_insert(unsigned char a, vector unsigned char b, int c) | |
| 8592 { | |
| 8593 b[c] = a; | |
| 8594 return b; | |
| 8595 } | |
| 8596 | |
| 8597 static vector short __ATTRS_o_ai | |
| 8598 vec_insert(short a, vector short b, int c) | |
| 8599 { | |
| 8600 b[c] = a; | |
| 8601 return b; | |
| 8602 } | |
| 8603 | |
| 8604 static vector unsigned short __ATTRS_o_ai | |
| 8605 vec_insert(unsigned short a, vector unsigned short b, int c) | |
| 8606 { | |
| 8607 b[c] = a; | |
| 8608 return b; | |
| 8609 } | |
| 8610 | |
| 8611 static vector int __ATTRS_o_ai | |
| 8612 vec_insert(int a, vector int b, int c) | |
| 8613 { | |
| 8614 b[c] = a; | |
| 8615 return b; | |
| 8616 } | |
| 8617 | |
| 8618 static vector unsigned int __ATTRS_o_ai | |
| 8619 vec_insert(unsigned int a, vector unsigned int b, int c) | |
| 8620 { | |
| 8621 b[c] = a; | |
| 8622 return b; | |
| 8623 } | |
| 8624 | |
| 8625 static vector float __ATTRS_o_ai | |
| 8626 vec_insert(float a, vector float b, int c) | |
| 8627 { | |
| 8628 b[c] = a; | |
| 8629 return b; | |
| 8630 } | |
| 8631 | |
| 8632 /* vec_lvlx */ | |
| 8633 | |
| 8634 static vector signed char __ATTRS_o_ai | |
| 8635 vec_lvlx(int a, const signed char *b) | |
| 8636 { | |
| 8637 return vec_perm(vec_ld(a, b), | |
| 8638 (vector signed char)(0), | |
| 8639 vec_lvsl(a, b)); | |
| 8640 } | |
| 8641 | |
| 8642 static vector signed char __ATTRS_o_ai | |
| 8643 vec_lvlx(int a, const vector signed char *b) | |
| 8644 { | |
| 8645 return vec_perm(vec_ld(a, b), | |
| 8646 (vector signed char)(0), | |
| 8647 vec_lvsl(a, (unsigned char *)b)); | |
| 8648 } | |
| 8649 | |
| 8650 static vector unsigned char __ATTRS_o_ai | |
| 8651 vec_lvlx(int a, const unsigned char *b) | |
| 8652 { | |
| 8653 return vec_perm(vec_ld(a, b), | |
| 8654 (vector unsigned char)(0), | |
| 8655 vec_lvsl(a, b)); | |
| 8656 } | |
| 8657 | |
| 8658 static vector unsigned char __ATTRS_o_ai | |
| 8659 vec_lvlx(int a, const vector unsigned char *b) | |
| 8660 { | |
| 8661 return vec_perm(vec_ld(a, b), | |
| 8662 (vector unsigned char)(0), | |
| 8663 vec_lvsl(a, (unsigned char *)b)); | |
| 8664 } | |
| 8665 | |
| 8666 static vector bool char __ATTRS_o_ai | |
| 8667 vec_lvlx(int a, const vector bool char *b) | |
| 8668 { | |
| 8669 return vec_perm(vec_ld(a, b), | |
| 8670 (vector bool char)(0), | |
| 8671 vec_lvsl(a, (unsigned char *)b)); | |
| 8672 } | |
| 8673 | |
| 8674 static vector short __ATTRS_o_ai | |
| 8675 vec_lvlx(int a, const short *b) | |
| 8676 { | |
| 8677 return vec_perm(vec_ld(a, b), | |
| 8678 (vector short)(0), | |
| 8679 vec_lvsl(a, b)); | |
| 8680 } | |
| 8681 | |
| 8682 static vector short __ATTRS_o_ai | |
| 8683 vec_lvlx(int a, const vector short *b) | |
| 8684 { | |
| 8685 return vec_perm(vec_ld(a, b), | |
| 8686 (vector short)(0), | |
| 8687 vec_lvsl(a, (unsigned char *)b)); | |
| 8688 } | |
| 8689 | |
| 8690 static vector unsigned short __ATTRS_o_ai | |
| 8691 vec_lvlx(int a, const unsigned short *b) | |
| 8692 { | |
| 8693 return vec_perm(vec_ld(a, b), | |
| 8694 (vector unsigned short)(0), | |
| 8695 vec_lvsl(a, b)); | |
| 8696 } | |
| 8697 | |
| 8698 static vector unsigned short __ATTRS_o_ai | |
| 8699 vec_lvlx(int a, const vector unsigned short *b) | |
| 8700 { | |
| 8701 return vec_perm(vec_ld(a, b), | |
| 8702 (vector unsigned short)(0), | |
| 8703 vec_lvsl(a, (unsigned char *)b)); | |
| 8704 } | |
| 8705 | |
| 8706 static vector bool short __ATTRS_o_ai | |
| 8707 vec_lvlx(int a, const vector bool short *b) | |
| 8708 { | |
| 8709 return vec_perm(vec_ld(a, b), | |
| 8710 (vector bool short)(0), | |
| 8711 vec_lvsl(a, (unsigned char *)b)); | |
| 8712 } | |
| 8713 | |
| 8714 static vector pixel __ATTRS_o_ai | |
| 8715 vec_lvlx(int a, const vector pixel *b) | |
| 8716 { | |
| 8717 return vec_perm(vec_ld(a, b), | |
| 8718 (vector pixel)(0), | |
| 8719 vec_lvsl(a, (unsigned char *)b)); | |
| 8720 } | |
| 8721 | |
| 8722 static vector int __ATTRS_o_ai | |
| 8723 vec_lvlx(int a, const int *b) | |
| 8724 { | |
| 8725 return vec_perm(vec_ld(a, b), | |
| 8726 (vector int)(0), | |
| 8727 vec_lvsl(a, b)); | |
| 8728 } | |
| 8729 | |
| 8730 static vector int __ATTRS_o_ai | |
| 8731 vec_lvlx(int a, const vector int *b) | |
| 8732 { | |
| 8733 return vec_perm(vec_ld(a, b), | |
| 8734 (vector int)(0), | |
| 8735 vec_lvsl(a, (unsigned char *)b)); | |
| 8736 } | |
| 8737 | |
| 8738 static vector unsigned int __ATTRS_o_ai | |
| 8739 vec_lvlx(int a, const unsigned int *b) | |
| 8740 { | |
| 8741 return vec_perm(vec_ld(a, b), | |
| 8742 (vector unsigned int)(0), | |
| 8743 vec_lvsl(a, b)); | |
| 8744 } | |
| 8745 | |
| 8746 static vector unsigned int __ATTRS_o_ai | |
| 8747 vec_lvlx(int a, const vector unsigned int *b) | |
| 8748 { | |
| 8749 return vec_perm(vec_ld(a, b), | |
| 8750 (vector unsigned int)(0), | |
| 8751 vec_lvsl(a, (unsigned char *)b)); | |
| 8752 } | |
| 8753 | |
| 8754 static vector bool int __ATTRS_o_ai | |
| 8755 vec_lvlx(int a, const vector bool int *b) | |
| 8756 { | |
| 8757 return vec_perm(vec_ld(a, b), | |
| 8758 (vector bool int)(0), | |
| 8759 vec_lvsl(a, (unsigned char *)b)); | |
| 8760 } | |
| 8761 | |
| 8762 static vector float __ATTRS_o_ai | |
| 8763 vec_lvlx(int a, const float *b) | |
| 8764 { | |
| 8765 return vec_perm(vec_ld(a, b), | |
| 8766 (vector float)(0), | |
| 8767 vec_lvsl(a, b)); | |
| 8768 } | |
| 8769 | |
| 8770 static vector float __ATTRS_o_ai | |
| 8771 vec_lvlx(int a, const vector float *b) | |
| 8772 { | |
| 8773 return vec_perm(vec_ld(a, b), | |
| 8774 (vector float)(0), | |
| 8775 vec_lvsl(a, (unsigned char *)b)); | |
| 8776 } | |
| 8777 | |
| 8778 /* vec_lvlxl */ | |
| 8779 | |
| 8780 static vector signed char __ATTRS_o_ai | |
| 8781 vec_lvlxl(int a, const signed char *b) | |
| 8782 { | |
| 8783 return vec_perm(vec_ldl(a, b), | |
| 8784 (vector signed char)(0), | |
| 8785 vec_lvsl(a, b)); | |
| 8786 } | |
| 8787 | |
| 8788 static vector signed char __ATTRS_o_ai | |
| 8789 vec_lvlxl(int a, const vector signed char *b) | |
| 8790 { | |
| 8791 return vec_perm(vec_ldl(a, b), | |
| 8792 (vector signed char)(0), | |
| 8793 vec_lvsl(a, (unsigned char *)b)); | |
| 8794 } | |
| 8795 | |
| 8796 static vector unsigned char __ATTRS_o_ai | |
| 8797 vec_lvlxl(int a, const unsigned char *b) | |
| 8798 { | |
| 8799 return vec_perm(vec_ldl(a, b), | |
| 8800 (vector unsigned char)(0), | |
| 8801 vec_lvsl(a, b)); | |
| 8802 } | |
| 8803 | |
| 8804 static vector unsigned char __ATTRS_o_ai | |
| 8805 vec_lvlxl(int a, const vector unsigned char *b) | |
| 8806 { | |
| 8807 return vec_perm(vec_ldl(a, b), | |
| 8808 (vector unsigned char)(0), | |
| 8809 vec_lvsl(a, (unsigned char *)b)); | |
| 8810 } | |
| 8811 | |
| 8812 static vector bool char __ATTRS_o_ai | |
| 8813 vec_lvlxl(int a, const vector bool char *b) | |
| 8814 { | |
| 8815 return vec_perm(vec_ldl(a, b), | |
| 8816 (vector bool char)(0), | |
| 8817 vec_lvsl(a, (unsigned char *)b)); | |
| 8818 } | |
| 8819 | |
| 8820 static vector short __ATTRS_o_ai | |
| 8821 vec_lvlxl(int a, const short *b) | |
| 8822 { | |
| 8823 return vec_perm(vec_ldl(a, b), | |
| 8824 (vector short)(0), | |
| 8825 vec_lvsl(a, b)); | |
| 8826 } | |
| 8827 | |
| 8828 static vector short __ATTRS_o_ai | |
| 8829 vec_lvlxl(int a, const vector short *b) | |
| 8830 { | |
| 8831 return vec_perm(vec_ldl(a, b), | |
| 8832 (vector short)(0), | |
| 8833 vec_lvsl(a, (unsigned char *)b)); | |
| 8834 } | |
| 8835 | |
| 8836 static vector unsigned short __ATTRS_o_ai | |
| 8837 vec_lvlxl(int a, const unsigned short *b) | |
| 8838 { | |
| 8839 return vec_perm(vec_ldl(a, b), | |
| 8840 (vector unsigned short)(0), | |
| 8841 vec_lvsl(a, b)); | |
| 8842 } | |
| 8843 | |
| 8844 static vector unsigned short __ATTRS_o_ai | |
| 8845 vec_lvlxl(int a, const vector unsigned short *b) | |
| 8846 { | |
| 8847 return vec_perm(vec_ldl(a, b), | |
| 8848 (vector unsigned short)(0), | |
| 8849 vec_lvsl(a, (unsigned char *)b)); | |
| 8850 } | |
| 8851 | |
| 8852 static vector bool short __ATTRS_o_ai | |
| 8853 vec_lvlxl(int a, const vector bool short *b) | |
| 8854 { | |
| 8855 return vec_perm(vec_ldl(a, b), | |
| 8856 (vector bool short)(0), | |
| 8857 vec_lvsl(a, (unsigned char *)b)); | |
| 8858 } | |
| 8859 | |
| 8860 static vector pixel __ATTRS_o_ai | |
| 8861 vec_lvlxl(int a, const vector pixel *b) | |
| 8862 { | |
| 8863 return vec_perm(vec_ldl(a, b), | |
| 8864 (vector pixel)(0), | |
| 8865 vec_lvsl(a, (unsigned char *)b)); | |
| 8866 } | |
| 8867 | |
| 8868 static vector int __ATTRS_o_ai | |
| 8869 vec_lvlxl(int a, const int *b) | |
| 8870 { | |
| 8871 return vec_perm(vec_ldl(a, b), | |
| 8872 (vector int)(0), | |
| 8873 vec_lvsl(a, b)); | |
| 8874 } | |
| 8875 | |
| 8876 static vector int __ATTRS_o_ai | |
| 8877 vec_lvlxl(int a, const vector int *b) | |
| 8878 { | |
| 8879 return vec_perm(vec_ldl(a, b), | |
| 8880 (vector int)(0), | |
| 8881 vec_lvsl(a, (unsigned char *)b)); | |
| 8882 } | |
| 8883 | |
| 8884 static vector unsigned int __ATTRS_o_ai | |
| 8885 vec_lvlxl(int a, const unsigned int *b) | |
| 8886 { | |
| 8887 return vec_perm(vec_ldl(a, b), | |
| 8888 (vector unsigned int)(0), | |
| 8889 vec_lvsl(a, b)); | |
| 8890 } | |
| 8891 | |
| 8892 static vector unsigned int __ATTRS_o_ai | |
| 8893 vec_lvlxl(int a, const vector unsigned int *b) | |
| 8894 { | |
| 8895 return vec_perm(vec_ldl(a, b), | |
| 8896 (vector unsigned int)(0), | |
| 8897 vec_lvsl(a, (unsigned char *)b)); | |
| 8898 } | |
| 8899 | |
| 8900 static vector bool int __ATTRS_o_ai | |
| 8901 vec_lvlxl(int a, const vector bool int *b) | |
| 8902 { | |
| 8903 return vec_perm(vec_ldl(a, b), | |
| 8904 (vector bool int)(0), | |
| 8905 vec_lvsl(a, (unsigned char *)b)); | |
| 8906 } | |
| 8907 | |
| 8908 static vector float __ATTRS_o_ai | |
| 8909 vec_lvlxl(int a, const float *b) | |
| 8910 { | |
| 8911 return vec_perm(vec_ldl(a, b), | |
| 8912 (vector float)(0), | |
| 8913 vec_lvsl(a, b)); | |
| 8914 } | |
| 8915 | |
| 8916 static vector float __ATTRS_o_ai | |
| 8917 vec_lvlxl(int a, vector float *b) | |
| 8918 { | |
| 8919 return vec_perm(vec_ldl(a, b), | |
| 8920 (vector float)(0), | |
| 8921 vec_lvsl(a, (unsigned char *)b)); | |
| 8922 } | |
| 8923 | |
| 8924 /* vec_lvrx */ | |
| 8925 | |
| 8926 static vector signed char __ATTRS_o_ai | |
| 8927 vec_lvrx(int a, const signed char *b) | |
| 8928 { | |
| 8929 return vec_perm((vector signed char)(0), | |
| 8930 vec_ld(a, b), | |
| 8931 vec_lvsl(a, b)); | |
| 8932 } | |
| 8933 | |
| 8934 static vector signed char __ATTRS_o_ai | |
| 8935 vec_lvrx(int a, const vector signed char *b) | |
| 8936 { | |
| 8937 return vec_perm((vector signed char)(0), | |
| 8938 vec_ld(a, b), | |
| 8939 vec_lvsl(a, (unsigned char *)b)); | |
| 8940 } | |
| 8941 | |
| 8942 static vector unsigned char __ATTRS_o_ai | |
| 8943 vec_lvrx(int a, const unsigned char *b) | |
| 8944 { | |
| 8945 return vec_perm((vector unsigned char)(0), | |
| 8946 vec_ld(a, b), | |
| 8947 vec_lvsl(a, b)); | |
| 8948 } | |
| 8949 | |
| 8950 static vector unsigned char __ATTRS_o_ai | |
| 8951 vec_lvrx(int a, const vector unsigned char *b) | |
| 8952 { | |
| 8953 return vec_perm((vector unsigned char)(0), | |
| 8954 vec_ld(a, b), | |
| 8955 vec_lvsl(a, (unsigned char *)b)); | |
| 8956 } | |
| 8957 | |
| 8958 static vector bool char __ATTRS_o_ai | |
| 8959 vec_lvrx(int a, const vector bool char *b) | |
| 8960 { | |
| 8961 return vec_perm((vector bool char)(0), | |
| 8962 vec_ld(a, b), | |
| 8963 vec_lvsl(a, (unsigned char *)b)); | |
| 8964 } | |
| 8965 | |
| 8966 static vector short __ATTRS_o_ai | |
| 8967 vec_lvrx(int a, const short *b) | |
| 8968 { | |
| 8969 return vec_perm((vector short)(0), | |
| 8970 vec_ld(a, b), | |
| 8971 vec_lvsl(a, b)); | |
| 8972 } | |
| 8973 | |
| 8974 static vector short __ATTRS_o_ai | |
| 8975 vec_lvrx(int a, const vector short *b) | |
| 8976 { | |
| 8977 return vec_perm((vector short)(0), | |
| 8978 vec_ld(a, b), | |
| 8979 vec_lvsl(a, (unsigned char *)b)); | |
| 8980 } | |
| 8981 | |
| 8982 static vector unsigned short __ATTRS_o_ai | |
| 8983 vec_lvrx(int a, const unsigned short *b) | |
| 8984 { | |
| 8985 return vec_perm((vector unsigned short)(0), | |
| 8986 vec_ld(a, b), | |
| 8987 vec_lvsl(a, b)); | |
| 8988 } | |
| 8989 | |
| 8990 static vector unsigned short __ATTRS_o_ai | |
| 8991 vec_lvrx(int a, const vector unsigned short *b) | |
| 8992 { | |
| 8993 return vec_perm((vector unsigned short)(0), | |
| 8994 vec_ld(a, b), | |
| 8995 vec_lvsl(a, (unsigned char *)b)); | |
| 8996 } | |
| 8997 | |
| 8998 static vector bool short __ATTRS_o_ai | |
| 8999 vec_lvrx(int a, const vector bool short *b) | |
| 9000 { | |
| 9001 return vec_perm((vector bool short)(0), | |
| 9002 vec_ld(a, b), | |
| 9003 vec_lvsl(a, (unsigned char *)b)); | |
| 9004 } | |
| 9005 | |
| 9006 static vector pixel __ATTRS_o_ai | |
| 9007 vec_lvrx(int a, const vector pixel *b) | |
| 9008 { | |
| 9009 return vec_perm((vector pixel)(0), | |
| 9010 vec_ld(a, b), | |
| 9011 vec_lvsl(a, (unsigned char *)b)); | |
| 9012 } | |
| 9013 | |
| 9014 static vector int __ATTRS_o_ai | |
| 9015 vec_lvrx(int a, const int *b) | |
| 9016 { | |
| 9017 return vec_perm((vector int)(0), | |
| 9018 vec_ld(a, b), | |
| 9019 vec_lvsl(a, b)); | |
| 9020 } | |
| 9021 | |
| 9022 static vector int __ATTRS_o_ai | |
| 9023 vec_lvrx(int a, const vector int *b) | |
| 9024 { | |
| 9025 return vec_perm((vector int)(0), | |
| 9026 vec_ld(a, b), | |
| 9027 vec_lvsl(a, (unsigned char *)b)); | |
| 9028 } | |
| 9029 | |
| 9030 static vector unsigned int __ATTRS_o_ai | |
| 9031 vec_lvrx(int a, const unsigned int *b) | |
| 9032 { | |
| 9033 return vec_perm((vector unsigned int)(0), | |
| 9034 vec_ld(a, b), | |
| 9035 vec_lvsl(a, b)); | |
| 9036 } | |
| 9037 | |
| 9038 static vector unsigned int __ATTRS_o_ai | |
| 9039 vec_lvrx(int a, const vector unsigned int *b) | |
| 9040 { | |
| 9041 return vec_perm((vector unsigned int)(0), | |
| 9042 vec_ld(a, b), | |
| 9043 vec_lvsl(a, (unsigned char *)b)); | |
| 9044 } | |
| 9045 | |
| 9046 static vector bool int __ATTRS_o_ai | |
| 9047 vec_lvrx(int a, const vector bool int *b) | |
| 9048 { | |
| 9049 return vec_perm((vector bool int)(0), | |
| 9050 vec_ld(a, b), | |
| 9051 vec_lvsl(a, (unsigned char *)b)); | |
| 9052 } | |
| 9053 | |
| 9054 static vector float __ATTRS_o_ai | |
| 9055 vec_lvrx(int a, const float *b) | |
| 9056 { | |
| 9057 return vec_perm((vector float)(0), | |
| 9058 vec_ld(a, b), | |
| 9059 vec_lvsl(a, b)); | |
| 9060 } | |
| 9061 | |
| 9062 static vector float __ATTRS_o_ai | |
| 9063 vec_lvrx(int a, const vector float *b) | |
| 9064 { | |
| 9065 return vec_perm((vector float)(0), | |
| 9066 vec_ld(a, b), | |
| 9067 vec_lvsl(a, (unsigned char *)b)); | |
| 9068 } | |
| 9069 | |
| 9070 /* vec_lvrxl */ | |
| 9071 | |
| 9072 static vector signed char __ATTRS_o_ai | |
| 9073 vec_lvrxl(int a, const signed char *b) | |
| 9074 { | |
| 9075 return vec_perm((vector signed char)(0), | |
| 9076 vec_ldl(a, b), | |
| 9077 vec_lvsl(a, b)); | |
| 9078 } | |
| 9079 | |
| 9080 static vector signed char __ATTRS_o_ai | |
| 9081 vec_lvrxl(int a, const vector signed char *b) | |
| 9082 { | |
| 9083 return vec_perm((vector signed char)(0), | |
| 9084 vec_ldl(a, b), | |
| 9085 vec_lvsl(a, (unsigned char *)b)); | |
| 9086 } | |
| 9087 | |
| 9088 static vector unsigned char __ATTRS_o_ai | |
| 9089 vec_lvrxl(int a, const unsigned char *b) | |
| 9090 { | |
| 9091 return vec_perm((vector unsigned char)(0), | |
| 9092 vec_ldl(a, b), | |
| 9093 vec_lvsl(a, b)); | |
| 9094 } | |
| 9095 | |
| 9096 static vector unsigned char __ATTRS_o_ai | |
| 9097 vec_lvrxl(int a, const vector unsigned char *b) | |
| 9098 { | |
| 9099 return vec_perm((vector unsigned char)(0), | |
| 9100 vec_ldl(a, b), | |
| 9101 vec_lvsl(a, (unsigned char *)b)); | |
| 9102 } | |
| 9103 | |
| 9104 static vector bool char __ATTRS_o_ai | |
| 9105 vec_lvrxl(int a, const vector bool char *b) | |
| 9106 { | |
| 9107 return vec_perm((vector bool char)(0), | |
| 9108 vec_ldl(a, b), | |
| 9109 vec_lvsl(a, (unsigned char *)b)); | |
| 9110 } | |
| 9111 | |
| 9112 static vector short __ATTRS_o_ai | |
| 9113 vec_lvrxl(int a, const short *b) | |
| 9114 { | |
| 9115 return vec_perm((vector short)(0), | |
| 9116 vec_ldl(a, b), | |
| 9117 vec_lvsl(a, b)); | |
| 9118 } | |
| 9119 | |
| 9120 static vector short __ATTRS_o_ai | |
| 9121 vec_lvrxl(int a, const vector short *b) | |
| 9122 { | |
| 9123 return vec_perm((vector short)(0), | |
| 9124 vec_ldl(a, b), | |
| 9125 vec_lvsl(a, (unsigned char *)b)); | |
| 9126 } | |
| 9127 | |
| 9128 static vector unsigned short __ATTRS_o_ai | |
| 9129 vec_lvrxl(int a, const unsigned short *b) | |
| 9130 { | |
| 9131 return vec_perm((vector unsigned short)(0), | |
| 9132 vec_ldl(a, b), | |
| 9133 vec_lvsl(a, b)); | |
| 9134 } | |
| 9135 | |
| 9136 static vector unsigned short __ATTRS_o_ai | |
| 9137 vec_lvrxl(int a, const vector unsigned short *b) | |
| 9138 { | |
| 9139 return vec_perm((vector unsigned short)(0), | |
| 9140 vec_ldl(a, b), | |
| 9141 vec_lvsl(a, (unsigned char *)b)); | |
| 9142 } | |
| 9143 | |
| 9144 static vector bool short __ATTRS_o_ai | |
| 9145 vec_lvrxl(int a, const vector bool short *b) | |
| 9146 { | |
| 9147 return vec_perm((vector bool short)(0), | |
| 9148 vec_ldl(a, b), | |
| 9149 vec_lvsl(a, (unsigned char *)b)); | |
| 9150 } | |
| 9151 | |
| 9152 static vector pixel __ATTRS_o_ai | |
| 9153 vec_lvrxl(int a, const vector pixel *b) | |
| 9154 { | |
| 9155 return vec_perm((vector pixel)(0), | |
| 9156 vec_ldl(a, b), | |
| 9157 vec_lvsl(a, (unsigned char *)b)); | |
| 9158 } | |
| 9159 | |
| 9160 static vector int __ATTRS_o_ai | |
| 9161 vec_lvrxl(int a, const int *b) | |
| 9162 { | |
| 9163 return vec_perm((vector int)(0), | |
| 9164 vec_ldl(a, b), | |
| 9165 vec_lvsl(a, b)); | |
| 9166 } | |
| 9167 | |
| 9168 static vector int __ATTRS_o_ai | |
| 9169 vec_lvrxl(int a, const vector int *b) | |
| 9170 { | |
| 9171 return vec_perm((vector int)(0), | |
| 9172 vec_ldl(a, b), | |
| 9173 vec_lvsl(a, (unsigned char *)b)); | |
| 9174 } | |
| 9175 | |
| 9176 static vector unsigned int __ATTRS_o_ai | |
| 9177 vec_lvrxl(int a, const unsigned int *b) | |
| 9178 { | |
| 9179 return vec_perm((vector unsigned int)(0), | |
| 9180 vec_ldl(a, b), | |
| 9181 vec_lvsl(a, b)); | |
| 9182 } | |
| 9183 | |
| 9184 static vector unsigned int __ATTRS_o_ai | |
| 9185 vec_lvrxl(int a, const vector unsigned int *b) | |
| 9186 { | |
| 9187 return vec_perm((vector unsigned int)(0), | |
| 9188 vec_ldl(a, b), | |
| 9189 vec_lvsl(a, (unsigned char *)b)); | |
| 9190 } | |
| 9191 | |
| 9192 static vector bool int __ATTRS_o_ai | |
| 9193 vec_lvrxl(int a, const vector bool int *b) | |
| 9194 { | |
| 9195 return vec_perm((vector bool int)(0), | |
| 9196 vec_ldl(a, b), | |
| 9197 vec_lvsl(a, (unsigned char *)b)); | |
| 9198 } | |
| 9199 | |
| 9200 static vector float __ATTRS_o_ai | |
| 9201 vec_lvrxl(int a, const float *b) | |
| 9202 { | |
| 9203 return vec_perm((vector float)(0), | |
| 9204 vec_ldl(a, b), | |
| 9205 vec_lvsl(a, b)); | |
| 9206 } | |
| 9207 | |
| 9208 static vector float __ATTRS_o_ai | |
| 9209 vec_lvrxl(int a, const vector float *b) | |
| 9210 { | |
| 9211 return vec_perm((vector float)(0), | |
| 9212 vec_ldl(a, b), | |
| 9213 vec_lvsl(a, (unsigned char *)b)); | |
| 9214 } | |
| 9215 | |
| 9216 /* vec_stvlx */ | |
| 9217 | |
| 9218 static void __ATTRS_o_ai | |
| 9219 vec_stvlx(vector signed char a, int b, signed char *c) | |
| 9220 { | |
| 9221 return vec_st(vec_perm(vec_lvrx(b, c), | |
| 9222 a, | |
| 9223 vec_lvsr(b, c)), | |
| 9224 b, c); | |
| 9225 } | |
| 9226 | |
| 9227 static void __ATTRS_o_ai | |
| 9228 vec_stvlx(vector signed char a, int b, vector signed char *c) | |
| 9229 { | |
| 9230 return vec_st(vec_perm(vec_lvrx(b, c), | |
| 9231 a, | |
| 9232 vec_lvsr(b, (unsigned char *)c)), | |
| 9233 b, c); | |
| 9234 } | |
| 9235 | |
| 9236 static void __ATTRS_o_ai | |
| 9237 vec_stvlx(vector unsigned char a, int b, unsigned char *c) | |
| 9238 { | |
| 9239 return vec_st(vec_perm(vec_lvrx(b, c), | |
| 9240 a, | |
| 9241 vec_lvsr(b, c)), | |
| 9242 b, c); | |
| 9243 } | |
| 9244 | |
| 9245 static void __ATTRS_o_ai | |
| 9246 vec_stvlx(vector unsigned char a, int b, vector unsigned char *c) | |
| 9247 { | |
| 9248 return vec_st(vec_perm(vec_lvrx(b, c), | |
| 9249 a, | |
| 9250 vec_lvsr(b, (unsigned char *)c)), | |
| 9251 b, c); | |
| 9252 } | |
| 9253 | |
| 9254 static void __ATTRS_o_ai | |
| 9255 vec_stvlx(vector bool char a, int b, vector bool char *c) | |
| 9256 { | |
| 9257 return vec_st(vec_perm(vec_lvrx(b, c), | |
| 9258 a, | |
| 9259 vec_lvsr(b, (unsigned char *)c)), | |
| 9260 b, c); | |
| 9261 } | |
| 9262 | |
| 9263 static void __ATTRS_o_ai | |
| 9264 vec_stvlx(vector short a, int b, short *c) | |
| 9265 { | |
| 9266 return vec_st(vec_perm(vec_lvrx(b, c), | |
| 9267 a, | |
| 9268 vec_lvsr(b, c)), | |
| 9269 b, c); | |
| 9270 } | |
| 9271 | |
| 9272 static void __ATTRS_o_ai | |
| 9273 vec_stvlx(vector short a, int b, vector short *c) | |
| 9274 { | |
| 9275 return vec_st(vec_perm(vec_lvrx(b, c), | |
| 9276 a, | |
| 9277 vec_lvsr(b, (unsigned char *)c)), | |
| 9278 b, c); | |
| 9279 } | |
| 9280 | |
| 9281 static void __ATTRS_o_ai | |
| 9282 vec_stvlx(vector unsigned short a, int b, unsigned short *c) | |
| 9283 { | |
| 9284 return vec_st(vec_perm(vec_lvrx(b, c), | |
| 9285 a, | |
| 9286 vec_lvsr(b, c)), | |
| 9287 b, c); | |
| 9288 } | |
| 9289 | |
| 9290 static void __ATTRS_o_ai | |
| 9291 vec_stvlx(vector unsigned short a, int b, vector unsigned short *c) | |
| 9292 { | |
| 9293 return vec_st(vec_perm(vec_lvrx(b, c), | |
| 9294 a, | |
| 9295 vec_lvsr(b, (unsigned char *)c)), | |
| 9296 b, c); | |
| 9297 } | |
| 9298 | |
| 9299 static void __ATTRS_o_ai | |
| 9300 vec_stvlx(vector bool short a, int b, vector bool short *c) | |
| 9301 { | |
| 9302 return vec_st(vec_perm(vec_lvrx(b, c), | |
| 9303 a, | |
| 9304 vec_lvsr(b, (unsigned char *)c)), | |
| 9305 b, c); | |
| 9306 } | |
| 9307 | |
| 9308 static void __ATTRS_o_ai | |
| 9309 vec_stvlx(vector pixel a, int b, vector pixel *c) | |
| 9310 { | |
| 9311 return vec_st(vec_perm(vec_lvrx(b, c), | |
| 9312 a, | |
| 9313 vec_lvsr(b, (unsigned char *)c)), | |
| 9314 b, c); | |
| 9315 } | |
| 9316 | |
| 9317 static void __ATTRS_o_ai | |
| 9318 vec_stvlx(vector int a, int b, int *c) | |
| 9319 { | |
| 9320 return vec_st(vec_perm(vec_lvrx(b, c), | |
| 9321 a, | |
| 9322 vec_lvsr(b, c)), | |
| 9323 b, c); | |
| 9324 } | |
| 9325 | |
| 9326 static void __ATTRS_o_ai | |
| 9327 vec_stvlx(vector int a, int b, vector int *c) | |
| 9328 { | |
| 9329 return vec_st(vec_perm(vec_lvrx(b, c), | |
| 9330 a, | |
| 9331 vec_lvsr(b, (unsigned char *)c)), | |
| 9332 b, c); | |
| 9333 } | |
| 9334 | |
| 9335 static void __ATTRS_o_ai | |
| 9336 vec_stvlx(vector unsigned int a, int b, unsigned int *c) | |
| 9337 { | |
| 9338 return vec_st(vec_perm(vec_lvrx(b, c), | |
| 9339 a, | |
| 9340 vec_lvsr(b, c)), | |
| 9341 b, c); | |
| 9342 } | |
| 9343 | |
| 9344 static void __ATTRS_o_ai | |
| 9345 vec_stvlx(vector unsigned int a, int b, vector unsigned int *c) | |
| 9346 { | |
| 9347 return vec_st(vec_perm(vec_lvrx(b, c), | |
| 9348 a, | |
| 9349 vec_lvsr(b, (unsigned char *)c)), | |
| 9350 b, c); | |
| 9351 } | |
| 9352 | |
| 9353 static void __ATTRS_o_ai | |
| 9354 vec_stvlx(vector bool int a, int b, vector bool int *c) | |
| 9355 { | |
| 9356 return vec_st(vec_perm(vec_lvrx(b, c), | |
| 9357 a, | |
| 9358 vec_lvsr(b, (unsigned char *)c)), | |
| 9359 b, c); | |
| 9360 } | |
| 9361 | |
| 9362 static void __ATTRS_o_ai | |
| 9363 vec_stvlx(vector float a, int b, vector float *c) | |
| 9364 { | |
| 9365 return vec_st(vec_perm(vec_lvrx(b, c), | |
| 9366 a, | |
| 9367 vec_lvsr(b, (unsigned char *)c)), | |
| 9368 b, c); | |
| 9369 } | |
| 9370 | |
| 9371 /* vec_stvlxl */ | |
| 9372 | |
| 9373 static void __ATTRS_o_ai | |
| 9374 vec_stvlxl(vector signed char a, int b, signed char *c) | |
| 9375 { | |
| 9376 return vec_stl(vec_perm(vec_lvrx(b, c), | |
| 9377 a, | |
| 9378 vec_lvsr(b, c)), | |
| 9379 b, c); | |
| 9380 } | |
| 9381 | |
| 9382 static void __ATTRS_o_ai | |
| 9383 vec_stvlxl(vector signed char a, int b, vector signed char *c) | |
| 9384 { | |
| 9385 return vec_stl(vec_perm(vec_lvrx(b, c), | |
| 9386 a, | |
| 9387 vec_lvsr(b, (unsigned char *)c)), | |
| 9388 b, c); | |
| 9389 } | |
| 9390 | |
| 9391 static void __ATTRS_o_ai | |
| 9392 vec_stvlxl(vector unsigned char a, int b, unsigned char *c) | |
| 9393 { | |
| 9394 return vec_stl(vec_perm(vec_lvrx(b, c), | |
| 9395 a, | |
| 9396 vec_lvsr(b, c)), | |
| 9397 b, c); | |
| 9398 } | |
| 9399 | |
| 9400 static void __ATTRS_o_ai | |
| 9401 vec_stvlxl(vector unsigned char a, int b, vector unsigned char *c) | |
| 9402 { | |
| 9403 return vec_stl(vec_perm(vec_lvrx(b, c), | |
| 9404 a, | |
| 9405 vec_lvsr(b, (unsigned char *)c)), | |
| 9406 b, c); | |
| 9407 } | |
| 9408 | |
| 9409 static void __ATTRS_o_ai | |
| 9410 vec_stvlxl(vector bool char a, int b, vector bool char *c) | |
| 9411 { | |
| 9412 return vec_stl(vec_perm(vec_lvrx(b, c), | |
| 9413 a, | |
| 9414 vec_lvsr(b, (unsigned char *)c)), | |
| 9415 b, c); | |
| 9416 } | |
| 9417 | |
| 9418 static void __ATTRS_o_ai | |
| 9419 vec_stvlxl(vector short a, int b, short *c) | |
| 9420 { | |
| 9421 return vec_stl(vec_perm(vec_lvrx(b, c), | |
| 9422 a, | |
| 9423 vec_lvsr(b, c)), | |
| 9424 b, c); | |
| 9425 } | |
| 9426 | |
| 9427 static void __ATTRS_o_ai | |
| 9428 vec_stvlxl(vector short a, int b, vector short *c) | |
| 9429 { | |
| 9430 return vec_stl(vec_perm(vec_lvrx(b, c), | |
| 9431 a, | |
| 9432 vec_lvsr(b, (unsigned char *)c)), | |
| 9433 b, c); | |
| 9434 } | |
| 9435 | |
| 9436 static void __ATTRS_o_ai | |
| 9437 vec_stvlxl(vector unsigned short a, int b, unsigned short *c) | |
| 9438 { | |
| 9439 return vec_stl(vec_perm(vec_lvrx(b, c), | |
| 9440 a, | |
| 9441 vec_lvsr(b, c)), | |
| 9442 b, c); | |
| 9443 } | |
| 9444 | |
| 9445 static void __ATTRS_o_ai | |
| 9446 vec_stvlxl(vector unsigned short a, int b, vector unsigned short *c) | |
| 9447 { | |
| 9448 return vec_stl(vec_perm(vec_lvrx(b, c), | |
| 9449 a, | |
| 9450 vec_lvsr(b, (unsigned char *)c)), | |
| 9451 b, c); | |
| 9452 } | |
| 9453 | |
| 9454 static void __ATTRS_o_ai | |
| 9455 vec_stvlxl(vector bool short a, int b, vector bool short *c) | |
| 9456 { | |
| 9457 return vec_stl(vec_perm(vec_lvrx(b, c), | |
| 9458 a, | |
| 9459 vec_lvsr(b, (unsigned char *)c)), | |
| 9460 b, c); | |
| 9461 } | |
| 9462 | |
| 9463 static void __ATTRS_o_ai | |
| 9464 vec_stvlxl(vector pixel a, int b, vector pixel *c) | |
| 9465 { | |
| 9466 return vec_stl(vec_perm(vec_lvrx(b, c), | |
| 9467 a, | |
| 9468 vec_lvsr(b, (unsigned char *)c)), | |
| 9469 b, c); | |
| 9470 } | |
| 9471 | |
| 9472 static void __ATTRS_o_ai | |
| 9473 vec_stvlxl(vector int a, int b, int *c) | |
| 9474 { | |
| 9475 return vec_stl(vec_perm(vec_lvrx(b, c), | |
| 9476 a, | |
| 9477 vec_lvsr(b, c)), | |
| 9478 b, c); | |
| 9479 } | |
| 9480 | |
| 9481 static void __ATTRS_o_ai | |
| 9482 vec_stvlxl(vector int a, int b, vector int *c) | |
| 9483 { | |
| 9484 return vec_stl(vec_perm(vec_lvrx(b, c), | |
| 9485 a, | |
| 9486 vec_lvsr(b, (unsigned char *)c)), | |
| 9487 b, c); | |
| 9488 } | |
| 9489 | |
| 9490 static void __ATTRS_o_ai | |
| 9491 vec_stvlxl(vector unsigned int a, int b, unsigned int *c) | |
| 9492 { | |
| 9493 return vec_stl(vec_perm(vec_lvrx(b, c), | |
| 9494 a, | |
| 9495 vec_lvsr(b, c)), | |
| 9496 b, c); | |
| 9497 } | |
| 9498 | |
| 9499 static void __ATTRS_o_ai | |
| 9500 vec_stvlxl(vector unsigned int a, int b, vector unsigned int *c) | |
| 9501 { | |
| 9502 return vec_stl(vec_perm(vec_lvrx(b, c), | |
| 9503 a, | |
| 9504 vec_lvsr(b, (unsigned char *)c)), | |
| 9505 b, c); | |
| 9506 } | |
| 9507 | |
| 9508 static void __ATTRS_o_ai | |
| 9509 vec_stvlxl(vector bool int a, int b, vector bool int *c) | |
| 9510 { | |
| 9511 return vec_stl(vec_perm(vec_lvrx(b, c), | |
| 9512 a, | |
| 9513 vec_lvsr(b, (unsigned char *)c)), | |
| 9514 b, c); | |
| 9515 } | |
| 9516 | |
| 9517 static void __ATTRS_o_ai | |
| 9518 vec_stvlxl(vector float a, int b, vector float *c) | |
| 9519 { | |
| 9520 return vec_stl(vec_perm(vec_lvrx(b, c), | |
| 9521 a, | |
| 9522 vec_lvsr(b, (unsigned char *)c)), | |
| 9523 b, c); | |
| 9524 } | |
| 9525 | |
| 9526 /* vec_stvrx */ | |
| 9527 | |
| 9528 static void __ATTRS_o_ai | |
| 9529 vec_stvrx(vector signed char a, int b, signed char *c) | |
| 9530 { | |
| 9531 return vec_st(vec_perm(a, | |
| 9532 vec_lvlx(b, c), | |
| 9533 vec_lvsr(b, c)), | |
| 9534 b, c); | |
| 9535 } | |
| 9536 | |
| 9537 static void __ATTRS_o_ai | |
| 9538 vec_stvrx(vector signed char a, int b, vector signed char *c) | |
| 9539 { | |
| 9540 return vec_st(vec_perm(a, | |
| 9541 vec_lvlx(b, c), | |
| 9542 vec_lvsr(b, (unsigned char *)c)), | |
| 9543 b, c); | |
| 9544 } | |
| 9545 | |
| 9546 static void __ATTRS_o_ai | |
| 9547 vec_stvrx(vector unsigned char a, int b, unsigned char *c) | |
| 9548 { | |
| 9549 return vec_st(vec_perm(a, | |
| 9550 vec_lvlx(b, c), | |
| 9551 vec_lvsr(b, c)), | |
| 9552 b, c); | |
| 9553 } | |
| 9554 | |
| 9555 static void __ATTRS_o_ai | |
| 9556 vec_stvrx(vector unsigned char a, int b, vector unsigned char *c) | |
| 9557 { | |
| 9558 return vec_st(vec_perm(a, | |
| 9559 vec_lvlx(b, c), | |
| 9560 vec_lvsr(b, (unsigned char *)c)), | |
| 9561 b, c); | |
| 9562 } | |
| 9563 | |
| 9564 static void __ATTRS_o_ai | |
| 9565 vec_stvrx(vector bool char a, int b, vector bool char *c) | |
| 9566 { | |
| 9567 return vec_st(vec_perm(a, | |
| 9568 vec_lvlx(b, c), | |
| 9569 vec_lvsr(b, (unsigned char *)c)), | |
| 9570 b, c); | |
| 9571 } | |
| 9572 | |
| 9573 static void __ATTRS_o_ai | |
| 9574 vec_stvrx(vector short a, int b, short *c) | |
| 9575 { | |
| 9576 return vec_st(vec_perm(a, | |
| 9577 vec_lvlx(b, c), | |
| 9578 vec_lvsr(b, c)), | |
| 9579 b, c); | |
| 9580 } | |
| 9581 | |
| 9582 static void __ATTRS_o_ai | |
| 9583 vec_stvrx(vector short a, int b, vector short *c) | |
| 9584 { | |
| 9585 return vec_st(vec_perm(a, | |
| 9586 vec_lvlx(b, c), | |
| 9587 vec_lvsr(b, (unsigned char *)c)), | |
| 9588 b, c); | |
| 9589 } | |
| 9590 | |
| 9591 static void __ATTRS_o_ai | |
| 9592 vec_stvrx(vector unsigned short a, int b, unsigned short *c) | |
| 9593 { | |
| 9594 return vec_st(vec_perm(a, | |
| 9595 vec_lvlx(b, c), | |
| 9596 vec_lvsr(b, c)), | |
| 9597 b, c); | |
| 9598 } | |
| 9599 | |
| 9600 static void __ATTRS_o_ai | |
| 9601 vec_stvrx(vector unsigned short a, int b, vector unsigned short *c) | |
| 9602 { | |
| 9603 return vec_st(vec_perm(a, | |
| 9604 vec_lvlx(b, c), | |
| 9605 vec_lvsr(b, (unsigned char *)c)), | |
| 9606 b, c); | |
| 9607 } | |
| 9608 | |
| 9609 static void __ATTRS_o_ai | |
| 9610 vec_stvrx(vector bool short a, int b, vector bool short *c) | |
| 9611 { | |
| 9612 return vec_st(vec_perm(a, | |
| 9613 vec_lvlx(b, c), | |
| 9614 vec_lvsr(b, (unsigned char *)c)), | |
| 9615 b, c); | |
| 9616 } | |
| 9617 | |
| 9618 static void __ATTRS_o_ai | |
| 9619 vec_stvrx(vector pixel a, int b, vector pixel *c) | |
| 9620 { | |
| 9621 return vec_st(vec_perm(a, | |
| 9622 vec_lvlx(b, c), | |
| 9623 vec_lvsr(b, (unsigned char *)c)), | |
| 9624 b, c); | |
| 9625 } | |
| 9626 | |
| 9627 static void __ATTRS_o_ai | |
| 9628 vec_stvrx(vector int a, int b, int *c) | |
| 9629 { | |
| 9630 return vec_st(vec_perm(a, | |
| 9631 vec_lvlx(b, c), | |
| 9632 vec_lvsr(b, c)), | |
| 9633 b, c); | |
| 9634 } | |
| 9635 | |
| 9636 static void __ATTRS_o_ai | |
| 9637 vec_stvrx(vector int a, int b, vector int *c) | |
| 9638 { | |
| 9639 return vec_st(vec_perm(a, | |
| 9640 vec_lvlx(b, c), | |
| 9641 vec_lvsr(b, (unsigned char *)c)), | |
| 9642 b, c); | |
| 9643 } | |
| 9644 | |
| 9645 static void __ATTRS_o_ai | |
| 9646 vec_stvrx(vector unsigned int a, int b, unsigned int *c) | |
| 9647 { | |
| 9648 return vec_st(vec_perm(a, | |
| 9649 vec_lvlx(b, c), | |
| 9650 vec_lvsr(b, c)), | |
| 9651 b, c); | |
| 9652 } | |
| 9653 | |
| 9654 static void __ATTRS_o_ai | |
| 9655 vec_stvrx(vector unsigned int a, int b, vector unsigned int *c) | |
| 9656 { | |
| 9657 return vec_st(vec_perm(a, | |
| 9658 vec_lvlx(b, c), | |
| 9659 vec_lvsr(b, (unsigned char *)c)), | |
| 9660 b, c); | |
| 9661 } | |
| 9662 | |
| 9663 static void __ATTRS_o_ai | |
| 9664 vec_stvrx(vector bool int a, int b, vector bool int *c) | |
| 9665 { | |
| 9666 return vec_st(vec_perm(a, | |
| 9667 vec_lvlx(b, c), | |
| 9668 vec_lvsr(b, (unsigned char *)c)), | |
| 9669 b, c); | |
| 9670 } | |
| 9671 | |
| 9672 static void __ATTRS_o_ai | |
| 9673 vec_stvrx(vector float a, int b, vector float *c) | |
| 9674 { | |
| 9675 return vec_st(vec_perm(a, | |
| 9676 vec_lvlx(b, c), | |
| 9677 vec_lvsr(b, (unsigned char *)c)), | |
| 9678 b, c); | |
| 9679 } | |
| 9680 | |
| 9681 /* vec_stvrxl */ | |
| 9682 | |
| 9683 static void __ATTRS_o_ai | |
| 9684 vec_stvrxl(vector signed char a, int b, signed char *c) | |
| 9685 { | |
| 9686 return vec_stl(vec_perm(a, | |
| 9687 vec_lvlx(b, c), | |
| 9688 vec_lvsr(b, c)), | |
| 9689 b, c); | |
| 9690 } | |
| 9691 | |
| 9692 static void __ATTRS_o_ai | |
| 9693 vec_stvrxl(vector signed char a, int b, vector signed char *c) | |
| 9694 { | |
| 9695 return vec_stl(vec_perm(a, | |
| 9696 vec_lvlx(b, c), | |
| 9697 vec_lvsr(b, (unsigned char *)c)), | |
| 9698 b, c); | |
| 9699 } | |
| 9700 | |
| 9701 static void __ATTRS_o_ai | |
| 9702 vec_stvrxl(vector unsigned char a, int b, unsigned char *c) | |
| 9703 { | |
| 9704 return vec_stl(vec_perm(a, | |
| 9705 vec_lvlx(b, c), | |
| 9706 vec_lvsr(b, c)), | |
| 9707 b, c); | |
| 9708 } | |
| 9709 | |
| 9710 static void __ATTRS_o_ai | |
| 9711 vec_stvrxl(vector unsigned char a, int b, vector unsigned char *c) | |
| 9712 { | |
| 9713 return vec_stl(vec_perm(a, | |
| 9714 vec_lvlx(b, c), | |
| 9715 vec_lvsr(b, (unsigned char *)c)), | |
| 9716 b, c); | |
| 9717 } | |
| 9718 | |
| 9719 static void __ATTRS_o_ai | |
| 9720 vec_stvrxl(vector bool char a, int b, vector bool char *c) | |
| 9721 { | |
| 9722 return vec_stl(vec_perm(a, | |
| 9723 vec_lvlx(b, c), | |
| 9724 vec_lvsr(b, (unsigned char *)c)), | |
| 9725 b, c); | |
| 9726 } | |
| 9727 | |
| 9728 static void __ATTRS_o_ai | |
| 9729 vec_stvrxl(vector short a, int b, short *c) | |
| 9730 { | |
| 9731 return vec_stl(vec_perm(a, | |
| 9732 vec_lvlx(b, c), | |
| 9733 vec_lvsr(b, c)), | |
| 9734 b, c); | |
| 9735 } | |
| 9736 | |
| 9737 static void __ATTRS_o_ai | |
| 9738 vec_stvrxl(vector short a, int b, vector short *c) | |
| 9739 { | |
| 9740 return vec_stl(vec_perm(a, | |
| 9741 vec_lvlx(b, c), | |
| 9742 vec_lvsr(b, (unsigned char *)c)), | |
| 9743 b, c); | |
| 9744 } | |
| 9745 | |
| 9746 static void __ATTRS_o_ai | |
| 9747 vec_stvrxl(vector unsigned short a, int b, unsigned short *c) | |
| 9748 { | |
| 9749 return vec_stl(vec_perm(a, | |
| 9750 vec_lvlx(b, c), | |
| 9751 vec_lvsr(b, c)), | |
| 9752 b, c); | |
| 9753 } | |
| 9754 | |
| 9755 static void __ATTRS_o_ai | |
| 9756 vec_stvrxl(vector unsigned short a, int b, vector unsigned short *c) | |
| 9757 { | |
| 9758 return vec_stl(vec_perm(a, | |
| 9759 vec_lvlx(b, c), | |
| 9760 vec_lvsr(b, (unsigned char *)c)), | |
| 9761 b, c); | |
| 9762 } | |
| 9763 | |
| 9764 static void __ATTRS_o_ai | |
| 9765 vec_stvrxl(vector bool short a, int b, vector bool short *c) | |
| 9766 { | |
| 9767 return vec_stl(vec_perm(a, | |
| 9768 vec_lvlx(b, c), | |
| 9769 vec_lvsr(b, (unsigned char *)c)), | |
| 9770 b, c); | |
| 9771 } | |
| 9772 | |
| 9773 static void __ATTRS_o_ai | |
| 9774 vec_stvrxl(vector pixel a, int b, vector pixel *c) | |
| 9775 { | |
| 9776 return vec_stl(vec_perm(a, | |
| 9777 vec_lvlx(b, c), | |
| 9778 vec_lvsr(b, (unsigned char *)c)), | |
| 9779 b, c); | |
| 9780 } | |
| 9781 | |
| 9782 static void __ATTRS_o_ai | |
| 9783 vec_stvrxl(vector int a, int b, int *c) | |
| 9784 { | |
| 9785 return vec_stl(vec_perm(a, | |
| 9786 vec_lvlx(b, c), | |
| 9787 vec_lvsr(b, c)), | |
| 9788 b, c); | |
| 9789 } | |
| 9790 | |
| 9791 static void __ATTRS_o_ai | |
| 9792 vec_stvrxl(vector int a, int b, vector int *c) | |
| 9793 { | |
| 9794 return vec_stl(vec_perm(a, | |
| 9795 vec_lvlx(b, c), | |
| 9796 vec_lvsr(b, (unsigned char *)c)), | |
| 9797 b, c); | |
| 9798 } | |
| 9799 | |
| 9800 static void __ATTRS_o_ai | |
| 9801 vec_stvrxl(vector unsigned int a, int b, unsigned int *c) | |
| 9802 { | |
| 9803 return vec_stl(vec_perm(a, | |
| 9804 vec_lvlx(b, c), | |
| 9805 vec_lvsr(b, c)), | |
| 9806 b, c); | |
| 9807 } | |
| 9808 | |
| 9809 static void __ATTRS_o_ai | |
| 9810 vec_stvrxl(vector unsigned int a, int b, vector unsigned int *c) | |
| 9811 { | |
| 9812 return vec_stl(vec_perm(a, | |
| 9813 vec_lvlx(b, c), | |
| 9814 vec_lvsr(b, (unsigned char *)c)), | |
| 9815 b, c); | |
| 9816 } | |
| 9817 | |
| 9818 static void __ATTRS_o_ai | |
| 9819 vec_stvrxl(vector bool int a, int b, vector bool int *c) | |
| 9820 { | |
| 9821 return vec_stl(vec_perm(a, | |
| 9822 vec_lvlx(b, c), | |
| 9823 vec_lvsr(b, (unsigned char *)c)), | |
| 9824 b, c); | |
| 9825 } | |
| 9826 | |
| 9827 static void __ATTRS_o_ai | |
| 9828 vec_stvrxl(vector float a, int b, vector float *c) | |
| 9829 { | |
| 9830 return vec_stl(vec_perm(a, | |
| 9831 vec_lvlx(b, c), | |
| 9832 vec_lvsr(b, (unsigned char *)c)), | |
| 9833 b, c); | |
| 9834 } | |
| 9835 | |
| 9836 /* vec_promote */ | |
| 9837 | |
| 9838 static vector signed char __ATTRS_o_ai | |
| 9839 vec_promote(signed char a, int b) | |
| 9840 { | |
| 9841 vector signed char res = (vector signed char)(0); | |
| 9842 res[b] = a; | |
| 9843 return res; | |
| 9844 } | |
| 9845 | |
| 9846 static vector unsigned char __ATTRS_o_ai | |
| 9847 vec_promote(unsigned char a, int b) | |
| 9848 { | |
| 9849 vector unsigned char res = (vector unsigned char)(0); | |
| 9850 res[b] = a; | |
| 9851 return res; | |
| 9852 } | |
| 9853 | |
| 9854 static vector short __ATTRS_o_ai | |
| 9855 vec_promote(short a, int b) | |
| 9856 { | |
| 9857 vector short res = (vector short)(0); | |
| 9858 res[b] = a; | |
| 9859 return res; | |
| 9860 } | |
| 9861 | |
| 9862 static vector unsigned short __ATTRS_o_ai | |
| 9863 vec_promote(unsigned short a, int b) | |
| 9864 { | |
| 9865 vector unsigned short res = (vector unsigned short)(0); | |
| 9866 res[b] = a; | |
| 9867 return res; | |
| 9868 } | |
| 9869 | |
| 9870 static vector int __ATTRS_o_ai | |
| 9871 vec_promote(int a, int b) | |
| 9872 { | |
| 9873 vector int res = (vector int)(0); | |
| 9874 res[b] = a; | |
| 9875 return res; | |
| 9876 } | |
| 9877 | |
| 9878 static vector unsigned int __ATTRS_o_ai | |
| 9879 vec_promote(unsigned int a, int b) | |
| 9880 { | |
| 9881 vector unsigned int res = (vector unsigned int)(0); | |
| 9882 res[b] = a; | |
| 9883 return res; | |
| 9884 } | |
| 9885 | |
| 9886 static vector float __ATTRS_o_ai | |
| 9887 vec_promote(float a, int b) | |
| 9888 { | |
| 9889 vector float res = (vector float)(0); | |
| 9890 res[b] = a; | |
| 9891 return res; | |
| 9892 } | |
| 9893 | |
| 9894 /* vec_splats */ | |
| 9895 | |
| 9896 static vector signed char __ATTRS_o_ai | |
| 9897 vec_splats(signed char a) | |
| 9898 { | |
| 9899 return (vector signed char)(a); | |
| 9900 } | |
| 9901 | |
| 9902 static vector unsigned char __ATTRS_o_ai | |
| 9903 vec_splats(unsigned char a) | |
| 9904 { | |
| 9905 return (vector unsigned char)(a); | |
| 9906 } | |
| 9907 | |
| 9908 static vector short __ATTRS_o_ai | |
| 9909 vec_splats(short a) | |
| 9910 { | |
| 9911 return (vector short)(a); | |
| 9912 } | |
| 9913 | |
| 9914 static vector unsigned short __ATTRS_o_ai | |
| 9915 vec_splats(unsigned short a) | |
| 9916 { | |
| 9917 return (vector unsigned short)(a); | |
| 9918 } | |
| 9919 | |
| 9920 static vector int __ATTRS_o_ai | |
| 9921 vec_splats(int a) | |
| 9922 { | |
| 9923 return (vector int)(a); | |
| 9924 } | |
| 9925 | |
| 9926 static vector unsigned int __ATTRS_o_ai | |
| 9927 vec_splats(unsigned int a) | |
| 9928 { | |
| 9929 return (vector unsigned int)(a); | |
| 9930 } | |
| 9931 | |
| 9932 static vector float __ATTRS_o_ai | |
| 9933 vec_splats(float a) | |
| 9934 { | |
| 9935 return (vector float)(a); | |
| 9936 } | |
| 9937 | |
| 9938 /* ----------------------------- predicates --------------------------------- */ | |
| 9939 | |
| 9940 /* vec_all_eq */ | |
| 9941 | |
| 9942 static int __ATTRS_o_ai | |
| 9943 vec_all_eq(vector signed char a, vector signed char b) | |
| 9944 { | |
| 9945 return __builtin_altivec_vcmpequb_p(__CR6_LT, (vector char)a, (vector char)b); | |
| 9946 } | |
| 9947 | |
| 9948 static int __ATTRS_o_ai | |
| 9949 vec_all_eq(vector signed char a, vector bool char b) | |
| 9950 { | |
| 9951 return __builtin_altivec_vcmpequb_p(__CR6_LT, (vector char)a, (vector char)b); | |
| 9952 } | |
| 9953 | |
| 9954 static int __ATTRS_o_ai | |
| 9955 vec_all_eq(vector unsigned char a, vector unsigned char b) | |
| 9956 { | |
| 9957 return __builtin_altivec_vcmpequb_p(__CR6_LT, (vector char)a, (vector char)b); | |
| 9958 } | |
| 9959 | |
| 9960 static int __ATTRS_o_ai | |
| 9961 vec_all_eq(vector unsigned char a, vector bool char b) | |
| 9962 { | |
| 9963 return __builtin_altivec_vcmpequb_p(__CR6_LT, (vector char)a, (vector char)b); | |
| 9964 } | |
| 9965 | |
| 9966 static int __ATTRS_o_ai | |
| 9967 vec_all_eq(vector bool char a, vector signed char b) | |
| 9968 { | |
| 9969 return __builtin_altivec_vcmpequb_p(__CR6_LT, (vector char)a, (vector char)b); | |
| 9970 } | |
| 9971 | |
| 9972 static int __ATTRS_o_ai | |
| 9973 vec_all_eq(vector bool char a, vector unsigned char b) | |
| 9974 { | |
| 9975 return __builtin_altivec_vcmpequb_p(__CR6_LT, (vector char)a, (vector char)b); | |
| 9976 } | |
| 9977 | |
| 9978 static int __ATTRS_o_ai | |
| 9979 vec_all_eq(vector bool char a, vector bool char b) | |
| 9980 { | |
| 9981 return __builtin_altivec_vcmpequb_p(__CR6_LT, (vector char)a, (vector char)b); | |
| 9982 } | |
| 9983 | |
| 9984 static int __ATTRS_o_ai | |
| 9985 vec_all_eq(vector short a, vector short b) | |
| 9986 { | |
| 9987 return __builtin_altivec_vcmpequh_p(__CR6_LT, a, b); | |
| 9988 } | |
| 9989 | |
| 9990 static int __ATTRS_o_ai | |
| 9991 vec_all_eq(vector short a, vector bool short b) | |
| 9992 { | |
| 9993 return __builtin_altivec_vcmpequh_p(__CR6_LT, a, (vector short)b); | |
| 9994 } | |
| 9995 | |
| 9996 static int __ATTRS_o_ai | |
| 9997 vec_all_eq(vector unsigned short a, vector unsigned short b) | |
| 9998 { | |
| 9999 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 */ | |
| OLD | NEW |