Fix Aes and Ssse3.Shuffle intrinsic APIs
authorFei Peng <fei.peng@intel.com>
Tue, 26 Jun 2018 23:20:54 +0000 (16:20 -0700)
committerFei Peng <fei.peng@intel.com>
Tue, 26 Jun 2018 23:20:54 +0000 (16:20 -0700)
Commit migrated from https://github.com/dotnet/coreclr/commit/1aec8f9ff3c1aa575be0ecad9b2920d25436281c

src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Aes.PlatformNotSupported.cs
src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Aes.cs
src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Ssse3.PlatformNotSupported.cs
src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Ssse3.cs

index 5df8f26..c31da39 100644 (file)
@@ -19,66 +19,36 @@ namespace System.Runtime.Intrinsics.X86
         /// __m128i _mm_aesdec_si128 (__m128i a, __m128i RoundKey)
         ///   AESDEC xmm, xmm/m128
         /// </summary>
-        public static Vector128<sbyte> Decrypt(Vector128<sbyte> value, Vector128<sbyte> roundKey) { throw new PlatformNotSupportedException(); }
-        /// <summary>
-        /// __m128i _mm_aesdec_si128 (__m128i a, __m128i RoundKey)
-        ///   AESDEC xmm, xmm/m128
-        /// </summary>
         public static Vector128<byte> Decrypt(Vector128<byte> value, Vector128<byte> roundKey) { throw new PlatformNotSupportedException(); }
 
         /// <summary>
         /// __m128i _mm_aesdeclast_si128 (__m128i a, __m128i RoundKey)
         ///   AESDECLAST xmm, xmm/m128
         /// </summary>
-        public static Vector128<sbyte> DecryptLast(Vector128<sbyte> value, Vector128<sbyte> roundKey) { throw new PlatformNotSupportedException(); }
-        /// <summary>
-        /// __m128i _mm_aesdeclast_si128 (__m128i a, __m128i RoundKey)
-        ///   AESDECLAST xmm, xmm/m128
-        /// </summary>
         public static Vector128<byte> DecryptLast(Vector128<byte> value, Vector128<byte> roundKey) { throw new PlatformNotSupportedException(); }
 
         /// <summary>
         /// __m128i _mm_aesenc_si128 (__m128i a, __m128i RoundKey)
         ///   AESENC xmm, xmm/m128
         /// </summary>
-        public static Vector128<sbyte> Encrypt(Vector128<sbyte> value, Vector128<sbyte> roundKey) { throw new PlatformNotSupportedException(); }
-        /// <summary>
-        /// __m128i _mm_aesenc_si128 (__m128i a, __m128i RoundKey)
-        ///   AESENC xmm, xmm/m128
-        /// </summary>
         public static Vector128<byte> Encrypt(Vector128<byte> value, Vector128<byte> roundKey) { throw new PlatformNotSupportedException(); }
 
         /// <summary>
         /// __m128i _mm_aesenclast_si128 (__m128i a, __m128i RoundKey)
         ///   AESENCLAST xmm, xmm/m128
         /// </summary>
-        public static Vector128<sbyte> EncryptLast(Vector128<sbyte> value, Vector128<sbyte> roundKey) { throw new PlatformNotSupportedException(); }
-        /// <summary>
-        /// __m128i _mm_aesenclast_si128 (__m128i a, __m128i RoundKey)
-        ///   AESENCLAST xmm, xmm/m128
-        /// </summary>
         public static Vector128<byte> EncryptLast(Vector128<byte> value, Vector128<byte> roundKey) { throw new PlatformNotSupportedException(); }
 
         /// <summary>
         /// __m128i _mm_aesimc_si128 (__m128i a)
         ///   AESIMC xmm, xmm/m128
         /// </summary>
-        public static Vector128<sbyte> InvisibleMixColumn(Vector128<sbyte> value) { throw new PlatformNotSupportedException(); }
-        /// <summary>
-        /// __m128i _mm_aesimc_si128 (__m128i a)
-        ///   AESIMC xmm, xmm/m128
-        /// </summary>
-        public static Vector128<byte> InvisibleMixColumn(Vector128<byte> value) { throw new PlatformNotSupportedException(); }
+        public static Vector128<byte> InverseMixColumns(Vector128<byte> value) { throw new PlatformNotSupportedException(); }
 
         /// <summary>
         /// __m128i _mm_aeskeygenassist_si128 (__m128i a, const int imm8)
         ///   AESKEYGENASSIST xmm, xmm/m128, imm8
         /// </summary>
-        public static Vector128<sbyte> KeygenAssist(Vector128<sbyte> value, byte control) { throw new PlatformNotSupportedException(); }
-        /// <summary>
-        /// __m128i _mm_aeskeygenassist_si128 (__m128i a, const int imm8)
-        ///   AESKEYGENASSIST xmm, xmm/m128, imm8
-        /// </summary>
         public static Vector128<byte> KeygenAssist(Vector128<byte> value, byte control) { throw new PlatformNotSupportedException(); }
 
     }
index 349919a..75db4b1 100644 (file)
@@ -19,66 +19,36 @@ namespace System.Runtime.Intrinsics.X86
         /// __m128i _mm_aesdec_si128 (__m128i a, __m128i RoundKey)
         ///   AESDEC xmm, xmm/m128
         /// </summary>
