13043175274899e086c8664fe64c8fb4b9eacb733Douglas Gregor/*===---- __wmmintrin_pclmul.h - AES intrinsics ----------------------------=== 23043175274899e086c8664fe64c8fb4b9eacb733Douglas Gregor * 33043175274899e086c8664fe64c8fb4b9eacb733Douglas Gregor * Permission is hereby granted, free of charge, to any person obtaining a copy 43043175274899e086c8664fe64c8fb4b9eacb733Douglas Gregor * of this software and associated documentation files (the "Software"), to deal 53043175274899e086c8664fe64c8fb4b9eacb733Douglas Gregor * in the Software without restriction, including without limitation the rights 63043175274899e086c8664fe64c8fb4b9eacb733Douglas Gregor * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 73043175274899e086c8664fe64c8fb4b9eacb733Douglas Gregor * copies of the Software, and to permit persons to whom the Software is 83043175274899e086c8664fe64c8fb4b9eacb733Douglas Gregor * furnished to do so, subject to the following conditions: 93043175274899e086c8664fe64c8fb4b9eacb733Douglas Gregor * 103043175274899e086c8664fe64c8fb4b9eacb733Douglas Gregor * The above copyright notice and this permission notice shall be included in 113043175274899e086c8664fe64c8fb4b9eacb733Douglas Gregor * all copies or substantial portions of the Software. 123043175274899e086c8664fe64c8fb4b9eacb733Douglas Gregor * 133043175274899e086c8664fe64c8fb4b9eacb733Douglas Gregor * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 143043175274899e086c8664fe64c8fb4b9eacb733Douglas Gregor * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 153043175274899e086c8664fe64c8fb4b9eacb733Douglas Gregor * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 163043175274899e086c8664fe64c8fb4b9eacb733Douglas Gregor * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 173043175274899e086c8664fe64c8fb4b9eacb733Douglas Gregor * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 183043175274899e086c8664fe64c8fb4b9eacb733Douglas Gregor * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 193043175274899e086c8664fe64c8fb4b9eacb733Douglas Gregor * THE SOFTWARE. 203043175274899e086c8664fe64c8fb4b9eacb733Douglas Gregor * 213043175274899e086c8664fe64c8fb4b9eacb733Douglas Gregor *===-----------------------------------------------------------------------=== 223043175274899e086c8664fe64c8fb4b9eacb733Douglas Gregor */ 233043175274899e086c8664fe64c8fb4b9eacb733Douglas Gregor#ifndef _WMMINTRIN_PCLMUL_H 243043175274899e086c8664fe64c8fb4b9eacb733Douglas Gregor#define _WMMINTRIN_PCLMUL_H 253043175274899e086c8664fe64c8fb4b9eacb733Douglas Gregor 263043175274899e086c8664fe64c8fb4b9eacb733Douglas Gregor#if !defined (__PCLMUL__) 273043175274899e086c8664fe64c8fb4b9eacb733Douglas Gregor# error "PCLMUL instruction is not enabled" 283043175274899e086c8664fe64c8fb4b9eacb733Douglas Gregor#else 293043175274899e086c8664fe64c8fb4b9eacb733Douglas Gregor#define _mm_clmulepi64_si128(__X, __Y, __I) \ 303043175274899e086c8664fe64c8fb4b9eacb733Douglas Gregor ((__m128i)__builtin_ia32_pclmulqdq128((__v2di)(__m128i)(__X), \ 313043175274899e086c8664fe64c8fb4b9eacb733Douglas Gregor (__v2di)(__m128i)(__Y), (char)(__I))) 323043175274899e086c8664fe64c8fb4b9eacb733Douglas Gregor#endif 333043175274899e086c8664fe64c8fb4b9eacb733Douglas Gregor 343043175274899e086c8664fe64c8fb4b9eacb733Douglas Gregor#endif /* _WMMINTRIN_PCLMUL_H */ 35