PATH:
lib64
/
llvm17
/
lib
/
clang
/
17
/
include
/*===---- shaintrin.h - SHA intrinsics -------------------------------------=== * * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. * See https://llvm.org/LICENSE.txt for license information. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception * *===-----------------------------------------------------------------------=== */ #ifndef __IMMINTRIN_H #error "Never use <shaintrin.h> directly; include <immintrin.h> instead." #endif #ifndef __SHAINTRIN_H #define __SHAINTRIN_H /* Define the default attributes for the functions in this file. */ #define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("sha"), __min_vector_width__(128))) /// Performs four iterations of the inner loop of the SHA-1 message digest /// algorithm using the starting SHA-1 state (A, B, C, D) from the 128-bit /// vector of [4 x i32] in \a V1 and the next four 32-bit elements of the /// message from the 128-bit vector of [4 x i32] in \a V2. Note that the /// SHA-1 state variable E must have already been added to \a V2 /// (\c _mm_sha1nexte_epu32() can perform this step). Returns the updated /// SHA-1 state (A, B, C, D) as a 128-bit vector of [4 x i32]. /// /// The SHA-1 algorithm has an inner loop of 80 iterations, twenty each /// with a different combining function and rounding constant. This /// intrinsic performs four iterations using a combining function and /// rounding constant selected by \a M[1:0]. /// /// \headerfile <immintrin.h> /// /// \code /// __m128i _mm_sha1rnds4_epu32(__m128i V1, __m128i V2, const int M); /// \endcode /// /// This intrinsic corresponds to the \c SHA1RNDS4 instruction. /// /// \param V1 /// A 128-bit vector of [4 x i32] containing the initial SHA-1 state. /// \param V2 /// A 128-bit vector of [4 x i32] containing the next four elements of /// the message, plus SHA-1 state variable E. /// \param M /// An immediate value where bits [1:0] select among four possible /// combining functions and rounding constants (not specified here). /// \returns A 128-bit vector of [4 x i32] containing the updated SHA-1 state. #define _mm_sha1rnds4_epu32(V1, V2, M) \ __builtin_ia32_sha1rnds4((__v4si)(__m128i)(V1), (__v4si)(__m128i)(V2), (M)) /// Calculates the SHA-1 state variable E from the SHA-1 state variables in /// the 128-bit vector of [4 x i32] in \a __X, adds that to the next set of /// four message elements in the 128-bit vector of [4 x i32] in \a __Y, and /// returns the result. /// /// \headerfile <immintrin.h> /// /// This intrinsic corresponds to the \c SHA1NEXTE instruction. /// /// \param __X /// A 128-bit vector of [4 x i32] containing the current SHA-1 state. /// \param __Y /// A 128-bit vector of [4 x i32] containing the next four elements of the /// message. /// \returns A 128-bit vector of [4 x i32] containing the updated SHA-1 /// values. static __inline__ __m128i __DEFAULT_FN_ATTRS _mm_sha1nexte_epu32(__m128i __X, __m128i __Y) { return (__m128i)__builtin_ia32_sha1nexte((__v4si)__X, (__v4si)__Y); } /// Performs an intermediate calculation for deriving the next four SHA-1 /// message elements using previous message elements from the 128-bit /// vectors of [4 x i32] in \a __X and \a __Y, and returns the result. /// /// \headerfile <immintrin.h> /// /// This intrinsic corresponds to the \c SHA1MSG1 instruction. /// /// \param __X /// A 128-bit vector of [4 x i32] containing previous message elements. /// \param __Y /// A 128-bit vector of [4 x i32] containing previous message elements. /// \returns A 128-bit vector of [4 x i32] containing the derived SHA-1 /// elements. static __inline__ __m128i __DEFAULT_FN_ATTRS _mm_sha1msg1_epu32(__m128i __X, __m128i __Y) { return (__m128i)__builtin_ia32_sha1msg1((__v4si)__X, (__v4si)__Y); } /// Performs the final calculation for deriving the next four SHA-1 message /// elements using previous message elements from the 128-bit vectors of /// [4 x i32] in \a __X and \a __Y, and returns the result. /// /// \headerfile <immintrin.h> /// /// This intrinsic corresponds to the \c SHA1MSG2 instruction. /// /// \param __X /// A 128-bit vector of [4 x i32] containing an intermediate result. /// \param __Y /// A 128-bit vector of [4 x i32] containing previous message values. /// \returns A 128-bit vector of [4 x i32] containing the updated SHA-1 /// values. static __inline__ __m128i __DEFAULT_FN_ATTRS _mm_sha1msg2_epu32(__m128i __X, __m128i __Y) { return (__m128i)__builtin_ia32_sha1msg2((__v4si)__X, (__v4si)__Y); } /// Performs two rounds of SHA-256 operation using the following inputs: a /// starting SHA-256 state (C, D, G, H) from the 128-bit vector of /// [4 x i32] in \a __X; a starting SHA-256 state (A, B, E, F) from the /// 128-bit vector of [4 x i32] in \a __Y; and a pre-computed sum of the /// next two message elements (unsigned 32-bit integers) and corresponding /// rounding constants from the 128-bit vector of [4 x i32] in \a __Z. /// Returns the updated SHA-256 state (A, B, E, F) as a 128-bit vector of /// [4 x i32]. /// /// The SHA-256 algorithm has a core loop of 64 iterations. This intrinsic /// performs two of those iterations. /// /// \headerfile <immintrin.h> /// /// This intrinsic corresponds to the \c SHA256RNDS2 instruction. /// /// \param __X /// A 128-bit vector of [4 x i32] containing part of the initial SHA-256 /// state. /// \param __Y /// A 128-bit vector of [4 x i32] containing part of the initial SHA-256 /// state. /// \param __Z /// A 128-bit vector of [4 x i32] containing additional input to the /// SHA-256 operation. /// \returns A 128-bit vector of [4 x i32] containing the updated SHA-1 state. static __inline__ __m128i __DEFAULT_FN_ATTRS _mm_sha256rnds2_epu32(__m128i __X, __m128i __Y, __m128i __Z) { return (__m128i)__builtin_ia32_sha256rnds2((__v4si)__X, (__v4si)__Y, (__v4si)__Z); } /// Performs an intermediate calculation for deriving the next four SHA-256 /// message elements using previous message elements from the 128-bit /// vectors of [4 x i32] in \a __X and \a __Y, and returns the result. /// /// \headerfile <immintrin.h> /// /// This intrinsic corresponds to the \c SHA256MSG1 instruction. /// /// \param __X /// A 128-bit vector of [4 x i32] containing previous message elements. /// \param __Y /// A 128-bit vector of [4 x i32] containing previous message elements. /// \returns A 128-bit vector of [4 x i32] containing the updated SHA-256 /// values. static __inline__ __m128i __DEFAULT_FN_ATTRS _mm_sha256msg1_epu32(__m128i __X, __m128i __Y) { return (__m128i)__builtin_ia32_sha256msg1((__v4si)__X, (__v4si)__Y); } /// Performs the final calculation for deriving the next four SHA-256 message /// elements using previous message elements from the 128-bit vectors of /// [4 x i32] in \a __X and \a __Y, and returns the result. /// /// \headerfile <immintrin.h> /// /// This intrinsic corresponds to the \c SHA256MSG2 instruction. /// /// \param __X /// A 128-bit vector of [4 x i32] containing an intermediate result. /// \param __Y /// A 128-bit vector of [4 x i32] containing previous message values. /// \returns A 128-bit vector of [4 x i32] containing the updated SHA-256 /// values. static __inline__ __m128i __DEFAULT_FN_ATTRS _mm_sha256msg2_epu32(__m128i __X, __m128i __Y) { return (__m128i)__builtin_ia32_sha256msg2((__v4si)__X, (__v4si)__Y); } #undef __DEFAULT_FN_ATTRS #endif /* __SHAINTRIN_H */
[+]
..
[-] riscv_ntlh.h
[edit]
[-] avx512vlbitalgintrin.h
[edit]
[-] avxifmaintrin.h
[edit]
[-] mm_malloc.h
[edit]
[-] avx512vlbf16intrin.h
[edit]
[-] mwaitxintrin.h
[edit]
[-] adxintrin.h
[edit]
[-] arm_cmse.h
[edit]
[-] __clang_cuda_intrinsics.h
[edit]
[-] module.modulemap
[edit]
[-] crc32intrin.h
[edit]
[+]
cuda_wrappers
[-] msa.h
[edit]
[-] __clang_hip_stdlib.h
[edit]
[-] arm_acle.h
[edit]
[-] arm_neon_sve_bridge.h
[edit]
[-] xsaveintrin.h
[edit]
[-] velintrin_gen.h
[edit]
[-] stdatomic.h
[edit]
[-] hvx_hexagon_protos.h
[edit]
[-] uintrintrin.h
[edit]
[-] fxsrintrin.h
[edit]
[-] sha512intrin.h
[edit]
[-] __clang_cuda_texture_intrinsics.h
[edit]
[-] iso646.h
[edit]
[-] unwind.h
[edit]
[-] avx512vlbwintrin.h
[edit]
[-] avxvnniint8intrin.h
[edit]
[-] avx512erintrin.h
[edit]
[-] avxvnniintrin.h
[edit]
[-] ia32intrin.h
[edit]
[-] rdseedintrin.h
[edit]
[-] prfchiintrin.h
[edit]
[-] amxcomplexintrin.h
[edit]
[-] clflushoptintrin.h
[edit]
[-] htmxlintrin.h
[edit]
[-] avx512fintrin.h
[edit]
[-] gfniintrin.h
[edit]
[-] arm_cde.h
[edit]
[+]
ppc_wrappers
[-] amxfp16intrin.h
[edit]
[-] velintrin_approx.h
[edit]
[-] avx512pfintrin.h
[edit]
[-] stdarg.h
[edit]
[-] cmpccxaddintrin.h
[edit]
[-] avx512vlintrin.h
[edit]
[-] __clang_hip_math.h
[edit]
[-] vecintrin.h
[edit]
[-] xtestintrin.h
[edit]
[-] __wmmintrin_aes.h
[edit]
[-] arm_neon.h
[edit]
[-] immintrin.h
[edit]
[-] ammintrin.h
[edit]
[-] waitpkgintrin.h
[edit]
[-] vpclmulqdqintrin.h
[edit]
[-] fmaintrin.h
[edit]
[-] tsxldtrkintrin.h
[edit]
[-] prfchwintrin.h
[edit]
[-] avx512bitalgintrin.h
[edit]
[-] bmiintrin.h
[edit]
[-] __wmmintrin_pclmul.h
[edit]
[-] htmintrin.h
[edit]
[-] mm3dnow.h
[edit]
[-] __clang_cuda_builtin_vars.h
[edit]
[-] __clang_hip_runtime_wrapper.h
[edit]
[-] stdbool.h
[edit]
[-] altivec.h
[edit]
[-] wbnoinvdintrin.h
[edit]
[-] keylockerintrin.h
[edit]
[-] tgmath.h
[edit]
[-] hexagon_circ_brev_intrinsics.h
[edit]
[-] x86intrin.h
[edit]
[-] pkuintrin.h
[edit]
[-] avx512vbmivlintrin.h
[edit]
[-] avxneconvertintrin.h
[edit]
[-] __clang_hip_cmath.h
[edit]
[-] sgxintrin.h
[edit]
[-] f16cintrin.h
[edit]
[-] opencl-c-base.h
[edit]
[-] cpuid.h
[edit]
[-] raointintrin.h
[edit]
[-] builtins.h
[edit]
[-] emmintrin.h
[edit]
[-] smmintrin.h
[edit]
[-] vaesintrin.h
[edit]
[-] larchintrin.h
[edit]
[-] avx512ifmaintrin.h
[edit]
[-] intrin.h
[edit]
[-] avx512vlvp2intersectintrin.h
[edit]
[-] fma4intrin.h
[edit]
[-] pmmintrin.h
[edit]
[-] __clang_hip_libdevice_declares.h
[edit]
[-] limits.h
[edit]
[-] clwbintrin.h
[edit]
[-] rtmintrin.h
[edit]
[-] mmintrin.h
[edit]
[-] stddef.h
[edit]
[-] invpcidintrin.h
[edit]
[-] avx512vp2intersectintrin.h
[edit]
[-] cet.h
[edit]
[-] xopintrin.h
[edit]
[-] avx512vlvnniintrin.h
[edit]
[-] avx512vlfp16intrin.h
[edit]
[-] stdint.h
[edit]
[-] arm64intr.h
[edit]
[-] sm4intrin.h
[edit]
[-] avx512vnniintrin.h
[edit]
[-] avx2intrin.h
[edit]
[-] movdirintrin.h
[edit]
[-] tbmintrin.h
[edit]
[-] arm_mve.h
[edit]
[-] avx512ifmavlintrin.h
[edit]
[-] amxintrin.h
[edit]
[-] opencl-c.h
[edit]
[-] stdalign.h
[edit]
[-] __clang_cuda_device_functions.h
[edit]
[-] pconfigintrin.h
[edit]
[-] avx512fp16intrin.h
[edit]
[-] inttypes.h
[edit]
[-] arm_bf16.h
[edit]
[-] __clang_cuda_math_forward_declares.h
[edit]
[-] vadefs.h
[edit]
[-] shaintrin.h
[edit]
[-] hexagon_protos.h
[edit]
[-] ptwriteintrin.h
[edit]
[-] xsaveoptintrin.h
[edit]
[-] enqcmdintrin.h
[edit]
[-] x86gprintrin.h
[edit]
[-] tmmintrin.h
[edit]
[-] stdnoreturn.h
[edit]
[-] avx512bf16intrin.h
[edit]
[-] varargs.h
[edit]
[-] s390intrin.h
[edit]
[-] avx512vbmiintrin.h
[edit]
[+]
openmp_wrappers
[-] wmmintrin.h
[edit]
[-] __clang_cuda_cmath.h
[edit]
[-] clzerointrin.h
[edit]
[-] xsavesintrin.h
[edit]
[-] __clang_cuda_libdevice_declares.h
[edit]
[-] nmmintrin.h
[edit]
[-] wasm_simd128.h
[edit]
[-] xsavecintrin.h
[edit]
[-] avx512dqintrin.h
[edit]
[-] lwpintrin.h
[edit]
[-] serializeintrin.h
[edit]
[-] arm_sme_draft_spec_subject_to_change.h
[edit]
[-] avxintrin.h
[edit]
[-] __stddef_max_align_t.h
[edit]
[-] sm3intrin.h
[edit]
[-] velintrin.h
[edit]
[-] __clang_cuda_complex_builtins.h
[edit]
[-] armintr.h
[edit]
[-] avx512cdintrin.h
[edit]
[-] float.h
[edit]
[-] avx512vbmi2intrin.h
[edit]
[-] lzcntintrin.h
[edit]
[-] sifive_vector.h
[edit]
[-] rdpruintrin.h
[edit]
[-] arm_sve.h
[edit]
[-] avx512vpopcntdqintrin.h
[edit]
[-] xmmintrin.h
[edit]
[-] hresetintrin.h
[edit]
[-] bmi2intrin.h
[edit]
[-] hexagon_types.h
[edit]
[-] avx512bwintrin.h
[edit]
[-] cetintrin.h
[edit]
[-] __clang_cuda_math.h
[edit]
[-] avx512vlvbmi2intrin.h
[edit]
[-] arm_fp16.h
[edit]
[-] avx512vpopcntdqvlintrin.h
[edit]
[-] avxvnniint16intrin.h
[edit]
[+]
llvm_libc_wrappers
[-] __clang_cuda_runtime_wrapper.h
[edit]
[-] cldemoteintrin.h
[edit]
[-] avx512vldqintrin.h
[edit]
[-] avx512vlcdintrin.h
[edit]
[-] popcntintrin.h
[edit]