10b57cec5SDimitry Andric /*===------------ vpclmulqdqintrin.h - VPCLMULQDQ intrinsics ---------------=== 20b57cec5SDimitry Andric * 30b57cec5SDimitry Andric * 40b57cec5SDimitry Andric * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 50b57cec5SDimitry Andric * See https://llvm.org/LICENSE.txt for license information. 60b57cec5SDimitry Andric * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 70b57cec5SDimitry Andric * 80b57cec5SDimitry Andric *===-----------------------------------------------------------------------=== 90b57cec5SDimitry Andric */ 100b57cec5SDimitry Andric #ifndef __IMMINTRIN_H 110b57cec5SDimitry Andric #error "Never use <vpclmulqdqintrin.h> directly; include <immintrin.h> instead." 120b57cec5SDimitry Andric #endif 130b57cec5SDimitry Andric 140b57cec5SDimitry Andric #ifndef __VPCLMULQDQINTRIN_H 150b57cec5SDimitry Andric #define __VPCLMULQDQINTRIN_H 160b57cec5SDimitry Andric 170b57cec5SDimitry Andric #define _mm256_clmulepi64_epi128(A, B, I) \ 18*349cc55cSDimitry Andric ((__m256i)__builtin_ia32_pclmulqdq256((__v4di)(__m256i)(A), \ 190b57cec5SDimitry Andric (__v4di)(__m256i)(B), \ 20*349cc55cSDimitry Andric (char)(I))) 210b57cec5SDimitry Andric 22fe6060f1SDimitry Andric #ifdef __AVX512FINTRIN_H 230b57cec5SDimitry Andric #define _mm512_clmulepi64_epi128(A, B, I) \ 24*349cc55cSDimitry Andric ((__m512i)__builtin_ia32_pclmulqdq512((__v8di)(__m512i)(A), \ 250b57cec5SDimitry Andric (__v8di)(__m512i)(B), \ 26*349cc55cSDimitry Andric (char)(I))) 27fe6060f1SDimitry Andric #endif // __AVX512FINTRIN_H 280b57cec5SDimitry Andric 290b57cec5SDimitry Andric #endif /* __VPCLMULQDQINTRIN_H */ 300b57cec5SDimitry Andric 31