-        public static Vector128<sbyte> Decrypt(Vector128<sbyte> value, Vector128<sbyte> roundKey) => Decrypt(value, roundKey);
-        /// <summary>
-        /// __m128i _mm_aesdec_si128 (__m128i a, __m128i RoundKey)
-        ///   AESDEC xmm, xmm/m128
-        /// </summary>
         public static Vector128<byte> Decrypt(Vector128<byte> value, Vector128<byte> roundKey) => Decrypt(value, roundKey);
 
         /// <summary>
         /// __m128i _mm_aesdeclast_si128 (__m128i a, __m128i RoundKey)
         ///   AESDECLAST xmm, xmm/m128
         /// </summary>
-        public static Vector128<sbyte> DecryptLast(Vector128<sbyte> value, Vector128<sbyte> roundKey) => DecryptLast(value, roundKey);
-        /// <summary>
-        /// __m128i _mm_aesdeclast_si128 (__m128i a, __m128i RoundKey)
-        ///   AESDECLAST xmm, xmm/m128
-        /// </summary>
         public static Vector128<byte> DecryptLast(Vector128<byte> value, Vector128<byte> roundKey) => DecryptLast(value, roundKey);
 
         /// <summary>
         /// __m128i _mm_aesenc_si128 (__m128i a, __m128i RoundKey)
         ///   AESENC xmm, xmm/m128
         /// </summary>
-        public static Vector128<sbyte> Encrypt(Vector128<sbyte> value, Vector128<sbyte> roundKey) => Encrypt(value, roundKey);
-        /// <summary>
-        /// __m128i _mm_aesenc_si128 (__m128i a, __m128i RoundKey)
-        ///   AESENC xmm, xmm/m128
-        /// </summary>
         public static Vector128<byte> Encrypt(Vector128<byte> value, Vector128<byte> roundKey) => Encrypt(value, roundKey);
 
         /// <summary>
         /// __m128i _mm_aesenclast_si128 (__m128i a, __m128i RoundKey)
         ///   AESENCLAST xmm, xmm/m128
         /// </summary>
-        public static Vector128<sbyte> EncryptLast(Vector128<sbyte> value, Vector128<sbyte> roundKey) => EncryptLast(value, roundKey);
-        /// <summary>
-        /// __m128i _mm_aesenclast_si128 (__m128i a, __m128i RoundKey)
-        ///   AESENCLAST xmm, xmm/m128
-        /// </summary>
         public static Vector128<byte> EncryptLast(Vector128<byte> value, Vector128<byte> roundKey) => EncryptLast(value, roundKey);
 
         /// <summary>
         /// __m128i _mm_aesimc_si128 (__m128i a)
         ///   AESIMC xmm, xmm/m128
         /// </summary>
-        public static Vector128<sbyte> InvisibleMixColumn(Vector128<sbyte> value) => InvisibleMixColumn(value);
-        /// <summary>
-        /// __m128i _mm_aesimc_si128 (__m128i a)
-        ///   AESIMC xmm, xmm/m128
-        /// </summary>
-        public static Vector128<byte> InvisibleMixColumn(Vector128<byte> value) => InvisibleMixColumn(value);
+        public static Vector128<byte> InverseMixColumns(Vector128<byte> value) => InverseMixColumns(value);
 
         /// <summary>
         /// __m128i _mm_aeskeygenassist_si128 (__m128i a, const int imm8)
         ///   AESKEYGENASSIST xmm, xmm/m128, imm8
         /// </summary>
-        public static Vector128<sbyte> KeygenAssist(Vector128<sbyte> value, byte control) => KeygenAssist(value, control);
-        /// <summary>
-        /// __m128i _mm_aeskeygenassist_si128 (__m128i a, const int imm8)
-        ///   AESKEYGENASSIST xmm, xmm/m128, imm8
-        /// </summary>
         public static Vector128<byte> KeygenAssist(Vector128<byte> value, byte control) => KeygenAssist(value, control);
 
     }
index 20e9bbb..7a930c4 100644 (file)
@@ -90,6 +90,12 @@ namespace System.Runtime.Intrinsics.X86
         public static Vector128<sbyte> Shuffle(Vector128<sbyte> value, Vector128<sbyte> mask) { throw new PlatformNotSupportedException(); }
 
         /// <summary>
+        /// __m128i _mm_shuffle_epi8 (__m128i a, __m128i b)
+        ///   PSHUFB xmm, xmm/m128
+        /// </summary>
+        public static Vector128<byte> Shuffle(Vector128<byte> value, Vector128<byte> mask) { throw new PlatformNotSupportedException(); }
+
+        /// <summary>
         /// __m128i _mm_sign_epi8 (__m128i a, __m128i b)
         ///   PSIGNB xmm, xmm/m128
         /// </summary>
index 0403a0a..fc32c29 100644 (file)
@@ -90,6 +90,12 @@ namespace System.Runtime.Intrinsics.X86
         public static Vector128<sbyte> Shuffle(Vector128<sbyte> value, Vector128<sbyte> mask) => Shuffle(value, mask);
 
         /// <summary>
+        /// __m128i _mm_shuffle_epi8 (__m128i a, __m128i b)
+        ///   PSHUFB xmm, xmm/m128
+        /// </summary>
+        public static Vector128<byte> Shuffle(Vector128<byte> value, Vector128<byte> mask) => Shuffle(value, mask);
+
+        /// <summary>
         /// __m128i _mm_sign_epi8 (__m128i a, __m128i b)
         ///   PSIGNB xmm, xmm/m128
         /// </summary>