Path: blob/main/contrib/llvm-project/clang/lib/Headers/__wmmintrin_pclmul.h
35233 views
/*===---- __wmmintrin_pclmul.h - PCMUL intrinsics ---------------------------===1*2* Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.3* See https://llvm.org/LICENSE.txt for license information.4* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception5*6*===-----------------------------------------------------------------------===7*/89#ifndef __WMMINTRIN_H10#error "Never use <__wmmintrin_pclmul.h> directly; include <wmmintrin.h> instead."11#endif1213#ifndef __WMMINTRIN_PCLMUL_H14#define __WMMINTRIN_PCLMUL_H1516/// Multiplies two 64-bit integer values, which are selected from source17/// operands using the immediate-value operand. The multiplication is a18/// carry-less multiplication, and the 128-bit integer product is stored in19/// the destination.20///21/// \headerfile <x86intrin.h>22///23/// \code24/// __m128i _mm_clmulepi64_si128(__m128i X, __m128i Y, const int I);25/// \endcode26///27/// This intrinsic corresponds to the <c> VPCLMULQDQ </c> instruction.28///29/// \param X30/// A 128-bit vector of [2 x i64] containing one of the source operands.31/// \param Y32/// A 128-bit vector of [2 x i64] containing one of the source operands.33/// \param I34/// An immediate value specifying which 64-bit values to select from the35/// operands. Bit 0 is used to select a value from operand \a X, and bit36/// 4 is used to select a value from operand \a Y: \n37/// Bit[0]=0 indicates that bits[63:0] of operand \a X are used. \n38/// Bit[0]=1 indicates that bits[127:64] of operand \a X are used. \n39/// Bit[4]=0 indicates that bits[63:0] of operand \a Y are used. \n40/// Bit[4]=1 indicates that bits[127:64] of operand \a Y are used.41/// \returns The 128-bit integer vector containing the result of the carry-less42/// multiplication of the selected 64-bit values.43#define _mm_clmulepi64_si128(X, Y, I) \44((__m128i)__builtin_ia32_pclmulqdq128((__v2di)(__m128i)(X), \45(__v2di)(__m128i)(Y), (char)(I)))4647#endif /* __WMMINTRIN_PCLMUL_H */484950