xref: /freebsd/contrib/llvm-project/clang/lib/Headers/vpclmulqdqintrin.h (revision fe6060f10f634930ff71b7c50291ddc610da2475)
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) \
180b57cec5SDimitry Andric   (__m256i)__builtin_ia32_pclmulqdq256((__v4di)(__m256i)(A),  \
190b57cec5SDimitry Andric                                        (__v4di)(__m256i)(B),  \
200b57cec5SDimitry Andric                                        (char)(I))
210b57cec5SDimitry Andric 
22*fe6060f1SDimitry Andric #ifdef __AVX512FINTRIN_H
230b57cec5SDimitry Andric #define _mm512_clmulepi64_epi128(A, B, I) \
240b57cec5SDimitry Andric   (__m512i)__builtin_ia32_pclmulqdq512((__v8di)(__m512i)(A),  \
250b57cec5SDimitry Andric                                        (__v8di)(__m512i)(B),  \
260b57cec5SDimitry Andric                                        (char)(I))
27*fe6060f1SDimitry Andric #endif // __AVX512FINTRIN_H
280b57cec5SDimitry Andric 
290b57cec5SDimitry Andric #endif /* __VPCLMULQDQINTRIN_H */
300b57cec5SDimitry Andric 
31