PATH:
lib64
/
llvm17
/
lib
/
clang
/
17
/
include
/*===--------------- sha512intrin.h - SHA512 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 <sha512intrin.h> directly; include <immintrin.h> instead." #endif // __IMMINTRIN_H #ifndef __SHA512INTRIN_H #define __SHA512INTRIN_H #define __DEFAULT_FN_ATTRS256 \ __attribute__((__always_inline__, __nodebug__, __target__("sha512"), \ __min_vector_width__(256))) /// This intrinisc is one of the two SHA512 message scheduling instructions. /// The intrinsic performs an intermediate calculation for the next four /// SHA512 message qwords. The calculated results are stored in \a dst. /// /// \headerfile <immintrin.h> /// /// \code /// __m256i _mm256_sha512msg1_epi64(__m256i __A, __m128i __B) /// \endcode /// /// This intrinsic corresponds to the \c VSHA512MSG1 instruction. /// /// \param __A /// A 256-bit vector of [4 x long long]. /// \param __B /// A 128-bit vector of [2 x long long]. /// \returns /// A 256-bit vector of [4 x long long]. /// /// \code{.operation} /// DEFINE ROR64(qword, n) { /// count := n % 64 /// dest := (qword >> count) | (qword << (64 - count)) /// RETURN dest /// } /// DEFINE SHR64(qword, n) { /// RETURN qword >> n /// } /// DEFINE s0(qword): /// RETURN ROR64(qword,1) ^ ROR64(qword, 8) ^ SHR64(qword, 7) /// } /// W[4] := __B.qword[0] /// W[3] := __A.qword[3] /// W[2] := __A.qword[2] /// W[1] := __A.qword[1] /// W[0] := __A.qword[0] /// dst.qword[3] := W[3] + s0(W[4]) /// dst.qword[2] := W[2] + s0(W[3]) /// dst.qword[1] := W[1] + s0(W[2]) /// dst.qword[0] := W[0] + s0(W[1]) /// dst[MAX:256] := 0 /// \endcode static __inline__ __m256i __DEFAULT_FN_ATTRS256 _mm256_sha512msg1_epi64(__m256i __A, __m128i __B) { return (__m256i)__builtin_ia32_vsha512msg1((__v4du)__A, (__v2du)__B); } /// This intrinisc is one of the two SHA512 message scheduling instructions. /// The intrinsic performs the final calculation for the next four SHA512 /// message qwords. The calculated results are stored in \a dst. /// /// \headerfile <immintrin.h> /// /// \code /// __m256i _mm256_sha512msg2_epi64(__m256i __A, __m256i __B) /// \endcode /// /// This intrinsic corresponds to the \c VSHA512MSG2 instruction. /// /// \param __A /// A 256-bit vector of [4 x long long]. /// \param __B /// A 256-bit vector of [4 x long long]. /// \returns /// A 256-bit vector of [4 x long long]. /// /// \code{.operation} /// DEFINE ROR64(qword, n) { /// count := n % 64 /// dest := (qword >> count) | (qword << (64 - count)) /// RETURN dest /// } /// DEFINE SHR64(qword, n) { /// RETURN qword >> n /// } /// DEFINE s1(qword) { /// RETURN ROR64(qword,19) ^ ROR64(qword, 61) ^ SHR64(qword, 6) /// } /// W[14] := __B.qword[2] /// W[15] := __B.qword[3] /// W[16] := __A.qword[0] + s1(W[14]) /// W[17] := __A.qword[1] + s1(W[15]) /// W[18] := __A.qword[2] + s1(W[16]) /// W[19] := __A.qword[3] + s1(W[17]) /// dst.qword[3] := W[19] /// dst.qword[2] := W[18] /// dst.qword[1] := W[17] /// dst.qword[0] := W[16] /// dst[MAX:256] := 0 /// \endcode static __inline__ __m256i __DEFAULT_FN_ATTRS256 _mm256_sha512msg2_epi64(__m256i __A, __m256i __B) { return (__m256i)__builtin_ia32_vsha512msg2((__v4du)__A, (__v4du)__B); } /// This intrinisc performs two rounds of SHA512 operation using initial SHA512 /// state (C,D,G,H) from \a __A, an initial SHA512 state (A,B,E,F) from /// \a __A, and a pre-computed sum of the next two round message qwords and /// the corresponding round constants from \a __C (only the two lower qwords /// of the third operand). The updated SHA512 state (A,B,E,F) is written to /// \a __A, and \a __A can be used as the updated state (C,D,G,H) in later /// rounds. /// /// \headerfile <immintrin.h> /// /// \code /// __m256i _mm256_sha512rnds2_epi64(__m256i __A, __m256i __B, __m128i __C) /// \endcode /// /// This intrinsic corresponds to the \c VSHA512RNDS2 instruction. /// /// \param __A /// A 256-bit vector of [4 x long long]. /// \param __B /// A 256-bit vector of [4 x long long]. /// \param __C /// A 128-bit vector of [2 x long long]. /// \returns /// A 256-bit vector of [4 x long long]. /// /// \code{.operation} /// DEFINE ROR64(qword, n) { /// count := n % 64 /// dest := (qword >> count) | (qword << (64 - count)) /// RETURN dest /// } /// DEFINE SHR64(qword, n) { /// RETURN qword >> n /// } /// DEFINE cap_sigma0(qword) { /// RETURN ROR64(qword,28) ^ ROR64(qword, 34) ^ ROR64(qword, 39) /// } /// DEFINE cap_sigma1(qword) { /// RETURN ROR64(qword,14) ^ ROR64(qword, 18) ^ ROR64(qword, 41) /// } /// DEFINE MAJ(a,b,c) { /// RETURN (a & b) ^ (a & c) ^ (b & c) /// } /// DEFINE CH(e,f,g) { /// RETURN (e & f) ^ (g & ~e) /// } /// A[0] := __B.qword[3] /// B[0] := __B.qword[2] /// C[0] := __C.qword[3] /// D[0] := __C.qword[2] /// E[0] := __B.qword[1] /// F[0] := __B.qword[0] /// G[0] := __C.qword[1] /// H[0] := __C.qword[0] /// WK[0]:= __A.qword[0] /// WK[1]:= __A.qword[1] /// FOR i := 0 to 1: /// A[i+1] := CH(E[i], F[i], G[i]) + /// cap_sigma1(E[i]) + WK[i] + H[i] + /// MAJ(A[i], B[i], C[i]) + /// cap_sigma0(A[i]) /// B[i+1] := A[i] /// C[i+1] := B[i] /// D[i+1] := C[i] /// E[i+1] := CH(E[i], F[i], G[i]) + /// cap_sigma1(E[i]) + WK[i] + H[i] + D[i] /// F[i+1] := E[i] /// G[i+1] := F[i] /// H[i+1] := G[i] /// ENDFOR /// dst.qword[3] := A[2] /// dst.qword[2] := B[2] /// dst.qword[1] := E[2] /// dst.qword[0] := F[2] /// dst[MAX:256] := 0 /// \endcode static __inline__ __m256i __DEFAULT_FN_ATTRS256 _mm256_sha512rnds2_epi64(__m256i __A, __m256i __B, __m128i __C) { return (__m256i)__builtin_ia32_vsha512rnds2((__v4du)__A, (__v4du)__B, (__v2du)__C); } #undef __DEFAULT_FN_ATTRS256 #endif // __SHA512INTRIN_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]