These headers magically speed up completions.
Clang searches for these files and if it doesn't find them, completion is twice as slow (or slower) than otherwise. See this issue report for more details: https://github.com/Rip-Rip/clang_complete/issues/17
This commit is contained in:
parent
ad32584a10
commit
74c363ef60
11856
python/clang/3.1/include/altivec.h
Normal file
11856
python/clang/3.1/include/altivec.h
Normal file
File diff suppressed because it is too large
Load Diff
961
python/clang/3.1/include/avx2intrin.h
Normal file
961
python/clang/3.1/include/avx2intrin.h
Normal file
@ -0,0 +1,961 @@
|
|||||||
|
/*===---- avx2intrin.h - AVX2 intrinsics -----------------------------------===
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
|
* in the Software without restriction, including without limitation the rights
|
||||||
|
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
* copies of the Software, and to permit persons to whom the Software is
|
||||||
|
* furnished to do so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included in
|
||||||
|
* all copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
* THE SOFTWARE.
|
||||||
|
*
|
||||||
|
*===-----------------------------------------------------------------------===
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __IMMINTRIN_H
|
||||||
|
#error "Never use <avx2intrin.h> directly; include <immintrin.h> instead."
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* SSE4 Multiple Packed Sums of Absolute Difference. */
|
||||||
|
#define _mm256_mpsadbw_epu8(X, Y, M) __builtin_ia32_mpsadbw256((X), (Y), (M))
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_abs_epi8(__m256i a)
|
||||||
|
{
|
||||||
|
return (__m256i)__builtin_ia32_pabsb256((__v32qi)a);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_abs_epi16(__m256i a)
|
||||||
|
{
|
||||||
|
return (__m256i)__builtin_ia32_pabsw256((__v16hi)a);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_abs_epi32(__m256i a)
|
||||||
|
{
|
||||||
|
return (__m256i)__builtin_ia32_pabsd256((__v8si)a);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_packs_epi16(__m256i a, __m256i b)
|
||||||
|
{
|
||||||
|
return (__m256i)__builtin_ia32_packsswb256((__v16hi)a, (__v16hi)b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_packs_epi32(__m256i a, __m256i b)
|
||||||
|
{
|
||||||
|
return (__m256i)__builtin_ia32_packssdw256((__v8si)a, (__v8si)b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_packus_epi16(__m256i a, __m256i b)
|
||||||
|
{
|
||||||
|
return (__m256i)__builtin_ia32_packuswb256((__v16hi)a, (__v16hi)b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_packus_epi32(__m256i __V1, __m256i __V2)
|
||||||
|
{
|
||||||
|
return (__m256i) __builtin_ia32_packusdw256((__v8si)__V1, (__v8si)__V2);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_add_epi8(__m256i a, __m256i b)
|
||||||
|
{
|
||||||
|
return (__m256i)((__v32qi)a + (__v32qi)b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_add_epi16(__m256i a, __m256i b)
|
||||||
|
{
|
||||||
|
return (__m256i)((__v16hi)a + (__v16hi)b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_add_epi32(__m256i a, __m256i b)
|
||||||
|
{
|
||||||
|
return (__m256i)((__v8si)a + (__v8si)b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_add_epi64(__m256i a, __m256i b)
|
||||||
|
{
|
||||||
|
return a + b;
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_adds_epi8(__m256i a, __m256i b)
|
||||||
|
{
|
||||||
|
return (__m256i)__builtin_ia32_paddsb256((__v32qi)a, (__v32qi)b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_adds_epi16(__m256i a, __m256i b)
|
||||||
|
{
|
||||||
|
return (__m256i)__builtin_ia32_paddsw256((__v16hi)a, (__v16hi)b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_adds_epu8(__m256i a, __m256i b)
|
||||||
|
{
|
||||||
|
return (__m256i)__builtin_ia32_paddusb256((__v32qi)a, (__v32qi)b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_adds_epu16(__m256i a, __m256i b)
|
||||||
|
{
|
||||||
|
return (__m256i)__builtin_ia32_paddusw256((__v16hi)a, (__v16hi)b);
|
||||||
|
}
|
||||||
|
|
||||||
|
#define _mm256_alignr_epi8(a, b, n) __extension__ ({ \
|
||||||
|
__m256i __a = (a); \
|
||||||
|
__m256i __b = (b); \
|
||||||
|
(__m256i)__builtin_ia32_palignr256((__v32qi)__a, (__v32qi)__b, (n)); })
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_and_si256(__m256i a, __m256i b)
|
||||||
|
{
|
||||||
|
return a & b;
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_andnot_si256(__m256i a, __m256i b)
|
||||||
|
{
|
||||||
|
return ~a & b;
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_avg_epu8(__m256i a, __m256i b)
|
||||||
|
{
|
||||||
|
return (__m256i)__builtin_ia32_pavgb256((__v32qi)a, (__v32qi)b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_avg_epu16(__m256i a, __m256i b)
|
||||||
|
{
|
||||||
|
return (__m256i)__builtin_ia32_pavgw256((__v16hi)a, (__v16hi)b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_blendv_epi8(__m256i __V1, __m256i __V2, __m256i __M)
|
||||||
|
{
|
||||||
|
return (__m256i)__builtin_ia32_pblendvb256((__v32qi)__V1, (__v32qi)__V2,
|
||||||
|
(__v32qi)__M);
|
||||||
|
}
|
||||||
|
|
||||||
|
#define _mm256_blend_epi16(V1, V2, M) __extension__ ({ \
|
||||||
|
__m256i __V1 = (V1); \
|
||||||
|
__m256i __V2 = (V2); \
|
||||||
|
(__m256i)__builtin_ia32_pblendw256((__v16hi)__V1, (__v16hi)__V2, (M)); })
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_cmpeq_epi8(__m256i a, __m256i b)
|
||||||
|
{
|
||||||
|
return (__m256i)((__v32qi)a == (__v32qi)b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_cmpeq_epi16(__m256i a, __m256i b)
|
||||||
|
{
|
||||||
|
return (__m256i)((__v16hi)a == (__v16hi)b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_cmpeq_epi32(__m256i a, __m256i b)
|
||||||
|
{
|
||||||
|
return (__m256i)((__v8si)a == (__v8si)b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_cmpeq_epi64(__m256i a, __m256i b)
|
||||||
|
{
|
||||||
|
return (__m256i)(a == b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_cmpgt_epi8(__m256i a, __m256i b)
|
||||||
|
{
|
||||||
|
return (__m256i)((__v32qi)a > (__v32qi)b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_cmpgt_epi16(__m256i a, __m256i b)
|
||||||
|
{
|
||||||
|
return (__m256i)((__v16hi)a > (__v16hi)b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_cmpgt_epi32(__m256i a, __m256i b)
|
||||||
|
{
|
||||||
|
return (__m256i)((__v8si)a > (__v8si)b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_cmpgt_epi64(__m256i a, __m256i b)
|
||||||
|
{
|
||||||
|
return (__m256i)(a > b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_hadd_epi16(__m256i a, __m256i b)
|
||||||
|
{
|
||||||
|
return (__m256i)__builtin_ia32_phaddw256((__v16hi)a, (__v16hi)b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_hadd_epi32(__m256i a, __m256i b)
|
||||||
|
{
|
||||||
|
return (__m256i)__builtin_ia32_phaddd256((__v8si)a, (__v8si)b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_hadds_epi16(__m256i a, __m256i b)
|
||||||
|
{
|
||||||
|
return (__m256i)__builtin_ia32_phaddsw256((__v16hi)a, (__v16hi)b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_hsub_epi16(__m256i a, __m256i b)
|
||||||
|
{
|
||||||
|
return (__m256i)__builtin_ia32_phsubw256((__v16hi)a, (__v16hi)b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_hsub_epi32(__m256i a, __m256i b)
|
||||||
|
{
|
||||||
|
return (__m256i)__builtin_ia32_phsubd256((__v8si)a, (__v8si)b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_hsubs_epi16(__m256i a, __m256i b)
|
||||||
|
{
|
||||||
|
return (__m256i)__builtin_ia32_phsubsw256((__v16hi)a, (__v16hi)b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_maddubs_epi16(__m256i a, __m256i b)
|
||||||
|
{
|
||||||
|
return (__m256i)__builtin_ia32_pmaddubsw256((__v32qi)a, (__v32qi)b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_madd_epi16(__m256i a, __m256i b)
|
||||||
|
{
|
||||||
|
return (__m256i)__builtin_ia32_pmaddwd256((__v16hi)a, (__v16hi)b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_max_epi8(__m256i a, __m256i b)
|
||||||
|
{
|
||||||
|
return (__m256i)__builtin_ia32_pmaxsb256((__v32qi)a, (__v32qi)b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_max_epi16(__m256i a, __m256i b)
|
||||||
|
{
|
||||||
|
return (__m256i)__builtin_ia32_pmaxsw256((__v16hi)a, (__v16hi)b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_max_epi32(__m256i a, __m256i b)
|
||||||
|
{
|
||||||
|
return (__m256i)__builtin_ia32_pmaxsd256((__v8si)a, (__v8si)b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_max_epu8(__m256i a, __m256i b)
|
||||||
|
{
|
||||||
|
return (__m256i)__builtin_ia32_pmaxub256((__v32qi)a, (__v32qi)b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_max_epu16(__m256i a, __m256i b)
|
||||||
|
{
|
||||||
|
return (__m256i)__builtin_ia32_pmaxuw256((__v16hi)a, (__v16hi)b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_max_epu32(__m256i a, __m256i b)
|
||||||
|
{
|
||||||
|
return (__m256i)__builtin_ia32_pmaxud256((__v8si)a, (__v8si)b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_min_epi8(__m256i a, __m256i b)
|
||||||
|
{
|
||||||
|
return (__m256i)__builtin_ia32_pminsb256((__v32qi)a, (__v32qi)b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_min_epi16(__m256i a, __m256i b)
|
||||||
|
{
|
||||||
|
return (__m256i)__builtin_ia32_pminsw256((__v16hi)a, (__v16hi)b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_min_epi32(__m256i a, __m256i b)
|
||||||
|
{
|
||||||
|
return (__m256i)__builtin_ia32_pminsd256((__v8si)a, (__v8si)b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_min_epu8(__m256i a, __m256i b)
|
||||||
|
{
|
||||||
|
return (__m256i)__builtin_ia32_pminub256((__v32qi)a, (__v32qi)b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_min_epu16(__m256i a, __m256i b)
|
||||||
|
{
|
||||||
|
return (__m256i)__builtin_ia32_pminuw256 ((__v16hi)a, (__v16hi)b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_min_epu32(__m256i a, __m256i b)
|
||||||
|
{
|
||||||
|
return (__m256i)__builtin_ia32_pminud256((__v8si)a, (__v8si)b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ int __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_movemask_epi8(__m256i a)
|
||||||
|
{
|
||||||
|
return __builtin_ia32_pmovmskb256((__v32qi)a);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_cvtepi8_epi16(__m128i __V)
|
||||||
|
{
|
||||||
|
return (__m256i)__builtin_ia32_pmovsxbw256((__v16qi)__V);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_cvtepi8_epi32(__m128i __V)
|
||||||
|
{
|
||||||
|
return (__m256i)__builtin_ia32_pmovsxbd256((__v16qi)__V);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_cvtepi8_epi64(__m128i __V)
|
||||||
|
{
|
||||||
|
return (__m256i)__builtin_ia32_pmovsxbq256((__v16qi)__V);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_cvtepi16_epi32(__m128i __V)
|
||||||
|
{
|
||||||
|
return (__m256i)__builtin_ia32_pmovsxwd256((__v8hi)__V);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_cvtepi16_epi64(__m128i __V)
|
||||||
|
{
|
||||||
|
return (__m256i)__builtin_ia32_pmovsxwq256((__v8hi)__V);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_cvtepi32_epi64(__m128i __V)
|
||||||
|
{
|
||||||
|
return (__m256i)__builtin_ia32_pmovsxdq256((__v4si)__V);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_cvtepu8_epi16(__m128i __V)
|
||||||
|
{
|
||||||
|
return (__m256i)__builtin_ia32_pmovzxbw256((__v16qi)__V);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_cvtepu8_epi32(__m128i __V)
|
||||||
|
{
|
||||||
|
return (__m256i)__builtin_ia32_pmovzxbd256((__v16qi)__V);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_cvtepu8_epi64(__m128i __V)
|
||||||
|
{
|
||||||
|
return (__m256i)__builtin_ia32_pmovzxbq256((__v16qi)__V);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_cvtepu16_epi32(__m128i __V)
|
||||||
|
{
|
||||||
|
return (__m256i)__builtin_ia32_pmovzxwd256((__v8hi)__V);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_cvtepu16_epi64(__m128i __V)
|
||||||
|
{
|
||||||
|
return (__m256i)__builtin_ia32_pmovzxwq256((__v8hi)__V);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_cvtepu32_epi64(__m128i __V)
|
||||||
|
{
|
||||||
|
return (__m256i)__builtin_ia32_pmovzxdq256((__v4si)__V);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_mul_epi32(__m256i a, __m256i b)
|
||||||
|
{
|
||||||
|
return (__m256i)__builtin_ia32_pmuldq256((__v8si)a, (__v8si)b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_mulhrs_epi16(__m256i a, __m256i b)
|
||||||
|
{
|
||||||
|
return (__m256i)__builtin_ia32_pmulhrsw256((__v16hi)a, (__v16hi)b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_mulhi_epu16(__m256i a, __m256i b)
|
||||||
|
{
|
||||||
|
return (__m256i)__builtin_ia32_pmulhuw256((__v16hi)a, (__v16hi)b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_mulhi_epi16(__m256i a, __m256i b)
|
||||||
|
{
|
||||||
|
return (__m256i)__builtin_ia32_pmulhw256((__v16hi)a, (__v16hi)b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_mullo_epi16(__m256i a, __m256i b)
|
||||||
|
{
|
||||||
|
return (__m256i)((__v16hi)a * (__v16hi)b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_mullo_epi32 (__m256i a, __m256i b)
|
||||||
|
{
|
||||||
|
return (__m256i)((__v8si)a * (__v8si)b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_mul_epu32(__m256i a, __m256i b)
|
||||||
|
{
|
||||||
|
return __builtin_ia32_pmuludq256((__v8si)a, (__v8si)b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_or_si256(__m256i a, __m256i b)
|
||||||
|
{
|
||||||
|
return a | b;
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_sad_epu8(__m256i a, __m256i b)
|
||||||
|
{
|
||||||
|
return __builtin_ia32_psadbw256((__v32qi)a, (__v32qi)b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_shuffle_epi8(__m256i a, __m256i b)
|
||||||
|
{
|
||||||
|
return (__m256i)__builtin_ia32_pshufb256((__v32qi)a, (__v32qi)b);
|
||||||
|
}
|
||||||
|
|
||||||
|
#define _mm256_shuffle_epi32(a, imm) __extension__ ({ \
|
||||||
|
__m256i __a = (a); \
|
||||||
|
(__m256i)__builtin_shufflevector((__v8si)__a, (__v8si)_mm256_set1_epi32(0), \
|
||||||
|
(imm) & 0x3, ((imm) & 0xc) >> 2, \
|
||||||
|
((imm) & 0x30) >> 4, ((imm) & 0xc0) >> 6, \
|
||||||
|
4 + (((imm) & 0x03) >> 0), \
|
||||||
|
4 + (((imm) & 0x0c) >> 2), \
|
||||||
|
4 + (((imm) & 0x30) >> 4), \
|
||||||
|
4 + (((imm) & 0xc0) >> 6)); })
|
||||||
|
|
||||||
|
#define _mm256_shufflehi_epi16(a, imm) __extension__ ({ \
|
||||||
|
__m256i __a = (a); \
|
||||||
|
(__m256i)__builtin_shufflevector((__v16hi)__a, (__v16hi)_mm256_set1_epi16(0), \
|
||||||
|
0, 1, 2, 3, \
|
||||||
|
4 + (((imm) & 0x03) >> 0), \
|
||||||
|
4 + (((imm) & 0x0c) >> 2), \
|
||||||
|
4 + (((imm) & 0x30) >> 4), \
|
||||||
|
4 + (((imm) & 0xc0) >> 6), \
|
||||||
|
8, 9, 10, 11, \
|
||||||
|
12 + (((imm) & 0x03) >> 0), \
|
||||||
|
12 + (((imm) & 0x0c) >> 2), \
|
||||||
|
12 + (((imm) & 0x30) >> 4), \
|
||||||
|
12 + (((imm) & 0xc0) >> 6)); })
|
||||||
|
|
||||||
|
#define _mm256_shufflelo_epi16(a, imm) __extension__ ({ \
|
||||||
|
__m256i __a = (a); \
|
||||||
|
(__m256i)__builtin_shufflevector((__v16hi)__a, (__v16hi)_mm256_set1_epi16(0), \
|
||||||
|
(imm) & 0x3,((imm) & 0xc) >> 2, \
|
||||||
|
((imm) & 0x30) >> 4, ((imm) & 0xc0) >> 6, \
|
||||||
|
4, 5, 6, 7, \
|
||||||
|
8 + (((imm) & 0x03) >> 0), \
|
||||||
|
8 + (((imm) & 0x0c) >> 2), \
|
||||||
|
8 + (((imm) & 0x30) >> 4), \
|
||||||
|
8 + (((imm) & 0xc0) >> 6), \
|
||||||
|
12, 13, 14, 15); })
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_sign_epi8(__m256i a, __m256i b)
|
||||||
|
{
|
||||||
|
return (__m256i)__builtin_ia32_psignb256((__v32qi)a, (__v32qi)b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_sign_epi16(__m256i a, __m256i b)
|
||||||
|
{
|
||||||
|
return (__m256i)__builtin_ia32_psignw256((__v16hi)a, (__v16hi)b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_sign_epi32(__m256i a, __m256i b)
|
||||||
|
{
|
||||||
|
return (__m256i)__builtin_ia32_psignd256((__v8si)a, (__v8si)b);
|
||||||
|
}
|
||||||
|
|
||||||
|
#define _mm256_slli_si256(a, count) __extension__ ({ \
|
||||||
|
__m256i __a = (a); \
|
||||||
|
(__m256i)__builtin_ia32_pslldqi256(__a, (count)*8); })
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_slli_epi16(__m256i a, int count)
|
||||||
|
{
|
||||||
|
return (__m256i)__builtin_ia32_psllwi256((__v16hi)a, count);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_sll_epi16(__m256i a, __m128i count)
|
||||||
|
{
|
||||||
|
return (__m256i)__builtin_ia32_psllw256((__v16hi)a, (__v8hi)count);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_slli_epi32(__m256i a, int count)
|
||||||
|
{
|
||||||
|
return (__m256i)__builtin_ia32_pslldi256((__v8si)a, count);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_sll_epi32(__m256i a, __m128i count)
|
||||||
|
{
|
||||||
|
return (__m256i)__builtin_ia32_pslld256((__v8si)a, (__v4si)count);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_slli_epi64(__m256i a, int count)
|
||||||
|
{
|
||||||
|
return __builtin_ia32_psllqi256(a, count);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_sll_epi64(__m256i a, __m128i count)
|
||||||
|
{
|
||||||
|
return __builtin_ia32_psllq256(a, count);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_srai_epi16(__m256i a, int count)
|
||||||
|
{
|
||||||
|
return (__m256i)__builtin_ia32_psrawi256((__v16hi)a, count);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_sra_epi16(__m256i a, __m128i count)
|
||||||
|
{
|
||||||
|
return (__m256i)__builtin_ia32_psraw256((__v16hi)a, (__v8hi)count);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_srai_epi32(__m256i a, int count)
|
||||||
|
{
|
||||||
|
return (__m256i)__builtin_ia32_psradi256((__v8si)a, count);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_sra_epi32(__m256i a, __m128i count)
|
||||||
|
{
|
||||||
|
return (__m256i)__builtin_ia32_psrad256((__v8si)a, (__v4si)count);
|
||||||
|
}
|
||||||
|
|
||||||
|
#define _mm256_srli_si256(a, count) __extension__ ({ \
|
||||||
|
__m256i __a = (a); \
|
||||||
|
(__m256i)__builtin_ia32_psrldqi256(__a, (count)*8); })
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_srli_epi16(__m256i a, int count)
|
||||||
|
{
|
||||||
|
return (__m256i)__builtin_ia32_psrlwi256((__v16hi)a, count);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_srl_epi16(__m256i a, __m128i count)
|
||||||
|
{
|
||||||
|
return (__m256i)__builtin_ia32_psrlw256((__v16hi)a, (__v8hi)count);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_srli_epi32(__m256i a, int count)
|
||||||
|
{
|
||||||
|
return (__m256i)__builtin_ia32_psrldi256((__v8si)a, count);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_srl_epi32(__m256i a, __m128i count)
|
||||||
|
{
|
||||||
|
return (__m256i)__builtin_ia32_psrld256((__v8si)a, (__v4si)count);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_srli_epi64(__m256i a, int count)
|
||||||
|
{
|
||||||
|
return __builtin_ia32_psrlqi256(a, count);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_srl_epi64(__m256i a, __m128i count)
|
||||||
|
{
|
||||||
|
return __builtin_ia32_psrlq256(a, count);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_sub_epi8(__m256i a, __m256i b)
|
||||||
|
{
|
||||||
|
return (__m256i)((__v32qi)a - (__v32qi)b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_sub_epi16(__m256i a, __m256i b)
|
||||||
|
{
|
||||||
|
return (__m256i)((__v16hi)a - (__v16hi)b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_sub_epi32(__m256i a, __m256i b)
|
||||||
|
{
|
||||||
|
return (__m256i)((__v8si)a - (__v8si)b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_sub_epi64(__m256i a, __m256i b)
|
||||||
|
{
|
||||||
|
return a - b;
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_subs_epi8(__m256i a, __m256i b)
|
||||||
|
{
|
||||||
|
return (__m256i)__builtin_ia32_psubsb256((__v32qi)a, (__v32qi)b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_subs_epi16(__m256i a, __m256i b)
|
||||||
|
{
|
||||||
|
return (__m256i)__builtin_ia32_psubsw256((__v16hi)a, (__v16hi)b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_subs_epu8(__m256i a, __m256i b)
|
||||||
|
{
|
||||||
|
return (__m256i)__builtin_ia32_psubusb256((__v32qi)a, (__v32qi)b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_subs_epu16(__m256i a, __m256i b)
|
||||||
|
{
|
||||||
|
return (__m256i)__builtin_ia32_psubusw256((__v16hi)a, (__v16hi)b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_unpackhi_epi8(__m256i a, __m256i b)
|
||||||
|
{
|
||||||
|
return (__m256i)__builtin_shufflevector((__v32qi)a, (__v32qi)b, 8, 32+8, 9, 32+9, 10, 32+10, 11, 32+11, 12, 32+12, 13, 32+13, 14, 32+14, 15, 32+15, 24, 32+24, 25, 32+25, 26, 32+26, 27, 32+27, 28, 32+28, 29, 32+29, 30, 32+30, 31, 32+31);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_unpackhi_epi16(__m256i a, __m256i b)
|
||||||
|
{
|
||||||
|
return (__m256i)__builtin_shufflevector((__v16hi)a, (__v16hi)b, 4, 16+4, 5, 16+5, 6, 16+6, 7, 16+7, 12, 16+12, 13, 16+13, 14, 16+14, 15, 16+15);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_unpackhi_epi32(__m256i a, __m256i b)
|
||||||
|
{
|
||||||
|
return (__m256i)__builtin_shufflevector((__v8si)a, (__v8si)b, 2, 8+2, 3, 8+3, 6, 8+6, 7, 8+7);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_unpackhi_epi64(__m256i a, __m256i b)
|
||||||
|
{
|
||||||
|
return (__m256i)__builtin_shufflevector(a, b, 1, 4+1, 3, 4+3);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_unpacklo_epi8(__m256i a, __m256i b)
|
||||||
|
{
|
||||||
|
return (__m256i)__builtin_shufflevector((__v32qi)a, (__v32qi)b, 0, 32+0, 1, 32+1, 2, 32+2, 3, 32+3, 4, 32+4, 5, 32+5, 6, 32+6, 7, 32+7, 16, 32+16, 17, 32+17, 18, 32+18, 19, 32+19, 20, 32+20, 21, 32+21, 22, 32+22, 23, 32+23);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_unpacklo_epi16(__m256i a, __m256i b)
|
||||||
|
{
|
||||||
|
return (__m256i)__builtin_shufflevector((__v16hi)a, (__v16hi)b, 0, 16+0, 1, 16+1, 2, 16+2, 3, 16+3, 8, 16+8, 9, 16+9, 10, 16+10, 11, 16+11);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_unpacklo_epi32(__m256i a, __m256i b)
|
||||||
|
{
|
||||||
|
return (__m256i)__builtin_shufflevector((__v8si)a, (__v8si)b, 0, 8+0, 1, 8+1, 4, 8+4, 5, 8+5);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_unpacklo_epi64(__m256i a, __m256i b)
|
||||||
|
{
|
||||||
|
return (__m256i)__builtin_shufflevector(a, b, 0, 4+0, 2, 4+2);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_xor_si256(__m256i a, __m256i b)
|
||||||
|
{
|
||||||
|
return a ^ b;
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_stream_load_si256(__m256i *__V)
|
||||||
|
{
|
||||||
|
return (__m256i)__builtin_ia32_movntdqa256((__v4di *)__V);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_broadcastss_ps(__m128 __X)
|
||||||
|
{
|
||||||
|
return (__m128)__builtin_ia32_vbroadcastss_ps((__v4sf)__X);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_broadcastss_ps(__m128 __X)
|
||||||
|
{
|
||||||
|
return (__m256)__builtin_ia32_vbroadcastss_ps256((__v4sf)__X);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256d __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_broadcastsd_pd(__m128d __X)
|
||||||
|
{
|
||||||
|
return (__m256d)__builtin_ia32_vbroadcastsd_pd256((__v2df)__X);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_broadcastsi128_si256(__m128i const *a)
|
||||||
|
{
|
||||||
|
return (__m256i)__builtin_ia32_vbroadcastsi256(a);
|
||||||
|
}
|
||||||
|
|
||||||
|
#define _mm_blend_epi32(V1, V2, M) __extension__ ({ \
|
||||||
|
__m128i __V1 = (V1); \
|
||||||
|
__m128i __V2 = (V2); \
|
||||||
|
(__m128i)__builtin_ia32_pblendd128((__v4si)__V1, (__v4si)__V2, (M)); })
|
||||||
|
|
||||||
|
#define _mm256_blend_epi32(V1, V2, M) __extension__ ({ \
|
||||||
|
__m256i __V1 = (V1); \
|
||||||
|
__m256i __V2 = (V2); \
|
||||||
|
(__m256i)__builtin_ia32_pblendd256((__v8si)__V1, (__v8si)__V2, (M)); })
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_broadcastb_epi8(__m128i __X)
|
||||||
|
{
|
||||||
|
return (__m256i)__builtin_ia32_pbroadcastb256((__v16qi)__X);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_broadcastw_epi16(__m128i __X)
|
||||||
|
{
|
||||||
|
return (__m256i)__builtin_ia32_pbroadcastw256((__v8hi)__X);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_broadcastd_epi32(__m128i __X)
|
||||||
|
{
|
||||||
|
return (__m256i)__builtin_ia32_pbroadcastd256((__v4si)__X);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_broadcastq_epi64(__m128i __X)
|
||||||
|
{
|
||||||
|
return (__m256i)__builtin_ia32_pbroadcastq256(__X);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_broadcastb_epi8(__m128i __X)
|
||||||
|
{
|
||||||
|
return (__m128i)__builtin_ia32_pbroadcastb128((__v16qi)__X);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_broadcastw_epi16(__m128i __X)
|
||||||
|
{
|
||||||
|
return (__m128i)__builtin_ia32_pbroadcastw128((__v8hi)__X);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static __inline__ __m128i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_broadcastd_epi32(__m128i __X)
|
||||||
|
{
|
||||||
|
return (__m128i)__builtin_ia32_pbroadcastd128((__v4si)__X);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_broadcastq_epi64(__m128i __X)
|
||||||
|
{
|
||||||
|
return (__m128i)__builtin_ia32_pbroadcastq128(__X);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_permutevar8x32_epi32(__m256i a, __m256i b)
|
||||||
|
{
|
||||||
|
return (__m256i)__builtin_ia32_permvarsi256((__v8si)a, (__v8si)b);
|
||||||
|
}
|
||||||
|
|
||||||
|
#define _mm256_permute4x64_pd(V, M) __extension__ ({ \
|
||||||
|
__m256d __V = (V); \
|
||||||
|
(__m256d)__builtin_shufflevector((__v4df)__V, (__v4df) _mm256_setzero_pd(), \
|
||||||
|
(M) & 0x3, ((M) & 0xc) >> 2, \
|
||||||
|
((M) & 0x30) >> 4, ((M) & 0xc0) >> 6); })
|
||||||
|
|
||||||
|
static __inline__ __m256 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_permutevar8x32_ps(__m256 a, __m256 b)
|
||||||
|
{
|
||||||
|
return (__m256)__builtin_ia32_permvarsf256((__v8sf)a, (__v8sf)b);
|
||||||
|
}
|
||||||
|
|
||||||
|
#define _mm256_permute4x64_epi64(V, M) __extension__ ({ \
|
||||||
|
__m256i __V = (V); \
|
||||||
|
(__m256i)__builtin_shufflevector((__v4di)__V, (__v4di) _mm256_setzero_si256(), \
|
||||||
|
(M) & 0x3, ((M) & 0xc) >> 2, \
|
||||||
|
((M) & 0x30) >> 4, ((M) & 0xc0) >> 6); })
|
||||||
|
|
||||||
|
#define _mm256_permute2x128_si256(V1, V2, M) __extension__ ({ \
|
||||||
|
__m256i __V1 = (V1); \
|
||||||
|
__m256i __V2 = (V2); \
|
||||||
|
(__m256i)__builtin_ia32_permti256(__V1, __V2, (M)); })
|
||||||
|
|
||||||
|
#define _mm256_extracti128_si256(A, O) __extension__ ({ \
|
||||||
|
__m256i __A = (A); \
|
||||||
|
(__m128i)__builtin_ia32_extract128i256(__A, (O)); })
|
||||||
|
|
||||||
|
#define _mm256_inserti128_si256(V1, V2, O) __extension__ ({ \
|
||||||
|
__m256i __V1 = (V1); \
|
||||||
|
__m128i __V2 = (V2); \
|
||||||
|
(__m256i)__builtin_ia32_insert128i256(__V1, __V2, (O)); })
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_maskload_epi32(int const *__X, __m256i __M)
|
||||||
|
{
|
||||||
|
return (__m256i)__builtin_ia32_maskloadd256((const __v8si *)__X, (__v8si)__M);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_maskload_epi64(long long const *__X, __m256i __M)
|
||||||
|
{
|
||||||
|
return (__m256i)__builtin_ia32_maskloadq256((const __v4di *)__X, __M);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_maskload_epi32(int const *__X, __m128i __M)
|
||||||
|
{
|
||||||
|
return (__m128i)__builtin_ia32_maskloadd((const __v4si *)__X, (__v4si)__M);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_maskload_epi64(long long const *__X, __m128i __M)
|
||||||
|
{
|
||||||
|
return (__m128i)__builtin_ia32_maskloadq((const __v2di *)__X, (__v2di)__M);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ void __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_maskstore_epi32(int *__X, __m256i __M, __m256i __Y)
|
||||||
|
{
|
||||||
|
__builtin_ia32_maskstored256((__v8si *)__X, (__v8si)__M, (__v8si)__Y);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ void __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_maskstore_epi64(long long *__X, __m256i __M, __m256i __Y)
|
||||||
|
{
|
||||||
|
__builtin_ia32_maskstoreq256((__v4di *)__X, __M, __Y);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ void __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_maskstore_epi32(int *__X, __m128i __M, __m128i __Y)
|
||||||
|
{
|
||||||
|
__builtin_ia32_maskstored((__v4si *)__X, (__v4si)__M, (__v4si)__Y);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ void __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_maskstore_epi64(long long *__X, __m128i __M, __m128i __Y)
|
||||||
|
{
|
||||||
|
__builtin_ia32_maskstoreq(( __v2di *)__X, __M, __Y);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_sllv_epi32(__m256i __X, __m256i __Y)
|
||||||
|
{
|
||||||
|
return (__m256i)__builtin_ia32_psllv8si((__v8si)__X, (__v8si)__Y);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_sllv_epi32(__m128i __X, __m128i __Y)
|
||||||
|
{
|
||||||
|
return (__m128i)__builtin_ia32_psllv4si((__v4si)__X, (__v4si)__Y);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_sllv_epi64(__m256i __X, __m256i __Y)
|
||||||
|
{
|
||||||
|
return (__m256i)__builtin_ia32_psllv4di(__X, __Y);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_sllv_epi64(__m128i __X, __m128i __Y)
|
||||||
|
{
|
||||||
|
return (__m128i)__builtin_ia32_psllv2di(__X, __Y);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_srav_epi32(__m256i __X, __m256i __Y)
|
||||||
|
{
|
||||||
|
return (__m256i)__builtin_ia32_psrav8si((__v8si)__X, (__v8si)__Y);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_srav_epi32(__m128i __X, __m128i __Y)
|
||||||
|
{
|
||||||
|
return (__m128i)__builtin_ia32_psrav4si((__v4si)__X, (__v4si)__Y);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_srlv_epi32(__m256i __X, __m256i __Y)
|
||||||
|
{
|
||||||
|
return (__m256i)__builtin_ia32_psrlv8si((__v8si)__X, (__v8si)__Y);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_srlv_epi32(__m128i __X, __m128i __Y)
|
||||||
|
{
|
||||||
|
return (__m128i)__builtin_ia32_psrlv4si((__v4si)__X, (__v4si)__Y);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_srlv_epi64(__m256i __X, __m256i __Y)
|
||||||
|
{
|
||||||
|
return (__m256i)__builtin_ia32_psrlv4di(__X, __Y);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_srlv_epi64(__m128i __X, __m128i __Y)
|
||||||
|
{
|
||||||
|
return (__m128i)__builtin_ia32_psrlv2di(__X, __Y);
|
||||||
|
}
|
1215
python/clang/3.1/include/avxintrin.h
Normal file
1215
python/clang/3.1/include/avxintrin.h
Normal file
File diff suppressed because it is too large
Load Diff
75
python/clang/3.1/include/bmi2intrin.h
Normal file
75
python/clang/3.1/include/bmi2intrin.h
Normal file
@ -0,0 +1,75 @@
|
|||||||
|
/*===---- bmi2intrin.h - BMI2 intrinsics -----------------------------------===
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
|
* in the Software without restriction, including without limitation the rights
|
||||||
|
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
* copies of the Software, and to permit persons to whom the Software is
|
||||||
|
* furnished to do so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included in
|
||||||
|
* all copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
* THE SOFTWARE.
|
||||||
|
*
|
||||||
|
*===-----------------------------------------------------------------------===
|
||||||
|
*/
|
||||||
|
|
||||||
|
#if !defined __X86INTRIN_H && !defined __IMMINTRIN_H
|
||||||
|
#error "Never use <bmi2intrin.h> directly; include <x86intrin.h> instead."
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef __BMI2__
|
||||||
|
# error "BMI2 instruction set not enabled"
|
||||||
|
#endif /* __BMI2__ */
|
||||||
|
|
||||||
|
#ifndef __BMI2INTRIN_H
|
||||||
|
#define __BMI2INTRIN_H
|
||||||
|
|
||||||
|
static __inline__ unsigned int __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_bzhi_u32(unsigned int __X, unsigned int __Y)
|
||||||
|
{
|
||||||
|
return __builtin_ia32_bzhi_si(__X, __Y);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ unsigned int __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_pdep_u32(unsigned int __X, unsigned int __Y)
|
||||||
|
{
|
||||||
|
return __builtin_ia32_pdep_si(__X, __Y);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ unsigned int __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_pext_u32(unsigned int __X, unsigned int __Y)
|
||||||
|
{
|
||||||
|
return __builtin_ia32_pext_si(__X, __Y);
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef __x86_64__
|
||||||
|
|
||||||
|
static __inline__ unsigned long long __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_bzhi_u64(unsigned long long __X, unsigned long long __Y)
|
||||||
|
{
|
||||||
|
return __builtin_ia32_bzhi_di(__X, __Y);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ unsigned long long __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_pdep_u64(unsigned long long __X, unsigned long long __Y)
|
||||||
|
{
|
||||||
|
return __builtin_ia32_pdep_di(__X, __Y);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ unsigned long long __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_pext_u64(unsigned long long __X, unsigned long long __Y)
|
||||||
|
{
|
||||||
|
return __builtin_ia32_pext_di(__X, __Y);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /* !__x86_64__ */
|
||||||
|
|
||||||
|
#endif /* __BMI2INTRIN_H */
|
115
python/clang/3.1/include/bmiintrin.h
Normal file
115
python/clang/3.1/include/bmiintrin.h
Normal file
@ -0,0 +1,115 @@
|
|||||||
|
/*===---- bmiintrin.h - BMI intrinsics -------------------------------------===
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
|
* in the Software without restriction, including without limitation the rights
|
||||||
|
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
* copies of the Software, and to permit persons to whom the Software is
|
||||||
|
* furnished to do so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included in
|
||||||
|
* all copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
* THE SOFTWARE.
|
||||||
|
*
|
||||||
|
*===-----------------------------------------------------------------------===
|
||||||
|
*/
|
||||||
|
|
||||||
|
#if !defined __X86INTRIN_H && !defined __IMMINTRIN_H
|
||||||
|
#error "Never use <bmiintrin.h> directly; include <x86intrin.h> instead."
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef __BMI__
|
||||||
|
# error "BMI instruction set not enabled"
|
||||||
|
#endif /* __BMI__ */
|
||||||
|
|
||||||
|
#ifndef __BMIINTRIN_H
|
||||||
|
#define __BMIINTRIN_H
|
||||||
|
|
||||||
|
static __inline__ unsigned short __attribute__((__always_inline__, __nodebug__))
|
||||||
|
__tzcnt16(unsigned short __X)
|
||||||
|
{
|
||||||
|
return __builtin_ctzs(__X);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ unsigned int __attribute__((__always_inline__, __nodebug__))
|
||||||
|
__andn_u32(unsigned int __X, unsigned int __Y)
|
||||||
|
{
|
||||||
|
return ~__X & __Y;
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ unsigned int __attribute__((__always_inline__, __nodebug__))
|
||||||
|
__bextr_u32(unsigned int __X, unsigned int __Y)
|
||||||
|
{
|
||||||
|
return __builtin_ia32_bextr_u32(__X, __Y);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ unsigned int __attribute__((__always_inline__, __nodebug__))
|
||||||
|
__blsi_u32(unsigned int __X)
|
||||||
|
{
|
||||||
|
return __X & -__X;
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ unsigned int __attribute__((__always_inline__, __nodebug__))
|
||||||
|
__blsmsk_u32(unsigned int __X)
|
||||||
|
{
|
||||||
|
return __X ^ (__X - 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ unsigned int __attribute__((__always_inline__, __nodebug__))
|
||||||
|
__blsr_u32(unsigned int __X)
|
||||||
|
{
|
||||||
|
return __X & (__X - 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ unsigned int __attribute__((__always_inline__, __nodebug__))
|
||||||
|
__tzcnt32(unsigned int __X)
|
||||||
|
{
|
||||||
|
return __builtin_ctz(__X);
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef __x86_64__
|
||||||
|
static __inline__ unsigned long long __attribute__((__always_inline__, __nodebug__))
|
||||||
|
__andn_u64 (unsigned long long __X, unsigned long long __Y)
|
||||||
|
{
|
||||||
|
return ~__X & __Y;
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ unsigned long long __attribute__((__always_inline__, __nodebug__))
|
||||||
|
__bextr_u64(unsigned long long __X, unsigned long long __Y)
|
||||||
|
{
|
||||||
|
return __builtin_ia32_bextr_u64(__X, __Y);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ unsigned long long __attribute__((__always_inline__, __nodebug__))
|
||||||
|
__blsi_u64(unsigned long long __X)
|
||||||
|
{
|
||||||
|
return __X & -__X;
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ unsigned long long __attribute__((__always_inline__, __nodebug__))
|
||||||
|
__blsmsk_u64(unsigned long long __X)
|
||||||
|
{
|
||||||
|
return __X ^ (__X - 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ unsigned long long __attribute__((__always_inline__, __nodebug__))
|
||||||
|
__blsr_u64(unsigned long long __X)
|
||||||
|
{
|
||||||
|
return __X & (__X - 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ unsigned long long __attribute__((__always_inline__, __nodebug__))
|
||||||
|
__tzcnt64(unsigned long long __X)
|
||||||
|
{
|
||||||
|
return __builtin_ctzll(__X);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* __BMIINTRIN_H */
|
33
python/clang/3.1/include/cpuid.h
Normal file
33
python/clang/3.1/include/cpuid.h
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
/*===---- cpuid.h - X86 cpu model detection --------------------------------===
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
|
* in the Software without restriction, including without limitation the rights
|
||||||
|
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
* copies of the Software, and to permit persons to whom the Software is
|
||||||
|
* furnished to do so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included in
|
||||||
|
* all copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
* THE SOFTWARE.
|
||||||
|
*
|
||||||
|
*===-----------------------------------------------------------------------===
|
||||||
|
*/
|
||||||
|
|
||||||
|
#if !(__x86_64__ || __i386__)
|
||||||
|
#error this header is for x86 only
|
||||||
|
#endif
|
||||||
|
|
||||||
|
static inline int __get_cpuid (unsigned int level, unsigned int *eax,
|
||||||
|
unsigned int *ebx, unsigned int *ecx,
|
||||||
|
unsigned int *edx) {
|
||||||
|
asm("cpuid" : "=a"(*eax), "=b" (*ebx), "=c"(*ecx), "=d"(*edx) : "0"(level));
|
||||||
|
return 1;
|
||||||
|
}
|
1424
python/clang/3.1/include/emmintrin.h
Normal file
1424
python/clang/3.1/include/emmintrin.h
Normal file
File diff suppressed because it is too large
Load Diff
124
python/clang/3.1/include/float.h
Normal file
124
python/clang/3.1/include/float.h
Normal file
@ -0,0 +1,124 @@
|
|||||||
|
/*===---- float.h - Characteristics of floating point types ----------------===
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
|
* in the Software without restriction, including without limitation the rights
|
||||||
|
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
* copies of the Software, and to permit persons to whom the Software is
|
||||||
|
* furnished to do so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included in
|
||||||
|
* all copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
* THE SOFTWARE.
|
||||||
|
*
|
||||||
|
*===-----------------------------------------------------------------------===
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __FLOAT_H
|
||||||
|
#define __FLOAT_H
|
||||||
|
|
||||||
|
/* If we're on MinGW, fall back to the system's float.h, which might have
|
||||||
|
* additional definitions provided for Windows.
|
||||||
|
* For more details see http://msdn.microsoft.com/en-us/library/y0ybw9fy.aspx
|
||||||
|
*/
|
||||||
|
#if defined(__MINGW32__) && \
|
||||||
|
defined(__has_include_next) && __has_include_next(<float.h>)
|
||||||
|
# include_next <float.h>
|
||||||
|
|
||||||
|
/* Undefine anything that we'll be redefining below. */
|
||||||
|
# undef FLT_EVAL_METHOD
|
||||||
|
# undef FLT_ROUNDS
|
||||||
|
# undef FLT_RADIX
|
||||||
|
# undef FLT_MANT_DIG
|
||||||
|
# undef DBL_MANT_DIG
|
||||||
|
# undef LDBL_MANT_DIG
|
||||||
|
# undef DECIMAL_DIG
|
||||||
|
# undef FLT_DIG
|
||||||
|
# undef DBL_DIG
|
||||||
|
# undef LDBL_DIG
|
||||||
|
# undef FLT_MIN_EXP
|
||||||
|
# undef DBL_MIN_EXP
|
||||||
|
# undef LDBL_MIN_EXP
|
||||||
|
# undef FLT_MIN_10_EXP
|
||||||
|
# undef DBL_MIN_10_EXP
|
||||||
|
# undef LDBL_MIN_10_EXP
|
||||||
|
# undef FLT_MAX_EXP
|
||||||
|
# undef DBL_MAX_EXP
|
||||||
|
# undef LDBL_MAX_EXP
|
||||||
|
# undef FLT_MAX_10_EXP
|
||||||
|
# undef DBL_MAX_10_EXP
|
||||||
|
# undef LDBL_MAX_10_EXP
|
||||||
|
# undef FLT_MAX
|
||||||
|
# undef DBL_MAX
|
||||||
|
# undef LDBL_MAX
|
||||||
|
# undef FLT_EPSILON
|
||||||
|
# undef DBL_EPSILON
|
||||||
|
# undef LDBL_EPSILON
|
||||||
|
# undef FLT_MIN
|
||||||
|
# undef DBL_MIN
|
||||||
|
# undef LDBL_MIN
|
||||||
|
# if __STDC_VERSION__ >= 201112L || !defined(__STRICT_ANSI__)
|
||||||
|
# undef FLT_TRUE_MIN
|
||||||
|
# undef DBL_TRUE_MIN
|
||||||
|
# undef LDBL_TRUE_MIN
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Characteristics of floating point types, C99 5.2.4.2.2 */
|
||||||
|
|
||||||
|
#define FLT_EVAL_METHOD __FLT_EVAL_METHOD__
|
||||||
|
#define FLT_ROUNDS (__builtin_flt_rounds())
|
||||||
|
#define FLT_RADIX __FLT_RADIX__
|
||||||
|
|
||||||
|
#define FLT_MANT_DIG __FLT_MANT_DIG__
|
||||||
|
#define DBL_MANT_DIG __DBL_MANT_DIG__
|
||||||
|
#define LDBL_MANT_DIG __LDBL_MANT_DIG__
|
||||||
|
|
||||||
|
#define DECIMAL_DIG __DECIMAL_DIG__
|
||||||
|
|
||||||
|
#define FLT_DIG __FLT_DIG__
|
||||||
|
#define DBL_DIG __DBL_DIG__
|
||||||
|
#define LDBL_DIG __LDBL_DIG__
|
||||||
|
|
||||||
|
#define FLT_MIN_EXP __FLT_MIN_EXP__
|
||||||
|
#define DBL_MIN_EXP __DBL_MIN_EXP__
|
||||||
|
#define LDBL_MIN_EXP __LDBL_MIN_EXP__
|
||||||
|
|
||||||
|
#define FLT_MIN_10_EXP __FLT_MIN_10_EXP__
|
||||||
|
#define DBL_MIN_10_EXP __DBL_MIN_10_EXP__
|
||||||
|
#define LDBL_MIN_10_EXP __LDBL_MIN_10_EXP__
|
||||||
|
|
||||||
|
#define FLT_MAX_EXP __FLT_MAX_EXP__
|
||||||
|
#define DBL_MAX_EXP __DBL_MAX_EXP__
|
||||||
|
#define LDBL_MAX_EXP __LDBL_MAX_EXP__
|
||||||
|
|
||||||
|
#define FLT_MAX_10_EXP __FLT_MAX_10_EXP__
|
||||||
|
#define DBL_MAX_10_EXP __DBL_MAX_10_EXP__
|
||||||
|
#define LDBL_MAX_10_EXP __LDBL_MAX_10_EXP__
|
||||||
|
|
||||||
|
#define FLT_MAX __FLT_MAX__
|
||||||
|
#define DBL_MAX __DBL_MAX__
|
||||||
|
#define LDBL_MAX __LDBL_MAX__
|
||||||
|
|
||||||
|
#define FLT_EPSILON __FLT_EPSILON__
|
||||||
|
#define DBL_EPSILON __DBL_EPSILON__
|
||||||
|
#define LDBL_EPSILON __LDBL_EPSILON__
|
||||||
|
|
||||||
|
#define FLT_MIN __FLT_MIN__
|
||||||
|
#define DBL_MIN __DBL_MIN__
|
||||||
|
#define LDBL_MIN __LDBL_MIN__
|
||||||
|
|
||||||
|
#if __STDC_VERSION__ >= 201112L || !defined(__STRICT_ANSI__)
|
||||||
|
# define FLT_TRUE_MIN __FLT_DENORM_MIN__
|
||||||
|
# define DBL_TRUE_MIN __DBL_DENORM_MIN__
|
||||||
|
# define LDBL_TRUE_MIN __LDBL_DENORM_MIN__
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* __FLOAT_H */
|
231
python/clang/3.1/include/fma4intrin.h
Normal file
231
python/clang/3.1/include/fma4intrin.h
Normal file
@ -0,0 +1,231 @@
|
|||||||
|
/*===---- fma4intrin.h - FMA4 intrinsics -----------------------------------===
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
|
* in the Software without restriction, including without limitation the rights
|
||||||
|
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
* copies of the Software, and to permit persons to whom the Software is
|
||||||
|
* furnished to do so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included in
|
||||||
|
* all copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
* THE SOFTWARE.
|
||||||
|
*
|
||||||
|
*===-----------------------------------------------------------------------===
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __X86INTRIN_H
|
||||||
|
#error "Never use <fma4intrin.h> directly; include <x86intrin.h> instead."
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef __FMA4INTRIN_H
|
||||||
|
#define __FMA4INTRIN_H
|
||||||
|
|
||||||
|
#ifndef __FMA4__
|
||||||
|
# error "FMA4 instruction set is not enabled"
|
||||||
|
#else
|
||||||
|
|
||||||
|
#include <pmmintrin.h>
|
||||||
|
|
||||||
|
static __inline__ __m128 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_macc_ps(__m128 __A, __m128 __B, __m128 __C)
|
||||||
|
{
|
||||||
|
return (__m128)__builtin_ia32_vfmaddps(__A, __B, __C);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128d __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_macc_pd(__m128d __A, __m128d __B, __m128d __C)
|
||||||
|
{
|
||||||
|
return (__m128d)__builtin_ia32_vfmaddpd(__A, __B, __C);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_macc_ss(__m128 __A, __m128 __B, __m128 __C)
|
||||||
|
{
|
||||||
|
return (__m128)__builtin_ia32_vfmaddss(__A, __B, __C);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128d __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_macc_sd(__m128d __A, __m128d __B, __m128d __C)
|
||||||
|
{
|
||||||
|
return (__m128d)__builtin_ia32_vfmaddsd(__A, __B, __C);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_msub_ps(__m128 __A, __m128 __B, __m128 __C)
|
||||||
|
{
|
||||||
|
return (__m128)__builtin_ia32_vfmsubps(__A, __B, __C);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128d __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_msub_pd(__m128d __A, __m128d __B, __m128d __C)
|
||||||
|
{
|
||||||
|
return (__m128d)__builtin_ia32_vfmsubpd(__A, __B, __C);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_msub_ss(__m128 __A, __m128 __B, __m128 __C)
|
||||||
|
{
|
||||||
|
return (__m128)__builtin_ia32_vfmsubss(__A, __B, __C);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128d __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_msub_sd(__m128d __A, __m128d __B, __m128d __C)
|
||||||
|
{
|
||||||
|
return (__m128d)__builtin_ia32_vfmsubsd(__A, __B, __C);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_nmacc_ps(__m128 __A, __m128 __B, __m128 __C)
|
||||||
|
{
|
||||||
|
return (__m128)__builtin_ia32_vfnmaddps(__A, __B, __C);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128d __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_nmacc_pd(__m128d __A, __m128d __B, __m128d __C)
|
||||||
|
{
|
||||||
|
return (__m128d)__builtin_ia32_vfnmaddpd(__A, __B, __C);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_nmacc_ss(__m128 __A, __m128 __B, __m128 __C)
|
||||||
|
{
|
||||||
|
return (__m128)__builtin_ia32_vfnmaddss(__A, __B, __C);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128d __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_nmacc_sd(__m128d __A, __m128d __B, __m128d __C)
|
||||||
|
{
|
||||||
|
return (__m128d)__builtin_ia32_vfnmaddsd(__A, __B, __C);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_nmsub_ps(__m128 __A, __m128 __B, __m128 __C)
|
||||||
|
{
|
||||||
|
return (__m128)__builtin_ia32_vfnmsubps(__A, __B, __C);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128d __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_nmsub_pd(__m128d __A, __m128d __B, __m128d __C)
|
||||||
|
{
|
||||||
|
return (__m128d)__builtin_ia32_vfnmsubpd(__A, __B, __C);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_nmsub_ss(__m128 __A, __m128 __B, __m128 __C)
|
||||||
|
{
|
||||||
|
return (__m128)__builtin_ia32_vfnmsubss(__A, __B, __C);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128d __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_nmsub_sd(__m128d __A, __m128d __B, __m128d __C)
|
||||||
|
{
|
||||||
|
return (__m128d)__builtin_ia32_vfnmsubsd(__A, __B, __C);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_maddsub_ps(__m128 __A, __m128 __B, __m128 __C)
|
||||||
|
{
|
||||||
|
return (__m128)__builtin_ia32_vfmaddsubps(__A, __B, __C);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128d __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_maddsub_pd(__m128d __A, __m128d __B, __m128d __C)
|
||||||
|
{
|
||||||
|
return (__m128d)__builtin_ia32_vfmaddsubpd(__A, __B, __C);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_msubadd_ps(__m128 __A, __m128 __B, __m128 __C)
|
||||||
|
{
|
||||||
|
return (__m128)__builtin_ia32_vfmsubaddps(__A, __B, __C);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128d __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_msubadd_pd(__m128d __A, __m128d __B, __m128d __C)
|
||||||
|
{
|
||||||
|
return (__m128d)__builtin_ia32_vfmsubaddpd(__A, __B, __C);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_macc_ps(__m256 __A, __m256 __B, __m256 __C)
|
||||||
|
{
|
||||||
|
return (__m256)__builtin_ia32_vfmaddps256(__A, __B, __C);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256d __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_macc_pd(__m256d __A, __m256d __B, __m256d __C)
|
||||||
|
{
|
||||||
|
return (__m256d)__builtin_ia32_vfmaddpd256(__A, __B, __C);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_msub_ps(__m256 __A, __m256 __B, __m256 __C)
|
||||||
|
{
|
||||||
|
return (__m256)__builtin_ia32_vfmsubps256(__A, __B, __C);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256d __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_msub_pd(__m256d __A, __m256d __B, __m256d __C)
|
||||||
|
{
|
||||||
|
return (__m256d)__builtin_ia32_vfmsubpd256(__A, __B, __C);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_nmacc_ps(__m256 __A, __m256 __B, __m256 __C)
|
||||||
|
{
|
||||||
|
return (__m256)__builtin_ia32_vfnmaddps256(__A, __B, __C);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256d __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_nmacc_pd(__m256d __A, __m256d __B, __m256d __C)
|
||||||
|
{
|
||||||
|
return (__m256d)__builtin_ia32_vfnmaddpd256(__A, __B, __C);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_nmsub_ps(__m256 __A, __m256 __B, __m256 __C)
|
||||||
|
{
|
||||||
|
return (__m256)__builtin_ia32_vfnmsubps256(__A, __B, __C);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256d __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_nmsub_pd(__m256d __A, __m256d __B, __m256d __C)
|
||||||
|
{
|
||||||
|
return (__m256d)__builtin_ia32_vfnmsubpd256(__A, __B, __C);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_maddsub_ps(__m256 __A, __m256 __B, __m256 __C)
|
||||||
|
{
|
||||||
|
return (__m256)__builtin_ia32_vfmaddsubps256(__A, __B, __C);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256d __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_maddsub_pd(__m256d __A, __m256d __B, __m256d __C)
|
||||||
|
{
|
||||||
|
return (__m256d)__builtin_ia32_vfmaddsubpd256(__A, __B, __C);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_msubadd_ps(__m256 __A, __m256 __B, __m256 __C)
|
||||||
|
{
|
||||||
|
return (__m256)__builtin_ia32_vfmsubaddps256(__A, __B, __C);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256d __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm256_msubadd_pd(__m256d __A, __m256d __B, __m256d __C)
|
||||||
|
{
|
||||||
|
return (__m256d)__builtin_ia32_vfmsubaddpd256(__A, __B, __C);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /* __FMA4__ */
|
||||||
|
|
||||||
|
#endif /* __FMA4INTRIN_H */
|
75
python/clang/3.1/include/immintrin.h
Normal file
75
python/clang/3.1/include/immintrin.h
Normal file
@ -0,0 +1,75 @@
|
|||||||
|
/*===---- immintrin.h - Intel intrinsics -----------------------------------===
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
|
* in the Software without restriction, including without limitation the rights
|
||||||
|
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
* copies of the Software, and to permit persons to whom the Software is
|
||||||
|
* furnished to do so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included in
|
||||||
|
* all copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
* THE SOFTWARE.
|
||||||
|
*
|
||||||
|
*===-----------------------------------------------------------------------===
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __IMMINTRIN_H
|
||||||
|
#define __IMMINTRIN_H
|
||||||
|
|
||||||
|
#ifdef __MMX__
|
||||||
|
#include <mmintrin.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __SSE__
|
||||||
|
#include <xmmintrin.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __SSE2__
|
||||||
|
#include <emmintrin.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __SSE3__
|
||||||
|
#include <pmmintrin.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __SSSE3__
|
||||||
|
#include <tmmintrin.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined (__SSE4_2__) || defined (__SSE4_1__)
|
||||||
|
#include <smmintrin.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined (__AES__)
|
||||||
|
#include <wmmintrin.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __AVX__
|
||||||
|
#include <avxintrin.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __AVX2__
|
||||||
|
#include <avx2intrin.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __BMI__
|
||||||
|
#include <bmiintrin.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __BMI2__
|
||||||
|
#include <bmi2intrin.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __LZCNT__
|
||||||
|
#include <lzcntintrin.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* __IMMINTRIN_H */
|
43
python/clang/3.1/include/iso646.h
Normal file
43
python/clang/3.1/include/iso646.h
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
/*===---- iso646.h - Standard header for alternate spellings of operators---===
|
||||||
|
*
|
||||||
|
* Copyright (c) 2008 Eli Friedman
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
|
* in the Software without restriction, including without limitation the rights
|
||||||
|
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
* copies of the Software, and to permit persons to whom the Software is
|
||||||
|
* furnished to do so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included in
|
||||||
|
* all copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
* THE SOFTWARE.
|
||||||
|
*
|
||||||
|
*===-----------------------------------------------------------------------===
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __ISO646_H
|
||||||
|
#define __ISO646_H
|
||||||
|
|
||||||
|
#ifndef __cplusplus
|
||||||
|
#define and &&
|
||||||
|
#define and_eq &=
|
||||||
|
#define bitand &
|
||||||
|
#define bitor |
|
||||||
|
#define compl ~
|
||||||
|
#define not !
|
||||||
|
#define not_eq !=
|
||||||
|
#define or ||
|
||||||
|
#define or_eq |=
|
||||||
|
#define xor ^
|
||||||
|
#define xor_eq ^=
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* __ISO646_H */
|
117
python/clang/3.1/include/limits.h
Normal file
117
python/clang/3.1/include/limits.h
Normal file
@ -0,0 +1,117 @@
|
|||||||
|
/*===---- limits.h - Standard header for integer sizes --------------------===*\
|
||||||
|
*
|
||||||
|
* Copyright (c) 2009 Chris Lattner
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
|
* in the Software without restriction, including without limitation the rights
|
||||||
|
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
* copies of the Software, and to permit persons to whom the Software is
|
||||||
|
* furnished to do so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included in
|
||||||
|
* all copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
* THE SOFTWARE.
|
||||||
|
*
|
||||||
|
\*===----------------------------------------------------------------------===*/
|
||||||
|
|
||||||
|
#ifndef __CLANG_LIMITS_H
|
||||||
|
#define __CLANG_LIMITS_H
|
||||||
|
|
||||||
|
/* The system's limits.h may, in turn, try to #include_next GCC's limits.h.
|
||||||
|
Avert this #include_next madness. */
|
||||||
|
#if defined __GNUC__ && !defined _GCC_LIMITS_H_
|
||||||
|
#define _GCC_LIMITS_H_
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* System headers include a number of constants from POSIX in <limits.h>.
|
||||||
|
Include it if we're hosted. */
|
||||||
|
#if __STDC_HOSTED__ && \
|
||||||
|
defined(__has_include_next) && __has_include_next(<limits.h>)
|
||||||
|
#include_next <limits.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Many system headers try to "help us out" by defining these. No really, we
|
||||||
|
know how big each datatype is. */
|
||||||
|
#undef SCHAR_MIN
|
||||||
|
#undef SCHAR_MAX
|
||||||
|
#undef UCHAR_MAX
|
||||||
|
#undef SHRT_MIN
|
||||||
|
#undef SHRT_MAX
|
||||||
|
#undef USHRT_MAX
|
||||||
|
#undef INT_MIN
|
||||||
|
#undef INT_MAX
|
||||||
|
#undef UINT_MAX
|
||||||
|
#undef LONG_MIN
|
||||||
|
#undef LONG_MAX
|
||||||
|
#undef ULONG_MAX
|
||||||
|
|
||||||
|
#undef CHAR_BIT
|
||||||
|
#undef CHAR_MIN
|
||||||
|
#undef CHAR_MAX
|
||||||
|
|
||||||
|
/* C90/99 5.2.4.2.1 */
|
||||||
|
#define SCHAR_MAX __SCHAR_MAX__
|
||||||
|
#define SHRT_MAX __SHRT_MAX__
|
||||||
|
#define INT_MAX __INT_MAX__
|
||||||
|
#define LONG_MAX __LONG_MAX__
|
||||||
|
|
||||||
|
#define SCHAR_MIN (-__SCHAR_MAX__-1)
|
||||||
|
#define SHRT_MIN (-__SHRT_MAX__ -1)
|
||||||
|
#define INT_MIN (-__INT_MAX__ -1)
|
||||||
|
#define LONG_MIN (-__LONG_MAX__ -1L)
|
||||||
|
|
||||||
|
#define UCHAR_MAX (__SCHAR_MAX__*2 +1)
|
||||||
|
#define USHRT_MAX (__SHRT_MAX__ *2 +1)
|
||||||
|
#define UINT_MAX (__INT_MAX__ *2U +1U)
|
||||||
|
#define ULONG_MAX (__LONG_MAX__ *2UL+1UL)
|
||||||
|
|
||||||
|
#ifndef MB_LEN_MAX
|
||||||
|
#define MB_LEN_MAX 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define CHAR_BIT __CHAR_BIT__
|
||||||
|
|
||||||
|
#ifdef __CHAR_UNSIGNED__ /* -funsigned-char */
|
||||||
|
#define CHAR_MIN 0
|
||||||
|
#define CHAR_MAX UCHAR_MAX
|
||||||
|
#else
|
||||||
|
#define CHAR_MIN SCHAR_MIN
|
||||||
|
#define CHAR_MAX __SCHAR_MAX__
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* C99 5.2.4.2.1: Added long long. */
|
||||||
|
#if __STDC_VERSION__ >= 199901
|
||||||
|
|
||||||
|
#undef LLONG_MIN
|
||||||
|
#undef LLONG_MAX
|
||||||
|
#undef ULLONG_MAX
|
||||||
|
|
||||||
|
#define LLONG_MAX __LONG_LONG_MAX__
|
||||||
|
#define LLONG_MIN (-__LONG_LONG_MAX__-1LL)
|
||||||
|
#define ULLONG_MAX (__LONG_LONG_MAX__*2ULL+1ULL)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* LONG_LONG_MIN/LONG_LONG_MAX/ULONG_LONG_MAX are a GNU extension. It's too bad
|
||||||
|
that we don't have something like #pragma poison that could be used to
|
||||||
|
deprecate a macro - the code should just use LLONG_MAX and friends.
|
||||||
|
*/
|
||||||
|
#if defined(__GNU_LIBRARY__) ? defined(__USE_GNU) : !defined(__STRICT_ANSI__)
|
||||||
|
|
||||||
|
#undef LONG_LONG_MIN
|
||||||
|
#undef LONG_LONG_MAX
|
||||||
|
#undef ULONG_LONG_MAX
|
||||||
|
|
||||||
|
#define LONG_LONG_MAX __LONG_LONG_MAX__
|
||||||
|
#define LONG_LONG_MIN (-__LONG_LONG_MAX__-1LL)
|
||||||
|
#define ULONG_LONG_MAX (__LONG_LONG_MAX__*2ULL+1ULL)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* __CLANG_LIMITS_H */
|
55
python/clang/3.1/include/lzcntintrin.h
Normal file
55
python/clang/3.1/include/lzcntintrin.h
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
/*===---- lzcntintrin.h - LZCNT intrinsics ---------------------------------===
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
|
* in the Software without restriction, including without limitation the rights
|
||||||
|
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
* copies of the Software, and to permit persons to whom the Software is
|
||||||
|
* furnished to do so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included in
|
||||||
|
* all copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
* THE SOFTWARE.
|
||||||
|
*
|
||||||
|
*===-----------------------------------------------------------------------===
|
||||||
|
*/
|
||||||
|
|
||||||
|
#if !defined __X86INTRIN_H && !defined __IMMINTRIN_H
|
||||||
|
#error "Never use <lzcntintrin.h> directly; include <x86intrin.h> instead."
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef __LZCNT__
|
||||||
|
# error "LZCNT instruction is not enabled"
|
||||||
|
#endif /* __LZCNT__ */
|
||||||
|
|
||||||
|
#ifndef __LZCNTINTRIN_H
|
||||||
|
#define __LZCNTINTRIN_H
|
||||||
|
|
||||||
|
static __inline__ unsigned short __attribute__((__always_inline__, __nodebug__))
|
||||||
|
__lzcnt16(unsigned short __X)
|
||||||
|
{
|
||||||
|
return __builtin_clzs(__X);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ unsigned int __attribute__((__always_inline__, __nodebug__))
|
||||||
|
__lzcnt32(unsigned int __X)
|
||||||
|
{
|
||||||
|
return __builtin_clz(__X);
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef __x86_64__
|
||||||
|
static __inline__ unsigned long long __attribute__((__always_inline__, __nodebug__))
|
||||||
|
__lzcnt64(unsigned long long __X)
|
||||||
|
{
|
||||||
|
return __builtin_clzll(__X);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* __LZCNTINTRIN_H */
|
161
python/clang/3.1/include/mm3dnow.h
Normal file
161
python/clang/3.1/include/mm3dnow.h
Normal file
@ -0,0 +1,161 @@
|
|||||||
|
/*===---- mm3dnow.h - 3DNow! intrinsics ------------------------------------===
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
|
* in the Software without restriction, including without limitation the rights
|
||||||
|
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
* copies of the Software, and to permit persons to whom the Software is
|
||||||
|
* furnished to do so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included in
|
||||||
|
* all copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
* THE SOFTWARE.
|
||||||
|
*
|
||||||
|
*===-----------------------------------------------------------------------===
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef _MM3DNOW_H_INCLUDED
|
||||||
|
#define _MM3DNOW_H_INCLUDED
|
||||||
|
|
||||||
|
#include <mmintrin.h>
|
||||||
|
|
||||||
|
typedef float __v2sf __attribute__((__vector_size__(8)));
|
||||||
|
|
||||||
|
static __inline__ void __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_m_femms() {
|
||||||
|
__builtin_ia32_femms();
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_m_pavgusb(__m64 __m1, __m64 __m2) {
|
||||||
|
return (__m64)__builtin_ia32_pavgusb((__v8qi)__m1, (__v8qi)__m2);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_m_pf2id(__m64 __m) {
|
||||||
|
return (__m64)__builtin_ia32_pf2id((__v2sf)__m);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_m_pfacc(__m64 __m1, __m64 __m2) {
|
||||||
|
return (__m64)__builtin_ia32_pfacc((__v2sf)__m1, (__v2sf)__m2);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_m_pfadd(__m64 __m1, __m64 __m2) {
|
||||||
|
return (__m64)__builtin_ia32_pfadd((__v2sf)__m1, (__v2sf)__m2);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_m_pfcmpeq(__m64 __m1, __m64 __m2) {
|
||||||
|
return (__m64)__builtin_ia32_pfcmpeq((__v2sf)__m1, (__v2sf)__m2);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_m_pfcmpge(__m64 __m1, __m64 __m2) {
|
||||||
|
return (__m64)__builtin_ia32_pfcmpge((__v2sf)__m1, (__v2sf)__m2);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_m_pfcmpgt(__m64 __m1, __m64 __m2) {
|
||||||
|
return (__m64)__builtin_ia32_pfcmpgt((__v2sf)__m1, (__v2sf)__m2);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_m_pfmax(__m64 __m1, __m64 __m2) {
|
||||||
|
return (__m64)__builtin_ia32_pfmax((__v2sf)__m1, (__v2sf)__m2);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_m_pfmin(__m64 __m1, __m64 __m2) {
|
||||||
|
return (__m64)__builtin_ia32_pfmin((__v2sf)__m1, (__v2sf)__m2);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_m_pfmul(__m64 __m1, __m64 __m2) {
|
||||||
|
return (__m64)__builtin_ia32_pfmul((__v2sf)__m1, (__v2sf)__m2);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_m_pfrcp(__m64 __m) {
|
||||||
|
return (__m64)__builtin_ia32_pfrcp((__v2sf)__m);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_m_pfrcpit1(__m64 __m1, __m64 __m2) {
|
||||||
|
return (__m64)__builtin_ia32_pfrcpit1((__v2sf)__m1, (__v2sf)__m2);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_m_pfrcpit2(__m64 __m1, __m64 __m2) {
|
||||||
|
return (__m64)__builtin_ia32_pfrcpit2((__v2sf)__m1, (__v2sf)__m2);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_m_pfrsqrt(__m64 __m) {
|
||||||
|
return (__m64)__builtin_ia32_pfrsqrt((__v2sf)__m);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_m_pfrsqrtit1(__m64 __m1, __m64 __m2) {
|
||||||
|
return (__m64)__builtin_ia32_pfrsqit1((__v2sf)__m1, (__v2sf)__m2);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_m_pfsub(__m64 __m1, __m64 __m2) {
|
||||||
|
return (__m64)__builtin_ia32_pfsub((__v2sf)__m1, (__v2sf)__m2);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_m_pfsubr(__m64 __m1, __m64 __m2) {
|
||||||
|
return (__m64)__builtin_ia32_pfsubr((__v2sf)__m1, (__v2sf)__m2);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_m_pi2fd(__m64 __m) {
|
||||||
|
return (__m64)__builtin_ia32_pi2fd((__v2si)__m);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_m_pmulhrw(__m64 __m1, __m64 __m2) {
|
||||||
|
return (__m64)__builtin_ia32_pmulhrw((__v4hi)__m1, (__v4hi)__m2);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_m_pf2iw(__m64 __m) {
|
||||||
|
return (__m64)__builtin_ia32_pf2iw((__v2sf)__m);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_m_pfnacc(__m64 __m1, __m64 __m2) {
|
||||||
|
return (__m64)__builtin_ia32_pfnacc((__v2sf)__m1, (__v2sf)__m2);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_m_pfpnacc(__m64 __m1, __m64 __m2) {
|
||||||
|
return (__m64)__builtin_ia32_pfpnacc((__v2sf)__m1, (__v2sf)__m2);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_m_pi2fw(__m64 __m) {
|
||||||
|
return (__m64)__builtin_ia32_pi2fw((__v2si)__m);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_m_pswapdsf(__m64 __m) {
|
||||||
|
return (__m64)__builtin_ia32_pswapdsf((__v2sf)__m);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_m_pswapdsi(__m64 __m) {
|
||||||
|
return (__m64)__builtin_ia32_pswapdsi((__v2si)__m);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
75
python/clang/3.1/include/mm_malloc.h
Normal file
75
python/clang/3.1/include/mm_malloc.h
Normal file
@ -0,0 +1,75 @@
|
|||||||
|
/*===---- mm_malloc.h - Allocating and Freeing Aligned Memory Blocks -------===
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
|
* in the Software without restriction, including without limitation the rights
|
||||||
|
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
* copies of the Software, and to permit persons to whom the Software is
|
||||||
|
* furnished to do so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included in
|
||||||
|
* all copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
* THE SOFTWARE.
|
||||||
|
*
|
||||||
|
*===-----------------------------------------------------------------------===
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __MM_MALLOC_H
|
||||||
|
#define __MM_MALLOC_H
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
#include <malloc.h>
|
||||||
|
#else
|
||||||
|
#ifndef __cplusplus
|
||||||
|
extern int posix_memalign(void **memptr, size_t alignment, size_t size);
|
||||||
|
#else
|
||||||
|
// Some systems (e.g. those with GNU libc) declare posix_memalign with an
|
||||||
|
// exception specifier. Via an "egregious workaround" in
|
||||||
|
// Sema::CheckEquivalentExceptionSpec, Clang accepts the following as a valid
|
||||||
|
// redeclaration of glibc's declaration.
|
||||||
|
extern "C" int posix_memalign(void **memptr, size_t alignment, size_t size);
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if !(defined(_WIN32) && defined(_mm_malloc))
|
||||||
|
static __inline__ void *__attribute__((__always_inline__, __nodebug__,
|
||||||
|
__malloc__))
|
||||||
|
_mm_malloc(size_t size, size_t align)
|
||||||
|
{
|
||||||
|
if (align == 1) {
|
||||||
|
return malloc(size);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!(align & (align - 1)) && align < sizeof(void *))
|
||||||
|
align = sizeof(void *);
|
||||||
|
|
||||||
|
void *mallocedMemory;
|
||||||
|
#if defined(__MINGW32__)
|
||||||
|
mallocedMemory = __mingw_aligned_malloc(size, align);
|
||||||
|
#elif defined(_WIN32)
|
||||||
|
mallocedMemory = _aligned_malloc(size, align);
|
||||||
|
#else
|
||||||
|
if (posix_memalign(&mallocedMemory, align, size))
|
||||||
|
return 0;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
return mallocedMemory;
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ void __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_free(void *p)
|
||||||
|
{
|
||||||
|
free(p);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* __MM_MALLOC_H */
|
503
python/clang/3.1/include/mmintrin.h
Normal file
503
python/clang/3.1/include/mmintrin.h
Normal file
@ -0,0 +1,503 @@
|
|||||||
|
/*===---- mmintrin.h - MMX intrinsics --------------------------------------===
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
|
* in the Software without restriction, including without limitation the rights
|
||||||
|
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
* copies of the Software, and to permit persons to whom the Software is
|
||||||
|
* furnished to do so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included in
|
||||||
|
* all copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
* THE SOFTWARE.
|
||||||
|
*
|
||||||
|
*===-----------------------------------------------------------------------===
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __MMINTRIN_H
|
||||||
|
#define __MMINTRIN_H
|
||||||
|
|
||||||
|
#ifndef __MMX__
|
||||||
|
#error "MMX instruction set not enabled"
|
||||||
|
#else
|
||||||
|
|
||||||
|
typedef long long __m64 __attribute__((__vector_size__(8)));
|
||||||
|
|
||||||
|
typedef int __v2si __attribute__((__vector_size__(8)));
|
||||||
|
typedef short __v4hi __attribute__((__vector_size__(8)));
|
||||||
|
typedef char __v8qi __attribute__((__vector_size__(8)));
|
||||||
|
|
||||||
|
static __inline__ void __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_empty(void)
|
||||||
|
{
|
||||||
|
__builtin_ia32_emms();
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_cvtsi32_si64(int __i)
|
||||||
|
{
|
||||||
|
return (__m64)__builtin_ia32_vec_init_v2si(__i, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ int __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_cvtsi64_si32(__m64 __m)
|
||||||
|
{
|
||||||
|
return __builtin_ia32_vec_ext_v2si((__v2si)__m, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_cvtsi64_m64(long long __i)
|
||||||
|
{
|
||||||
|
return (__m64)__i;
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ long long __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_cvtm64_si64(__m64 __m)
|
||||||
|
{
|
||||||
|
return (long long)__m;
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_packs_pi16(__m64 __m1, __m64 __m2)
|
||||||
|
{
|
||||||
|
return (__m64)__builtin_ia32_packsswb((__v4hi)__m1, (__v4hi)__m2);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_packs_pi32(__m64 __m1, __m64 __m2)
|
||||||
|
{
|
||||||
|
return (__m64)__builtin_ia32_packssdw((__v2si)__m1, (__v2si)__m2);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_packs_pu16(__m64 __m1, __m64 __m2)
|
||||||
|
{
|
||||||
|
return (__m64)__builtin_ia32_packuswb((__v4hi)__m1, (__v4hi)__m2);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_unpackhi_pi8(__m64 __m1, __m64 __m2)
|
||||||
|
{
|
||||||
|
return (__m64)__builtin_ia32_punpckhbw((__v8qi)__m1, (__v8qi)__m2);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_unpackhi_pi16(__m64 __m1, __m64 __m2)
|
||||||
|
{
|
||||||
|
return (__m64)__builtin_ia32_punpckhwd((__v4hi)__m1, (__v4hi)__m2);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_unpackhi_pi32(__m64 __m1, __m64 __m2)
|
||||||
|
{
|
||||||
|
return (__m64)__builtin_ia32_punpckhdq((__v2si)__m1, (__v2si)__m2);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_unpacklo_pi8(__m64 __m1, __m64 __m2)
|
||||||
|
{
|
||||||
|
return (__m64)__builtin_ia32_punpcklbw((__v8qi)__m1, (__v8qi)__m2);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_unpacklo_pi16(__m64 __m1, __m64 __m2)
|
||||||
|
{
|
||||||
|
return (__m64)__builtin_ia32_punpcklwd((__v4hi)__m1, (__v4hi)__m2);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_unpacklo_pi32(__m64 __m1, __m64 __m2)
|
||||||
|
{
|
||||||
|
return (__m64)__builtin_ia32_punpckldq((__v2si)__m1, (__v2si)__m2);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_add_pi8(__m64 __m1, __m64 __m2)
|
||||||
|
{
|
||||||
|
return (__m64)__builtin_ia32_paddb((__v8qi)__m1, (__v8qi)__m2);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_add_pi16(__m64 __m1, __m64 __m2)
|
||||||
|
{
|
||||||
|
return (__m64)__builtin_ia32_paddw((__v4hi)__m1, (__v4hi)__m2);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_add_pi32(__m64 __m1, __m64 __m2)
|
||||||
|
{
|
||||||
|
return (__m64)__builtin_ia32_paddd((__v2si)__m1, (__v2si)__m2);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_adds_pi8(__m64 __m1, __m64 __m2)
|
||||||
|
{
|
||||||
|
return (__m64)__builtin_ia32_paddsb((__v8qi)__m1, (__v8qi)__m2);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_adds_pi16(__m64 __m1, __m64 __m2)
|
||||||
|
{
|
||||||
|
return (__m64)__builtin_ia32_paddsw((__v4hi)__m1, (__v4hi)__m2);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_adds_pu8(__m64 __m1, __m64 __m2)
|
||||||
|
{
|
||||||
|
return (__m64)__builtin_ia32_paddusb((__v8qi)__m1, (__v8qi)__m2);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_adds_pu16(__m64 __m1, __m64 __m2)
|
||||||
|
{
|
||||||
|
return (__m64)__builtin_ia32_paddusw((__v4hi)__m1, (__v4hi)__m2);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_sub_pi8(__m64 __m1, __m64 __m2)
|
||||||
|
{
|
||||||
|
return (__m64)__builtin_ia32_psubb((__v8qi)__m1, (__v8qi)__m2);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_sub_pi16(__m64 __m1, __m64 __m2)
|
||||||
|
{
|
||||||
|
return (__m64)__builtin_ia32_psubw((__v4hi)__m1, (__v4hi)__m2);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_sub_pi32(__m64 __m1, __m64 __m2)
|
||||||
|
{
|
||||||
|
return (__m64)__builtin_ia32_psubd((__v2si)__m1, (__v2si)__m2);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_subs_pi8(__m64 __m1, __m64 __m2)
|
||||||
|
{
|
||||||
|
return (__m64)__builtin_ia32_psubsb((__v8qi)__m1, (__v8qi)__m2);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_subs_pi16(__m64 __m1, __m64 __m2)
|
||||||
|
{
|
||||||
|
return (__m64)__builtin_ia32_psubsw((__v4hi)__m1, (__v4hi)__m2);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_subs_pu8(__m64 __m1, __m64 __m2)
|
||||||
|
{
|
||||||
|
return (__m64)__builtin_ia32_psubusb((__v8qi)__m1, (__v8qi)__m2);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_subs_pu16(__m64 __m1, __m64 __m2)
|
||||||
|
{
|
||||||
|
return (__m64)__builtin_ia32_psubusw((__v4hi)__m1, (__v4hi)__m2);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_madd_pi16(__m64 __m1, __m64 __m2)
|
||||||
|
{
|
||||||
|
return (__m64)__builtin_ia32_pmaddwd((__v4hi)__m1, (__v4hi)__m2);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_mulhi_pi16(__m64 __m1, __m64 __m2)
|
||||||
|
{
|
||||||
|
return (__m64)__builtin_ia32_pmulhw((__v4hi)__m1, (__v4hi)__m2);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_mullo_pi16(__m64 __m1, __m64 __m2)
|
||||||
|
{
|
||||||
|
return (__m64)__builtin_ia32_pmullw((__v4hi)__m1, (__v4hi)__m2);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_sll_pi16(__m64 __m, __m64 __count)
|
||||||
|
{
|
||||||
|
return (__m64)__builtin_ia32_psllw((__v4hi)__m, __count);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_slli_pi16(__m64 __m, int __count)
|
||||||
|
{
|
||||||
|
return (__m64)__builtin_ia32_psllwi((__v4hi)__m, __count);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_sll_pi32(__m64 __m, __m64 __count)
|
||||||
|
{
|
||||||
|
return (__m64)__builtin_ia32_pslld((__v2si)__m, __count);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_slli_pi32(__m64 __m, int __count)
|
||||||
|
{
|
||||||
|
return (__m64)__builtin_ia32_pslldi((__v2si)__m, __count);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_sll_si64(__m64 __m, __m64 __count)
|
||||||
|
{
|
||||||
|
return (__m64)__builtin_ia32_psllq(__m, __count);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_slli_si64(__m64 __m, int __count)
|
||||||
|
{
|
||||||
|
return (__m64)__builtin_ia32_psllqi(__m, __count);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_sra_pi16(__m64 __m, __m64 __count)
|
||||||
|
{
|
||||||
|
return (__m64)__builtin_ia32_psraw((__v4hi)__m, __count);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_srai_pi16(__m64 __m, int __count)
|
||||||
|
{
|
||||||
|
return (__m64)__builtin_ia32_psrawi((__v4hi)__m, __count);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_sra_pi32(__m64 __m, __m64 __count)
|
||||||
|
{
|
||||||
|
return (__m64)__builtin_ia32_psrad((__v2si)__m, __count);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_srai_pi32(__m64 __m, int __count)
|
||||||
|
{
|
||||||
|
return (__m64)__builtin_ia32_psradi((__v2si)__m, __count);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_srl_pi16(__m64 __m, __m64 __count)
|
||||||
|
{
|
||||||
|
return (__m64)__builtin_ia32_psrlw((__v4hi)__m, __count);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_srli_pi16(__m64 __m, int __count)
|
||||||
|
{
|
||||||
|
return (__m64)__builtin_ia32_psrlwi((__v4hi)__m, __count);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_srl_pi32(__m64 __m, __m64 __count)
|
||||||
|
{
|
||||||
|
return (__m64)__builtin_ia32_psrld((__v2si)__m, __count);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_srli_pi32(__m64 __m, int __count)
|
||||||
|
{
|
||||||
|
return (__m64)__builtin_ia32_psrldi((__v2si)__m, __count);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_srl_si64(__m64 __m, __m64 __count)
|
||||||
|
{
|
||||||
|
return (__m64)__builtin_ia32_psrlq(__m, __count);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_srli_si64(__m64 __m, int __count)
|
||||||
|
{
|
||||||
|
return (__m64)__builtin_ia32_psrlqi(__m, __count);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_and_si64(__m64 __m1, __m64 __m2)
|
||||||
|
{
|
||||||
|
return __builtin_ia32_pand(__m1, __m2);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_andnot_si64(__m64 __m1, __m64 __m2)
|
||||||
|
{
|
||||||
|
return __builtin_ia32_pandn(__m1, __m2);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_or_si64(__m64 __m1, __m64 __m2)
|
||||||
|
{
|
||||||
|
return __builtin_ia32_por(__m1, __m2);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_xor_si64(__m64 __m1, __m64 __m2)
|
||||||
|
{
|
||||||
|
return __builtin_ia32_pxor(__m1, __m2);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_cmpeq_pi8(__m64 __m1, __m64 __m2)
|
||||||
|
{
|
||||||
|
return (__m64)__builtin_ia32_pcmpeqb((__v8qi)__m1, (__v8qi)__m2);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_cmpeq_pi16(__m64 __m1, __m64 __m2)
|
||||||
|
{
|
||||||
|
return (__m64)__builtin_ia32_pcmpeqw((__v4hi)__m1, (__v4hi)__m2);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_cmpeq_pi32(__m64 __m1, __m64 __m2)
|
||||||
|
{
|
||||||
|
return (__m64)__builtin_ia32_pcmpeqd((__v2si)__m1, (__v2si)__m2);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_cmpgt_pi8(__m64 __m1, __m64 __m2)
|
||||||
|
{
|
||||||
|
return (__m64)__builtin_ia32_pcmpgtb((__v8qi)__m1, (__v8qi)__m2);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_cmpgt_pi16(__m64 __m1, __m64 __m2)
|
||||||
|
{
|
||||||
|
return (__m64)__builtin_ia32_pcmpgtw((__v4hi)__m1, (__v4hi)__m2);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_cmpgt_pi32(__m64 __m1, __m64 __m2)
|
||||||
|
{
|
||||||
|
return (__m64)__builtin_ia32_pcmpgtd((__v2si)__m1, (__v2si)__m2);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_setzero_si64(void)
|
||||||
|
{
|
||||||
|
return (__m64){ 0LL };
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_set_pi32(int __i1, int __i0)
|
||||||
|
{
|
||||||
|
return (__m64)__builtin_ia32_vec_init_v2si(__i0, __i1);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_set_pi16(short __s3, short __s2, short __s1, short __s0)
|
||||||
|
{
|
||||||
|
return (__m64)__builtin_ia32_vec_init_v4hi(__s0, __s1, __s2, __s3);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_set_pi8(char __b7, char __b6, char __b5, char __b4, char __b3, char __b2,
|
||||||
|
char __b1, char __b0)
|
||||||
|
{
|
||||||
|
return (__m64)__builtin_ia32_vec_init_v8qi(__b0, __b1, __b2, __b3,
|
||||||
|
__b4, __b5, __b6, __b7);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_set1_pi32(int __i)
|
||||||
|
{
|
||||||
|
return _mm_set_pi32(__i, __i);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_set1_pi16(short __w)
|
||||||
|
{
|
||||||
|
return _mm_set_pi16(__w, __w, __w, __w);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_set1_pi8(char __b)
|
||||||
|
{
|
||||||
|
return _mm_set_pi8(__b, __b, __b, __b, __b, __b, __b, __b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_setr_pi32(int __i0, int __i1)
|
||||||
|
{
|
||||||
|
return _mm_set_pi32(__i1, __i0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_setr_pi16(short __w0, short __w1, short __w2, short __w3)
|
||||||
|
{
|
||||||
|
return _mm_set_pi16(__w3, __w2, __w1, __w0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_setr_pi8(char __b0, char __b1, char __b2, char __b3, char __b4, char __b5,
|
||||||
|
char __b6, char __b7)
|
||||||
|
{
|
||||||
|
return _mm_set_pi8(__b7, __b6, __b5, __b4, __b3, __b2, __b1, __b0);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Aliases for compatibility. */
|
||||||
|
#define _m_empty _mm_empty
|
||||||
|
#define _m_from_int _mm_cvtsi32_si64
|
||||||
|
#define _m_to_int _mm_cvtsi64_si32
|
||||||
|
#define _m_packsswb _mm_packs_pi16
|
||||||
|
#define _m_packssdw _mm_packs_pi32
|
||||||
|
#define _m_packuswb _mm_packs_pu16
|
||||||
|
#define _m_punpckhbw _mm_unpackhi_pi8
|
||||||
|
#define _m_punpckhwd _mm_unpackhi_pi16
|
||||||
|
#define _m_punpckhdq _mm_unpackhi_pi32
|
||||||
|
#define _m_punpcklbw _mm_unpacklo_pi8
|
||||||
|
#define _m_punpcklwd _mm_unpacklo_pi16
|
||||||
|
#define _m_punpckldq _mm_unpacklo_pi32
|
||||||
|
#define _m_paddb _mm_add_pi8
|
||||||
|
#define _m_paddw _mm_add_pi16
|
||||||
|
#define _m_paddd _mm_add_pi32
|
||||||
|
#define _m_paddsb _mm_adds_pi8
|
||||||
|
#define _m_paddsw _mm_adds_pi16
|
||||||
|
#define _m_paddusb _mm_adds_pu8
|
||||||
|
#define _m_paddusw _mm_adds_pu16
|
||||||
|
#define _m_psubb _mm_sub_pi8
|
||||||
|
#define _m_psubw _mm_sub_pi16
|
||||||
|
#define _m_psubd _mm_sub_pi32
|
||||||
|
#define _m_psubsb _mm_subs_pi8
|
||||||
|
#define _m_psubsw _mm_subs_pi16
|
||||||
|
#define _m_psubusb _mm_subs_pu8
|
||||||
|
#define _m_psubusw _mm_subs_pu16
|
||||||
|
#define _m_pmaddwd _mm_madd_pi16
|
||||||
|
#define _m_pmulhw _mm_mulhi_pi16
|
||||||
|
#define _m_pmullw _mm_mullo_pi16
|
||||||
|
#define _m_psllw _mm_sll_pi16
|
||||||
|
#define _m_psllwi _mm_slli_pi16
|
||||||
|
#define _m_pslld _mm_sll_pi32
|
||||||
|
#define _m_pslldi _mm_slli_pi32
|
||||||
|
#define _m_psllq _mm_sll_si64
|
||||||
|
#define _m_psllqi _mm_slli_si64
|
||||||
|
#define _m_psraw _mm_sra_pi16
|
||||||
|
#define _m_psrawi _mm_srai_pi16
|
||||||
|
#define _m_psrad _mm_sra_pi32
|
||||||
|
#define _m_psradi _mm_srai_pi32
|
||||||
|
#define _m_psrlw _mm_srl_pi16
|
||||||
|
#define _m_psrlwi _mm_srli_pi16
|
||||||
|
#define _m_psrld _mm_srl_pi32
|
||||||
|
#define _m_psrldi _mm_srli_pi32
|
||||||
|
#define _m_psrlq _mm_srl_si64
|
||||||
|
#define _m_psrlqi _mm_srli_si64
|
||||||
|
#define _m_pand _mm_and_si64
|
||||||
|
#define _m_pandn _mm_andnot_si64
|
||||||
|
#define _m_por _mm_or_si64
|
||||||
|
#define _m_pxor _mm_xor_si64
|
||||||
|
#define _m_pcmpeqb _mm_cmpeq_pi8
|
||||||
|
#define _m_pcmpeqw _mm_cmpeq_pi16
|
||||||
|
#define _m_pcmpeqd _mm_cmpeq_pi32
|
||||||
|
#define _m_pcmpgtb _mm_cmpgt_pi8
|
||||||
|
#define _m_pcmpgtw _mm_cmpgt_pi16
|
||||||
|
#define _m_pcmpgtd _mm_cmpgt_pi32
|
||||||
|
|
||||||
|
#endif /* __MMX__ */
|
||||||
|
|
||||||
|
#endif /* __MMINTRIN_H */
|
||||||
|
|
108
python/clang/3.1/include/module.map
Normal file
108
python/clang/3.1/include/module.map
Normal file
@ -0,0 +1,108 @@
|
|||||||
|
module _Builtin_intrinsics [system] {
|
||||||
|
explicit module altivec {
|
||||||
|
requires altivec
|
||||||
|
header "altivec.h"
|
||||||
|
}
|
||||||
|
|
||||||
|
explicit module intel {
|
||||||
|
requires x86
|
||||||
|
export *
|
||||||
|
|
||||||
|
header "immintrin.h"
|
||||||
|
header "x86intrin.h"
|
||||||
|
|
||||||
|
explicit module mm_malloc {
|
||||||
|
header "mm_malloc.h"
|
||||||
|
export * // note: for <stdlib.h> dependency
|
||||||
|
}
|
||||||
|
|
||||||
|
explicit module cpuid {
|
||||||
|
header "cpuid.h"
|
||||||
|
}
|
||||||
|
|
||||||
|
explicit module mmx {
|
||||||
|
requires mmx
|
||||||
|
header "mmintrin.h"
|
||||||
|
}
|
||||||
|
|
||||||
|
explicit module sse {
|
||||||
|
requires sse
|
||||||
|
export mmx
|
||||||
|
export * // note: for hackish <emmintrin.h> dependency
|
||||||
|
header "xmmintrin.h"
|
||||||
|
}
|
||||||
|
|
||||||
|
explicit module sse2 {
|
||||||
|
requires sse2
|
||||||
|
export sse
|
||||||
|
header "emmintrin.h"
|
||||||
|
}
|
||||||
|
|
||||||
|
explicit module sse3 {
|
||||||
|
requires sse3
|
||||||
|
export sse2
|
||||||
|
header "pmmintrin.h"
|
||||||
|
}
|
||||||
|
|
||||||
|
explicit module ssse3 {
|
||||||
|
requires ssse3
|
||||||
|
export sse3
|
||||||
|
header "tmmintrin.h"
|
||||||
|
}
|
||||||
|
|
||||||
|
explicit module sse4_1 {
|
||||||
|
requires sse41
|
||||||
|
export ssse3
|
||||||
|
header "smmintrin.h"
|
||||||
|
}
|
||||||
|
|
||||||
|
explicit module sse4_2 {
|
||||||
|
requires sse42
|
||||||
|
export sse4_1
|
||||||
|
header "nmmintrin.h"
|
||||||
|
}
|
||||||
|
|
||||||
|
explicit module avx {
|
||||||
|
requires avx
|
||||||
|
export sse4_2
|
||||||
|
header "avxintrin.h"
|
||||||
|
}
|
||||||
|
|
||||||
|
explicit module avx2 {
|
||||||
|
requires avx2
|
||||||
|
export avx
|
||||||
|
header "avx2intrin.h"
|
||||||
|
}
|
||||||
|
|
||||||
|
explicit module bmi {
|
||||||
|
requires bmi
|
||||||
|
header "bmiintrin.h"
|
||||||
|
}
|
||||||
|
|
||||||
|
explicit module bmi2 {
|
||||||
|
requires bmi2
|
||||||
|
header "bmi2intrin.h"
|
||||||
|
}
|
||||||
|
|
||||||
|
explicit module fma4 {
|
||||||
|
requires fma4
|
||||||
|
export sse3
|
||||||
|
header "fma4intrin.h"
|
||||||
|
}
|
||||||
|
|
||||||
|
explicit module lzcnt {
|
||||||
|
requires lzcnt
|
||||||
|
header "lzcntintrin.h"
|
||||||
|
}
|
||||||
|
|
||||||
|
explicit module popcnt {
|
||||||
|
requires popcnt
|
||||||
|
header "popcntintrin.h"
|
||||||
|
}
|
||||||
|
|
||||||
|
explicit module mm3dnow {
|
||||||
|
requires mm3dnow
|
||||||
|
header "mm3dnow.h"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
35
python/clang/3.1/include/nmmintrin.h
Normal file
35
python/clang/3.1/include/nmmintrin.h
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
/*===---- nmmintrin.h - SSE4 intrinsics ------------------------------------===
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
|
* in the Software without restriction, including without limitation the rights
|
||||||
|
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
* copies of the Software, and to permit persons to whom the Software is
|
||||||
|
* furnished to do so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included in
|
||||||
|
* all copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
* THE SOFTWARE.
|
||||||
|
*
|
||||||
|
*===-----------------------------------------------------------------------===
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef _NMMINTRIN_H
|
||||||
|
#define _NMMINTRIN_H
|
||||||
|
|
||||||
|
#ifndef __SSE4_2__
|
||||||
|
#error "SSE4.2 instruction set not enabled"
|
||||||
|
#else
|
||||||
|
|
||||||
|
/* To match expectations of gcc we put the sse4.2 definitions into smmintrin.h,
|
||||||
|
just include it now then. */
|
||||||
|
#include <smmintrin.h>
|
||||||
|
#endif /* __SSE4_2__ */
|
||||||
|
#endif /* _NMMINTRIN_H */
|
117
python/clang/3.1/include/pmmintrin.h
Normal file
117
python/clang/3.1/include/pmmintrin.h
Normal file
@ -0,0 +1,117 @@
|
|||||||
|
/*===---- pmmintrin.h - SSE3 intrinsics ------------------------------------===
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
|
* in the Software without restriction, including without limitation the rights
|
||||||
|
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
* copies of the Software, and to permit persons to whom the Software is
|
||||||
|
* furnished to do so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included in
|
||||||
|
* all copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
* THE SOFTWARE.
|
||||||
|
*
|
||||||
|
*===-----------------------------------------------------------------------===
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __PMMINTRIN_H
|
||||||
|
#define __PMMINTRIN_H
|
||||||
|
|
||||||
|
#ifndef __SSE3__
|
||||||
|
#error "SSE3 instruction set not enabled"
|
||||||
|
#else
|
||||||
|
|
||||||
|
#include <emmintrin.h>
|
||||||
|
|
||||||
|
static __inline__ __m128i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_lddqu_si128(__m128i const *p)
|
||||||
|
{
|
||||||
|
return (__m128i)__builtin_ia32_lddqu((char const *)p);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_addsub_ps(__m128 a, __m128 b)
|
||||||
|
{
|
||||||
|
return __builtin_ia32_addsubps(a, b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_hadd_ps(__m128 a, __m128 b)
|
||||||
|
{
|
||||||
|
return __builtin_ia32_haddps(a, b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_hsub_ps(__m128 a, __m128 b)
|
||||||
|
{
|
||||||
|
return __builtin_ia32_hsubps(a, b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_movehdup_ps(__m128 a)
|
||||||
|
{
|
||||||
|
return __builtin_shufflevector(a, a, 1, 1, 3, 3);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_moveldup_ps(__m128 a)
|
||||||
|
{
|
||||||
|
return __builtin_shufflevector(a, a, 0, 0, 2, 2);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128d __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_addsub_pd(__m128d a, __m128d b)
|
||||||
|
{
|
||||||
|
return __builtin_ia32_addsubpd(a, b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128d __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_hadd_pd(__m128d a, __m128d b)
|
||||||
|
{
|
||||||
|
return __builtin_ia32_haddpd(a, b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128d __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_hsub_pd(__m128d a, __m128d b)
|
||||||
|
{
|
||||||
|
return __builtin_ia32_hsubpd(a, b);
|
||||||
|
}
|
||||||
|
|
||||||
|
#define _mm_loaddup_pd(dp) _mm_load1_pd(dp)
|
||||||
|
|
||||||
|
static __inline__ __m128d __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_movedup_pd(__m128d a)
|
||||||
|
{
|
||||||
|
return __builtin_shufflevector(a, a, 0, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
#define _MM_DENORMALS_ZERO_ON (0x0040)
|
||||||
|
#define _MM_DENORMALS_ZERO_OFF (0x0000)
|
||||||
|
|
||||||
|
#define _MM_DENORMALS_ZERO_MASK (0x0040)
|
||||||
|
|
||||||
|
#define _MM_GET_DENORMALS_ZERO_MODE() (_mm_getcsr() & _MM_DENORMALS_ZERO_MASK)
|
||||||
|
#define _MM_SET_DENORMALS_ZERO_MODE(x) (_mm_setcsr((_mm_getcsr() & ~_MM_DENORMALS_ZERO_MASK) | (x)))
|
||||||
|
|
||||||
|
static __inline__ void __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_monitor(void const *p, unsigned extensions, unsigned hints)
|
||||||
|
{
|
||||||
|
__builtin_ia32_monitor((void *)p, extensions, hints);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ void __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_mwait(unsigned extensions, unsigned hints)
|
||||||
|
{
|
||||||
|
__builtin_ia32_mwait(extensions, hints);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /* __SSE3__ */
|
||||||
|
|
||||||
|
#endif /* __PMMINTRIN_H */
|
45
python/clang/3.1/include/popcntintrin.h
Normal file
45
python/clang/3.1/include/popcntintrin.h
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
/*===---- popcntintrin.h - POPCNT intrinsics -------------------------------===
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
|
* in the Software without restriction, including without limitation the rights
|
||||||
|
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
* copies of the Software, and to permit persons to whom the Software is
|
||||||
|
* furnished to do so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included in
|
||||||
|
* all copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
* THE SOFTWARE.
|
||||||
|
*
|
||||||
|
*===-----------------------------------------------------------------------===
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __POPCNT__
|
||||||
|
#error "POPCNT instruction set not enabled"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef _POPCNTINTRIN_H
|
||||||
|
#define _POPCNTINTRIN_H
|
||||||
|
|
||||||
|
static __inline__ int __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_popcnt_u32(unsigned int __A)
|
||||||
|
{
|
||||||
|
return __builtin_popcount(__A);
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef __x86_64__
|
||||||
|
static __inline__ long long __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_popcnt_u64(unsigned long long __A)
|
||||||
|
{
|
||||||
|
return __builtin_popcountll(__A);
|
||||||
|
}
|
||||||
|
#endif /* __x86_64__ */
|
||||||
|
|
||||||
|
#endif /* _POPCNTINTRIN_H */
|
467
python/clang/3.1/include/smmintrin.h
Normal file
467
python/clang/3.1/include/smmintrin.h
Normal file
@ -0,0 +1,467 @@
|
|||||||
|
/*===---- smmintrin.h - SSE4 intrinsics ------------------------------------===
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
|
* in the Software without restriction, including without limitation the rights
|
||||||
|
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
* copies of the Software, and to permit persons to whom the Software is
|
||||||
|
* furnished to do so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included in
|
||||||
|
* all copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
* THE SOFTWARE.
|
||||||
|
*
|
||||||
|
*===-----------------------------------------------------------------------===
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef _SMMINTRIN_H
|
||||||
|
#define _SMMINTRIN_H
|
||||||
|
|
||||||
|
#ifndef __SSE4_1__
|
||||||
|
#error "SSE4.1 instruction set not enabled"
|
||||||
|
#else
|
||||||
|
|
||||||
|
#include <tmmintrin.h>
|
||||||
|
|
||||||
|
/* SSE4 Rounding macros. */
|
||||||
|
#define _MM_FROUND_TO_NEAREST_INT 0x00
|
||||||
|
#define _MM_FROUND_TO_NEG_INF 0x01
|
||||||
|
#define _MM_FROUND_TO_POS_INF 0x02
|
||||||
|
#define _MM_FROUND_TO_ZERO 0x03
|
||||||
|
#define _MM_FROUND_CUR_DIRECTION 0x04
|
||||||
|
|
||||||
|
#define _MM_FROUND_RAISE_EXC 0x00
|
||||||
|
#define _MM_FROUND_NO_EXC 0x08
|
||||||
|
|
||||||
|
#define _MM_FROUND_NINT (_MM_FROUND_RAISE_EXC | _MM_FROUND_TO_NEAREST_INT)
|
||||||
|
#define _MM_FROUND_FLOOR (_MM_FROUND_RAISE_EXC | _MM_FROUND_TO_NEG_INF)
|
||||||
|
#define _MM_FROUND_CEIL (_MM_FROUND_RAISE_EXC | _MM_FROUND_TO_POS_INF)
|
||||||
|
#define _MM_FROUND_TRUNC (_MM_FROUND_RAISE_EXC | _MM_FROUND_TO_ZERO)
|
||||||
|
#define _MM_FROUND_RINT (_MM_FROUND_RAISE_EXC | _MM_FROUND_CUR_DIRECTION)
|
||||||
|
#define _MM_FROUND_NEARBYINT (_MM_FROUND_NO_EXC | _MM_FROUND_CUR_DIRECTION)
|
||||||
|
|
||||||
|
#define _mm_ceil_ps(X) _mm_round_ps((X), _MM_FROUND_CEIL)
|
||||||
|
#define _mm_ceil_pd(X) _mm_round_pd((X), _MM_FROUND_CEIL)
|
||||||
|
#define _mm_ceil_ss(X, Y) _mm_round_ss((X), (Y), _MM_FROUND_CEIL)
|
||||||
|
#define _mm_ceil_sd(X, Y) _mm_round_sd((X), (Y), _MM_FROUND_CEIL)
|
||||||
|
|
||||||
|
#define _mm_floor_ps(X) _mm_round_ps((X), _MM_FROUND_FLOOR)
|
||||||
|
#define _mm_floor_pd(X) _mm_round_pd((X), _MM_FROUND_FLOOR)
|
||||||
|
#define _mm_floor_ss(X, Y) _mm_round_ss((X), (Y), _MM_FROUND_FLOOR)
|
||||||
|
#define _mm_floor_sd(X, Y) _mm_round_sd((X), (Y), _MM_FROUND_FLOOR)
|
||||||
|
|
||||||
|
#define _mm_round_ps(X, M) __extension__ ({ \
|
||||||
|
__m128 __X = (X); \
|
||||||
|
(__m128) __builtin_ia32_roundps((__v4sf)__X, (M)); })
|
||||||
|
|
||||||
|
#define _mm_round_ss(X, Y, M) __extension__ ({ \
|
||||||
|
__m128 __X = (X); \
|
||||||
|
__m128 __Y = (Y); \
|
||||||
|
(__m128) __builtin_ia32_roundss((__v4sf)__X, (__v4sf)__Y, (M)); })
|
||||||
|
|
||||||
|
#define _mm_round_pd(X, M) __extension__ ({ \
|
||||||
|
__m128d __X = (X); \
|
||||||
|
(__m128d) __builtin_ia32_roundpd((__v2df)__X, (M)); })
|
||||||
|
|
||||||
|
#define _mm_round_sd(X, Y, M) __extension__ ({ \
|
||||||
|
__m128d __X = (X); \
|
||||||
|
__m128d __Y = (Y); \
|
||||||
|
(__m128d) __builtin_ia32_roundsd((__v2df)__X, (__v2df)__Y, (M)); })
|
||||||
|
|
||||||
|
/* SSE4 Packed Blending Intrinsics. */
|
||||||
|
#define _mm_blend_pd(V1, V2, M) __extension__ ({ \
|
||||||
|
__m128d __V1 = (V1); \
|
||||||
|
__m128d __V2 = (V2); \
|
||||||
|
(__m128d) __builtin_ia32_blendpd ((__v2df)__V1, (__v2df)__V2, (M)); })
|
||||||
|
|
||||||
|
#define _mm_blend_ps(V1, V2, M) __extension__ ({ \
|
||||||
|
__m128 __V1 = (V1); \
|
||||||
|
__m128 __V2 = (V2); \
|
||||||
|
(__m128) __builtin_ia32_blendps ((__v4sf)__V1, (__v4sf)__V2, (M)); })
|
||||||
|
|
||||||
|
static __inline__ __m128d __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_blendv_pd (__m128d __V1, __m128d __V2, __m128d __M)
|
||||||
|
{
|
||||||
|
return (__m128d) __builtin_ia32_blendvpd ((__v2df)__V1, (__v2df)__V2,
|
||||||
|
(__v2df)__M);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_blendv_ps (__m128 __V1, __m128 __V2, __m128 __M)
|
||||||
|
{
|
||||||
|
return (__m128) __builtin_ia32_blendvps ((__v4sf)__V1, (__v4sf)__V2,
|
||||||
|
(__v4sf)__M);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_blendv_epi8 (__m128i __V1, __m128i __V2, __m128i __M)
|
||||||
|
{
|
||||||
|
return (__m128i) __builtin_ia32_pblendvb128 ((__v16qi)__V1, (__v16qi)__V2,
|
||||||
|
(__v16qi)__M);
|
||||||
|
}
|
||||||
|
|
||||||
|
#define _mm_blend_epi16(V1, V2, M) __extension__ ({ \
|
||||||
|
__m128i __V1 = (V1); \
|
||||||
|
__m128i __V2 = (V2); \
|
||||||
|
(__m128i) __builtin_ia32_pblendw128 ((__v8hi)__V1, (__v8hi)__V2, (M)); })
|
||||||
|
|
||||||
|
/* SSE4 Dword Multiply Instructions. */
|
||||||
|
static __inline__ __m128i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_mullo_epi32 (__m128i __V1, __m128i __V2)
|
||||||
|
{
|
||||||
|
return (__m128i) ((__v4si)__V1 * (__v4si)__V2);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_mul_epi32 (__m128i __V1, __m128i __V2)
|
||||||
|
{
|
||||||
|
return (__m128i) __builtin_ia32_pmuldq128 ((__v4si)__V1, (__v4si)__V2);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* SSE4 Floating Point Dot Product Instructions. */
|
||||||
|
#define _mm_dp_ps(X, Y, M) __extension__ ({ \
|
||||||
|
__m128 __X = (X); \
|
||||||
|
__m128 __Y = (Y); \
|
||||||
|
(__m128) __builtin_ia32_dpps((__v4sf)__X, (__v4sf)__Y, (M)); })
|
||||||
|
|
||||||
|
#define _mm_dp_pd(X, Y, M) __extension__ ({\
|
||||||
|
__m128d __X = (X); \
|
||||||
|
__m128d __Y = (Y); \
|
||||||
|
(__m128d) __builtin_ia32_dppd((__v2df)__X, (__v2df)__Y, (M)); })
|
||||||
|
|
||||||
|
/* SSE4 Streaming Load Hint Instruction. */
|
||||||
|
static __inline__ __m128i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_stream_load_si128 (__m128i *__V)
|
||||||
|
{
|
||||||
|
return (__m128i) __builtin_ia32_movntdqa ((__v2di *) __V);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* SSE4 Packed Integer Min/Max Instructions. */
|
||||||
|
static __inline__ __m128i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_min_epi8 (__m128i __V1, __m128i __V2)
|
||||||
|
{
|
||||||
|
return (__m128i) __builtin_ia32_pminsb128 ((__v16qi) __V1, (__v16qi) __V2);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_max_epi8 (__m128i __V1, __m128i __V2)
|
||||||
|
{
|
||||||
|
return (__m128i) __builtin_ia32_pmaxsb128 ((__v16qi) __V1, (__v16qi) __V2);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_min_epu16 (__m128i __V1, __m128i __V2)
|
||||||
|
{
|
||||||
|
return (__m128i) __builtin_ia32_pminuw128 ((__v8hi) __V1, (__v8hi) __V2);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_max_epu16 (__m128i __V1, __m128i __V2)
|
||||||
|
{
|
||||||
|
return (__m128i) __builtin_ia32_pmaxuw128 ((__v8hi) __V1, (__v8hi) __V2);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_min_epi32 (__m128i __V1, __m128i __V2)
|
||||||
|
{
|
||||||
|
return (__m128i) __builtin_ia32_pminsd128 ((__v4si) __V1, (__v4si) __V2);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_max_epi32 (__m128i __V1, __m128i __V2)
|
||||||
|
{
|
||||||
|
return (__m128i) __builtin_ia32_pmaxsd128 ((__v4si) __V1, (__v4si) __V2);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_min_epu32 (__m128i __V1, __m128i __V2)
|
||||||
|
{
|
||||||
|
return (__m128i) __builtin_ia32_pminud128((__v4si) __V1, (__v4si) __V2);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_max_epu32 (__m128i __V1, __m128i __V2)
|
||||||
|
{
|
||||||
|
return (__m128i) __builtin_ia32_pmaxud128((__v4si) __V1, (__v4si) __V2);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* SSE4 Insertion and Extraction from XMM Register Instructions. */
|
||||||
|
#define _mm_insert_ps(X, Y, N) __builtin_ia32_insertps128((X), (Y), (N))
|
||||||
|
#define _mm_extract_ps(X, N) (__extension__ \
|
||||||
|
({ union { int i; float f; } __t; \
|
||||||
|
__v4sf __a = (__v4sf)(X); \
|
||||||
|
__t.f = __a[N]; \
|
||||||
|
__t.i;}))
|
||||||
|
|
||||||
|
/* Miscellaneous insert and extract macros. */
|
||||||
|
/* Extract a single-precision float from X at index N into D. */
|
||||||
|
#define _MM_EXTRACT_FLOAT(D, X, N) (__extension__ ({ __v4sf __a = (__v4sf)(X); \
|
||||||
|
(D) = __a[N]; }))
|
||||||
|
|
||||||
|
/* Or together 2 sets of indexes (X and Y) with the zeroing bits (Z) to create
|
||||||
|
an index suitable for _mm_insert_ps. */
|
||||||
|
#define _MM_MK_INSERTPS_NDX(X, Y, Z) (((X) << 6) | ((Y) << 4) | (Z))
|
||||||
|
|
||||||
|
/* Extract a float from X at index N into the first index of the return. */
|
||||||
|
#define _MM_PICK_OUT_PS(X, N) _mm_insert_ps (_mm_setzero_ps(), (X), \
|
||||||
|
_MM_MK_INSERTPS_NDX((N), 0, 0x0e))
|
||||||
|
|
||||||
|
/* Insert int into packed integer array at index. */
|
||||||
|
#define _mm_insert_epi8(X, I, N) (__extension__ ({ __v16qi __a = (__v16qi)(X); \
|
||||||
|
__a[(N)] = (I); \
|
||||||
|
__a;}))
|
||||||
|
#define _mm_insert_epi32(X, I, N) (__extension__ ({ __v4si __a = (__v4si)(X); \
|
||||||
|
__a[(N)] = (I); \
|
||||||
|
__a;}))
|
||||||
|
#ifdef __x86_64__
|
||||||
|
#define _mm_insert_epi64(X, I, N) (__extension__ ({ __v2di __a = (__v2di)(X); \
|
||||||
|
__a[(N)] = (I); \
|
||||||
|
__a;}))
|
||||||
|
#endif /* __x86_64__ */
|
||||||
|
|
||||||
|
/* Extract int from packed integer array at index. This returns the element
|
||||||
|
* as a zero extended value, so it is unsigned.
|
||||||
|
*/
|
||||||
|
#define _mm_extract_epi8(X, N) (__extension__ ({ __v16qi __a = (__v16qi)(X); \
|
||||||
|
(unsigned char)__a[(N)];}))
|
||||||
|
#define _mm_extract_epi32(X, N) (__extension__ ({ __v4si __a = (__v4si)(X); \
|
||||||
|
(unsigned)__a[(N)];}))
|
||||||
|
#ifdef __x86_64__
|
||||||
|
#define _mm_extract_epi64(X, N) (__extension__ ({ __v2di __a = (__v2di)(X); \
|
||||||
|
__a[(N)];}))
|
||||||
|
#endif /* __x86_64 */
|
||||||
|
|
||||||
|
/* SSE4 128-bit Packed Integer Comparisons. */
|
||||||
|
static __inline__ int __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_testz_si128(__m128i __M, __m128i __V)
|
||||||
|
{
|
||||||
|
return __builtin_ia32_ptestz128((__v2di)__M, (__v2di)__V);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ int __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_testc_si128(__m128i __M, __m128i __V)
|
||||||
|
{
|
||||||
|
return __builtin_ia32_ptestc128((__v2di)__M, (__v2di)__V);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ int __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_testnzc_si128(__m128i __M, __m128i __V)
|
||||||
|
{
|
||||||
|
return __builtin_ia32_ptestnzc128((__v2di)__M, (__v2di)__V);
|
||||||
|
}
|
||||||
|
|
||||||
|
#define _mm_test_all_ones(V) _mm_testc_si128((V), _mm_cmpeq_epi32((V), (V)))
|
||||||
|
#define _mm_test_mix_ones_zeros(M, V) _mm_testnzc_si128((M), (V))
|
||||||
|
#define _mm_test_all_zeros(M, V) _mm_testz_si128 ((M), (V))
|
||||||
|
|
||||||
|
/* SSE4 64-bit Packed Integer Comparisons. */
|
||||||
|
static __inline__ __m128i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_cmpeq_epi64(__m128i __V1, __m128i __V2)
|
||||||
|
{
|
||||||
|
return (__m128i)((__v2di)__V1 == (__v2di)__V2);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* SSE4 Packed Integer Sign-Extension. */
|
||||||
|
static __inline__ __m128i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_cvtepi8_epi16(__m128i __V)
|
||||||
|
{
|
||||||
|
return (__m128i) __builtin_ia32_pmovsxbw128((__v16qi) __V);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_cvtepi8_epi32(__m128i __V)
|
||||||
|
{
|
||||||
|
return (__m128i) __builtin_ia32_pmovsxbd128((__v16qi) __V);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_cvtepi8_epi64(__m128i __V)
|
||||||
|
{
|
||||||
|
return (__m128i) __builtin_ia32_pmovsxbq128((__v16qi) __V);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_cvtepi16_epi32(__m128i __V)
|
||||||
|
{
|
||||||
|
return (__m128i) __builtin_ia32_pmovsxwd128((__v8hi) __V);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_cvtepi16_epi64(__m128i __V)
|
||||||
|
{
|
||||||
|
return (__m128i) __builtin_ia32_pmovsxwq128((__v8hi)__V);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_cvtepi32_epi64(__m128i __V)
|
||||||
|
{
|
||||||
|
return (__m128i) __builtin_ia32_pmovsxdq128((__v4si)__V);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* SSE4 Packed Integer Zero-Extension. */
|
||||||
|
static __inline__ __m128i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_cvtepu8_epi16(__m128i __V)
|
||||||
|
{
|
||||||
|
return (__m128i) __builtin_ia32_pmovzxbw128((__v16qi) __V);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_cvtepu8_epi32(__m128i __V)
|
||||||
|
{
|
||||||
|
return (__m128i) __builtin_ia32_pmovzxbd128((__v16qi)__V);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_cvtepu8_epi64(__m128i __V)
|
||||||
|
{
|
||||||
|
return (__m128i) __builtin_ia32_pmovzxbq128((__v16qi)__V);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_cvtepu16_epi32(__m128i __V)
|
||||||
|
{
|
||||||
|
return (__m128i) __builtin_ia32_pmovzxwd128((__v8hi)__V);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_cvtepu16_epi64(__m128i __V)
|
||||||
|
{
|
||||||
|
return (__m128i) __builtin_ia32_pmovzxwq128((__v8hi)__V);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_cvtepu32_epi64(__m128i __V)
|
||||||
|
{
|
||||||
|
return (__m128i) __builtin_ia32_pmovzxdq128((__v4si)__V);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* SSE4 Pack with Unsigned Saturation. */
|
||||||
|
static __inline__ __m128i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_packus_epi32(__m128i __V1, __m128i __V2)
|
||||||
|
{
|
||||||
|
return (__m128i) __builtin_ia32_packusdw128((__v4si)__V1, (__v4si)__V2);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* SSE4 Multiple Packed Sums of Absolute Difference. */
|
||||||
|
#define _mm_mpsadbw_epu8(X, Y, M) __extension__ ({ \
|
||||||
|
__m128i __X = (X); \
|
||||||
|
__m128i __Y = (Y); \
|
||||||
|
(__m128i) __builtin_ia32_mpsadbw128((__v16qi)__X, (__v16qi)__Y, (M)); })
|
||||||
|
|
||||||
|
static __inline__ __m128i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_minpos_epu16(__m128i __V)
|
||||||
|
{
|
||||||
|
return (__m128i) __builtin_ia32_phminposuw128((__v8hi)__V);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* These definitions are normally in nmmintrin.h, but gcc puts them in here
|
||||||
|
so we'll do the same. */
|
||||||
|
#ifdef __SSE4_2__
|
||||||
|
|
||||||
|
/* These specify the type of data that we're comparing. */
|
||||||
|
#define _SIDD_UBYTE_OPS 0x00
|
||||||
|
#define _SIDD_UWORD_OPS 0x01
|
||||||
|
#define _SIDD_SBYTE_OPS 0x02
|
||||||
|
#define _SIDD_SWORD_OPS 0x03
|
||||||
|
|
||||||
|
/* These specify the type of comparison operation. */
|
||||||
|
#define _SIDD_CMP_EQUAL_ANY 0x00
|
||||||
|
#define _SIDD_CMP_RANGES 0x04
|
||||||
|
#define _SIDD_CMP_EQUAL_EACH 0x08
|
||||||
|
#define _SIDD_CMP_EQUAL_ORDERED 0x0c
|
||||||
|
|
||||||
|
/* These macros specify the polarity of the operation. */
|
||||||
|
#define _SIDD_POSITIVE_POLARITY 0x00
|
||||||
|
#define _SIDD_NEGATIVE_POLARITY 0x10
|
||||||
|
#define _SIDD_MASKED_POSITIVE_POLARITY 0x20
|
||||||
|
#define _SIDD_MASKED_NEGATIVE_POLARITY 0x30
|
||||||
|
|
||||||
|
/* These macros are used in _mm_cmpXstri() to specify the return. */
|
||||||
|
#define _SIDD_LEAST_SIGNIFICANT 0x00
|
||||||
|
#define _SIDD_MOST_SIGNIFICANT 0x40
|
||||||
|
|
||||||
|
/* These macros are used in _mm_cmpXstri() to specify the return. */
|
||||||
|
#define _SIDD_BIT_MASK 0x00
|
||||||
|
#define _SIDD_UNIT_MASK 0x40
|
||||||
|
|
||||||
|
/* SSE4.2 Packed Comparison Intrinsics. */
|
||||||
|
#define _mm_cmpistrm(A, B, M) __builtin_ia32_pcmpistrm128((A), (B), (M))
|
||||||
|
#define _mm_cmpistri(A, B, M) __builtin_ia32_pcmpistri128((A), (B), (M))
|
||||||
|
|
||||||
|
#define _mm_cmpestrm(A, LA, B, LB, M) \
|
||||||
|
__builtin_ia32_pcmpestrm128((A), (LA), (B), (LB), (M))
|
||||||
|
#define _mm_cmpestri(A, LA, B, LB, M) \
|
||||||
|
__builtin_ia32_pcmpestri128((A), (LA), (B), (LB), (M))
|
||||||
|
|
||||||
|
/* SSE4.2 Packed Comparison Intrinsics and EFlag Reading. */
|
||||||
|
#define _mm_cmpistra(A, B, M) \
|
||||||
|
__builtin_ia32_pcmpistria128((A), (B), (M))
|
||||||
|
#define _mm_cmpistrc(A, B, M) \
|
||||||
|
__builtin_ia32_pcmpistric128((A), (B), (M))
|
||||||
|
#define _mm_cmpistro(A, B, M) \
|
||||||
|
__builtin_ia32_pcmpistrio128((A), (B), (M))
|
||||||
|
#define _mm_cmpistrs(A, B, M) \
|
||||||
|
__builtin_ia32_pcmpistris128((A), (B), (M))
|
||||||
|
#define _mm_cmpistrz(A, B, M) \
|
||||||
|
__builtin_ia32_pcmpistriz128((A), (B), (M))
|
||||||
|
|
||||||
|
#define _mm_cmpestra(A, LA, B, LB, M) \
|
||||||
|
__builtin_ia32_pcmpestria128((A), (LA), (B), (LB), (M))
|
||||||
|
#define _mm_cmpestrc(A, LA, B, LB, M) \
|
||||||
|
__builtin_ia32_pcmpestric128((A), (LA), (B), (LB), (M))
|
||||||
|
#define _mm_cmpestro(A, LA, B, LB, M) \
|
||||||
|
__builtin_ia32_pcmpestrio128((A), (LA), (B), (LB), (M))
|
||||||
|
#define _mm_cmpestrs(A, LA, B, LB, M) \
|
||||||
|
__builtin_ia32_pcmpestris128((A), (LA), (B), (LB), (M))
|
||||||
|
#define _mm_cmpestrz(A, LA, B, LB, M) \
|
||||||
|
__builtin_ia32_pcmpestriz128((A), (LA), (B), (LB), (M))
|
||||||
|
|
||||||
|
/* SSE4.2 Compare Packed Data -- Greater Than. */
|
||||||
|
static __inline__ __m128i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_cmpgt_epi64(__m128i __V1, __m128i __V2)
|
||||||
|
{
|
||||||
|
return (__m128i)((__v2di)__V1 > (__v2di)__V2);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* SSE4.2 Accumulate CRC32. */
|
||||||
|
static __inline__ unsigned int __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_crc32_u8(unsigned int __C, unsigned char __D)
|
||||||
|
{
|
||||||
|
return __builtin_ia32_crc32qi(__C, __D);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ unsigned int __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_crc32_u16(unsigned int __C, unsigned short __D)
|
||||||
|
{
|
||||||
|
return __builtin_ia32_crc32hi(__C, __D);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ unsigned int __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_crc32_u32(unsigned int __C, unsigned int __D)
|
||||||
|
{
|
||||||
|
return __builtin_ia32_crc32si(__C, __D);
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef __x86_64__
|
||||||
|
static __inline__ unsigned long long __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_crc32_u64(unsigned long long __C, unsigned long long __D)
|
||||||
|
{
|
||||||
|
return __builtin_ia32_crc32di(__C, __D);
|
||||||
|
}
|
||||||
|
#endif /* __x86_64__ */
|
||||||
|
|
||||||
|
#ifdef __POPCNT__
|
||||||
|
#include <popcntintrin.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* __SSE4_2__ */
|
||||||
|
#endif /* __SSE4_1__ */
|
||||||
|
|
||||||
|
#endif /* _SMMINTRIN_H */
|
30
python/clang/3.1/include/stdalign.h
Normal file
30
python/clang/3.1/include/stdalign.h
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
/*===---- stdalign.h - Standard header for alignment ------------------------===
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
|
* in the Software without restriction, including without limitation the rights
|
||||||
|
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
* copies of the Software, and to permit persons to whom the Software is
|
||||||
|
* furnished to do so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included in
|
||||||
|
* all copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
* THE SOFTWARE.
|
||||||
|
*
|
||||||
|
*===-----------------------------------------------------------------------===
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __STDALIGN_H
|
||||||
|
#define __STDALIGN_H
|
||||||
|
|
||||||
|
#define alignas _Alignas
|
||||||
|
#define __alignas_is_defined 1
|
||||||
|
|
||||||
|
#endif /* __STDALIGN_H */
|
50
python/clang/3.1/include/stdarg.h
Normal file
50
python/clang/3.1/include/stdarg.h
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
/*===---- stdarg.h - Variable argument handling ----------------------------===
|
||||||
|
*
|
||||||
|
* Copyright (c) 2008 Eli Friedman
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
|
* in the Software without restriction, including without limitation the rights
|
||||||
|
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
* copies of the Software, and to permit persons to whom the Software is
|
||||||
|
* furnished to do so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included in
|
||||||
|
* all copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
* THE SOFTWARE.
|
||||||
|
*
|
||||||
|
*===-----------------------------------------------------------------------===
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __STDARG_H
|
||||||
|
#define __STDARG_H
|
||||||
|
|
||||||
|
#ifndef _VA_LIST
|
||||||
|
typedef __builtin_va_list va_list;
|
||||||
|
#define _VA_LIST
|
||||||
|
#endif
|
||||||
|
#define va_start(ap, param) __builtin_va_start(ap, param)
|
||||||
|
#define va_end(ap) __builtin_va_end(ap)
|
||||||
|
#define va_arg(ap, type) __builtin_va_arg(ap, type)
|
||||||
|
|
||||||
|
/* GCC always defines __va_copy, but does not define va_copy unless in c99 mode
|
||||||
|
* or -ansi is not specified, since it was not part of C90.
|
||||||
|
*/
|
||||||
|
#define __va_copy(d,s) __builtin_va_copy(d,s)
|
||||||
|
|
||||||
|
#if __STDC_VERSION__ >= 199900L || __cplusplus >= 201103L || !defined(__STRICT_ANSI__)
|
||||||
|
#define va_copy(dest, src) __builtin_va_copy(dest, src)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Hack required to make standard headers work, at least on Ubuntu */
|
||||||
|
#define __GNUC_VA_LIST 1
|
||||||
|
typedef __builtin_va_list __gnuc_va_list;
|
||||||
|
|
||||||
|
#endif /* __STDARG_H */
|
44
python/clang/3.1/include/stdbool.h
Normal file
44
python/clang/3.1/include/stdbool.h
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
/*===---- stdbool.h - Standard header for booleans -------------------------===
|
||||||
|
*
|
||||||
|
* Copyright (c) 2008 Eli Friedman
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
|
* in the Software without restriction, including without limitation the rights
|
||||||
|
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
* copies of the Software, and to permit persons to whom the Software is
|
||||||
|
* furnished to do so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included in
|
||||||
|
* all copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
* THE SOFTWARE.
|
||||||
|
*
|
||||||
|
*===-----------------------------------------------------------------------===
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __STDBOOL_H
|
||||||
|
#define __STDBOOL_H
|
||||||
|
|
||||||
|
/* Don't define bool, true, and false in C++, except as a GNU extension. */
|
||||||
|
#ifndef __cplusplus
|
||||||
|
#define bool _Bool
|
||||||
|
#define true 1
|
||||||
|
#define false 0
|
||||||
|
#elif defined(__GNUC__) && !defined(__STRICT_ANSI__)
|
||||||
|
/* Define _Bool, bool, false, true as a GNU extension. */
|
||||||
|
#define _Bool bool
|
||||||
|
#define bool bool
|
||||||
|
#define false false
|
||||||
|
#define true true
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define __bool_true_false_are_defined 1
|
||||||
|
|
||||||
|
#endif /* __STDBOOL_H */
|
64
python/clang/3.1/include/stddef.h
Normal file
64
python/clang/3.1/include/stddef.h
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
/*===---- stddef.h - Basic type definitions --------------------------------===
|
||||||
|
*
|
||||||
|
* Copyright (c) 2008 Eli Friedman
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
|
* in the Software without restriction, including without limitation the rights
|
||||||
|
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
* copies of the Software, and to permit persons to whom the Software is
|
||||||
|
* furnished to do so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included in
|
||||||
|
* all copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
* THE SOFTWARE.
|
||||||
|
*
|
||||||
|
*===-----------------------------------------------------------------------===
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __STDDEF_H
|
||||||
|
#define __STDDEF_H
|
||||||
|
|
||||||
|
#ifndef _PTRDIFF_T
|
||||||
|
#define _PTRDIFF_T
|
||||||
|
typedef __typeof__(((int*)0)-((int*)0)) ptrdiff_t;
|
||||||
|
#endif
|
||||||
|
#ifndef _SIZE_T
|
||||||
|
#define _SIZE_T
|
||||||
|
typedef __typeof__(sizeof(int)) size_t;
|
||||||
|
#endif
|
||||||
|
#ifndef __cplusplus
|
||||||
|
#ifndef _WCHAR_T
|
||||||
|
#define _WCHAR_T
|
||||||
|
typedef __WCHAR_TYPE__ wchar_t;
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#undef NULL
|
||||||
|
#ifdef __cplusplus
|
||||||
|
#undef __null // VC++ hack.
|
||||||
|
#define NULL __null
|
||||||
|
#else
|
||||||
|
#define NULL ((void*)0)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define offsetof(t, d) __builtin_offsetof(t, d)
|
||||||
|
|
||||||
|
#endif /* __STDDEF_H */
|
||||||
|
|
||||||
|
/* Some C libraries expect to see a wint_t here. Others (notably MinGW) will use
|
||||||
|
__WINT_TYPE__ directly; accommodate both by requiring __need_wint_t */
|
||||||
|
#if defined(__need_wint_t)
|
||||||
|
#if !defined(_WINT_T)
|
||||||
|
#define _WINT_T
|
||||||
|
typedef __WINT_TYPE__ wint_t;
|
||||||
|
#endif /* _WINT_T */
|
||||||
|
#undef __need_wint_t
|
||||||
|
#endif /* __need_wint_t */
|
661
python/clang/3.1/include/stdint.h
Normal file
661
python/clang/3.1/include/stdint.h
Normal file
@ -0,0 +1,661 @@
|
|||||||
|
/*===---- stdint.h - Standard header for sized integer types --------------===*\
|
||||||
|
*
|
||||||
|
* Copyright (c) 2009 Chris Lattner
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
|
* in the Software without restriction, including without limitation the rights
|
||||||
|
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
* copies of the Software, and to permit persons to whom the Software is
|
||||||
|
* furnished to do so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included in
|
||||||
|
* all copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
* THE SOFTWARE.
|
||||||
|
*
|
||||||
|
\*===----------------------------------------------------------------------===*/
|
||||||
|
|
||||||
|
#ifndef __CLANG_STDINT_H
|
||||||
|
#define __CLANG_STDINT_H
|
||||||
|
|
||||||
|
/* If we're hosted, fall back to the system's stdint.h, which might have
|
||||||
|
* additional definitions.
|
||||||
|
*/
|
||||||
|
#if __STDC_HOSTED__ && \
|
||||||
|
defined(__has_include_next) && __has_include_next(<stdint.h>)
|
||||||
|
# include_next <stdint.h>
|
||||||
|
#else
|
||||||
|
|
||||||
|
/* C99 7.18.1.1 Exact-width integer types.
|
||||||
|
* C99 7.18.1.2 Minimum-width integer types.
|
||||||
|
* C99 7.18.1.3 Fastest minimum-width integer types.
|
||||||
|
*
|
||||||
|
* The standard requires that exact-width type be defined for 8-, 16-, 32-, and
|
||||||
|
* 64-bit types if they are implemented. Other exact width types are optional.
|
||||||
|
* This implementation defines an exact-width types for every integer width
|
||||||
|
* that is represented in the standard integer types.
|
||||||
|
*
|
||||||
|
* The standard also requires minimum-width types be defined for 8-, 16-, 32-,
|
||||||
|
* and 64-bit widths regardless of whether there are corresponding exact-width
|
||||||
|
* types.
|
||||||
|
*
|
||||||
|
* To accommodate targets that are missing types that are exactly 8, 16, 32, or
|
||||||
|
* 64 bits wide, this implementation takes an approach of cascading
|
||||||
|
* redefintions, redefining __int_leastN_t to successively smaller exact-width
|
||||||
|
* types. It is therefore important that the types are defined in order of
|
||||||
|
* descending widths.
|
||||||
|
*
|
||||||
|
* We currently assume that the minimum-width types and the fastest
|
||||||
|
* minimum-width types are the same. This is allowed by the standard, but is
|
||||||
|
* suboptimal.
|
||||||
|
*
|
||||||
|
* In violation of the standard, some targets do not implement a type that is
|
||||||
|
* wide enough to represent all of the required widths (8-, 16-, 32-, 64-bit).
|
||||||
|
* To accommodate these targets, a required minimum-width type is only
|
||||||
|
* defined if there exists an exact-width type of equal or greater width.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef __INT64_TYPE__
|
||||||
|
# ifndef __int8_t_defined /* glibc sys/types.h also defines int64_t*/
|
||||||
|
typedef signed __INT64_TYPE__ int64_t;
|
||||||
|
# endif /* __int8_t_defined */
|
||||||
|
typedef unsigned __INT64_TYPE__ uint64_t;
|
||||||
|
# define __int_least64_t int64_t
|
||||||
|
# define __uint_least64_t uint64_t
|
||||||
|
# define __int_least32_t int64_t
|
||||||
|
# define __uint_least32_t uint64_t
|
||||||
|
# define __int_least16_t int64_t
|
||||||
|
# define __uint_least16_t uint64_t
|
||||||
|
# define __int_least8_t int64_t
|
||||||
|
# define __uint_least8_t uint64_t
|
||||||
|
#endif /* __INT64_TYPE__ */
|
||||||
|
|
||||||
|
#ifdef __int_least64_t
|
||||||
|
typedef __int_least64_t int_least64_t;
|
||||||
|
typedef __uint_least64_t uint_least64_t;
|
||||||
|
typedef __int_least64_t int_fast64_t;
|
||||||
|
typedef __uint_least64_t uint_fast64_t;
|
||||||
|
#endif /* __int_least64_t */
|
||||||
|
|
||||||
|
#ifdef __INT56_TYPE__
|
||||||
|
typedef signed __INT56_TYPE__ int56_t;
|
||||||
|
typedef unsigned __INT56_TYPE__ uint56_t;
|
||||||
|
typedef int56_t int_least56_t;
|
||||||
|
typedef uint56_t uint_least56_t;
|
||||||
|
typedef int56_t int_fast56_t;
|
||||||
|
typedef uint56_t uint_fast56_t;
|
||||||
|
# define __int_least32_t int56_t
|
||||||
|
# define __uint_least32_t uint56_t
|
||||||
|
# define __int_least16_t int56_t
|
||||||
|
# define __uint_least16_t uint56_t
|
||||||
|
# define __int_least8_t int56_t
|
||||||
|
# define __uint_least8_t uint56_t
|
||||||
|
#endif /* __INT56_TYPE__ */
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __INT48_TYPE__
|
||||||
|
typedef signed __INT48_TYPE__ int48_t;
|
||||||
|
typedef unsigned __INT48_TYPE__ uint48_t;
|
||||||
|
typedef int48_t int_least48_t;
|
||||||
|
typedef uint48_t uint_least48_t;
|
||||||
|
typedef int48_t int_fast48_t;
|
||||||
|
typedef uint48_t uint_fast48_t;
|
||||||
|
# define __int_least32_t int48_t
|
||||||
|
# define __uint_least32_t uint48_t
|
||||||
|
# define __int_least16_t int48_t
|
||||||
|
# define __uint_least16_t uint48_t
|
||||||
|
# define __int_least8_t int48_t
|
||||||
|
# define __uint_least8_t uint48_t
|
||||||
|
#endif /* __INT48_TYPE__ */
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __INT40_TYPE__
|
||||||
|
typedef signed __INT40_TYPE__ int40_t;
|
||||||
|
typedef unsigned __INT40_TYPE__ uint40_t;
|
||||||
|
typedef int40_t int_least40_t;
|
||||||
|
typedef uint40_t uint_least40_t;
|
||||||
|
typedef int40_t int_fast40_t;
|
||||||
|
typedef uint40_t uint_fast40_t;
|
||||||
|
# define __int_least32_t int40_t
|
||||||
|
# define __uint_least32_t uint40_t
|
||||||
|
# define __int_least16_t int40_t
|
||||||
|
# define __uint_least16_t uint40_t
|
||||||
|
# define __int_least8_t int40_t
|
||||||
|
# define __uint_least8_t uint40_t
|
||||||
|
#endif /* __INT40_TYPE__ */
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __INT32_TYPE__
|
||||||
|
|
||||||
|
# ifndef __int8_t_defined /* glibc sys/types.h also defines int32_t*/
|
||||||
|
typedef signed __INT32_TYPE__ int32_t;
|
||||||
|
# endif /* __int8_t_defined */
|
||||||
|
|
||||||
|
# ifndef __uint32_t_defined /* more glibc compatibility */
|
||||||
|
# define __uint32_t_defined
|
||||||
|
typedef unsigned __INT32_TYPE__ uint32_t;
|
||||||
|
# endif /* __uint32_t_defined */
|
||||||
|
|
||||||
|
# define __int_least32_t int32_t
|
||||||
|
# define __uint_least32_t uint32_t
|
||||||
|
# define __int_least16_t int32_t
|
||||||
|
# define __uint_least16_t uint32_t
|
||||||
|
# define __int_least8_t int32_t
|
||||||
|
# define __uint_least8_t uint32_t
|
||||||
|
#endif /* __INT32_TYPE__ */
|
||||||
|
|
||||||
|
#ifdef __int_least32_t
|
||||||
|
typedef __int_least32_t int_least32_t;
|
||||||
|
typedef __uint_least32_t uint_least32_t;
|
||||||
|
typedef __int_least32_t int_fast32_t;
|
||||||
|
typedef __uint_least32_t uint_fast32_t;
|
||||||
|
#endif /* __int_least32_t */
|
||||||
|
|
||||||
|
#ifdef __INT24_TYPE__
|
||||||
|
typedef signed __INT24_TYPE__ int24_t;
|
||||||
|
typedef unsigned __INT24_TYPE__ uint24_t;
|
||||||
|
typedef int24_t int_least24_t;
|
||||||
|
typedef uint24_t uint_least24_t;
|
||||||
|
typedef int24_t int_fast24_t;
|
||||||
|
typedef uint24_t uint_fast24_t;
|
||||||
|
# define __int_least16_t int24_t
|
||||||
|
# define __uint_least16_t uint24_t
|
||||||
|
# define __int_least8_t int24_t
|
||||||
|
# define __uint_least8_t uint24_t
|
||||||
|
#endif /* __INT24_TYPE__ */
|
||||||
|
|
||||||
|
#ifdef __INT16_TYPE__
|
||||||
|
#ifndef __int8_t_defined /* glibc sys/types.h also defines int16_t*/
|
||||||
|
typedef signed __INT16_TYPE__ int16_t;
|
||||||
|
#endif /* __int8_t_defined */
|
||||||
|
typedef unsigned __INT16_TYPE__ uint16_t;
|
||||||
|
# define __int_least16_t int16_t
|
||||||
|
# define __uint_least16_t uint16_t
|
||||||
|
# define __int_least8_t int16_t
|
||||||
|
# define __uint_least8_t uint16_t
|
||||||
|
#endif /* __INT16_TYPE__ */
|
||||||
|
|
||||||
|
#ifdef __int_least16_t
|
||||||
|
typedef __int_least16_t int_least16_t;
|
||||||
|
typedef __uint_least16_t uint_least16_t;
|
||||||
|
typedef __int_least16_t int_fast16_t;
|
||||||
|
typedef __uint_least16_t uint_fast16_t;
|
||||||
|
#endif /* __int_least16_t */
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __INT8_TYPE__
|
||||||
|
#ifndef __int8_t_defined /* glibc sys/types.h also defines int8_t*/
|
||||||
|
typedef signed __INT8_TYPE__ int8_t;
|
||||||
|
#endif /* __int8_t_defined */
|
||||||
|
typedef unsigned __INT8_TYPE__ uint8_t;
|
||||||
|
# define __int_least8_t int8_t
|
||||||
|
# define __uint_least8_t uint8_t
|
||||||
|
#endif /* __INT8_TYPE__ */
|
||||||
|
|
||||||
|
#ifdef __int_least8_t
|
||||||
|
typedef __int_least8_t int_least8_t;
|
||||||
|
typedef __uint_least8_t uint_least8_t;
|
||||||
|
typedef __int_least8_t int_fast8_t;
|
||||||
|
typedef __uint_least8_t uint_fast8_t;
|
||||||
|
#endif /* __int_least8_t */
|
||||||
|
|
||||||
|
/* prevent glibc sys/types.h from defining conflicting types */
|
||||||
|
#ifndef __int8_t_defined
|
||||||
|
# define __int8_t_defined
|
||||||
|
#endif /* __int8_t_defined */
|
||||||
|
|
||||||
|
/* C99 7.18.1.4 Integer types capable of holding object pointers.
|
||||||
|
*/
|
||||||
|
#define __stdint_join3(a,b,c) a ## b ## c
|
||||||
|
|
||||||
|
#define __intn_t(n) __stdint_join3( int, n, _t)
|
||||||
|
#define __uintn_t(n) __stdint_join3(uint, n, _t)
|
||||||
|
|
||||||
|
#ifndef _INTPTR_T
|
||||||
|
#ifndef __intptr_t_defined
|
||||||
|
typedef __intn_t(__INTPTR_WIDTH__) intptr_t;
|
||||||
|
#define __intptr_t_defined
|
||||||
|
#define _INTPTR_T
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef _UINTPTR_T
|
||||||
|
typedef __uintn_t(__INTPTR_WIDTH__) uintptr_t;
|
||||||
|
#define _UINTPTR_T
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* C99 7.18.1.5 Greatest-width integer types.
|
||||||
|
*/
|
||||||
|
typedef __INTMAX_TYPE__ intmax_t;
|
||||||
|
typedef __UINTMAX_TYPE__ uintmax_t;
|
||||||
|
|
||||||
|
/* C99 7.18.4 Macros for minimum-width integer constants.
|
||||||
|
*
|
||||||
|
* The standard requires that integer constant macros be defined for all the
|
||||||
|
* minimum-width types defined above. As 8-, 16-, 32-, and 64-bit minimum-width
|
||||||
|
* types are required, the corresponding integer constant macros are defined
|
||||||
|
* here. This implementation also defines minimum-width types for every other
|
||||||
|
* integer width that the target implements, so corresponding macros are
|
||||||
|
* defined below, too.
|
||||||
|
*
|
||||||
|
* These macros are defined using the same successive-shrinking approach as
|
||||||
|
* the type definitions above. It is likewise important that macros are defined
|
||||||
|
* in order of decending width.
|
||||||
|
*
|
||||||
|
* Note that C++ should not check __STDC_CONSTANT_MACROS here, contrary to the
|
||||||
|
* claims of the C standard (see C++ 18.3.1p2, [cstdint.syn]).
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define __int_c_join(a, b) a ## b
|
||||||
|
#define __int_c(v, suffix) __int_c_join(v, suffix)
|
||||||
|
#define __uint_c(v, suffix) __int_c_join(v##U, suffix)
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __INT64_TYPE__
|
||||||
|
# ifdef __INT64_C_SUFFIX__
|
||||||
|
# define __int64_c_suffix __INT64_C_SUFFIX__
|
||||||
|
# define __int32_c_suffix __INT64_C_SUFFIX__
|
||||||
|
# define __int16_c_suffix __INT64_C_SUFFIX__
|
||||||
|
# define __int8_c_suffix __INT64_C_SUFFIX__
|
||||||
|
# else
|
||||||
|
# undef __int64_c_suffix
|
||||||
|
# undef __int32_c_suffix
|
||||||
|
# undef __int16_c_suffix
|
||||||
|
# undef __int8_c_suffix
|
||||||
|
# endif /* __INT64_C_SUFFIX__ */
|
||||||
|
#endif /* __INT64_TYPE__ */
|
||||||
|
|
||||||
|
#ifdef __int_least64_t
|
||||||
|
# ifdef __int64_c_suffix
|
||||||
|
# define INT64_C(v) __int_c(v, __int64_c_suffix)
|
||||||
|
# define UINT64_C(v) __uint_c(v, __int64_c_suffix)
|
||||||
|
# else
|
||||||
|
# define INT64_C(v) v
|
||||||
|
# define UINT64_C(v) v ## U
|
||||||
|
# endif /* __int64_c_suffix */
|
||||||
|
#endif /* __int_least64_t */
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __INT56_TYPE__
|
||||||
|
# ifdef __INT56_C_SUFFIX__
|
||||||
|
# define INT56_C(v) __int_c(v, __INT56_C_SUFFIX__)
|
||||||
|
# define UINT56_C(v) __uint_c(v, __INT56_C_SUFFIX__)
|
||||||
|
# define __int32_c_suffix __INT56_C_SUFFIX__
|
||||||
|
# define __int16_c_suffix __INT56_C_SUFFIX__
|
||||||
|
# define __int8_c_suffix __INT56_C_SUFFIX__
|
||||||
|
# else
|
||||||
|
# define INT56_C(v) v
|
||||||
|
# define UINT56_C(v) v ## U
|
||||||
|
# undef __int32_c_suffix
|
||||||
|
# undef __int16_c_suffix
|
||||||
|
# undef __int8_c_suffix
|
||||||
|
# endif /* __INT56_C_SUFFIX__ */
|
||||||
|
#endif /* __INT56_TYPE__ */
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __INT48_TYPE__
|
||||||
|
# ifdef __INT48_C_SUFFIX__
|
||||||
|
# define INT48_C(v) __int_c(v, __INT48_C_SUFFIX__)
|
||||||
|
# define UINT48_C(v) __uint_c(v, __INT48_C_SUFFIX__)
|
||||||
|
# define __int32_c_suffix __INT48_C_SUFFIX__
|
||||||
|
# define __int16_c_suffix __INT48_C_SUFFIX__
|
||||||
|
# define __int8_c_suffix __INT48_C_SUFFIX__
|
||||||
|
# else
|
||||||
|
# define INT48_C(v) v
|
||||||
|
# define UINT48_C(v) v ## U
|
||||||
|
# undef __int32_c_suffix
|
||||||
|
# undef __int16_c_suffix
|
||||||
|
# undef __int8_c_suffix
|
||||||
|
# endif /* __INT48_C_SUFFIX__ */
|
||||||
|
#endif /* __INT48_TYPE__ */
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __INT40_TYPE__
|
||||||
|
# ifdef __INT40_C_SUFFIX__
|
||||||
|
# define INT40_C(v) __int_c(v, __INT40_C_SUFFIX__)
|
||||||
|
# define UINT40_C(v) __uint_c(v, __INT40_C_SUFFIX__)
|
||||||
|
# define __int32_c_suffix __INT40_C_SUFFIX__
|
||||||
|
# define __int16_c_suffix __INT40_C_SUFFIX__
|
||||||
|
# define __int8_c_suffix __INT40_C_SUFFIX__
|
||||||
|
# else
|
||||||
|
# define INT40_C(v) v
|
||||||
|
# define UINT40_C(v) v ## U
|
||||||
|
# undef __int32_c_suffix
|
||||||
|
# undef __int16_c_suffix
|
||||||
|
# undef __int8_c_suffix
|
||||||
|
# endif /* __INT40_C_SUFFIX__ */
|
||||||
|
#endif /* __INT40_TYPE__ */
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __INT32_TYPE__
|
||||||
|
# ifdef __INT32_C_SUFFIX__
|
||||||
|
# define __int32_c_suffix __INT32_C_SUFFIX__
|
||||||
|
# define __int16_c_suffix __INT32_C_SUFFIX__
|
||||||
|
# define __int8_c_suffix __INT32_C_SUFFIX__
|
||||||
|
#else
|
||||||
|
# undef __int32_c_suffix
|
||||||
|
# undef __int16_c_suffix
|
||||||
|
# undef __int8_c_suffix
|
||||||
|
# endif /* __INT32_C_SUFFIX__ */
|
||||||
|
#endif /* __INT32_TYPE__ */
|
||||||
|
|
||||||
|
#ifdef __int_least32_t
|
||||||
|
# ifdef __int32_c_suffix
|
||||||
|
# define INT32_C(v) __int_c(v, __int32_c_suffix)
|
||||||
|
# define UINT32_C(v) __uint_c(v, __int32_c_suffix)
|
||||||
|
# else
|
||||||
|
# define INT32_C(v) v
|
||||||
|
# define UINT32_C(v) v ## U
|
||||||
|
# endif /* __int32_c_suffix */
|
||||||
|
#endif /* __int_least32_t */
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __INT24_TYPE__
|
||||||
|
# ifdef __INT24_C_SUFFIX__
|
||||||
|
# define INT24_C(v) __int_c(v, __INT24_C_SUFFIX__)
|
||||||
|
# define UINT24_C(v) __uint_c(v, __INT24_C_SUFFIX__)
|
||||||
|
# define __int16_c_suffix __INT24_C_SUFFIX__
|
||||||
|
# define __int8_c_suffix __INT24_C_SUFFIX__
|
||||||
|
# else
|
||||||
|
# define INT24_C(v) v
|
||||||
|
# define UINT24_C(v) v ## U
|
||||||
|
# undef __int16_c_suffix
|
||||||
|
# undef __int8_c_suffix
|
||||||
|
# endif /* __INT24_C_SUFFIX__ */
|
||||||
|
#endif /* __INT24_TYPE__ */
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __INT16_TYPE__
|
||||||
|
# ifdef __INT16_C_SUFFIX__
|
||||||
|
# define __int16_c_suffix __INT16_C_SUFFIX__
|
||||||
|
# define __int8_c_suffix __INT16_C_SUFFIX__
|
||||||
|
#else
|
||||||
|
# undef __int16_c_suffix
|
||||||
|
# undef __int8_c_suffix
|
||||||
|
# endif /* __INT16_C_SUFFIX__ */
|
||||||
|
#endif /* __INT16_TYPE__ */
|
||||||
|
|
||||||
|
#ifdef __int_least16_t
|
||||||
|
# ifdef __int16_c_suffix
|
||||||
|
# define INT16_C(v) __int_c(v, __int16_c_suffix)
|
||||||
|
# define UINT16_C(v) __uint_c(v, __int16_c_suffix)
|
||||||
|
# else
|
||||||
|
# define INT16_C(v) v
|
||||||
|
# define UINT16_C(v) v ## U
|
||||||
|
# endif /* __int16_c_suffix */
|
||||||
|
#endif /* __int_least16_t */
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __INT8_TYPE__
|
||||||
|
# ifdef __INT8_C_SUFFIX__
|
||||||
|
# define __int8_c_suffix __INT8_C_SUFFIX__
|
||||||
|
#else
|
||||||
|
# undef __int8_c_suffix
|
||||||
|
# endif /* __INT8_C_SUFFIX__ */
|
||||||
|
#endif /* __INT8_TYPE__ */
|
||||||
|
|
||||||
|
#ifdef __int_least8_t
|
||||||
|
# ifdef __int8_c_suffix
|
||||||
|
# define INT8_C(v) __int_c(v, __int8_c_suffix)
|
||||||
|
# define UINT8_C(v) __uint_c(v, __int8_c_suffix)
|
||||||
|
# else
|
||||||
|
# define INT8_C(v) v
|
||||||
|
# define UINT8_C(v) v ## U
|
||||||
|
# endif /* __int8_c_suffix */
|
||||||
|
#endif /* __int_least8_t */
|
||||||
|
|
||||||
|
|
||||||
|
/* C99 7.18.2.1 Limits of exact-width integer types.
|
||||||
|
* C99 7.18.2.2 Limits of minimum-width integer types.
|
||||||
|
* C99 7.18.2.3 Limits of fastest minimum-width integer types.
|
||||||
|
*
|
||||||
|
* The presence of limit macros are completely optional in C99. This
|
||||||
|
* implementation defines limits for all of the types (exact- and
|
||||||
|
* minimum-width) that it defines above, using the limits of the minimum-width
|
||||||
|
* type for any types that do not have exact-width representations.
|
||||||
|
*
|
||||||
|
* As in the type definitions, this section takes an approach of
|
||||||
|
* successive-shrinking to determine which limits to use for the standard (8,
|
||||||
|
* 16, 32, 64) bit widths when they don't have exact representations. It is
|
||||||
|
* therefore important that the defintions be kept in order of decending
|
||||||
|
* widths.
|
||||||
|
*
|
||||||
|
* Note that C++ should not check __STDC_LIMIT_MACROS here, contrary to the
|
||||||
|
* claims of the C standard (see C++ 18.3.1p2, [cstdint.syn]).
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef __INT64_TYPE__
|
||||||
|
# define INT64_MAX INT64_C( 9223372036854775807)
|
||||||
|
# define INT64_MIN (-INT64_C( 9223372036854775807)-1)
|
||||||
|
# define UINT64_MAX UINT64_C(18446744073709551615)
|
||||||
|
# define __INT_LEAST64_MIN INT64_MIN
|
||||||
|
# define __INT_LEAST64_MAX INT64_MAX
|
||||||
|
# define __UINT_LEAST64_MAX UINT64_MAX
|
||||||
|
# define __INT_LEAST32_MIN INT64_MIN
|
||||||
|
# define __INT_LEAST32_MAX INT64_MAX
|
||||||
|
# define __UINT_LEAST32_MAX UINT64_MAX
|
||||||
|
# define __INT_LEAST16_MIN INT64_MIN
|
||||||
|
# define __INT_LEAST16_MAX INT64_MAX
|
||||||
|
# define __UINT_LEAST16_MAX UINT64_MAX
|
||||||
|
# define __INT_LEAST8_MIN INT64_MIN
|
||||||
|
# define __INT_LEAST8_MAX INT64_MAX
|
||||||
|
# define __UINT_LEAST8_MAX UINT64_MAX
|
||||||
|
#endif /* __INT64_TYPE__ */
|
||||||
|
|
||||||
|
#ifdef __INT_LEAST64_MIN
|
||||||
|
# define INT_LEAST64_MIN __INT_LEAST64_MIN
|
||||||
|
# define INT_LEAST64_MAX __INT_LEAST64_MAX
|
||||||
|
# define UINT_LEAST64_MAX __UINT_LEAST64_MAX
|
||||||
|
# define INT_FAST64_MIN __INT_LEAST64_MIN
|
||||||
|
# define INT_FAST64_MAX __INT_LEAST64_MAX
|
||||||
|
# define UINT_FAST64_MAX __UINT_LEAST64_MAX
|
||||||
|
#endif /* __INT_LEAST64_MIN */
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __INT56_TYPE__
|
||||||
|
# define INT56_MAX INT56_C(36028797018963967)
|
||||||
|
# define INT56_MIN (-INT56_C(36028797018963967)-1)
|
||||||
|
# define UINT56_MAX UINT56_C(72057594037927935)
|
||||||
|
# define INT_LEAST56_MIN INT56_MIN
|
||||||
|
# define INT_LEAST56_MAX INT56_MAX
|
||||||
|
# define UINT_LEAST56_MAX UINT56_MAX
|
||||||
|
# define INT_FAST56_MIN INT56_MIN
|
||||||
|
# define INT_FAST56_MAX INT56_MAX
|
||||||
|
# define UINT_FAST56_MAX UINT56_MAX
|
||||||
|
# define __INT_LEAST32_MIN INT56_MIN
|
||||||
|
# define __INT_LEAST32_MAX INT56_MAX
|
||||||
|
# define __UINT_LEAST32_MAX UINT56_MAX
|
||||||
|
# define __INT_LEAST16_MIN INT56_MIN
|
||||||
|
# define __INT_LEAST16_MAX INT56_MAX
|
||||||
|
# define __UINT_LEAST16_MAX UINT56_MAX
|
||||||
|
# define __INT_LEAST8_MIN INT56_MIN
|
||||||
|
# define __INT_LEAST8_MAX INT56_MAX
|
||||||
|
# define __UINT_LEAST8_MAX UINT56_MAX
|
||||||
|
#endif /* __INT56_TYPE__ */
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __INT48_TYPE__
|
||||||
|
# define INT48_MAX INT48_C(140737488355327)
|
||||||
|
# define INT48_MIN (-INT48_C(140737488355327)-1)
|
||||||
|
# define UINT48_MAX UINT48_C(281474976710655)
|
||||||
|
# define INT_LEAST48_MIN INT48_MIN
|
||||||
|
# define INT_LEAST48_MAX INT48_MAX
|
||||||
|
# define UINT_LEAST48_MAX UINT48_MAX
|
||||||
|
# define INT_FAST48_MIN INT48_MIN
|
||||||
|
# define INT_FAST48_MAX INT48_MAX
|
||||||
|
# define UINT_FAST48_MAX UINT48_MAX
|
||||||
|
# define __INT_LEAST32_MIN INT48_MIN
|
||||||
|
# define __INT_LEAST32_MAX INT48_MAX
|
||||||
|
# define __UINT_LEAST32_MAX UINT48_MAX
|
||||||
|
# define __INT_LEAST16_MIN INT48_MIN
|
||||||
|
# define __INT_LEAST16_MAX INT48_MAX
|
||||||
|
# define __UINT_LEAST16_MAX UINT48_MAX
|
||||||
|
# define __INT_LEAST8_MIN INT48_MIN
|
||||||
|
# define __INT_LEAST8_MAX INT48_MAX
|
||||||
|
# define __UINT_LEAST8_MAX UINT48_MAX
|
||||||
|
#endif /* __INT48_TYPE__ */
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __INT40_TYPE__
|
||||||
|
# define INT40_MAX INT40_C(549755813887)
|
||||||
|
# define INT40_MIN (-INT40_C(549755813887)-1)
|
||||||
|
# define UINT40_MAX UINT40_C(1099511627775)
|
||||||
|
# define INT_LEAST40_MIN INT40_MIN
|
||||||
|
# define INT_LEAST40_MAX INT40_MAX
|
||||||
|
# define UINT_LEAST40_MAX UINT40_MAX
|
||||||
|
# define INT_FAST40_MIN INT40_MIN
|
||||||
|
# define INT_FAST40_MAX INT40_MAX
|
||||||
|
# define UINT_FAST40_MAX UINT40_MAX
|
||||||
|
# define __INT_LEAST32_MIN INT40_MIN
|
||||||
|
# define __INT_LEAST32_MAX INT40_MAX
|
||||||
|
# define __UINT_LEAST32_MAX UINT40_MAX
|
||||||
|
# define __INT_LEAST16_MIN INT40_MIN
|
||||||
|
# define __INT_LEAST16_MAX INT40_MAX
|
||||||
|
# define __UINT_LEAST16_MAX UINT40_MAX
|
||||||
|
# define __INT_LEAST8_MIN INT40_MIN
|
||||||
|
# define __INT_LEAST8_MAX INT40_MAX
|
||||||
|
# define __UINT_LEAST8_MAX UINT40_MAX
|
||||||
|
#endif /* __INT40_TYPE__ */
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __INT32_TYPE__
|
||||||
|
# define INT32_MAX INT32_C(2147483647)
|
||||||
|
# define INT32_MIN (-INT32_C(2147483647)-1)
|
||||||
|
# define UINT32_MAX UINT32_C(4294967295)
|
||||||
|
# define __INT_LEAST32_MIN INT32_MIN
|
||||||
|
# define __INT_LEAST32_MAX INT32_MAX
|
||||||
|
# define __UINT_LEAST32_MAX UINT32_MAX
|
||||||
|
# define __INT_LEAST16_MIN INT32_MIN
|
||||||
|
# define __INT_LEAST16_MAX INT32_MAX
|
||||||
|
# define __UINT_LEAST16_MAX UINT32_MAX
|
||||||
|
# define __INT_LEAST8_MIN INT32_MIN
|
||||||
|
# define __INT_LEAST8_MAX INT32_MAX
|
||||||
|
# define __UINT_LEAST8_MAX UINT32_MAX
|
||||||
|
#endif /* __INT32_TYPE__ */
|
||||||
|
|
||||||
|
#ifdef __INT_LEAST32_MIN
|
||||||
|
# define INT_LEAST32_MIN __INT_LEAST32_MIN
|
||||||
|
# define INT_LEAST32_MAX __INT_LEAST32_MAX
|
||||||
|
# define UINT_LEAST32_MAX __UINT_LEAST32_MAX
|
||||||
|
# define INT_FAST32_MIN __INT_LEAST32_MIN
|
||||||
|
# define INT_FAST32_MAX __INT_LEAST32_MAX
|
||||||
|
# define UINT_FAST32_MAX __UINT_LEAST32_MAX
|
||||||
|
#endif /* __INT_LEAST32_MIN */
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __INT24_TYPE__
|
||||||
|
# define INT24_MAX INT24_C(8388607)
|
||||||
|
# define INT24_MIN (-INT24_C(8388607)-1)
|
||||||
|
# define UINT24_MAX UINT24_C(16777215)
|
||||||
|
# define INT_LEAST24_MIN INT24_MIN
|
||||||
|
# define INT_LEAST24_MAX INT24_MAX
|
||||||
|
# define UINT_LEAST24_MAX UINT24_MAX
|
||||||
|
# define INT_FAST24_MIN INT24_MIN
|
||||||
|
# define INT_FAST24_MAX INT24_MAX
|
||||||
|
# define UINT_FAST24_MAX UINT24_MAX
|
||||||
|
# define __INT_LEAST16_MIN INT24_MIN
|
||||||
|
# define __INT_LEAST16_MAX INT24_MAX
|
||||||
|
# define __UINT_LEAST16_MAX UINT24_MAX
|
||||||
|
# define __INT_LEAST8_MIN INT24_MIN
|
||||||
|
# define __INT_LEAST8_MAX INT24_MAX
|
||||||
|
# define __UINT_LEAST8_MAX UINT24_MAX
|
||||||
|
#endif /* __INT24_TYPE__ */
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __INT16_TYPE__
|
||||||
|
#define INT16_MAX INT16_C(32767)
|
||||||
|
#define INT16_MIN (-INT16_C(32767)-1)
|
||||||
|
#define UINT16_MAX UINT16_C(65535)
|
||||||
|
# define __INT_LEAST16_MIN INT16_MIN
|
||||||
|
# define __INT_LEAST16_MAX INT16_MAX
|
||||||
|
# define __UINT_LEAST16_MAX UINT16_MAX
|
||||||
|
# define __INT_LEAST8_MIN INT16_MIN
|
||||||
|
# define __INT_LEAST8_MAX INT16_MAX
|
||||||
|
# define __UINT_LEAST8_MAX UINT16_MAX
|
||||||
|
#endif /* __INT16_TYPE__ */
|
||||||
|
|
||||||
|
#ifdef __INT_LEAST16_MIN
|
||||||
|
# define INT_LEAST16_MIN __INT_LEAST16_MIN
|
||||||
|
# define INT_LEAST16_MAX __INT_LEAST16_MAX
|
||||||
|
# define UINT_LEAST16_MAX __UINT_LEAST16_MAX
|
||||||
|
# define INT_FAST16_MIN __INT_LEAST16_MIN
|
||||||
|
# define INT_FAST16_MAX __INT_LEAST16_MAX
|
||||||
|
# define UINT_FAST16_MAX __UINT_LEAST16_MAX
|
||||||
|
#endif /* __INT_LEAST16_MIN */
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __INT8_TYPE__
|
||||||
|
# define INT8_MAX INT8_C(127)
|
||||||
|
# define INT8_MIN (-INT8_C(127)-1)
|
||||||
|
# define UINT8_MAX UINT8_C(255)
|
||||||
|
# define __INT_LEAST8_MIN INT8_MIN
|
||||||
|
# define __INT_LEAST8_MAX INT8_MAX
|
||||||
|
# define __UINT_LEAST8_MAX UINT8_MAX
|
||||||
|
#endif /* __INT8_TYPE__ */
|
||||||
|
|
||||||
|
#ifdef __INT_LEAST8_MIN
|
||||||
|
# define INT_LEAST8_MIN __INT_LEAST8_MIN
|
||||||
|
# define INT_LEAST8_MAX __INT_LEAST8_MAX
|
||||||
|
# define UINT_LEAST8_MAX __UINT_LEAST8_MAX
|
||||||
|
# define INT_FAST8_MIN __INT_LEAST8_MIN
|
||||||
|
# define INT_FAST8_MAX __INT_LEAST8_MAX
|
||||||
|
# define UINT_FAST8_MAX __UINT_LEAST8_MAX
|
||||||
|
#endif /* __INT_LEAST8_MIN */
|
||||||
|
|
||||||
|
/* Some utility macros */
|
||||||
|
#define __INTN_MIN(n) __stdint_join3( INT, n, _MIN)
|
||||||
|
#define __INTN_MAX(n) __stdint_join3( INT, n, _MAX)
|
||||||
|
#define __UINTN_MAX(n) __stdint_join3(UINT, n, _MAX)
|
||||||
|
#define __INTN_C(n, v) __stdint_join3( INT, n, _C(v))
|
||||||
|
#define __UINTN_C(n, v) __stdint_join3(UINT, n, _C(v))
|
||||||
|
|
||||||
|
/* C99 7.18.2.4 Limits of integer types capable of holding object pointers. */
|
||||||
|
/* C99 7.18.3 Limits of other integer types. */
|
||||||
|
|
||||||
|
#define INTPTR_MIN __INTN_MIN(__INTPTR_WIDTH__)
|
||||||
|
#define INTPTR_MAX __INTN_MAX(__INTPTR_WIDTH__)
|
||||||
|
#define UINTPTR_MAX __UINTN_MAX(__INTPTR_WIDTH__)
|
||||||
|
#define PTRDIFF_MIN __INTN_MIN(__PTRDIFF_WIDTH__)
|
||||||
|
#define PTRDIFF_MAX __INTN_MAX(__PTRDIFF_WIDTH__)
|
||||||
|
#define SIZE_MAX __UINTN_MAX(__SIZE_WIDTH__)
|
||||||
|
|
||||||
|
/* C99 7.18.2.5 Limits of greatest-width integer types. */
|
||||||
|
#define INTMAX_MIN __INTN_MIN(__INTMAX_WIDTH__)
|
||||||
|
#define INTMAX_MAX __INTN_MAX(__INTMAX_WIDTH__)
|
||||||
|
#define UINTMAX_MAX __UINTN_MAX(__INTMAX_WIDTH__)
|
||||||
|
|
||||||
|
/* C99 7.18.3 Limits of other integer types. */
|
||||||
|
#define SIG_ATOMIC_MIN __INTN_MIN(__SIG_ATOMIC_WIDTH__)
|
||||||
|
#define SIG_ATOMIC_MAX __INTN_MAX(__SIG_ATOMIC_WIDTH__)
|
||||||
|
#ifdef __WINT_UNSIGNED__
|
||||||
|
# define WINT_MIN __UINTN_C(__WINT_WIDTH__, 0)
|
||||||
|
# define WINT_MAX __UINTN_MAX(__WINT_WIDTH__)
|
||||||
|
#else
|
||||||
|
# define WINT_MIN __INTN_MIN(__WINT_WIDTH__)
|
||||||
|
# define WINT_MAX __INTN_MAX(__WINT_WIDTH__)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WCHAR_MAX
|
||||||
|
# define WCHAR_MAX __WCHAR_MAX__
|
||||||
|
#endif
|
||||||
|
#ifndef WCHAR_MIN
|
||||||
|
# if __WCHAR_MAX__ == __INTN_MAX(__WCHAR_WIDTH__)
|
||||||
|
# define WCHAR_MIN __INTN_MIN(__WCHAR_WIDTH__)
|
||||||
|
# else
|
||||||
|
# define WCHAR_MIN __UINTN_C(__WCHAR_WIDTH__, 0)
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* 7.18.4.2 Macros for greatest-width integer constants. */
|
||||||
|
#define INTMAX_C(v) __INTN_C(__INTMAX_WIDTH__, v)
|
||||||
|
#define UINTMAX_C(v) __UINTN_C(__INTMAX_WIDTH__, v)
|
||||||
|
|
||||||
|
#endif /* __STDC_HOSTED__ */
|
||||||
|
#endif /* __CLANG_STDINT_H */
|
1374
python/clang/3.1/include/tgmath.h
Normal file
1374
python/clang/3.1/include/tgmath.h
Normal file
File diff suppressed because it is too large
Load Diff
225
python/clang/3.1/include/tmmintrin.h
Normal file
225
python/clang/3.1/include/tmmintrin.h
Normal file
@ -0,0 +1,225 @@
|
|||||||
|
/*===---- tmmintrin.h - SSSE3 intrinsics -----------------------------------===
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
|
* in the Software without restriction, including without limitation the rights
|
||||||
|
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
* copies of the Software, and to permit persons to whom the Software is
|
||||||
|
* furnished to do so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included in
|
||||||
|
* all copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
* THE SOFTWARE.
|
||||||
|
*
|
||||||
|
*===-----------------------------------------------------------------------===
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __TMMINTRIN_H
|
||||||
|
#define __TMMINTRIN_H
|
||||||
|
|
||||||
|
#ifndef __SSSE3__
|
||||||
|
#error "SSSE3 instruction set not enabled"
|
||||||
|
#else
|
||||||
|
|
||||||
|
#include <pmmintrin.h>
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_abs_pi8(__m64 a)
|
||||||
|
{
|
||||||
|
return (__m64)__builtin_ia32_pabsb((__v8qi)a);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_abs_epi8(__m128i a)
|
||||||
|
{
|
||||||
|
return (__m128i)__builtin_ia32_pabsb128((__v16qi)a);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_abs_pi16(__m64 a)
|
||||||
|
{
|
||||||
|
return (__m64)__builtin_ia32_pabsw((__v4hi)a);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_abs_epi16(__m128i a)
|
||||||
|
{
|
||||||
|
return (__m128i)__builtin_ia32_pabsw128((__v8hi)a);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_abs_pi32(__m64 a)
|
||||||
|
{
|
||||||
|
return (__m64)__builtin_ia32_pabsd((__v2si)a);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_abs_epi32(__m128i a)
|
||||||
|
{
|
||||||
|
return (__m128i)__builtin_ia32_pabsd128((__v4si)a);
|
||||||
|
}
|
||||||
|
|
||||||
|
#define _mm_alignr_epi8(a, b, n) __extension__ ({ \
|
||||||
|
__m128i __a = (a); \
|
||||||
|
__m128i __b = (b); \
|
||||||
|
(__m128i)__builtin_ia32_palignr128((__v16qi)__a, (__v16qi)__b, (n)); })
|
||||||
|
|
||||||
|
#define _mm_alignr_pi8(a, b, n) __extension__ ({ \
|
||||||
|
__m64 __a = (a); \
|
||||||
|
__m64 __b = (b); \
|
||||||
|
(__m64)__builtin_ia32_palignr((__v8qi)__a, (__v8qi)__b, (n)); })
|
||||||
|
|
||||||
|
static __inline__ __m128i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_hadd_epi16(__m128i a, __m128i b)
|
||||||
|
{
|
||||||
|
return (__m128i)__builtin_ia32_phaddw128((__v8hi)a, (__v8hi)b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_hadd_epi32(__m128i a, __m128i b)
|
||||||
|
{
|
||||||
|
return (__m128i)__builtin_ia32_phaddd128((__v4si)a, (__v4si)b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_hadd_pi16(__m64 a, __m64 b)
|
||||||
|
{
|
||||||
|
return (__m64)__builtin_ia32_phaddw((__v4hi)a, (__v4hi)b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_hadd_pi32(__m64 a, __m64 b)
|
||||||
|
{
|
||||||
|
return (__m64)__builtin_ia32_phaddd((__v2si)a, (__v2si)b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_hadds_epi16(__m128i a, __m128i b)
|
||||||
|
{
|
||||||
|
return (__m128i)__builtin_ia32_phaddsw128((__v8hi)a, (__v8hi)b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_hadds_pi16(__m64 a, __m64 b)
|
||||||
|
{
|
||||||
|
return (__m64)__builtin_ia32_phaddsw((__v4hi)a, (__v4hi)b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_hsub_epi16(__m128i a, __m128i b)
|
||||||
|
{
|
||||||
|
return (__m128i)__builtin_ia32_phsubw128((__v8hi)a, (__v8hi)b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_hsub_epi32(__m128i a, __m128i b)
|
||||||
|
{
|
||||||
|
return (__m128i)__builtin_ia32_phsubd128((__v4si)a, (__v4si)b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_hsub_pi16(__m64 a, __m64 b)
|
||||||
|
{
|
||||||
|
return (__m64)__builtin_ia32_phsubw((__v4hi)a, (__v4hi)b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_hsub_pi32(__m64 a, __m64 b)
|
||||||
|
{
|
||||||
|
return (__m64)__builtin_ia32_phsubd((__v2si)a, (__v2si)b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_hsubs_epi16(__m128i a, __m128i b)
|
||||||
|
{
|
||||||
|
return (__m128i)__builtin_ia32_phsubsw128((__v8hi)a, (__v8hi)b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_hsubs_pi16(__m64 a, __m64 b)
|
||||||
|
{
|
||||||
|
return (__m64)__builtin_ia32_phsubsw((__v4hi)a, (__v4hi)b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_maddubs_epi16(__m128i a, __m128i b)
|
||||||
|
{
|
||||||
|
return (__m128i)__builtin_ia32_pmaddubsw128((__v16qi)a, (__v16qi)b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_maddubs_pi16(__m64 a, __m64 b)
|
||||||
|
{
|
||||||
|
return (__m64)__builtin_ia32_pmaddubsw((__v8qi)a, (__v8qi)b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_mulhrs_epi16(__m128i a, __m128i b)
|
||||||
|
{
|
||||||
|
return (__m128i)__builtin_ia32_pmulhrsw128((__v8hi)a, (__v8hi)b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_mulhrs_pi16(__m64 a, __m64 b)
|
||||||
|
{
|
||||||
|
return (__m64)__builtin_ia32_pmulhrsw((__v4hi)a, (__v4hi)b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_shuffle_epi8(__m128i a, __m128i b)
|
||||||
|
{
|
||||||
|
return (__m128i)__builtin_ia32_pshufb128((__v16qi)a, (__v16qi)b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_shuffle_pi8(__m64 a, __m64 b)
|
||||||
|
{
|
||||||
|
return (__m64)__builtin_ia32_pshufb((__v8qi)a, (__v8qi)b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_sign_epi8(__m128i a, __m128i b)
|
||||||
|
{
|
||||||
|
return (__m128i)__builtin_ia32_psignb128((__v16qi)a, (__v16qi)b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_sign_epi16(__m128i a, __m128i b)
|
||||||
|
{
|
||||||
|
return (__m128i)__builtin_ia32_psignw128((__v8hi)a, (__v8hi)b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_sign_epi32(__m128i a, __m128i b)
|
||||||
|
{
|
||||||
|
return (__m128i)__builtin_ia32_psignd128((__v4si)a, (__v4si)b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_sign_pi8(__m64 a, __m64 b)
|
||||||
|
{
|
||||||
|
return (__m64)__builtin_ia32_psignb((__v8qi)a, (__v8qi)b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_sign_pi16(__m64 a, __m64 b)
|
||||||
|
{
|
||||||
|
return (__m64)__builtin_ia32_psignw((__v4hi)a, (__v4hi)b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_sign_pi32(__m64 a, __m64 b)
|
||||||
|
{
|
||||||
|
return (__m64)__builtin_ia32_psignd((__v2si)a, (__v2si)b);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /* __SSSE3__ */
|
||||||
|
|
||||||
|
#endif /* __TMMINTRIN_H */
|
124
python/clang/3.1/include/unwind.h
Normal file
124
python/clang/3.1/include/unwind.h
Normal file
@ -0,0 +1,124 @@
|
|||||||
|
/*===---- unwind.h - Stack unwinding ----------------------------------------===
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
|
* in the Software without restriction, including without limitation the rights
|
||||||
|
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
* copies of the Software, and to permit persons to whom the Software is
|
||||||
|
* furnished to do so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included in
|
||||||
|
* all copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
* THE SOFTWARE.
|
||||||
|
*
|
||||||
|
*===-----------------------------------------------------------------------===
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* See "Data Definitions for libgcc_s" in the Linux Standard Base.*/
|
||||||
|
|
||||||
|
#if __has_include_next(<unwind.h>)
|
||||||
|
/* Darwin and libunwind provide an unwind.h. If that's available, use
|
||||||
|
* it. libunwind wraps some of its definitions in #ifdef _GNU_SOURCE,
|
||||||
|
* so define that around the include.*/
|
||||||
|
# ifndef _GNU_SOURCE
|
||||||
|
# define _SHOULD_UNDEFINE_GNU_SOURCE
|
||||||
|
# define _GNU_SOURCE
|
||||||
|
# endif
|
||||||
|
// libunwind's unwind.h reflects the current visibility. However, Mozilla
|
||||||
|
// builds with -fvisibility=hidden and relies on gcc's unwind.h to reset the
|
||||||
|
// visibility to default and export its contents. gcc also allows users to
|
||||||
|
// override its override by #defining HIDE_EXPORTS (but note, this only obeys
|
||||||
|
// the user's -fvisibility setting; it doesn't hide any exports on its own). We
|
||||||
|
// imitate gcc's header here:
|
||||||
|
# ifdef HIDE_EXPORTS
|
||||||
|
# include_next <unwind.h>
|
||||||
|
# else
|
||||||
|
# pragma GCC visibility push(default)
|
||||||
|
# include_next <unwind.h>
|
||||||
|
# pragma GCC visibility pop
|
||||||
|
# endif
|
||||||
|
# ifdef _SHOULD_UNDEFINE_GNU_SOURCE
|
||||||
|
# undef _GNU_SOURCE
|
||||||
|
# undef _SHOULD_UNDEFINE_GNU_SOURCE
|
||||||
|
# endif
|
||||||
|
#else
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* It is a bit strange for a header to play with the visibility of the
|
||||||
|
symbols it declares, but this matches gcc's behavior and some programs
|
||||||
|
depend on it */
|
||||||
|
#pragma GCC visibility push(default)
|
||||||
|
|
||||||
|
struct _Unwind_Context;
|
||||||
|
typedef enum {
|
||||||
|
_URC_NO_REASON = 0,
|
||||||
|
_URC_FOREIGN_EXCEPTION_CAUGHT = 1,
|
||||||
|
|
||||||
|
_URC_FATAL_PHASE2_ERROR = 2,
|
||||||
|
_URC_FATAL_PHASE1_ERROR = 3,
|
||||||
|
_URC_NORMAL_STOP = 4,
|
||||||
|
|
||||||
|
_URC_END_OF_STACK = 5,
|
||||||
|
_URC_HANDLER_FOUND = 6,
|
||||||
|
_URC_INSTALL_CONTEXT = 7,
|
||||||
|
_URC_CONTINUE_UNWIND = 8
|
||||||
|
} _Unwind_Reason_Code;
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __arm__
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
_UVRSC_CORE = 0, /* integer register */
|
||||||
|
_UVRSC_VFP = 1, /* vfp */
|
||||||
|
_UVRSC_WMMXD = 3, /* Intel WMMX data register */
|
||||||
|
_UVRSC_WMMXC = 4 /* Intel WMMX control register */
|
||||||
|
} _Unwind_VRS_RegClass;
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
_UVRSD_UINT32 = 0,
|
||||||
|
_UVRSD_VFPX = 1,
|
||||||
|
_UVRSD_UINT64 = 3,
|
||||||
|
_UVRSD_FLOAT = 4,
|
||||||
|
_UVRSD_DOUBLE = 5
|
||||||
|
} _Unwind_VRS_DataRepresentation;
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
_UVRSR_OK = 0,
|
||||||
|
_UVRSR_NOT_IMPLEMENTED = 1,
|
||||||
|
_UVRSR_FAILED = 2
|
||||||
|
} _Unwind_VRS_Result;
|
||||||
|
|
||||||
|
_Unwind_VRS_Result _Unwind_VRS_Get(_Unwind_Context *context,
|
||||||
|
_Unwind_VRS_RegClass regclass,
|
||||||
|
uint32_t regno,
|
||||||
|
_Unwind_VRS_DataRepresentation representation,
|
||||||
|
void *valuep);
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
uintptr_t _Unwind_GetIP(struct _Unwind_Context* context);
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
typedef _Unwind_Reason_Code (*_Unwind_Trace_Fn)(struct _Unwind_Context*, void*);
|
||||||
|
_Unwind_Reason_Code _Unwind_Backtrace(_Unwind_Trace_Fn, void*);
|
||||||
|
|
||||||
|
#pragma GCC visibility pop
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
26
python/clang/3.1/include/varargs.h
Normal file
26
python/clang/3.1/include/varargs.h
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
/*===---- varargs.h - Variable argument handling -------------------------------------===
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
|
* in the Software without restriction, including without limitation the rights
|
||||||
|
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
* copies of the Software, and to permit persons to whom the Software is
|
||||||
|
* furnished to do so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included in
|
||||||
|
* all copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
* THE SOFTWARE.
|
||||||
|
*
|
||||||
|
*===-----------------------------------------------------------------------===
|
||||||
|
*/
|
||||||
|
#ifndef __VARARGS_H
|
||||||
|
#define __VARARGS_H
|
||||||
|
#error "Please use <stdarg.h> instead of <varargs.h>"
|
||||||
|
#endif
|
67
python/clang/3.1/include/wmmintrin.h
Normal file
67
python/clang/3.1/include/wmmintrin.h
Normal file
@ -0,0 +1,67 @@
|
|||||||
|
/*===---- wmmintrin.h - AES intrinsics ------------------------------------===
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
|
* in the Software without restriction, including without limitation the rights
|
||||||
|
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
* copies of the Software, and to permit persons to whom the Software is
|
||||||
|
* furnished to do so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included in
|
||||||
|
* all copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
* THE SOFTWARE.
|
||||||
|
*
|
||||||
|
*===-----------------------------------------------------------------------===
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef _WMMINTRIN_H
|
||||||
|
#define _WMMINTRIN_H
|
||||||
|
|
||||||
|
#if !defined (__AES__)
|
||||||
|
# error "AES instructions not enabled"
|
||||||
|
#else
|
||||||
|
|
||||||
|
#include <xmmintrin.h>
|
||||||
|
|
||||||
|
static __inline__ __m128i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_aesenc_si128(__m128i __V, __m128i __R)
|
||||||
|
{
|
||||||
|
return (__m128i)__builtin_ia32_aesenc128(__V, __R);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_aesenclast_si128(__m128i __V, __m128i __R)
|
||||||
|
{
|
||||||
|
return (__m128i)__builtin_ia32_aesenclast128(__V, __R);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_aesdec_si128(__m128i __V, __m128i __R)
|
||||||
|
{
|
||||||
|
return (__m128i)__builtin_ia32_aesdec128(__V, __R);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_aesdeclast_si128(__m128i __V, __m128i __R)
|
||||||
|
{
|
||||||
|
return (__m128i)__builtin_ia32_aesdeclast128(__V, __R);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128i __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_aesimc_si128(__m128i __V)
|
||||||
|
{
|
||||||
|
return (__m128i)__builtin_ia32_aesimc128(__V);
|
||||||
|
}
|
||||||
|
|
||||||
|
#define _mm_aeskeygenassist_si128(C, R) \
|
||||||
|
__builtin_ia32_aeskeygenassist128((C), (R))
|
||||||
|
|
||||||
|
#endif /* __AES__ */
|
||||||
|
#endif /* _WMMINTRIN_H */
|
55
python/clang/3.1/include/x86intrin.h
Normal file
55
python/clang/3.1/include/x86intrin.h
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
/*===---- x86intrin.h - X86 intrinsics -------------------------------------===
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
|
* in the Software without restriction, including without limitation the rights
|
||||||
|
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
* copies of the Software, and to permit persons to whom the Software is
|
||||||
|
* furnished to do so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included in
|
||||||
|
* all copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
* THE SOFTWARE.
|
||||||
|
*
|
||||||
|
*===-----------------------------------------------------------------------===
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __X86INTRIN_H
|
||||||
|
#define __X86INTRIN_H
|
||||||
|
|
||||||
|
#include <immintrin.h>
|
||||||
|
|
||||||
|
#ifdef __3dNOW__
|
||||||
|
#include <mm3dnow.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __BMI__
|
||||||
|
#include <bmiintrin.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __BMI2__
|
||||||
|
#include <bmi2intrin.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __LZCNT__
|
||||||
|
#include <lzcntintrin.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __POPCNT__
|
||||||
|
#include <popcntintrin.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __FMA4__
|
||||||
|
#include <fma4intrin.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// FIXME: SSE4A, XOP, LWP, ABM
|
||||||
|
|
||||||
|
#endif /* __X86INTRIN_H */
|
990
python/clang/3.1/include/xmmintrin.h
Normal file
990
python/clang/3.1/include/xmmintrin.h
Normal file
@ -0,0 +1,990 @@
|
|||||||
|
/*===---- xmmintrin.h - SSE intrinsics -------------------------------------===
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
|
* in the Software without restriction, including without limitation the rights
|
||||||
|
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
* copies of the Software, and to permit persons to whom the Software is
|
||||||
|
* furnished to do so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included in
|
||||||
|
* all copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
* THE SOFTWARE.
|
||||||
|
*
|
||||||
|
*===-----------------------------------------------------------------------===
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __XMMINTRIN_H
|
||||||
|
#define __XMMINTRIN_H
|
||||||
|
|
||||||
|
#ifndef __SSE__
|
||||||
|
#error "SSE instruction set not enabled"
|
||||||
|
#else
|
||||||
|
|
||||||
|
#include <mmintrin.h>
|
||||||
|
|
||||||
|
typedef int __v4si __attribute__((__vector_size__(16)));
|
||||||
|
typedef float __v4sf __attribute__((__vector_size__(16)));
|
||||||
|
typedef float __m128 __attribute__((__vector_size__(16)));
|
||||||
|
|
||||||
|
// This header should only be included in a hosted environment as it depends on
|
||||||
|
// a standard library to provide allocation routines.
|
||||||
|
#if __STDC_HOSTED__
|
||||||
|
#include <mm_malloc.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
static __inline__ __m128 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_add_ss(__m128 a, __m128 b)
|
||||||
|
{
|
||||||
|
a[0] += b[0];
|
||||||
|
return a;
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_add_ps(__m128 a, __m128 b)
|
||||||
|
{
|
||||||
|
return a + b;
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_sub_ss(__m128 a, __m128 b)
|
||||||
|
{
|
||||||
|
a[0] -= b[0];
|
||||||
|
return a;
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_sub_ps(__m128 a, __m128 b)
|
||||||
|
{
|
||||||
|
return a - b;
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_mul_ss(__m128 a, __m128 b)
|
||||||
|
{
|
||||||
|
a[0] *= b[0];
|
||||||
|
return a;
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_mul_ps(__m128 a, __m128 b)
|
||||||
|
{
|
||||||
|
return a * b;
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_div_ss(__m128 a, __m128 b)
|
||||||
|
{
|
||||||
|
a[0] /= b[0];
|
||||||
|
return a;
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_div_ps(__m128 a, __m128 b)
|
||||||
|
{
|
||||||
|
return a / b;
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_sqrt_ss(__m128 a)
|
||||||
|
{
|
||||||
|
return __builtin_ia32_sqrtss(a);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_sqrt_ps(__m128 a)
|
||||||
|
{
|
||||||
|
return __builtin_ia32_sqrtps(a);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_rcp_ss(__m128 a)
|
||||||
|
{
|
||||||
|
return __builtin_ia32_rcpss(a);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_rcp_ps(__m128 a)
|
||||||
|
{
|
||||||
|
return __builtin_ia32_rcpps(a);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_rsqrt_ss(__m128 a)
|
||||||
|
{
|
||||||
|
return __builtin_ia32_rsqrtss(a);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_rsqrt_ps(__m128 a)
|
||||||
|
{
|
||||||
|
return __builtin_ia32_rsqrtps(a);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_min_ss(__m128 a, __m128 b)
|
||||||
|
{
|
||||||
|
return __builtin_ia32_minss(a, b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_min_ps(__m128 a, __m128 b)
|
||||||
|
{
|
||||||
|
return __builtin_ia32_minps(a, b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_max_ss(__m128 a, __m128 b)
|
||||||
|
{
|
||||||
|
return __builtin_ia32_maxss(a, b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_max_ps(__m128 a, __m128 b)
|
||||||
|
{
|
||||||
|
return __builtin_ia32_maxps(a, b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_and_ps(__m128 a, __m128 b)
|
||||||
|
{
|
||||||
|
return (__m128)((__v4si)a & (__v4si)b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_andnot_ps(__m128 a, __m128 b)
|
||||||
|
{
|
||||||
|
return (__m128)(~(__v4si)a & (__v4si)b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_or_ps(__m128 a, __m128 b)
|
||||||
|
{
|
||||||
|
return (__m128)((__v4si)a | (__v4si)b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_xor_ps(__m128 a, __m128 b)
|
||||||
|
{
|
||||||
|
return (__m128)((__v4si)a ^ (__v4si)b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_cmpeq_ss(__m128 a, __m128 b)
|
||||||
|
{
|
||||||
|
return (__m128)__builtin_ia32_cmpss(a, b, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_cmpeq_ps(__m128 a, __m128 b)
|
||||||
|
{
|
||||||
|
return (__m128)__builtin_ia32_cmpps(a, b, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_cmplt_ss(__m128 a, __m128 b)
|
||||||
|
{
|
||||||
|
return (__m128)__builtin_ia32_cmpss(a, b, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_cmplt_ps(__m128 a, __m128 b)
|
||||||
|
{
|
||||||
|
return (__m128)__builtin_ia32_cmpps(a, b, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_cmple_ss(__m128 a, __m128 b)
|
||||||
|
{
|
||||||
|
return (__m128)__builtin_ia32_cmpss(a, b, 2);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_cmple_ps(__m128 a, __m128 b)
|
||||||
|
{
|
||||||
|
return (__m128)__builtin_ia32_cmpps(a, b, 2);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_cmpgt_ss(__m128 a, __m128 b)
|
||||||
|
{
|
||||||
|
return (__m128)__builtin_ia32_cmpss(b, a, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_cmpgt_ps(__m128 a, __m128 b)
|
||||||
|
{
|
||||||
|
return (__m128)__builtin_ia32_cmpps(b, a, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_cmpge_ss(__m128 a, __m128 b)
|
||||||
|
{
|
||||||
|
return (__m128)__builtin_ia32_cmpss(b, a, 2);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_cmpge_ps(__m128 a, __m128 b)
|
||||||
|
{
|
||||||
|
return (__m128)__builtin_ia32_cmpps(b, a, 2);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_cmpneq_ss(__m128 a, __m128 b)
|
||||||
|
{
|
||||||
|
return (__m128)__builtin_ia32_cmpss(a, b, 4);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_cmpneq_ps(__m128 a, __m128 b)
|
||||||
|
{
|
||||||
|
return (__m128)__builtin_ia32_cmpps(a, b, 4);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_cmpnlt_ss(__m128 a, __m128 b)
|
||||||
|
{
|
||||||
|
return (__m128)__builtin_ia32_cmpss(a, b, 5);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_cmpnlt_ps(__m128 a, __m128 b)
|
||||||
|
{
|
||||||
|
return (__m128)__builtin_ia32_cmpps(a, b, 5);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_cmpnle_ss(__m128 a, __m128 b)
|
||||||
|
{
|
||||||
|
return (__m128)__builtin_ia32_cmpss(a, b, 6);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_cmpnle_ps(__m128 a, __m128 b)
|
||||||
|
{
|
||||||
|
return (__m128)__builtin_ia32_cmpps(a, b, 6);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_cmpngt_ss(__m128 a, __m128 b)
|
||||||
|
{
|
||||||
|
return (__m128)__builtin_ia32_cmpss(b, a, 5);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_cmpngt_ps(__m128 a, __m128 b)
|
||||||
|
{
|
||||||
|
return (__m128)__builtin_ia32_cmpps(b, a, 5);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_cmpnge_ss(__m128 a, __m128 b)
|
||||||
|
{
|
||||||
|
return (__m128)__builtin_ia32_cmpss(b, a, 6);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_cmpnge_ps(__m128 a, __m128 b)
|
||||||
|
{
|
||||||
|
return (__m128)__builtin_ia32_cmpps(b, a, 6);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_cmpord_ss(__m128 a, __m128 b)
|
||||||
|
{
|
||||||
|
return (__m128)__builtin_ia32_cmpss(a, b, 7);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_cmpord_ps(__m128 a, __m128 b)
|
||||||
|
{
|
||||||
|
return (__m128)__builtin_ia32_cmpps(a, b, 7);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_cmpunord_ss(__m128 a, __m128 b)
|
||||||
|
{
|
||||||
|
return (__m128)__builtin_ia32_cmpss(a, b, 3);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_cmpunord_ps(__m128 a, __m128 b)
|
||||||
|
{
|
||||||
|
return (__m128)__builtin_ia32_cmpps(a, b, 3);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ int __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_comieq_ss(__m128 a, __m128 b)
|
||||||
|
{
|
||||||
|
return __builtin_ia32_comieq(a, b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ int __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_comilt_ss(__m128 a, __m128 b)
|
||||||
|
{
|
||||||
|
return __builtin_ia32_comilt(a, b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ int __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_comile_ss(__m128 a, __m128 b)
|
||||||
|
{
|
||||||
|
return __builtin_ia32_comile(a, b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ int __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_comigt_ss(__m128 a, __m128 b)
|
||||||
|
{
|
||||||
|
return __builtin_ia32_comigt(a, b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ int __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_comige_ss(__m128 a, __m128 b)
|
||||||
|
{
|
||||||
|
return __builtin_ia32_comige(a, b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ int __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_comineq_ss(__m128 a, __m128 b)
|
||||||
|
{
|
||||||
|
return __builtin_ia32_comineq(a, b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ int __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_ucomieq_ss(__m128 a, __m128 b)
|
||||||
|
{
|
||||||
|
return __builtin_ia32_ucomieq(a, b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ int __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_ucomilt_ss(__m128 a, __m128 b)
|
||||||
|
{
|
||||||
|
return __builtin_ia32_ucomilt(a, b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ int __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_ucomile_ss(__m128 a, __m128 b)
|
||||||
|
{
|
||||||
|
return __builtin_ia32_ucomile(a, b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ int __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_ucomigt_ss(__m128 a, __m128 b)
|
||||||
|
{
|
||||||
|
return __builtin_ia32_ucomigt(a, b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ int __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_ucomige_ss(__m128 a, __m128 b)
|
||||||
|
{
|
||||||
|
return __builtin_ia32_ucomige(a, b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ int __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_ucomineq_ss(__m128 a, __m128 b)
|
||||||
|
{
|
||||||
|
return __builtin_ia32_ucomineq(a, b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ int __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_cvtss_si32(__m128 a)
|
||||||
|
{
|
||||||
|
return __builtin_ia32_cvtss2si(a);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ int __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_cvt_ss2si(__m128 a)
|
||||||
|
{
|
||||||
|
return _mm_cvtss_si32(a);
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef __x86_64__
|
||||||
|
|
||||||
|
static __inline__ long long __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_cvtss_si64(__m128 a)
|
||||||
|
{
|
||||||
|
return __builtin_ia32_cvtss2si64(a);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_cvtps_pi32(__m128 a)
|
||||||
|
{
|
||||||
|
return (__m64)__builtin_ia32_cvtps2pi(a);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_cvt_ps2pi(__m128 a)
|
||||||
|
{
|
||||||
|
return _mm_cvtps_pi32(a);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ int __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_cvttss_si32(__m128 a)
|
||||||
|
{
|
||||||
|
return a[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ int __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_cvtt_ss2si(__m128 a)
|
||||||
|
{
|
||||||
|
return _mm_cvttss_si32(a);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ long long __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_cvttss_si64(__m128 a)
|
||||||
|
{
|
||||||
|
return a[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_cvttps_pi32(__m128 a)
|
||||||
|
{
|
||||||
|
return (__m64)__builtin_ia32_cvttps2pi(a);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_cvtt_ps2pi(__m128 a)
|
||||||
|
{
|
||||||
|
return _mm_cvttps_pi32(a);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_cvtsi32_ss(__m128 a, int b)
|
||||||
|
{
|
||||||
|
a[0] = b;
|
||||||
|
return a;
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_cvt_si2ss(__m128 a, int b)
|
||||||
|
{
|
||||||
|
return _mm_cvtsi32_ss(a, b);
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef __x86_64__
|
||||||
|
|
||||||
|
static __inline__ __m128 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_cvtsi64_ss(__m128 a, long long b)
|
||||||
|
{
|
||||||
|
a[0] = b;
|
||||||
|
return a;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
static __inline__ __m128 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_cvtpi32_ps(__m128 a, __m64 b)
|
||||||
|
{
|
||||||
|
return __builtin_ia32_cvtpi2ps(a, (__v2si)b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_cvt_pi2ps(__m128 a, __m64 b)
|
||||||
|
{
|
||||||
|
return _mm_cvtpi32_ps(a, b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ float __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_cvtss_f32(__m128 a)
|
||||||
|
{
|
||||||
|
return a[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_loadh_pi(__m128 a, const __m64 *p)
|
||||||
|
{
|
||||||
|
typedef float __mm_loadh_pi_v2f32 __attribute__((__vector_size__(8)));
|
||||||
|
struct __mm_loadh_pi_struct {
|
||||||
|
__mm_loadh_pi_v2f32 u;
|
||||||
|
} __attribute__((__packed__, __may_alias__));
|
||||||
|
__mm_loadh_pi_v2f32 b = ((struct __mm_loadh_pi_struct*)p)->u;
|
||||||
|
__m128 bb = __builtin_shufflevector(b, b, 0, 1, 0, 1);
|
||||||
|
return __builtin_shufflevector(a, bb, 0, 1, 4, 5);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_loadl_pi(__m128 a, const __m64 *p)
|
||||||
|
{
|
||||||
|
typedef float __mm_loadl_pi_v2f32 __attribute__((__vector_size__(8)));
|
||||||
|
struct __mm_loadl_pi_struct {
|
||||||
|
__mm_loadl_pi_v2f32 u;
|
||||||
|
} __attribute__((__packed__, __may_alias__));
|
||||||
|
__mm_loadl_pi_v2f32 b = ((struct __mm_loadl_pi_struct*)p)->u;
|
||||||
|
__m128 bb = __builtin_shufflevector(b, b, 0, 1, 0, 1);
|
||||||
|
return __builtin_shufflevector(a, bb, 4, 5, 2, 3);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_load_ss(const float *p)
|
||||||
|
{
|
||||||
|
struct __mm_load_ss_struct {
|
||||||
|
float u;
|
||||||
|
} __attribute__((__packed__, __may_alias__));
|
||||||
|
float u = ((struct __mm_load_ss_struct*)p)->u;
|
||||||
|
return (__m128){ u, 0, 0, 0 };
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_load1_ps(const float *p)
|
||||||
|
{
|
||||||
|
struct __mm_load1_ps_struct {
|
||||||
|
float u;
|
||||||
|
} __attribute__((__packed__, __may_alias__));
|
||||||
|
float u = ((struct __mm_load1_ps_struct*)p)->u;
|
||||||
|
return (__m128){ u, u, u, u };
|
||||||
|
}
|
||||||
|
|
||||||
|
#define _mm_load_ps1(p) _mm_load1_ps(p)
|
||||||
|
|
||||||
|
static __inline__ __m128 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_load_ps(const float *p)
|
||||||
|
{
|
||||||
|
return *(__m128*)p;
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_loadu_ps(const float *p)
|
||||||
|
{
|
||||||
|
struct __loadu_ps {
|
||||||
|
__m128 v;
|
||||||
|
} __attribute__((__packed__, __may_alias__));
|
||||||
|
return ((struct __loadu_ps*)p)->v;
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_loadr_ps(const float *p)
|
||||||
|
{
|
||||||
|
__m128 a = _mm_load_ps(p);
|
||||||
|
return __builtin_shufflevector(a, a, 3, 2, 1, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_set_ss(float w)
|
||||||
|
{
|
||||||
|
return (__m128){ w, 0, 0, 0 };
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_set1_ps(float w)
|
||||||
|
{
|
||||||
|
return (__m128){ w, w, w, w };
|
||||||
|
}
|
||||||
|
|
||||||
|
// Microsoft specific.
|
||||||
|
static __inline__ __m128 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_set_ps1(float w)
|
||||||
|
{
|
||||||
|
return _mm_set1_ps(w);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_set_ps(float z, float y, float x, float w)
|
||||||
|
{
|
||||||
|
return (__m128){ w, x, y, z };
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_setr_ps(float z, float y, float x, float w)
|
||||||
|
{
|
||||||
|
return (__m128){ z, y, x, w };
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128 __attribute__((__always_inline__))
|
||||||
|
_mm_setzero_ps(void)
|
||||||
|
{
|
||||||
|
return (__m128){ 0, 0, 0, 0 };
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ void __attribute__((__always_inline__))
|
||||||
|
_mm_storeh_pi(__m64 *p, __m128 a)
|
||||||
|
{
|
||||||
|
__builtin_ia32_storehps((__v2si *)p, a);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ void __attribute__((__always_inline__))
|
||||||
|
_mm_storel_pi(__m64 *p, __m128 a)
|
||||||
|
{
|
||||||
|
__builtin_ia32_storelps((__v2si *)p, a);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ void __attribute__((__always_inline__))
|
||||||
|
_mm_store_ss(float *p, __m128 a)
|
||||||
|
{
|
||||||
|
struct __mm_store_ss_struct {
|
||||||
|
float u;
|
||||||
|
} __attribute__((__packed__, __may_alias__));
|
||||||
|
((struct __mm_store_ss_struct*)p)->u = a[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ void __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_storeu_ps(float *p, __m128 a)
|
||||||
|
{
|
||||||
|
__builtin_ia32_storeups(p, a);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ void __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_store1_ps(float *p, __m128 a)
|
||||||
|
{
|
||||||
|
a = __builtin_shufflevector(a, a, 0, 0, 0, 0);
|
||||||
|
_mm_storeu_ps(p, a);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ void __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_store_ps1(float *p, __m128 a)
|
||||||
|
{
|
||||||
|
return _mm_store1_ps(p, a);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ void __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_store_ps(float *p, __m128 a)
|
||||||
|
{
|
||||||
|
*(__m128 *)p = a;
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ void __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_storer_ps(float *p, __m128 a)
|
||||||
|
{
|
||||||
|
a = __builtin_shufflevector(a, a, 3, 2, 1, 0);
|
||||||
|
_mm_store_ps(p, a);
|
||||||
|
}
|
||||||
|
|
||||||
|
#define _MM_HINT_T0 3
|
||||||
|
#define _MM_HINT_T1 2
|
||||||
|
#define _MM_HINT_T2 1
|
||||||
|
#define _MM_HINT_NTA 0
|
||||||
|
|
||||||
|
/* FIXME: We have to #define this because "sel" must be a constant integer, and
|
||||||
|
Sema doesn't do any form of constant propagation yet. */
|
||||||
|
|
||||||
|
#define _mm_prefetch(a, sel) (__builtin_prefetch((void *)(a), 0, (sel)))
|
||||||
|
|
||||||
|
static __inline__ void __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_stream_pi(__m64 *p, __m64 a)
|
||||||
|
{
|
||||||
|
__builtin_ia32_movntq(p, a);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ void __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_stream_ps(float *p, __m128 a)
|
||||||
|
{
|
||||||
|
__builtin_ia32_movntps(p, a);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ void __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_sfence(void)
|
||||||
|
{
|
||||||
|
__builtin_ia32_sfence();
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ int __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_extract_pi16(__m64 a, int n)
|
||||||
|
{
|
||||||
|
__v4hi b = (__v4hi)a;
|
||||||
|
return (unsigned short)b[n & 3];
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_insert_pi16(__m64 a, int d, int n)
|
||||||
|
{
|
||||||
|
__v4hi b = (__v4hi)a;
|
||||||
|
b[n & 3] = d;
|
||||||
|
return (__m64)b;
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_max_pi16(__m64 a, __m64 b)
|
||||||
|
{
|
||||||
|
return (__m64)__builtin_ia32_pmaxsw((__v4hi)a, (__v4hi)b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_max_pu8(__m64 a, __m64 b)
|
||||||
|
{
|
||||||
|
return (__m64)__builtin_ia32_pmaxub((__v8qi)a, (__v8qi)b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_min_pi16(__m64 a, __m64 b)
|
||||||
|
{
|
||||||
|
return (__m64)__builtin_ia32_pminsw((__v4hi)a, (__v4hi)b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_min_pu8(__m64 a, __m64 b)
|
||||||
|
{
|
||||||
|
return (__m64)__builtin_ia32_pminub((__v8qi)a, (__v8qi)b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ int __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_movemask_pi8(__m64 a)
|
||||||
|
{
|
||||||
|
return __builtin_ia32_pmovmskb((__v8qi)a);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_mulhi_pu16(__m64 a, __m64 b)
|
||||||
|
{
|
||||||
|
return (__m64)__builtin_ia32_pmulhuw((__v4hi)a, (__v4hi)b);
|
||||||
|
}
|
||||||
|
|
||||||
|
#define _mm_shuffle_pi16(a, n) __extension__ ({ \
|
||||||
|
__m64 __a = (a); \
|
||||||
|
(__m64)__builtin_ia32_pshufw((__v4hi)__a, (n)); })
|
||||||
|
|
||||||
|
static __inline__ void __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_maskmove_si64(__m64 d, __m64 n, char *p)
|
||||||
|
{
|
||||||
|
__builtin_ia32_maskmovq((__v8qi)d, (__v8qi)n, p);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_avg_pu8(__m64 a, __m64 b)
|
||||||
|
{
|
||||||
|
return (__m64)__builtin_ia32_pavgb((__v8qi)a, (__v8qi)b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_avg_pu16(__m64 a, __m64 b)
|
||||||
|
{
|
||||||
|
return (__m64)__builtin_ia32_pavgw((__v4hi)a, (__v4hi)b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_sad_pu8(__m64 a, __m64 b)
|
||||||
|
{
|
||||||
|
return (__m64)__builtin_ia32_psadbw((__v8qi)a, (__v8qi)b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ unsigned int __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_getcsr(void)
|
||||||
|
{
|
||||||
|
return __builtin_ia32_stmxcsr();
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ void __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_setcsr(unsigned int i)
|
||||||
|
{
|
||||||
|
__builtin_ia32_ldmxcsr(i);
|
||||||
|
}
|
||||||
|
|
||||||
|
#define _mm_shuffle_ps(a, b, mask) __extension__ ({ \
|
||||||
|
__m128 __a = (a); \
|
||||||
|
__m128 __b = (b); \
|
||||||
|
(__m128)__builtin_shufflevector((__v4sf)__a, (__v4sf)__b, \
|
||||||
|
(mask) & 0x3, ((mask) & 0xc) >> 2, \
|
||||||
|
(((mask) & 0x30) >> 4) + 4, \
|
||||||
|
(((mask) & 0xc0) >> 6) + 4); })
|
||||||
|
|
||||||
|
static __inline__ __m128 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_unpackhi_ps(__m128 a, __m128 b)
|
||||||
|
{
|
||||||
|
return __builtin_shufflevector(a, b, 2, 6, 3, 7);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_unpacklo_ps(__m128 a, __m128 b)
|
||||||
|
{
|
||||||
|
return __builtin_shufflevector(a, b, 0, 4, 1, 5);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_move_ss(__m128 a, __m128 b)
|
||||||
|
{
|
||||||
|
return __builtin_shufflevector(a, b, 4, 1, 2, 3);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_movehl_ps(__m128 a, __m128 b)
|
||||||
|
{
|
||||||
|
return __builtin_shufflevector(a, b, 6, 7, 2, 3);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_movelh_ps(__m128 a, __m128 b)
|
||||||
|
{
|
||||||
|
return __builtin_shufflevector(a, b, 0, 1, 4, 5);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_cvtpi16_ps(__m64 a)
|
||||||
|
{
|
||||||
|
__m64 b, c;
|
||||||
|
__m128 r;
|
||||||
|
|
||||||
|
b = _mm_setzero_si64();
|
||||||
|
b = _mm_cmpgt_pi16(b, a);
|
||||||
|
c = _mm_unpackhi_pi16(a, b);
|
||||||
|
r = _mm_setzero_ps();
|
||||||
|
r = _mm_cvtpi32_ps(r, c);
|
||||||
|
r = _mm_movelh_ps(r, r);
|
||||||
|
c = _mm_unpacklo_pi16(a, b);
|
||||||
|
r = _mm_cvtpi32_ps(r, c);
|
||||||
|
|
||||||
|
return r;
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_cvtpu16_ps(__m64 a)
|
||||||
|
{
|
||||||
|
__m64 b, c;
|
||||||
|
__m128 r;
|
||||||
|
|
||||||
|
b = _mm_setzero_si64();
|
||||||
|
c = _mm_unpackhi_pi16(a, b);
|
||||||
|
r = _mm_setzero_ps();
|
||||||
|
r = _mm_cvtpi32_ps(r, c);
|
||||||
|
r = _mm_movelh_ps(r, r);
|
||||||
|
c = _mm_unpacklo_pi16(a, b);
|
||||||
|
r = _mm_cvtpi32_ps(r, c);
|
||||||
|
|
||||||
|
return r;
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_cvtpi8_ps(__m64 a)
|
||||||
|
{
|
||||||
|
__m64 b;
|
||||||
|
|
||||||
|
b = _mm_setzero_si64();
|
||||||
|
b = _mm_cmpgt_pi8(b, a);
|
||||||
|
b = _mm_unpacklo_pi8(a, b);
|
||||||
|
|
||||||
|
return _mm_cvtpi16_ps(b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_cvtpu8_ps(__m64 a)
|
||||||
|
{
|
||||||
|
__m64 b;
|
||||||
|
|
||||||
|
b = _mm_setzero_si64();
|
||||||
|
b = _mm_unpacklo_pi8(a, b);
|
||||||
|
|
||||||
|
return _mm_cvtpi16_ps(b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_cvtpi32x2_ps(__m64 a, __m64 b)
|
||||||
|
{
|
||||||
|
__m128 c;
|
||||||
|
|
||||||
|
c = _mm_setzero_ps();
|
||||||
|
c = _mm_cvtpi32_ps(c, b);
|
||||||
|
c = _mm_movelh_ps(c, c);
|
||||||
|
|
||||||
|
return _mm_cvtpi32_ps(c, a);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_cvtps_pi16(__m128 a)
|
||||||
|
{
|
||||||
|
__m64 b, c;
|
||||||
|
|
||||||
|
b = _mm_cvtps_pi32(a);
|
||||||
|
a = _mm_movehl_ps(a, a);
|
||||||
|
c = _mm_cvtps_pi32(a);
|
||||||
|
|
||||||
|
return _mm_packs_pi16(b, c);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_cvtps_pi8(__m128 a)
|
||||||
|
{
|
||||||
|
__m64 b, c;
|
||||||
|
|
||||||
|
b = _mm_cvtps_pi16(a);
|
||||||
|
c = _mm_setzero_si64();
|
||||||
|
|
||||||
|
return _mm_packs_pi16(b, c);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ int __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_mm_movemask_ps(__m128 a)
|
||||||
|
{
|
||||||
|
return __builtin_ia32_movmskps(a);
|
||||||
|
}
|
||||||
|
|
||||||
|
#define _MM_SHUFFLE(z, y, x, w) (((z) << 6) | ((y) << 4) | ((x) << 2) | (w))
|
||||||
|
|
||||||
|
#define _MM_EXCEPT_INVALID (0x0001)
|
||||||
|
#define _MM_EXCEPT_DENORM (0x0002)
|
||||||
|
#define _MM_EXCEPT_DIV_ZERO (0x0004)
|
||||||
|
#define _MM_EXCEPT_OVERFLOW (0x0008)
|
||||||
|
#define _MM_EXCEPT_UNDERFLOW (0x0010)
|
||||||
|
#define _MM_EXCEPT_INEXACT (0x0020)
|
||||||
|
#define _MM_EXCEPT_MASK (0x003f)
|
||||||
|
|
||||||
|
#define _MM_MASK_INVALID (0x0080)
|
||||||
|
#define _MM_MASK_DENORM (0x0100)
|
||||||
|
#define _MM_MASK_DIV_ZERO (0x0200)
|
||||||
|
#define _MM_MASK_OVERFLOW (0x0400)
|
||||||
|
#define _MM_MASK_UNDERFLOW (0x0800)
|
||||||
|
#define _MM_MASK_INEXACT (0x1000)
|
||||||
|
#define _MM_MASK_MASK (0x1f80)
|
||||||
|
|
||||||
|
#define _MM_ROUND_NEAREST (0x0000)
|
||||||
|
#define _MM_ROUND_DOWN (0x2000)
|
||||||
|
#define _MM_ROUND_UP (0x4000)
|
||||||
|
#define _MM_ROUND_TOWARD_ZERO (0x6000)
|
||||||
|
#define _MM_ROUND_MASK (0x6000)
|
||||||
|
|
||||||
|
#define _MM_FLUSH_ZERO_MASK (0x8000)
|
||||||
|
#define _MM_FLUSH_ZERO_ON (0x8000)
|
||||||
|
#define _MM_FLUSH_ZERO_OFF (0x0000)
|
||||||
|
|
||||||
|
#define _MM_GET_EXCEPTION_MASK() (_mm_getcsr() & _MM_MASK_MASK)
|
||||||
|
#define _MM_GET_EXCEPTION_STATE() (_mm_getcsr() & _MM_EXCEPT_MASK)
|
||||||
|
#define _MM_GET_FLUSH_ZERO_MODE() (_mm_getcsr() & _MM_FLUSH_ZERO_MASK)
|
||||||
|
#define _MM_GET_ROUNDING_MODE() (_mm_getcsr() & _MM_ROUND_MASK)
|
||||||
|
|
||||||
|
#define _MM_SET_EXCEPTION_MASK(x) (_mm_setcsr((_mm_getcsr() & ~_MM_MASK_MASK) | (x)))
|
||||||
|
#define _MM_SET_EXCEPTION_STATE(x) (_mm_setcsr((_mm_getcsr() & ~_MM_EXCEPT_MASK) | (x)))
|
||||||
|
#define _MM_SET_FLUSH_ZERO_MODE(x) (_mm_setcsr((_mm_getcsr() & ~_MM_FLUSH_ZERO_MASK) | (x)))
|
||||||
|
#define _MM_SET_ROUNDING_MODE(x) (_mm_setcsr((_mm_getcsr() & ~_MM_ROUND_MASK) | (x)))
|
||||||
|
|
||||||
|
#define _MM_TRANSPOSE4_PS(row0, row1, row2, row3) \
|
||||||
|
do { \
|
||||||
|
__m128 tmp3, tmp2, tmp1, tmp0; \
|
||||||
|
tmp0 = _mm_unpacklo_ps((row0), (row1)); \
|
||||||
|
tmp2 = _mm_unpacklo_ps((row2), (row3)); \
|
||||||
|
tmp1 = _mm_unpackhi_ps((row0), (row1)); \
|
||||||
|
tmp3 = _mm_unpackhi_ps((row2), (row3)); \
|
||||||
|
(row0) = _mm_movelh_ps(tmp0, tmp2); \
|
||||||
|
(row1) = _mm_movehl_ps(tmp2, tmp0); \
|
||||||
|
(row2) = _mm_movelh_ps(tmp1, tmp3); \
|
||||||
|
(row3) = _mm_movehl_ps(tmp3, tmp1); \
|
||||||
|
} while (0)
|
||||||
|
|
||||||
|
/* Aliases for compatibility. */
|
||||||
|
#define _m_pextrw _mm_extract_pi16
|
||||||
|
#define _m_pinsrw _mm_insert_pi16
|
||||||
|
#define _m_pmaxsw _mm_max_pi16
|
||||||
|
#define _m_pmaxub _mm_max_pu8
|
||||||
|
#define _m_pminsw _mm_min_pi16
|
||||||
|
#define _m_pminub _mm_min_pu8
|
||||||
|
#define _m_pmovmskb _mm_movemask_pi8
|
||||||
|
#define _m_pmulhuw _mm_mulhi_pu16
|
||||||
|
#define _m_pshufw _mm_shuffle_pi16
|
||||||
|
#define _m_maskmovq _mm_maskmove_si64
|
||||||
|
#define _m_pavgb _mm_avg_pu8
|
||||||
|
#define _m_pavgw _mm_avg_pu16
|
||||||
|
#define _m_psadbw _mm_sad_pu8
|
||||||
|
#define _m_ _mm_
|
||||||
|
#define _m_ _mm_
|
||||||
|
|
||||||
|
/* Ugly hack for backwards-compatibility (compatible with gcc) */
|
||||||
|
#ifdef __SSE2__
|
||||||
|
#include <emmintrin.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* __SSE__ */
|
||||||
|
|
||||||
|
#endif /* __XMMINTRIN_H */
|
Loading…
Reference in New Issue
Block a user