OLD | NEW |
1 /*===---- tmmintrin.h - SSSE3 intrinsics -----------------------------------=== | 1 /*===---- tmmintrin.h - SSSE3 intrinsics -----------------------------------=== |
2 * | 2 * |
3 * Permission is hereby granted, free of charge, to any person obtaining a copy | 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 | 4 * of this software and associated documentation files (the "Software"), to deal |
5 * in the Software without restriction, including without limitation the rights | 5 * in the Software without restriction, including without limitation the rights |
6 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | 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 | 7 * copies of the Software, and to permit persons to whom the Software is |
8 * furnished to do so, subject to the following conditions: | 8 * furnished to do so, subject to the following conditions: |
9 * | 9 * |
10 * The above copyright notice and this permission notice shall be included in | 10 * The above copyright notice and this permission notice shall be included in |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 { | 59 { |
60 return (__m64)__builtin_ia32_pabsd((__v2si)a); | 60 return (__m64)__builtin_ia32_pabsd((__v2si)a); |
61 } | 61 } |
62 | 62 |
63 static __inline__ __m128i __attribute__((__always_inline__, __nodebug__)) | 63 static __inline__ __m128i __attribute__((__always_inline__, __nodebug__)) |
64 _mm_abs_epi32(__m128i a) | 64 _mm_abs_epi32(__m128i a) |
65 { | 65 { |
66 return (__m128i)__builtin_ia32_pabsd128((__v4si)a); | 66 return (__m128i)__builtin_ia32_pabsd128((__v4si)a); |
67 } | 67 } |
68 | 68 |
69 #define _mm_alignr_epi8(a, b, n) (__builtin_ia32_palignr128((a), (b), (n))) | 69 #define _mm_alignr_epi8(a, b, n) __extension__ ({ \ |
70 #define _mm_alignr_pi8(a, b, n) (__builtin_ia32_palignr((a), (b), (n))) | 70 __m128i __a = (a); \ |
| 71 __m128i __b = (b); \ |
| 72 (__m128i)__builtin_ia32_palignr128((__v16qi)__a, (__v16qi)__b, (n)); }) |
| 73 |
| 74 #define _mm_alignr_pi8(a, b, n) __extension__ ({ \ |
| 75 __m64 __a = (a); \ |
| 76 __m64 __b = (b); \ |
| 77 (__m64)__builtin_ia32_palignr((__v8qi)__a, (__v8qi)__b, (n)); }) |
71 | 78 |
72 static __inline__ __m128i __attribute__((__always_inline__, __nodebug__)) | 79 static __inline__ __m128i __attribute__((__always_inline__, __nodebug__)) |
73 _mm_hadd_epi16(__m128i a, __m128i b) | 80 _mm_hadd_epi16(__m128i a, __m128i b) |
74 { | 81 { |
75 return (__m128i)__builtin_ia32_phaddw128((__v8hi)a, (__v8hi)b); | 82 return (__m128i)__builtin_ia32_phaddw128((__v8hi)a, (__v8hi)b); |
76 } | 83 } |
77 | 84 |
78 static __inline__ __m128i __attribute__((__always_inline__, __nodebug__)) | 85 static __inline__ __m128i __attribute__((__always_inline__, __nodebug__)) |
79 _mm_hadd_epi32(__m128i a, __m128i b) | 86 _mm_hadd_epi32(__m128i a, __m128i b) |
80 { | 87 { |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
209 | 216 |
210 static __inline__ __m64 __attribute__((__always_inline__, __nodebug__)) | 217 static __inline__ __m64 __attribute__((__always_inline__, __nodebug__)) |
211 _mm_sign_pi32(__m64 a, __m64 b) | 218 _mm_sign_pi32(__m64 a, __m64 b) |
212 { | 219 { |
213 return (__m64)__builtin_ia32_psignd((__v2si)a, (__v2si)b); | 220 return (__m64)__builtin_ia32_psignd((__v2si)a, (__v2si)b); |
214 } | 221 } |
215 | 222 |
216 #endif /* __SSSE3__ */ | 223 #endif /* __SSSE3__ */ |
217 | 224 |
218 #endif /* __TMMINTRIN_H */ | 225 #endif /* __TMMINTRIN_H */ |
OLD | NEW |