| OLD | NEW |
| 1 /*===---- smmintrin.h - SSE4 intrinsics ------------------------------------=== | 1 /*===---- smmintrin.h - SSE4 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 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 232 } | 232 } |
| 233 | 233 |
| 234 static __inline__ int __attribute__((__always_inline__, __nodebug__)) | 234 static __inline__ int __attribute__((__always_inline__, __nodebug__)) |
| 235 _mm_testnzc_si128(__m128i __M, __m128i __V) | 235 _mm_testnzc_si128(__m128i __M, __m128i __V) |
| 236 { | 236 { |
| 237 return __builtin_ia32_ptestnzc128((__v2di)__M, (__v2di)__V); | 237 return __builtin_ia32_ptestnzc128((__v2di)__M, (__v2di)__V); |
| 238 } | 238 } |
| 239 | 239 |
| 240 #define _mm_test_all_ones(V) _mm_testc_si128((V), _mm_cmpeq_epi32((V), (V))) | 240 #define _mm_test_all_ones(V) _mm_testc_si128((V), _mm_cmpeq_epi32((V), (V))) |
| 241 #define _mm_test_mix_ones_zeros(M, V) _mm_testnzc_si128((M), (V)) | 241 #define _mm_test_mix_ones_zeros(M, V) _mm_testnzc_si128((M), (V)) |
| 242 #define _mm_test_all_zeros(M, V) _mm_testz_si128 ((V), (V)) | 242 #define _mm_test_all_zeros(M, V) _mm_testz_si128 ((M), (V)) |
| 243 | 243 |
| 244 /* SSE4 64-bit Packed Integer Comparisons. */ | 244 /* SSE4 64-bit Packed Integer Comparisons. */ |
| 245 static __inline__ __m128i __attribute__((__always_inline__, __nodebug__)) | 245 static __inline__ __m128i __attribute__((__always_inline__, __nodebug__)) |
| 246 _mm_cmpeq_epi64(__m128i __V1, __m128i __V2) | 246 _mm_cmpeq_epi64(__m128i __V1, __m128i __V2) |
| 247 { | 247 { |
| 248 return (__m128i) __builtin_ia32_pcmpeqq((__v2di)__V1, (__v2di)__V2); | 248 return (__m128i) __builtin_ia32_pcmpeqq((__v2di)__V1, (__v2di)__V2); |
| 249 } | 249 } |
| 250 | 250 |
| 251 /* SSE4 Packed Integer Sign-Extension. */ | 251 /* SSE4 Packed Integer Sign-Extension. */ |
| 252 static __inline__ __m128i __attribute__((__always_inline__, __nodebug__)) | 252 static __inline__ __m128i __attribute__((__always_inline__, __nodebug__)) |
| (...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 440 _mm_popcnt_u64(unsigned long long __A) | 440 _mm_popcnt_u64(unsigned long long __A) |
| 441 { | 441 { |
| 442 return __builtin_popcountll(__A); | 442 return __builtin_popcountll(__A); |
| 443 } | 443 } |
| 444 #endif /* __x86_64__ */ | 444 #endif /* __x86_64__ */ |
| 445 | 445 |
| 446 #endif /* __SSE4_2__ */ | 446 #endif /* __SSE4_2__ */ |
| 447 #endif /* __SSE4_1__ */ | 447 #endif /* __SSE4_1__ */ |
| 448 | 448 |
| 449 #endif /* _SMMINTRIN_H */ | 449 #endif /* _SMMINTRIN_H */ |
| OLD | NEW |