13 #ifndef NO_WARN_X86_INTRINSICS 32 "Please read comment above. Use -DNO_WARN_X86_INTRINSICS to disable this error." 35 #ifndef _MMINTRIN_H_INCLUDED 36 #define _MMINTRIN_H_INCLUDED 46 signed char as_signed_char[8];
49 long long as_long_long;
62 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
69 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
71 return (
__m64)(
unsigned int)__i;
75 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
82 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
88 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
97 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
102 extern __inline
__m64 103 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
109 extern __inline
__m64 110 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
111 _mm_cvtsi64x_si64(
long long __i) {
115 extern __inline
__m64 116 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
117 _mm_set_pi64x(
long long __i) {
124 extern __inline
long long 125 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
127 return (
long long)__i;
130 extern __inline
long long 131 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
133 return (
long long)__i;
137 extern __inline
long long 138 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
139 _mm_cvtsi64_si64x(
__m64 __i) {
140 return (
long long)__i;
147 extern __inline
__m64 148 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
150 __vector
signed short vm1;
151 __vector
signed char vresult;
153 vm1 = (__vector
signed short)(__vector
unsigned long long)
154 #ifdef __LITTLE_ENDIAN__ 160 return (
__m64)((__vector
long long)vresult)[0];
163 extern __inline
__m64 164 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
172 extern __inline
__m64 173 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
175 __vector
signed int vm1;
176 __vector
signed short vresult;
178 vm1 = (__vector
signed int)(__vector
unsigned long long)
179 #ifdef __LITTLE_ENDIAN__ 185 return (
__m64)((__vector
long long)vresult)[0];
188 extern __inline
__m64 189 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
197 extern __inline
__m64 198 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
200 __vector
unsigned char r;
201 __vector
signed short vm1 = (__vector
signed short)(__vector
long long)
202 #ifdef __LITTLE_ENDIAN__ 207 const __vector
signed short __zero = {0};
208 __vector __bool
short __select =
vec_cmplt(vm1, __zero);
209 r =
vec_packs((__vector
unsigned short)vm1, (__vector
unsigned short)vm1);
210 __vector __bool
char packsel =
vec_pack(__select, __select);
211 r =
vec_sel(r, (
const __vector
unsigned char)__zero, packsel);
212 return (
__m64)((__vector
long long)r)[0];
215 extern __inline
__m64 216 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
224 extern __inline
__m64 225 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
228 __vector
unsigned char a,
b,
c;
233 return (
__m64)((__vector
long long)c)[1];
240 res.as_char[0] = m1.as_char[4];
241 res.as_char[1] = m2.as_char[4];
242 res.as_char[2] = m1.as_char[5];
243 res.as_char[3] = m2.as_char[5];
244 res.as_char[4] = m1.as_char[6];
245 res.as_char[5] = m2.as_char[6];
246 res.as_char[6] = m1.as_char[7];
247 res.as_char[7] = m2.as_char[7];
249 return (
__m64)res.as_m64;
253 extern __inline
__m64 254 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
261 extern __inline
__m64 262 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
269 res.as_short[0] = m1.as_short[2];
270 res.as_short[1] = m2.as_short[2];
271 res.as_short[2] = m1.as_short[3];
272 res.as_short[3] = m2.as_short[3];
274 return (
__m64)res.as_m64;
277 extern __inline
__m64 278 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
284 extern __inline
__m64 285 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
292 res.as_int[0] = m1.as_int[1];
293 res.as_int[1] = m2.as_int[1];
295 return (
__m64)res.as_m64;
298 extern __inline
__m64 299 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
305 extern __inline
__m64 306 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
309 __vector
unsigned char a,
b,
c;
314 return (
__m64)((__vector
long long)c)[0];
321 res.as_char[0] = m1.as_char[0];
322 res.as_char[1] = m2.as_char[0];
323 res.as_char[2] = m1.as_char[1];
324 res.as_char[3] = m2.as_char[1];
325 res.as_char[4] = m1.as_char[2];
326 res.as_char[5] = m2.as_char[2];
327 res.as_char[6] = m1.as_char[3];
328 res.as_char[7] = m2.as_char[3];
330 return (
__m64)res.as_m64;
334 extern __inline
__m64 335 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
341 extern __inline
__m64 342 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
349 res.as_short[0] = m1.as_short[0];
350 res.as_short[1] = m2.as_short[0];
351 res.as_short[2] = m1.as_short[1];
352 res.as_short[3] = m2.as_short[1];
354 return (
__m64)res.as_m64;
357 extern __inline
__m64 358 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
365 extern __inline
__m64 366 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
373 res.as_int[0] = m1.as_int[0];
374 res.as_int[1] = m2.as_int[0];
376 return (
__m64)res.as_m64;
379 extern __inline
__m64 380 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
386 extern __inline
__m64 387 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
390 __vector
signed char a,
b,
c;
395 return (
__m64)((__vector
long long)c)[0];
402 res.as_char[0] = m1.as_char[0] + m2.as_char[0];
403 res.as_char[1] = m1.as_char[1] + m2.as_char[1];
404 res.as_char[2] = m1.as_char[2] + m2.as_char[2];
405 res.as_char[3] = m1.as_char[3] + m2.as_char[3];
406 res.as_char[4] = m1.as_char[4] + m2.as_char[4];
407 res.as_char[5] = m1.as_char[5] + m2.as_char[5];
408 res.as_char[6] = m1.as_char[6] + m2.as_char[6];
409 res.as_char[7] = m1.as_char[7] + m2.as_char[7];
411 return (
__m64)res.as_m64;
415 extern __inline
__m64 416 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
422 extern __inline
__m64 423 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
426 __vector
signed short a,
b,
c;
431 return (
__m64)((__vector
long long)c)[0];
438 res.as_short[0] = m1.as_short[0] + m2.as_short[0];
439 res.as_short[1] = m1.as_short[1] + m2.as_short[1];
440 res.as_short[2] = m1.as_short[2] + m2.as_short[2];
441 res.as_short[3] = m1.as_short[3] + m2.as_short[3];
443 return (
__m64)res.as_m64;
447 extern __inline
__m64 448 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
454 extern __inline
__m64 455 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
458 __vector
signed int a,
b,
c;
463 return (
__m64)((__vector
long long)c)[0];
470 res.as_int[0] = m1.as_int[0] + m2.as_int[0];
471 res.as_int[1] = m1.as_int[1] + m2.as_int[1];
473 return (
__m64)res.as_m64;
477 extern __inline
__m64 478 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
484 extern __inline
__m64 485 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
488 __vector
signed char a,
b,
c;
493 return (
__m64)((__vector
long long)c)[0];
500 res.as_char[0] = m1.as_char[0] - m2.as_char[0];
501 res.as_char[1] = m1.as_char[1] - m2.as_char[1];
502 res.as_char[2] = m1.as_char[2] - m2.as_char[2];
503 res.as_char[3] = m1.as_char[3] - m2.as_char[3];
504 res.as_char[4] = m1.as_char[4] - m2.as_char[4];
505 res.as_char[5] = m1.as_char[5] - m2.as_char[5];
506 res.as_char[6] = m1.as_char[6] - m2.as_char[6];
507 res.as_char[7] = m1.as_char[7] - m2.as_char[7];
509 return (
__m64)res.as_m64;
513 extern __inline
__m64 514 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
520 extern __inline
__m64 521 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
524 __vector
signed short a,
b,
c;
529 return (
__m64)((__vector
long long)c)[0];
536 res.as_short[0] = m1.as_short[0] - m2.as_short[0];
537 res.as_short[1] = m1.as_short[1] - m2.as_short[1];
538 res.as_short[2] = m1.as_short[2] - m2.as_short[2];
539 res.as_short[3] = m1.as_short[3] - m2.as_short[3];
541 return (
__m64)res.as_m64;
545 extern __inline
__m64 546 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
552 extern __inline
__m64 553 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
556 __vector
signed int a,
b,
c;
561 return (
__m64)((__vector
long long)c)[0];
568 res.as_int[0] = m1.as_int[0] - m2.as_int[0];
569 res.as_int[1] = m1.as_int[1] - m2.as_int[1];
571 return (
__m64)res.as_m64;
575 extern __inline
__m64 576 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
581 extern __inline
__m64 582 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
584 return (__m1 + __m2);
587 extern __inline
__m64 588 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
590 return (__m1 - __m2);
594 extern __inline
__m64 595 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
597 return (__m << __count);
600 extern __inline
__m64 601 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
606 extern __inline
__m64 607 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
609 return (__m << __count);
612 extern __inline
__m64 613 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
619 extern __inline
__m64 620 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
622 return (__m >> __count);
625 extern __inline
__m64 626 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
631 extern __inline
__m64 632 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
634 return (__m >> __count);
637 extern __inline
__m64 638 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
644 extern __inline
__m64 645 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
647 return (__m1 & __m2);
650 extern __inline
__m64 651 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
658 extern __inline
__m64 659 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
661 return (~__m1 & __m2);
664 extern __inline
__m64 665 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
671 extern __inline
__m64 672 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
674 return (__m1 | __m2);
677 extern __inline
__m64 678 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
684 extern __inline
__m64 685 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
687 return (__m1 ^ __m2);
690 extern __inline
__m64 691 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
697 extern __inline
__m64 698 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
705 extern __inline
__m64 706 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
708 #if defined(_ARCH_PWR6) && defined(__powerpc64__) 710 __asm__(
"cmpb %0,%1,%2;\n" :
"=r"(res) :
"r"(__m1),
"r"(__m2) :);
718 res.as_char[0] = (m1.as_char[0] == m2.as_char[0]) ? -1 : 0;
719 res.as_char[1] = (m1.as_char[1] == m2.as_char[1]) ? -1 : 0;
720 res.as_char[2] = (m1.as_char[2] == m2.as_char[2]) ? -1 : 0;
721 res.as_char[3] = (m1.as_char[3] == m2.as_char[3]) ? -1 : 0;
722 res.as_char[4] = (m1.as_char[4] == m2.as_char[4]) ? -1 : 0;
723 res.as_char[5] = (m1.as_char[5] == m2.as_char[5]) ? -1 : 0;
724 res.as_char[6] = (m1.as_char[6] == m2.as_char[6]) ? -1 : 0;
725 res.as_char[7] = (m1.as_char[7] == m2.as_char[7]) ? -1 : 0;
727 return (
__m64)res.as_m64;
731 extern __inline
__m64 732 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
737 extern __inline
__m64 738 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
741 __vector
signed char a,
b,
c;
745 c = (__vector
signed char)
vec_cmpgt(a, b);
746 return (
__m64)((__vector
long long)c)[0];
753 res.as_char[0] = (m1.as_char[0] > m2.as_char[0]) ? -1 : 0;
754 res.as_char[1] = (m1.as_char[1] > m2.as_char[1]) ? -1 : 0;
755 res.as_char[2] = (m1.as_char[2] > m2.as_char[2]) ? -1 : 0;
756 res.as_char[3] = (m1.as_char[3] > m2.as_char[3]) ? -1 : 0;
757 res.as_char[4] = (m1.as_char[4] > m2.as_char[4]) ? -1 : 0;
758 res.as_char[5] = (m1.as_char[5] > m2.as_char[5]) ? -1 : 0;
759 res.as_char[6] = (m1.as_char[6] > m2.as_char[6]) ? -1 : 0;
760 res.as_char[7] = (m1.as_char[7] > m2.as_char[7]) ? -1 : 0;
762 return (
__m64)res.as_m64;
766 extern __inline
__m64 767 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
774 extern __inline
__m64 775 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
778 __vector
signed short a,
b,
c;
782 c = (__vector
signed short)
vec_cmpeq(a, b);
783 return (
__m64)((__vector
long long)c)[0];
790 res.as_short[0] = (m1.as_short[0] == m2.as_short[0]) ? -1 : 0;
791 res.as_short[1] = (m1.as_short[1] == m2.as_short[1]) ? -1 : 0;
792 res.as_short[2] = (m1.as_short[2] == m2.as_short[2]) ? -1 : 0;
793 res.as_short[3] = (m1.as_short[3] == m2.as_short[3]) ? -1 : 0;
795 return (
__m64)res.as_m64;
799 extern __inline
__m64 800 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
805 extern __inline
__m64 806 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
809 __vector
signed short a,
b,
c;
813 c = (__vector
signed short)
vec_cmpgt(a, b);
814 return (
__m64)((__vector
long long)c)[0];
821 res.as_short[0] = (m1.as_short[0] > m2.as_short[0]) ? -1 : 0;
822 res.as_short[1] = (m1.as_short[1] > m2.as_short[1]) ? -1 : 0;
823 res.as_short[2] = (m1.as_short[2] > m2.as_short[2]) ? -1 : 0;
824 res.as_short[3] = (m1.as_short[3] > m2.as_short[3]) ? -1 : 0;
826 return (
__m64)res.as_m64;
830 extern __inline
__m64 831 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
838 extern __inline
__m64 839 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
842 __vector
signed int a,
b,
c;
846 c = (__vector
signed int)
vec_cmpeq(a, b);
847 return (
__m64)((__vector
long long)c)[0];
854 res.as_int[0] = (m1.as_int[0] == m2.as_int[0]) ? -1 : 0;
855 res.as_int[1] = (m1.as_int[1] == m2.as_int[1]) ? -1 : 0;
857 return (
__m64)res.as_m64;
861 extern __inline
__m64 862 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
867 extern __inline
__m64 868 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
871 __vector
signed int a,
b,
c;
875 c = (__vector
signed int)
vec_cmpgt(a, b);
876 return (
__m64)((__vector
long long)c)[0];
883 res.as_int[0] = (m1.as_int[0] > m2.as_int[0]) ? -1 : 0;
884 res.as_int[1] = (m1.as_int[1] > m2.as_int[1]) ? -1 : 0;
886 return (
__m64)res.as_m64;
890 extern __inline
__m64 891 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
899 extern __inline
__m64 900 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
902 __vector
signed char a,
b,
c;
907 return (
__m64)((__vector
long long)c)[0];
910 extern __inline
__m64 911 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
917 extern __inline
__m64 918 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
920 __vector
signed short a,
b,
c;
925 return (
__m64)((__vector
long long)c)[0];
928 extern __inline
__m64 929 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
935 extern __inline
__m64 936 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
938 __vector
unsigned char a,
b,
c;
943 return (
__m64)((__vector
long long)c)[0];
946 extern __inline
__m64 947 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
954 extern __inline
__m64 955 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
957 __vector
unsigned short a,
b,
c;
959 a = (__vector
unsigned short)
vec_splats(__m1);
960 b = (__vector
unsigned short)
vec_splats(__m2);
962 return (
__m64)((__vector
long long)c)[0];
965 extern __inline
__m64 966 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
973 extern __inline
__m64 974 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
976 __vector
signed char a,
b,
c;
981 return (
__m64)((__vector
long long)c)[0];
984 extern __inline
__m64 985 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
992 extern __inline
__m64 993 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
995 __vector
signed short a,
b,
c;
1000 return (
__m64)((__vector
long long)c)[0];
1003 extern __inline
__m64 1004 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
1011 extern __inline
__m64 1012 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
1014 __vector
unsigned char a,
b,
c;
1016 a = (__vector
unsigned char)
vec_splats(__m1);
1017 b = (__vector
unsigned char)
vec_splats(__m2);
1019 return (
__m64)((__vector
long long)c)[0];
1022 extern __inline
__m64 1023 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
1030 extern __inline
__m64 1031 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
1033 __vector
unsigned short a,
b,
c;
1035 a = (__vector
unsigned short)
vec_splats(__m1);
1036 b = (__vector
unsigned short)
vec_splats(__m2);
1038 return (
__m64)((__vector
long long)c)[0];
1041 extern __inline
__m64 1042 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
1050 extern __inline
__m64 1051 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
1053 __vector
signed short a,
b;
1054 __vector
signed int c;
1055 __vector
signed int zero = {0, 0, 0, 0};
1059 c = vec_vmsumshm(a, b, zero);
1060 return (
__m64)((__vector
long long)c)[0];
1063 extern __inline
__m64 1064 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
1070 extern __inline
__m64 1071 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
1073 __vector
signed short a,
b;
1074 __vector
signed short c;
1075 __vector
signed int w0,
w1;
1076 __vector
unsigned char xform1 = {
1077 #ifdef __LITTLE_ENDIAN__ 1078 0x02, 0x03, 0x12, 0x13, 0x06, 0x07, 0x16, 0x17, 0x0A,
1079 0x0B, 0x1A, 0x1B, 0x0E, 0x0F, 0x1E, 0x1F
1081 0x00, 0x01, 0x10, 0x11, 0x04, 0x05, 0x14, 0x15, 0x00,
1082 0x01, 0x10, 0x11, 0x04, 0x05, 0x14, 0x15
1089 w0 = vec_vmulesh(a, b);
1090 w1 = vec_vmulosh(a, b);
1091 c = (__vector
signed short)
vec_perm(w0, w1, xform1);
1093 return (
__m64)((__vector
long long)c)[0];
1096 extern __inline
__m64 1097 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
1104 extern __inline
__m64 1105 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
1107 __vector
signed short a,
b,
c;
1112 return (
__m64)((__vector
long long)c)[0];
1115 extern __inline
__m64 1116 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
1122 extern __inline
__m64 1123 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
1125 __vector
signed short m,
r;
1126 __vector
unsigned short c;
1128 if (__count <= 15) {
1131 r =
vec_sl(m, (__vector
unsigned short)c);
1132 return (
__m64)((__vector
long long)r)[0];
1137 extern __inline
__m64 1138 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
1143 extern __inline
__m64 1144 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
1150 extern __inline
__m64 1151 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
1157 extern __inline
__m64 1158 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
1164 res.as_int[0] = m.as_int[0] <<
__count;
1165 res.as_int[1] = m.as_int[1] <<
__count;
1166 return (res.as_m64);
1169 extern __inline
__m64 1170 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
1175 extern __inline
__m64 1176 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
1182 extern __inline
__m64 1183 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
1189 extern __inline
__m64 1190 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
1192 __vector
signed short m,
r;
1193 __vector
unsigned short c;
1195 if (__count <= 15) {
1198 r =
vec_sra(m, (__vector
unsigned short)c);
1199 return (
__m64)((__vector
long long)r)[0];
1204 extern __inline
__m64 1205 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
1210 extern __inline
__m64 1211 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
1217 extern __inline
__m64 1218 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
1224 extern __inline
__m64 1225 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
1231 res.as_int[0] = m.as_int[0] >>
__count;
1232 res.as_int[1] = m.as_int[1] >>
__count;
1233 return (res.as_m64);
1236 extern __inline
__m64 1237 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
1242 extern __inline
__m64 1243 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
1249 extern __inline
__m64 1250 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
1256 extern __inline
__m64 1257 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
1259 __vector
unsigned short m,
r;
1260 __vector
unsigned short c;
1262 if (__count <= 15) {
1263 m = (__vector
unsigned short)
vec_splats(__m);
1265 r =
vec_sr(m, (__vector
unsigned short)c);
1266 return (
__m64)((__vector
long long)r)[0];
1271 extern __inline
__m64 1272 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
1277 extern __inline
__m64 1278 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
1284 extern __inline
__m64 1285 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
1291 extern __inline
__m64 1292 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
1298 res.as_int[0] = (
unsigned int)m.as_int[0] >> __count;
1299 res.as_int[1] = (
unsigned int)m.as_int[1] >>
__count;
1300 return (res.as_m64);
1303 extern __inline
__m64 1304 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
1309 extern __inline
__m64 1310 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
1316 extern __inline
__m64 1317 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
1324 extern __inline
__m64 1325 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
1329 res.as_int[0] =
__i0;
1330 res.as_int[1] =
__i1;
1331 return (res.as_m64);
1335 extern __inline
__m64 1336 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
1340 res.as_short[0] =
__w0;
1341 res.as_short[1] =
__w1;
1342 res.as_short[2] =
__w2;
1343 res.as_short[3] =
__w3;
1344 return (res.as_m64);
1348 extern __inline
__m64 1349 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
1354 res.as_char[0] =
__b0;
1355 res.as_char[1] =
__b1;
1356 res.as_char[2] =
__b2;
1357 res.as_char[3] =
__b3;
1358 res.as_char[4] =
__b4;
1359 res.as_char[5] =
__b5;
1360 res.as_char[6] =
__b6;
1361 res.as_char[7] =
__b7;
1362 return (res.as_m64);
1366 extern __inline
__m64 1367 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
1371 res.as_int[0] =
__i0;
1372 res.as_int[1] =
__i1;
1373 return (res.as_m64);
1376 extern __inline
__m64 1377 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
1382 extern __inline
__m64 1383 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
1386 return _mm_set_pi8(__b7, __b6, __b5, __b4, __b3, __b2, __b1, __b0);
1390 extern __inline
__m64 1391 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
1395 res.as_int[0] = __i;
1396 res.as_int[1] = __i;
1397 return (res.as_m64);
1401 extern __inline
__m64 1402 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
1405 __vector
signed short w;
1408 return (
__m64)((__vector
long long)w)[0];
1412 res.as_short[0] = __w;
1413 res.as_short[1] = __w;
1414 res.as_short[2] = __w;
1415 res.as_short[3] = __w;
1416 return (res.as_m64);
1421 extern __inline
__m64 1422 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
1425 __vector
signed char b;
1428 return (
__m64)((__vector
long long)b)[0];
1432 res.as_char[0] =
__b;
1433 res.as_char[1] =
__b;
1434 res.as_char[2] =
__b;
1435 res.as_char[3] =
__b;
1436 res.as_char[4] =
__b;
1437 res.as_char[5] =
__b;
1438 res.as_char[6] =
__b;
1439 res.as_char[7] =
__b;
1440 return (res.as_m64);
static __inline__ vector signed char __ATTRS_o_ai vec_packs(vector short __a, vector short __b)
__inline __m64 __m64 __count
static __inline__ __m64 __DEFAULT_FN_ATTRS _mm_unpacklo_pi16(__m64 __m1, __m64 __m2)
Unpacks the lower 32 bits from two 64-bit integer vectors of [4 x i16] and interleaves them into a 64...
static __inline__ __m64 __DEFAULT_FN_ATTRS _mm_unpackhi_pi32(__m64 __m1, __m64 __m2)
Unpacks the upper 32 bits from two 64-bit integer vectors of [2 x i32] and interleaves them into a 64...
return vec_perm((__v4sf) __A,(__v4sf) __B,(__vector unsigned char) t)
static __inline__ __m64 __DEFAULT_FN_ATTRS _mm_set1_pi16(short __w)
Constructs a 64-bit integer vector of [4 x i16], with each of the 16-bit integer vector elements set ...
return vec_sel(__B, __A, m)
static __inline__ __m64 __DEFAULT_FN_ATTRS _mm_setzero_si64(void)
Constructs a 64-bit integer vector initialized to zero.
static __inline__ vector signed char __ATTRS_o_ai vec_mergel(vector signed char __a, vector signed char __b)
static __inline__ __m64 __DEFAULT_FN_ATTRS _mm_adds_pi16(__m64 __m1, __m64 __m2)
Adds each 16-bit signed integer element of the first 64-bit integer vector of [4 x i16] to the corres...
static __inline__ __m64 __DEFAULT_FN_ATTRS _mm_packs_pi16(__m64 __m1, __m64 __m2)
Converts 16-bit signed integers from both 64-bit integer vector parameters of [4 x i16] into 8-bit si...
static __inline__ __m64 __DEFAULT_FN_ATTRS _mm_unpackhi_pi16(__m64 __m1, __m64 __m2)
Unpacks the upper 32 bits from two 64-bit integer vectors of [4 x i16] and interleaves them into a 64...
static __inline__ vector signed char __ATTRS_o_ai vec_adds(vector signed char __a, vector signed char __b)
__inline __m64 char char char char char char char __b0
__inline __m64 char char char char char char char __b7
static __inline__ __m64 __DEFAULT_FN_ATTRS _mm_cmpeq_pi32(__m64 __m1, __m64 __m2)
Compares the 32-bit integer elements of two 64-bit integer vectors of [2 x i32] to determine if the e...
static __inline__ __m64 __DEFAULT_FN_ATTRS _mm_unpacklo_pi32(__m64 __m1, __m64 __m2)
Unpacks the lower 32 bits from two 64-bit integer vectors of [2 x i32] and interleaves them into a 64...
static __inline__ __m64 __DEFAULT_FN_ATTRS _mm_packs_pu16(__m64 __m1, __m64 __m2)
Converts 16-bit signed integers from both 64-bit integer vector parameters of [4 x i16] into 8-bit un...
static __inline__ vector bool char __ATTRS_o_ai vec_cmplt(vector signed char __a, vector signed char __b)
static __inline__ __m64 __DEFAULT_FN_ATTRS _mm_xor_si64(__m64 __m1, __m64 __m2)
Performs a bitwise exclusive OR of two 64-bit integer vectors.
static __inline__ __m64 __DEFAULT_FN_ATTRS _mm_cmpgt_pi16(__m64 __m1, __m64 __m2)
Compares the 16-bit integer elements of two 64-bit integer vectors of [4 x i16] to determine if the e...
static __inline__ __m64 __DEFAULT_FN_ATTRS _mm_set1_pi8(char __b)
Constructs a 64-bit integer vector of [8 x i8], with each of the 8-bit integer vector elements set to...
static __inline__ vector signed char __ATTRS_o_ai vec_add(vector signed char __a, vector signed char __b)
static __inline__ __m64 __DEFAULT_FN_ATTRS _mm_unpackhi_pi8(__m64 __m1, __m64 __m2)
Unpacks the upper 32 bits from two 64-bit integer vectors of [8 x i8] and interleaves them into a 64-...
static __inline__ __m64 __DEFAULT_FN_ATTRS _mm_subs_pu8(__m64 __m1, __m64 __m2)
Subtracts each 8-bit unsigned integer element of the second 64-bit integer vector of [8 x i8] from th...
static __inline__ __m64 __DEFAULT_FN_ATTRS _mm_adds_pu16(__m64 __m1, __m64 __m2)
Adds each 16-bit unsigned integer element of the first 64-bit integer vector of [4 x i16] to the corr...
static __inline__ __m64 __DEFAULT_FN_ATTRS _mm_set_pi16(short __s3, short __s2, short __s1, short __s0)
Constructs a 64-bit integer vector initialized with the specified 16-bit integer values.
static __inline__ __m64 __DEFAULT_FN_ATTRS _mm_adds_pi8(__m64 __m1, __m64 __m2)
Adds each 8-bit signed integer element of the first 64-bit integer vector of [8 x i8] to the correspo...
__inline __m64 char char char char char char __b1
static __inline__ __m64 __DEFAULT_FN_ATTRS _mm_sll_pi16(__m64 __m, __m64 __count)
Left-shifts each 16-bit signed integer element of the first parameter, which is a 64-bit integer vect...
static __inline__ vector unsigned char __ATTRS_o_ai vec_sl(vector unsigned char __a, vector unsigned char __b)
static __inline__ __m64 __DEFAULT_FN_ATTRS _mm_srli_si64(__m64 __m, int __count)
Right-shifts the first parameter, which is a 64-bit integer, by the number of bits specified by the s...
static __inline__ __m64 __DEFAULT_FN_ATTRS _mm_cmpgt_pi8(__m64 __m1, __m64 __m2)
Compares the 8-bit integer elements of two 64-bit integer vectors of [8 x i8] to determine if the ele...
__vector unsigned char xform1
__asm__("vmuleuw %0,%1,%2" :"=v"(result) :"v"(__A), "v"(__B) :)
static __inline__ __m64 __DEFAULT_FN_ATTRS _mm_sub_pi8(__m64 __m1, __m64 __m2)
Subtracts each 8-bit integer element of the second 64-bit integer vector of [8 x i8] from the corresp...
static __inline__ vector signed char __ATTRS_o_ai vec_subs(vector signed char __a, vector signed char __b)
static __inline__ __m64 __DEFAULT_FN_ATTRS _mm_srl_pi32(__m64 __m, __m64 __count)
Right-shifts each 32-bit integer element of the first parameter, which is a 64-bit integer vector of ...
return() __m64((__vector long long) c)[0]
static __inline__ __m64 __DEFAULT_FN_ATTRS _mm_set1_pi32(int __i)
Constructs a 64-bit integer vector of [2 x i32], with each of the 32-bit integer vector elements set ...
static __inline__ __m64 __DEFAULT_FN_ATTRS _mm_subs_pi8(__m64 __m1, __m64 __m2)
Subtracts each 8-bit signed integer element of the second 64-bit integer vector of [8 x i8] from the ...
static __inline__ vector bool char __ATTRS_o_ai vec_cmpeq(vector signed char __a, vector signed char __b)
static __inline__ vector signed char __ATTRS_o_ai vec_splats(signed char __a)
static __inline__ vector signed char __ATTRS_o_ai vec_sub(vector signed char __a, vector signed char __b)
static __inline__ vector signed char __ATTRS_o_ai vec_sra(vector signed char __a, vector unsigned char __b)
static __inline__ __m64 __DEFAULT_FN_ATTRS _mm_add_pi8(__m64 __m1, __m64 __m2)
Adds each 8-bit integer element of the first 64-bit integer vector of [8 x i8] to the corresponding 8...
static __inline__ __m64 __DEFAULT_FN_ATTRS_MMX _mm_sub_si64(__m64 __a, __m64 __b)
Subtracts signed or unsigned 64-bit integer values and writes the difference to the corresponding bit...
static __inline__ __m64 __DEFAULT_FN_ATTRS _mm_sra_pi32(__m64 __m, __m64 __count)
Right-shifts each 32-bit integer element of the first parameter, which is a 64-bit integer vector of ...
static __inline__ __m64 __DEFAULT_FN_ATTRS _mm_srli_pi16(__m64 __m, int __count)
Right-shifts each 16-bit integer element of a 64-bit integer vector of [4 x i16] by the number of bit...
__inline __m64 short short __w1
static __inline__ __m64 __DEFAULT_FN_ATTRS _mm_cmpgt_pi32(__m64 __m1, __m64 __m2)
Compares the 32-bit integer elements of two 64-bit integer vectors of [2 x i32] to determine if the e...
static __inline__ long long __DEFAULT_FN_ATTRS _mm_cvtm64_si64(__m64 __m)
Casts a 64-bit integer vector into a 64-bit signed integer value.
__inline __m64 char char __b5
static __inline__ __m64 __DEFAULT_FN_ATTRS _mm_adds_pu8(__m64 __m1, __m64 __m2)
Adds each 8-bit unsigned integer element of the first 64-bit integer vector of [8 x i8] to the corres...
static __inline__ vector float vector float __b
static __inline__ __m64 __DEFAULT_FN_ATTRS _mm_and_si64(__m64 __m1, __m64 __m2)
Performs a bitwise AND of two 64-bit integer vectors.
__inline __m64 short short short __w0
static __inline__ __m64 __DEFAULT_FN_ATTRS _mm_unpacklo_pi8(__m64 __m1, __m64 __m2)
Unpacks the lower 32 bits from two 64-bit integer vectors of [8 x i8] and interleaves them into a 64-...
__inline __m64 char char char __b4
static __inline__ __m64 __DEFAULT_FN_ATTRS _mm_subs_pi16(__m64 __m1, __m64 __m2)
Subtracts each 16-bit signed integer element of the second 64-bit integer vector of [4 x i16] from th...
static __inline__ __m64 __DEFAULT_FN_ATTRS _mm_slli_si64(__m64 __m, int __count)
Left-shifts the first parameter, which is a 64-bit integer, by the number of bits specified by the se...
__inline __m64 char char char char char __b2
static __inline__ __m64 __DEFAULT_FN_ATTRS _mm_mullo_pi16(__m64 __m1, __m64 __m2)
Multiplies each 16-bit signed integer element of the first 64-bit integer vector of [4 x i16] by the ...
static __inline__ __m64 __DEFAULT_FN_ATTRS _mm_slli_pi32(__m64 __m, int __count)
Left-shifts each 32-bit signed integer element of a 64-bit integer vector of [2 x i32] by the number ...
static __inline__ __m64 __DEFAULT_FN_ATTRS _mm_madd_pi16(__m64 __m1, __m64 __m2)
Multiplies each 16-bit signed integer element of the first 64-bit integer vector of [4 x i16] by the ...
static __inline__ __m64 __DEFAULT_FN_ATTRS _mm_subs_pu16(__m64 __m1, __m64 __m2)
Subtracts each 16-bit unsigned integer element of the second 64-bit integer vector of [4 x i16] from ...
static __inline__ __m64 __DEFAULT_FN_ATTRS _mm_sub_pi16(__m64 __m1, __m64 __m2)
Subtracts each 16-bit integer element of the second 64-bit integer vector of [4 x i16] from the corre...
static __inline__ vector bool char __ATTRS_o_ai vec_cmpgt(vector signed char __a, vector signed char __b)
static __inline__ __m64 __DEFAULT_FN_ATTRS _mm_set_pi32(int __i1, int __i0)
Constructs a 64-bit integer vector initialized with the specified 32-bit integer values.
static __inline__ __m64 __DEFAULT_FN_ATTRS _mm_sub_pi32(__m64 __m1, __m64 __m2)
Subtracts each 32-bit integer element of the second 64-bit integer vector of [2 x i32] from the corre...
static __inline__ __m64 __DEFAULT_FN_ATTRS _mm_setr_pi32(int __i0, int __i1)
Constructs a 64-bit integer vector, initialized in reverse order with the specified 32-bit integer va...
static __inline__ __m64 __DEFAULT_FN_ATTRS _mm_cvtsi32_si64(int __i)
Constructs a 64-bit integer vector, setting the lower 32 bits to the value of the 32-bit integer para...
static __inline__ __m64 __DEFAULT_FN_ATTRS _mm_cmpeq_pi8(__m64 __m1, __m64 __m2)
Compares the 8-bit integer elements of two 64-bit integer vectors of [8 x i8] to determine if the ele...
static __inline__ __m64 __DEFAULT_FN_ATTRS _mm_srai_pi32(__m64 __m, int __count)
Right-shifts each 32-bit integer element of a 64-bit integer vector of [2 x i32] by the number of bit...
long long __m64 __attribute__((__vector_size__(8), __aligned__(8)))
static __inline__ __m64 __DEFAULT_FN_ATTRS _mm_srl_si64(__m64 __m, __m64 __count)
Right-shifts the first 64-bit integer parameter by the number of bits specified by the second 64-bit ...
__inline __m64 __m64 __m2
static __inline__ int __DEFAULT_FN_ATTRS _mm_cvtsi64_si32(__m64 __m)
Returns the lower 32 bits of a 64-bit integer vector as a 32-bit signed integer.
static __inline__ __m64 __DEFAULT_FN_ATTRS _mm_srl_pi16(__m64 __m, __m64 __count)
Right-shifts each 16-bit integer element of the first parameter, which is a 64-bit integer vector of ...
static __inline__ vector signed char __ATTRS_o_ai vec_pack(vector signed short __a, vector signed short __b)
static __inline__ __m64 __DEFAULT_FN_ATTRS _mm_srli_pi32(__m64 __m, int __count)
Right-shifts each 32-bit integer element of a 64-bit integer vector of [2 x i32] by the number of bit...
static __inline__ __m64 __DEFAULT_FN_ATTRS _mm_mulhi_pi16(__m64 __m1, __m64 __m2)
Multiplies each 16-bit signed integer element of the first 64-bit integer vector of [4 x i16] by the ...
static __inline__ __m64 __DEFAULT_FN_ATTRS _mm_add_pi16(__m64 __m1, __m64 __m2)
Adds each 16-bit integer element of the first 64-bit integer vector of [4 x i16] to the corresponding...
static __inline__ __m64 __DEFAULT_FN_ATTRS _mm_setr_pi8(char __b0, char __b1, char __b2, char __b3, char __b4, char __b5, char __b6, char __b7)
Constructs a 64-bit integer vector, initialized in reverse order with the specified 8-bit integer val...
static __inline__ __m64 __DEFAULT_FN_ATTRS _mm_andnot_si64(__m64 __m1, __m64 __m2)
Performs a bitwise NOT of the first 64-bit integer vector, and then performs a bitwise AND of the int...
__inline __m64 short __w2
static __inline__ vector unsigned char __ATTRS_o_ai vec_sr(vector unsigned char __a, vector unsigned char __b)
static __inline__ __m64 __DEFAULT_FN_ATTRS _mm_cmpeq_pi16(__m64 __m1, __m64 __m2)
Compares the 16-bit integer elements of two 64-bit integer vectors of [4 x i16] to determine if the e...
__inline __m64 short short short __w3
static __inline__ __m64 __DEFAULT_FN_ATTRS _mm_slli_pi16(__m64 __m, int __count)
Left-shifts each 16-bit signed integer element of a 64-bit integer vector of [4 x i16] by the number ...
static __inline__ __m64 __DEFAULT_FN_ATTRS _mm_set_pi8(char __b7, char __b6, char __b5, char __b4, char __b3, char __b2, char __b1, char __b0)
Constructs a 64-bit integer vector initialized with the specified 8-bit integer values.
static __inline__ __m64 __DEFAULT_FN_ATTRS _mm_packs_pi32(__m64 __m1, __m64 __m2)
Converts 32-bit signed integers from both 64-bit integer vector parameters of [2 x i32] into 16-bit s...
static __inline__ __m64 __DEFAULT_FN_ATTRS _mm_setr_pi16(short __w0, short __w1, short __w2, short __w3)
Constructs a 64-bit integer vector, initialized in reverse order with the specified 16-bit integer va...
static __inline__ __m64 __DEFAULT_FN_ATTRS _mm_cvtsi64_m64(long long __i)
Casts a 64-bit signed integer value into a 64-bit integer vector.
static __inline__ __m64 __DEFAULT_FN_ATTRS_MMX _mm_add_si64(__m64 __a, __m64 __b)
Adds two signed or unsigned 64-bit integer values, returning the lower 64 bits of the sum...
__inline __m64 char char char char __b3
static __inline__ __m64 __DEFAULT_FN_ATTRS _mm_srai_pi16(__m64 __m, int __count)
Right-shifts each 16-bit integer element of a 64-bit integer vector of [4 x i16] by the number of bit...
static __inline__ __m64 __DEFAULT_FN_ATTRS _mm_sra_pi16(__m64 __m, __m64 __count)
Right-shifts each 16-bit integer element of the first parameter, which is a 64-bit integer vector of ...
static __inline__ __m64 __DEFAULT_FN_ATTRS _mm_sll_pi32(__m64 __m, __m64 __count)
Left-shifts each 32-bit signed integer element of the first parameter, which is a 64-bit integer vect...
static __inline__ __m64 __DEFAULT_FN_ATTRS _mm_add_pi32(__m64 __m1, __m64 __m2)
Adds each 32-bit integer element of the first 64-bit integer vector of [2 x i32] to the corresponding...
static __inline__ __m64 __DEFAULT_FN_ATTRS _mm_sll_si64(__m64 __m, __m64 __count)
Left-shifts the first 64-bit integer parameter by the number of bits specified by the second 64-bit i...
static __inline__ __m64 __DEFAULT_FN_ATTRS _mm_or_si64(__m64 __m1, __m64 __m2)
Performs a bitwise OR of two 64-bit integer vectors.