xref: /aosp_15_r20/prebuilts/clang-tools/linux-x86/clang-headers/vpclmulqdqintrin.h (revision bed243d3d9cd544cfb038bfa7be843dedc6e6bf7)
1*bed243d3SAndroid Build Coastguard Worker /*===------------ vpclmulqdqintrin.h - VPCLMULQDQ intrinsics ---------------===
2*bed243d3SAndroid Build Coastguard Worker  *
3*bed243d3SAndroid Build Coastguard Worker  *
4*bed243d3SAndroid Build Coastguard Worker  * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
5*bed243d3SAndroid Build Coastguard Worker  * See https://llvm.org/LICENSE.txt for license information.
6*bed243d3SAndroid Build Coastguard Worker  * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7*bed243d3SAndroid Build Coastguard Worker  *
8*bed243d3SAndroid Build Coastguard Worker  *===-----------------------------------------------------------------------===
9*bed243d3SAndroid Build Coastguard Worker  */
10*bed243d3SAndroid Build Coastguard Worker #ifndef __IMMINTRIN_H
11*bed243d3SAndroid Build Coastguard Worker #error "Never use <vpclmulqdqintrin.h> directly; include <immintrin.h> instead."
12*bed243d3SAndroid Build Coastguard Worker #endif
13*bed243d3SAndroid Build Coastguard Worker 
14*bed243d3SAndroid Build Coastguard Worker #ifndef __VPCLMULQDQINTRIN_H
15*bed243d3SAndroid Build Coastguard Worker #define __VPCLMULQDQINTRIN_H
16*bed243d3SAndroid Build Coastguard Worker 
17*bed243d3SAndroid Build Coastguard Worker #define _mm256_clmulepi64_epi128(A, B, I) \
18*bed243d3SAndroid Build Coastguard Worker   ((__m256i)__builtin_ia32_pclmulqdq256((__v4di)(__m256i)(A),  \
19*bed243d3SAndroid Build Coastguard Worker                                         (__v4di)(__m256i)(B),  \
20*bed243d3SAndroid Build Coastguard Worker                                         (char)(I)))
21*bed243d3SAndroid Build Coastguard Worker 
22*bed243d3SAndroid Build Coastguard Worker #ifdef __AVX512FINTRIN_H
23*bed243d3SAndroid Build Coastguard Worker #define _mm512_clmulepi64_epi128(A, B, I) \
24*bed243d3SAndroid Build Coastguard Worker   ((__m512i)__builtin_ia32_pclmulqdq512((__v8di)(__m512i)(A),  \
25*bed243d3SAndroid Build Coastguard Worker                                         (__v8di)(__m512i)(B),  \
26*bed243d3SAndroid Build Coastguard Worker                                         (char)(I)))
27*bed243d3SAndroid Build Coastguard Worker #endif // __AVX512FINTRIN_H
28*bed243d3SAndroid Build Coastguard Worker 
29*bed243d3SAndroid Build Coastguard Worker #endif /* __VPCLMULQDQINTRIN_H */
30*bed243d3SAndroid Build Coastguard Worker 
31