diff options
Diffstat (limited to 'contrib/llvm-project/clang/lib/Headers/keylockerintrin.h')
-rw-r--r-- | contrib/llvm-project/clang/lib/Headers/keylockerintrin.h | 67 |
1 files changed, 29 insertions, 38 deletions
diff --git a/contrib/llvm-project/clang/lib/Headers/keylockerintrin.h b/contrib/llvm-project/clang/lib/Headers/keylockerintrin.h index 68b0a5689618..f76e91b4d4b3 100644 --- a/contrib/llvm-project/clang/lib/Headers/keylockerintrin.h +++ b/contrib/llvm-project/clang/lib/Headers/keylockerintrin.h @@ -28,8 +28,7 @@ #ifndef _KEYLOCKERINTRIN_H #define _KEYLOCKERINTRIN_H -#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \ - defined(__KL__) +#if !defined(__SCE__) || __has_feature(modules) || defined(__KL__) /* Define the default attributes for the functions in this file. */ #define __DEFAULT_FN_ATTRS \ @@ -46,7 +45,7 @@ /// /// This intrinsic corresponds to the <c> LOADIWKEY </c> instructions. /// -/// \operation +/// \code{.operation} /// IF CPL > 0 // LOADKWKEY only allowed at ring 0 (supervisor mode) /// GP (0) /// FI @@ -91,7 +90,7 @@ /// AF := 0 /// PF := 0 /// CF := 0 -/// \endoperation +/// \endcode static __inline__ void __DEFAULT_FN_ATTRS _mm_loadiwkey (unsigned int __ctl, __m128i __intkey, __m128i __enkey_lo, __m128i __enkey_hi) { @@ -99,14 +98,14 @@ _mm_loadiwkey (unsigned int __ctl, __m128i __intkey, } /// Wrap a 128-bit AES key from __key into a key handle and output in -/// ((__m128i*)__h) to ((__m128i*)__h) + 5 and a 32-bit value as return. +/// ((__m128i*)__h) to ((__m128i*)__h) + 2 and a 32-bit value as return. /// The explicit source operand __htype specifies handle restrictions. /// /// \headerfile <x86intrin.h> /// /// This intrinsic corresponds to the <c> ENCODEKEY128 </c> instructions. /// -/// \operation +/// \code{.operation} /// InputKey[127:0] := __key[127:0] /// KeyMetadata[2:0] := __htype[2:0] /// KeyMetadata[23:3] := 0 // Reserved for future usage @@ -120,23 +119,20 @@ _mm_loadiwkey (unsigned int __ctl, __m128i __intkey, /// MEM[__h+127:__h] := Handle[127:0] // AAD /// MEM[__h+255:__h+128] := Handle[255:128] // Integrity Tag /// MEM[__h+383:__h+256] := Handle[383:256] // CipherText -/// MEM[__h+511:__h+384] := 0 // Reserved for future usage -/// MEM[__h+639:__h+512] := 0 // Reserved for future usage -/// MEM[__h+767:__h+640] := 0 // Reserved for future usage /// OF := 0 /// SF := 0 /// ZF := 0 /// AF := 0 /// PF := 0 /// CF := 0 -/// \endoperation +/// \endcode static __inline__ unsigned int __DEFAULT_FN_ATTRS _mm_encodekey128_u32(unsigned int __htype, __m128i __key, void *__h) { return __builtin_ia32_encodekey128_u32(__htype, (__v2di)__key, __h); } /// Wrap a 256-bit AES key from __key_hi:__key_lo into a key handle, then -/// output handle in ((__m128i*)__h) to ((__m128i*)__h) + 6 and +/// output handle in ((__m128i*)__h) to ((__m128i*)__h) + 3 and /// a 32-bit value as return. /// The explicit source operand __htype specifies handle restrictions. /// @@ -144,7 +140,7 @@ _mm_encodekey128_u32(unsigned int __htype, __m128i __key, void *__h) { /// /// This intrinsic corresponds to the <c> ENCODEKEY256 </c> instructions. /// -/// \operation +/// \code{.operation} /// InputKey[127:0] := __key_lo[127:0] /// InputKey[255:128] := __key_hi[255:128] /// KeyMetadata[2:0] := __htype[2:0] @@ -160,16 +156,13 @@ _mm_encodekey128_u32(unsigned int __htype, __m128i __key, void *__h) { /// MEM[__h+255:__h+128] := Handle[255:128] // Tag /// MEM[__h+383:__h+256] := Handle[383:256] // CipherText[127:0] /// MEM[__h+511:__h+384] := Handle[511:384] // CipherText[255:128] -/// MEM[__h+639:__h+512] := 0 // Reserved for future usage -/// MEM[__h+767:__h+640] := 0 // Reserved for future usage -/// MEM[__h+895:__h+768] := 0 Integrity// Reserved for future usage /// OF := 0 /// SF := 0 /// ZF := 0 /// AF := 0 /// PF := 0 /// CF := 0 -/// \endoperation +/// \endcode static __inline__ unsigned int __DEFAULT_FN_ATTRS _mm_encodekey256_u32(unsigned int __htype, __m128i __key_lo, __m128i __key_hi, void *__h) { @@ -185,7 +178,7 @@ _mm_encodekey256_u32(unsigned int __htype, __m128i __key_lo, __m128i __key_hi, /// /// This intrinsic corresponds to the <c> AESENC128KL </c> instructions. /// -/// \operation +/// \code{.operation} /// Handle[383:0] := MEM[__h+383:__h] // Load is not guaranteed to be atomic. /// IllegalHandle := ( HandleReservedBitSet (Handle[383:0]) || /// (Handle[127:0] AND (CPL > 0)) || @@ -208,7 +201,7 @@ _mm_encodekey256_u32(unsigned int __htype, __m128i __key_lo, __m128i __key_hi, /// AF := 0 /// PF := 0 /// CF := 0 -/// \endoperation +/// \endcode static __inline__ unsigned char __DEFAULT_FN_ATTRS _mm_aesenc128kl_u8(__m128i* __odata, __m128i __idata, const void *__h) { return __builtin_ia32_aesenc128kl_u8((__v2di *)__odata, (__v2di)__idata, __h); @@ -222,7 +215,7 @@ _mm_aesenc128kl_u8(__m128i* __odata, __m128i __idata, const void *__h) { /// /// This intrinsic corresponds to the <c> AESENC256KL </c> instructions. /// -/// \operation +/// \code{.operation} /// Handle[511:0] := MEM[__h+511:__h] // Load is not guaranteed to be atomic. /// IllegalHandle := ( HandleReservedBitSet (Handle[511:0]) || /// (Handle[127:0] AND (CPL > 0)) || @@ -247,7 +240,7 @@ _mm_aesenc128kl_u8(__m128i* __odata, __m128i __idata, const void *__h) { /// AF := 0 /// PF := 0 /// CF := 0 -/// \endoperation +/// \endcode static __inline__ unsigned char __DEFAULT_FN_ATTRS _mm_aesenc256kl_u8(__m128i* __odata, __m128i __idata, const void *__h) { return __builtin_ia32_aesenc256kl_u8((__v2di *)__odata, (__v2di)__idata, __h); @@ -261,7 +254,7 @@ _mm_aesenc256kl_u8(__m128i* __odata, __m128i __idata, const void *__h) { /// /// This intrinsic corresponds to the <c> AESDEC128KL </c> instructions. /// -/// \operation +/// \code{.operation} /// Handle[383:0] := MEM[__h+383:__h] // Load is not guaranteed to be atomic. /// IllegalHandle := (HandleReservedBitSet (Handle[383:0]) || /// (Handle[127:0] AND (CPL > 0)) || @@ -286,7 +279,7 @@ _mm_aesenc256kl_u8(__m128i* __odata, __m128i __idata, const void *__h) { /// AF := 0 /// PF := 0 /// CF := 0 -/// \endoperation +/// \endcode static __inline__ unsigned char __DEFAULT_FN_ATTRS _mm_aesdec128kl_u8(__m128i* __odata, __m128i __idata, const void *__h) { return __builtin_ia32_aesdec128kl_u8((__v2di *)__odata, (__v2di)__idata, __h); @@ -300,7 +293,7 @@ _mm_aesdec128kl_u8(__m128i* __odata, __m128i __idata, const void *__h) { /// /// This intrinsic corresponds to the <c> AESDEC256KL </c> instructions. /// -/// \operation +/// \code{.operation} /// Handle[511:0] := MEM[__h+511:__h] /// IllegalHandle := (HandleReservedBitSet (Handle[511:0]) || /// (Handle[127:0] AND (CPL > 0)) || @@ -325,7 +318,7 @@ _mm_aesdec128kl_u8(__m128i* __odata, __m128i __idata, const void *__h) { /// AF := 0 /// PF := 0 /// CF := 0 -/// \endoperation +/// \endcode static __inline__ unsigned char __DEFAULT_FN_ATTRS _mm_aesdec256kl_u8(__m128i* __odata, __m128i __idata, const void *__h) { return __builtin_ia32_aesdec256kl_u8((__v2di *)__odata, (__v2di)__idata, __h); @@ -333,11 +326,9 @@ _mm_aesdec256kl_u8(__m128i* __odata, __m128i __idata, const void *__h) { #undef __DEFAULT_FN_ATTRS -#endif /* !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) \ - || defined(__KL__) */ +#endif /* !defined(__SCE__ || __has_feature(modules) || defined(__KL__) */ -#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \ - defined(__WIDEKL__) +#if !defined(__SCE__) || __has_feature(modules) || defined(__WIDEKL__) /* Define the default attributes for the functions in this file. */ #define __DEFAULT_FN_ATTRS \ @@ -352,7 +343,7 @@ _mm_aesdec256kl_u8(__m128i* __odata, __m128i __idata, const void *__h) { /// /// This intrinsic corresponds to the <c> AESENCWIDE128KL </c> instructions. /// -/// \operation +/// \code{.operation} /// Handle := MEM[__h+383:__h] /// IllegalHandle := ( HandleReservedBitSet (Handle[383:0]) || /// (Handle[127:0] AND (CPL > 0)) || @@ -383,7 +374,7 @@ _mm_aesdec256kl_u8(__m128i* __odata, __m128i __idata, const void *__h) { /// AF := 0 /// PF := 0 /// CF := 0 -/// \endoperation +/// \endcode static __inline__ unsigned char __DEFAULT_FN_ATTRS _mm_aesencwide128kl_u8(__m128i __odata[8], const __m128i __idata[8], const void* __h) { return __builtin_ia32_aesencwide128kl_u8((__v2di *)__odata, @@ -398,7 +389,7 @@ _mm_aesencwide128kl_u8(__m128i __odata[8], const __m128i __idata[8], const void* /// /// This intrinsic corresponds to the <c> AESENCWIDE256KL </c> instructions. /// -/// \operation +/// \code{.operation} /// Handle[511:0] := MEM[__h+511:__h] /// IllegalHandle := ( HandleReservedBitSet (Handle[511:0]) || /// (Handle[127:0] AND (CPL > 0)) || @@ -429,7 +420,7 @@ _mm_aesencwide128kl_u8(__m128i __odata[8], const __m128i __idata[8], const void* /// AF := 0 /// PF := 0 /// CF := 0 -/// \endoperation +/// \endcode static __inline__ unsigned char __DEFAULT_FN_ATTRS _mm_aesencwide256kl_u8(__m128i __odata[8], const __m128i __idata[8], const void* __h) { return __builtin_ia32_aesencwide256kl_u8((__v2di *)__odata, @@ -444,7 +435,7 @@ _mm_aesencwide256kl_u8(__m128i __odata[8], const __m128i __idata[8], const void* /// /// This intrinsic corresponds to the <c> AESDECWIDE128KL </c> instructions. /// -/// \operation +/// \code{.operation} /// Handle[383:0] := MEM[__h+383:__h] /// IllegalHandle := ( HandleReservedBitSet (Handle[383:0]) || /// (Handle[127:0] AND (CPL > 0)) || @@ -475,7 +466,7 @@ _mm_aesencwide256kl_u8(__m128i __odata[8], const __m128i __idata[8], const void* /// AF := 0 /// PF := 0 /// CF := 0 -/// \endoperation +/// \endcode static __inline__ unsigned char __DEFAULT_FN_ATTRS _mm_aesdecwide128kl_u8(__m128i __odata[8], const __m128i __idata[8], const void* __h) { return __builtin_ia32_aesdecwide128kl_u8((__v2di *)__odata, @@ -490,7 +481,7 @@ _mm_aesdecwide128kl_u8(__m128i __odata[8], const __m128i __idata[8], const void* /// /// This intrinsic corresponds to the <c> AESDECWIDE256KL </c> instructions. /// -/// \operation +/// \code{.operation} /// Handle[511:0] := MEM[__h+511:__h] /// IllegalHandle = ( HandleReservedBitSet (Handle[511:0]) || /// (Handle[127:0] AND (CPL > 0)) || @@ -521,7 +512,7 @@ _mm_aesdecwide128kl_u8(__m128i __odata[8], const __m128i __idata[8], const void* /// AF := 0 /// PF := 0 /// CF := 0 -/// \endoperation +/// \endcode static __inline__ unsigned char __DEFAULT_FN_ATTRS _mm_aesdecwide256kl_u8(__m128i __odata[8], const __m128i __idata[8], const void* __h) { return __builtin_ia32_aesdecwide256kl_u8((__v2di *)__odata, @@ -530,7 +521,7 @@ _mm_aesdecwide256kl_u8(__m128i __odata[8], const __m128i __idata[8], const void* #undef __DEFAULT_FN_ATTRS -#endif /* !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) \ - || defined(__WIDEKL__) */ +#endif /* !defined(__SCE__) || __has_feature(modules) || defined(__WIDEKL__) \ + */ #endif /* _KEYLOCKERINTRIN_H */ |