Add managed non-const fall-back for AVX2 gather intrinsic
authorFei Peng <fei.peng@intel.com>
Thu, 9 Aug 2018 21:57:22 +0000 (14:57 -0700)
committerTanner Gooding <tagoo@outlook.com>
Wed, 5 Sep 2018 19:56:39 +0000 (12:56 -0700)
Commit migrated from https://github.com/dotnet/coreclr/commit/d59b1af3429809e8c2af86f818ebb387948e313e

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

index ee07f09..a4b5680 100644 (file)
@@ -539,242 +539,290 @@ namespace System.Runtime.Intrinsics.X86
         /// <summary>
         /// __m128i _mm_i32gather_epi32 (int const* base_addr, __m128i vindex, const int scale)
         ///   VPGATHERDD xmm, vm32x, xmm
+        /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
         /// </summary>
         public static unsafe Vector128<int> GatherVector128(int* baseAddress, Vector128<int> index, byte scale) { throw new PlatformNotSupportedException(); }
         /// <summary>
         /// __m128i _mm_i32gather_epi32 (int const* base_addr, __m128i vindex, const int scale)
         ///   VPGATHERDD xmm, vm32x, xmm
+        /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
         /// </summary>
         public static unsafe Vector128<uint> GatherVector128(uint* baseAddress, Vector128<int> index, byte scale) { throw new PlatformNotSupportedException(); }
         /// <summary>
         /// __m128i _mm_i32gather_epi64 (__int64 const* base_addr, __m128i vindex, const int scale)
         ///   VPGATHERDQ xmm, vm32x, xmm
+        /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
         /// </summary>
         public static unsafe Vector128<long> GatherVector128(long* baseAddress, Vector128<int> index, byte scale) { throw new PlatformNotSupportedException(); }
         /// <summary>
         /// __m128i _mm_i32gather_epi64 (__int64 const* base_addr, __m128i vindex, const int scale)
         ///   VPGATHERDQ xmm, vm32x, xmm
+        /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
         /// </summary>
         public static unsafe Vector128<ulong> GatherVector128(ulong* baseAddress, Vector128<int> index, byte scale) { throw new PlatformNotSupportedException(); }
         /// <summary>
         /// __m128 _mm_i32gather_ps (float const* base_addr, __m128i vindex, const int scale)
         ///   VGATHERDPS xmm, vm32x, xmm
+        /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
         /// </summary>
         public static unsafe Vector128<float> GatherVector128(float* baseAddress, Vector128<int> index, byte scale) { throw new PlatformNotSupportedException(); }
         /// <summary>
         /// __m128d _mm_i32gather_pd (double const* base_addr, __m128i vindex, const int scale)
         ///   VGATHERDPD xmm, vm32x, xmm
+        /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
         /// </summary>
         public static unsafe Vector128<double> GatherVector128(double* baseAddress, Vector128<int> index, byte scale) { throw new PlatformNotSupportedException(); }
         /// <summary>
         /// __m128i _mm_i64gather_epi32 (int const* base_addr, __m128i vindex, const int scale)
         ///   VPGATHERQD xmm, vm64x, xmm
+        /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
         /// </summary>
         public static unsafe Vector128<int> GatherVector128(int* baseAddress, Vector128<long> index, byte scale) { throw new PlatformNotSupportedException(); }
         /// <summary>
         /// __m128i _mm_i64gather_epi32 (int const* base_addr, __m128i vindex, const int scale)
         ///   VPGATHERQD xmm, vm64x, xmm
+        /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
         /// </summary>
         public static unsafe Vector128<uint> GatherVector128(uint* baseAddress, Vector128<long> index, byte scale) { throw new PlatformNotSupportedException(); }
         /// <summary>
         /// __m128i _mm_i64gather_epi64 (__int64 const* base_addr, __m128i vindex, const int scale)
         ///   VPGATHERQQ xmm, vm64x, xmm
+        /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
         /// </summary>
         public static unsafe Vector128<long> GatherVector128(long* baseAddress, Vector128<long> index, byte scale) { throw new PlatformNotSupportedException(); }
         /// <summary>
         /// __m128i _mm_i64gather_epi64 (__int64 const* base_addr, __m128i vindex, const int scale)
         ///   VPGATHERQQ xmm, vm64x, xmm
+        /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
         /// </summary>
         public static unsafe Vector128<ulong> GatherVector128(ulong* baseAddress, Vector128<long> index, byte scale) { throw new PlatformNotSupportedException(); }
         /// <summary>
         /// __m128 _mm_i64gather_ps (float const* base_addr, __m128i vindex, const int scale)
         ///   VGATHERQPS xmm, vm64x, xmm
+        /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
         /// </summary>
         public static unsafe Vector128<float> GatherVector128(float* baseAddress, Vector128<long> index, byte scale) { throw new PlatformNotSupportedException(); }
         /// <summary>
         /// __m128d _mm_i64gather_pd (double const* base_addr, __m128i vindex, const int scale)
         ///   VGATHERQPD xmm, vm64x, xmm
+        /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
         /// </summary>
         public static unsafe Vector128<double> GatherVector128(double* baseAddress, Vector128<long> index, byte scale) { throw new PlatformNotSupportedException(); }
         /// <summary>
         /// __m256i _mm256_i32gather_epi32 (int const* base_addr, __m256i vindex, const int scale)
         ///   VPGATHERDD ymm, vm32y, ymm
+        /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
         /// </summary>
         public static unsafe Vector256<int> GatherVector256(int* baseAddress, Vector256<int> index, byte scale) { throw new PlatformNotSupportedException(); }
         /// <summary>
         /// __m256i _mm256_i32gather_epi32 (int const* base_addr, __m256i vindex, const int scale)
         ///   VPGATHERDD ymm, vm32y, ymm
+        /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
         /// </summary>
         public static unsafe Vector256<uint> GatherVector256(uint* baseAddress, Vector256<int> index, byte scale) { throw new PlatformNotSupportedException(); }
         /// <summary>
         /// __m256i _mm256_i32gather_epi64 (__int64 const* base_addr, __m128i vindex, const int scale)
         ///   VPGATHERDQ ymm, vm32y, ymm
+        /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
         /// </summary>
         public static unsafe Vector256<long> GatherVector256(long* baseAddress, Vector128<int> index, byte scale) { throw new PlatformNotSupportedException(); }
         /// <summary>
         /// __m256i _mm256_i32gather_epi64 (__int64 const* base_addr, __m128i vindex, const int scale)
         ///   VPGATHERDQ ymm, vm32y, ymm
+        /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
         /// </summary>
         public static unsafe Vector256<ulong> GatherVector256(ulong* baseAddress, Vector128<int> index, byte scale) { throw new PlatformNotSupportedException(); }
         /// <summary>
         /// __m256 _mm256_i32gather_ps (float const* base_addr, __m256i vindex, const int scale)
         ///   VGATHERDPS ymm, vm32y, ymm
+        /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
         /// </summary>
         public static unsafe Vector256<float> GatherVector256(float* baseAddress, Vector256<int> index, byte scale) { throw new PlatformNotSupportedException(); }
         /// <summary>
         /// __m256d _mm256_i32gather_pd (double const* base_addr, __m128i vindex, const int scale)
         ///   VGATHERDPD ymm, vm32y, ymm
+        /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
         /// </summary>
         public static unsafe Vector256<double> GatherVector256(double* baseAddress, Vector128<int> index, byte scale) { throw new PlatformNotSupportedException(); }
         /// <summary>
         /// __m128i _mm256_i64gather_epi32 (int const* base_addr, __m256i vindex, const int scale)
-        ///   VPGATHERQD ymm, vm64y, ymm
+        ///   VPGATHERQD xmm, vm64y, xmm
+        /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
         /// </summary>
         public static unsafe Vector128<int> GatherVector128(int* baseAddress, Vector256<long> index, byte scale) { throw new PlatformNotSupportedException(); }
         /// <summary>
         /// __m128i _mm256_i64gather_epi32 (int const* base_addr, __m256i vindex, const int scale)
-        ///   VPGATHERQD ymm, vm64y, ymm
+        ///   VPGATHERQD xmm, vm64y, xmm
+        /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
         /// </summary>
         public static unsafe Vector128<uint> GatherVector128(uint* baseAddress, Vector256<long> index, byte scale) { throw new PlatformNotSupportedException(); }
         /// <summary>
         /// __m256i _mm256_i64gather_epi64 (__int64 const* base_addr, __m256i vindex, const int scale)
         ///   VPGATHERQQ ymm, vm64y, ymm
+        /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
         /// </summary>
         public static unsafe Vector256<long> GatherVector256(long* baseAddress, Vector256<long> index, byte scale) { throw new PlatformNotSupportedException(); }
         /// <summary>
         /// __m256i _mm256_i64gather_epi64 (__int64 const* base_addr, __m256i vindex, const int scale)
         ///   VPGATHERQQ ymm, vm64y, ymm
+        /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
         /// </summary>
         public static unsafe Vector256<ulong> GatherVector256(ulong* baseAddress, Vector256<long> index, byte scale) { throw new PlatformNotSupportedException(); }
         /// <summary>
         /// __m128 _mm256_i64gather_ps (float const* base_addr, __m256i vindex, const int scale)
-        ///   VGATHERQPS ymm, vm64y, ymm
+        ///   VGATHERQPS xmm, vm64y, xmm
+        /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
         /// </summary>
         public static unsafe Vector128<float> GatherVector128(float* baseAddress, Vector256<long> index, byte scale) { throw new PlatformNotSupportedException(); }
         /// <summary>
         /// __m256d _mm256_i64gather_pd (double const* base_addr, __m256i vindex, const int scale)
         ///   VGATHERQPD ymm, vm64y, ymm
+        /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
         /// </summary>
         public static unsafe Vector256<double> GatherVector256(double* baseAddress, Vector256<long> index, byte scale) { throw new PlatformNotSupportedException(); }
 
         /// <summary>
         /// __m128i _mm_mask_i32gather_epi32 (__m128i src, int const* base_addr, __m128i vindex, __m128i mask, const int scale)
         ///   VPGATHERDD xmm, vm32x, xmm
+        /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
         /// </summary>
         public static unsafe Vector128<int> GatherMaskVector128(Vector128<int> source, int* baseAddress, Vector128<int> index, Vector128<int> mask, byte scale) { throw new PlatformNotSupportedException(); }
         /// <summary>
         /// __m128i _mm_mask_i32gather_epi32 (__m128i src, int const* base_addr, __m128i vindex, __m128i mask, const int scale)
         ///   VPGATHERDD xmm, vm32x, xmm
+        /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
         /// </summary>
         public static unsafe Vector128<uint> GatherMaskVector128(Vector128<uint> source, uint* baseAddress, Vector128<int> index, Vector128<uint> mask, byte scale) { throw new PlatformNotSupportedException(); }
         /// <summary>
         /// __m128i _mm_mask_i32gather_epi64 (__m128i src, __int64 const* base_addr, __m128i vindex, __m128i mask, const int scale)
         ///   VPGATHERDQ xmm, vm32x, xmm
+        /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
         /// </summary>
         public static unsafe Vector128<long> GatherMaskVector128(Vector128<long> source, long* baseAddress, Vector128<int> index, Vector128<long> mask, byte scale) { throw new PlatformNotSupportedException(); }
         /// <summary>
         /// __m128i _mm_mask_i32gather_epi64 (__m128i src, __int64 const* base_addr, __m128i vindex, __m128i mask, const int scale)
         ///   VPGATHERDQ xmm, vm32x, xmm
+        /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
         /// </summary>
         public static unsafe Vector128<ulong> GatherMaskVector128(Vector128<ulong> source, ulong* baseAddress, Vector128<int> index, Vector128<ulong> mask, byte scale) { throw new PlatformNotSupportedException(); }
         /// <summary>
         /// __m128 _mm_mask_i32gather_ps (__m128 src, float const* base_addr, __m128i vindex, __m128 mask, const int scale)
         ///   VGATHERDPS xmm, vm32x, xmm
+        /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
         /// </summary>
         public static unsafe Vector128<float> GatherMaskVector128(Vector128<float> source, float* baseAddress, Vector128<int> index, Vector128<float> mask, byte scale) { throw new PlatformNotSupportedException(); }
         /// <summary>
         /// __m128d _mm_mask_i32gather_pd (__m128d src, double const* base_addr, __m128i vindex, __m128d mask, const int scale)
         ///   VGATHERDPD xmm, vm32x, xmm
+        /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
         /// </summary>
         public static unsafe Vector128<double> GatherMaskVector128(Vector128<double> source, double* baseAddress, Vector128<int> index, Vector128<double> mask, byte scale) { throw new PlatformNotSupportedException(); }
         /// <summary>
         /// __m128i _mm_mask_i64gather_epi32 (__m128i src, int const* base_addr, __m128i vindex, __m128i mask, const int scale)
         ///   VPGATHERQD xmm, vm64x, xmm
+        /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
         /// </summary>
         public static unsafe Vector128<int> GatherMaskVector128(Vector128<int> source, int* baseAddress, Vector128<long> index, Vector128<int> mask, byte scale) { throw new PlatformNotSupportedException(); }
         /// <summary>
         /// __m128i _mm_mask_i64gather_epi32 (__m128i src, int const* base_addr, __m128i vindex, __m128i mask, const int scale)
         ///   VPGATHERQD xmm, vm64x, xmm
+        /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
         /// </summary>
         public static unsafe Vector128<uint> GatherMaskVector128(Vector128<uint> source, uint* baseAddress, Vector128<long> index, Vector128<uint> mask, byte scale) { throw new PlatformNotSupportedException(); }
         /// <summary>
         /// __m128i _mm_mask_i64gather_epi64 (__m128i src, __int64 const* base_addr, __m128i vindex, __m128i mask, const int scale)
         ///   VPGATHERQQ xmm, vm64x, xmm
+        /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
         /// </summary>
         public static unsafe Vector128<long> GatherMaskVector128(Vector128<long> source, long* baseAddress, Vector128<long> index, Vector128<long> mask, byte scale) { throw new PlatformNotSupportedException(); }
         /// <summary>
         /// __m128i _mm_mask_i64gather_epi64 (__m128i src, __int64 const* base_addr, __m128i vindex, __m128i mask, const int scale)
         ///   VPGATHERQQ xmm, vm64x, xmm
+        /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
         /// </summary>
         public static unsafe Vector128<ulong> GatherMaskVector128(Vector128<ulong> source, ulong* baseAddress, Vector128<long> index, Vector128<ulong> mask, byte scale) { throw new PlatformNotSupportedException(); }
         /// <summary>
         /// __m128 _mm_mask_i64gather_ps (__m128 src, float const* base_addr, __m128i vindex, __m128 mask, const int scale)
-        ///   VPGATHERQPS xmm, vm64x, xmm
+        ///   VGATHERQPS xmm, vm64x, xmm
+        /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
         /// </summary>
         public static unsafe Vector128<float> GatherMaskVector128(Vector128<float> source, float* baseAddress, Vector128<long> index, Vector128<float> mask, byte scale) { throw new PlatformNotSupportedException(); }
         /// <summary>
         /// __m128d _mm_mask_i64gather_pd (__m128d src, double const* base_addr, __m128i vindex, __m128d mask, const int scale)
-        ///   VPGATHERQPD xmm, vm64x, xmm
+        ///   VGATHERQPD xmm, vm64x, xmm
+        /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
         /// </summary>
         public static unsafe Vector128<double> GatherMaskVector128(Vector128<double> source, double* baseAddress, Vector128<long> index, Vector128<double> mask, byte scale) { throw new PlatformNotSupportedException(); }
         /// <summary>
         /// __m256i _mm256_mask_i32gather_epi32 (__m256i src, int const* base_addr, __m256i vindex, __m256i mask, const int scale)
         ///   VPGATHERDD ymm, vm32y, ymm
+        /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
         /// </summary>
         public static unsafe Vector256<int> GatherMaskVector256(Vector256<int> source, int* baseAddress, Vector256<int> index, Vector256<int> mask, byte scale) { throw new PlatformNotSupportedException(); }
         /// <summary>
         /// __m256i _mm256_mask_i32gather_epi32 (__m256i src, int const* base_addr, __m256i vindex, __m256i mask, const int scale)
         ///   VPGATHERDD ymm, vm32y, ymm
+        /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
         /// </summary>
         public static unsafe Vector256<uint> GatherMaskVector256(Vector256<uint> source, uint* baseAddress, Vector256<int> index, Vector256<uint> mask, byte scale) { throw new PlatformNotSupportedException(); }
         /// <summary>
         /// __m256i _mm256_mask_i32gather_epi64 (__m256i src, __int64 const* base_addr, __m128i vindex, __m256i mask, const int scale)
         ///   VPGATHERDQ ymm, vm32y, ymm
+        /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
         /// </summary>
         public static unsafe Vector256<long> GatherMaskVector256(Vector256<long> source, long* baseAddress, Vector128<int> index, Vector256<long> mask, byte scale) { throw new PlatformNotSupportedException(); }
         /// <summary>
         /// __m256i _mm256_mask_i32gather_epi64 (__m256i src, __int64 const* base_addr, __m128i vindex, __m256i mask, const int scale)
         ///   VPGATHERDQ ymm, vm32y, ymm
+        /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
         /// </summary>
         public static unsafe Vector256<ulong> GatherMaskVector256(Vector256<ulong> source, ulong* baseAddress, Vector128<int> index, Vector256<ulong> mask, byte scale) { throw new PlatformNotSupportedException(); }
         /// <summary>
         /// __m256 _mm256_mask_i32gather_ps (__m256 src, float const* base_addr, __m256i vindex, __m256 mask, const int scale)
         ///   VPGATHERDPS ymm, vm32y, ymm
+        /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
         /// </summary>
         public static unsafe Vector256<float> GatherMaskVector256(Vector256<float> source, float* baseAddress, Vector256<int> index, Vector256<float> mask, byte scale) { throw new PlatformNotSupportedException(); }
         /// <summary>
         /// __m256d _mm256_mask_i32gather_pd (__m256d src, double const* base_addr, __m128i vindex, __m256d mask, const int scale)
         ///   VPGATHERDPD ymm, vm32y, ymm
+        /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
         /// </summary>
         public static unsafe Vector256<double> GatherMaskVector256(Vector256<double> source, double* baseAddress, Vector128<int> index, Vector256<double> mask, byte scale) { throw new PlatformNotSupportedException(); }
         /// <summary>
         /// __m128i _mm256_mask_i64gather_epi32 (__m128i src, int const* base_addr, __m256i vindex, __m128i mask, const int scale)
-        ///   VPGATHERQD ymm, vm32y, ymm
+        ///   VPGATHERQD xmm, vm32y, xmm
+        /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
         /// </summary>
         public static unsafe Vector128<int> GatherMaskVector128(Vector128<int> source, int* baseAddress, Vector256<long> index, Vector128<int> mask, byte scale) { throw new PlatformNotSupportedException(); }
         /// <summary>
         /// __m128i _mm256_mask_i64gather_epi32 (__m128i src, int const* base_addr, __m256i vindex, __m128i mask, const int scale)
-        ///   VPGATHERQD ymm, vm32y, ymm
+        ///   VPGATHERQD xmm, vm32y, xmm
+        /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
         /// </summary>
         public static unsafe Vector128<uint> GatherMaskVector128(Vector128<uint> source, uint* baseAddress, Vector256<long> index, Vector128<uint> mask, byte scale) { throw new PlatformNotSupportedException(); }
         /// <summary>
         /// __m256i _mm256_mask_i64gather_epi64 (__m256i src, __int64 const* base_addr, __m256i vindex, __m256i mask, const int scale)
         ///   VPGATHERQQ ymm, vm32y, ymm
+        /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
         /// </summary>
         public static unsafe Vector256<long> GatherMaskVector256(Vector256<long> source, long* baseAddress, Vector256<long> index, Vector256<long> mask, byte scale) { throw new PlatformNotSupportedException(); }
         /// <summary>
         /// __m256i _mm256_mask_i64gather_epi64 (__m256i src, __int64 const* base_addr, __m256i vindex, __m256i mask, const int scale)
         ///   VPGATHERQQ ymm, vm32y, ymm
+        /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
         /// </summary>
         public static unsafe Vector256<ulong> GatherMaskVector256(Vector256<ulong> source, ulong* baseAddress, Vector256<long> index, Vector256<ulong> mask, byte scale) { throw new PlatformNotSupportedException(); }
         /// <summary>
         /// __m128 _mm256_mask_i64gather_ps (__m128 src, float const* base_addr, __m256i vindex, __m128 mask, const int scale)
-        ///   VPGATHERQPS ymm, vm32y, ymm
+        ///   VGATHERQPS xmm, vm32y, xmm
+        /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
         /// </summary>
         public static unsafe Vector128<float> GatherMaskVector128(Vector128<float> source, float* baseAddress, Vector256<long> index, Vector128<float> mask, byte scale) { throw new PlatformNotSupportedException(); }
         /// <summary>
         /// __m256d _mm256_mask_i64gather_pd (__m256d src, double const* base_addr, __m256i vindex, __m256d mask, const int scale)
-        ///   VPGATHERQPD ymm, vm32y, ymm
+        ///   VGATHERQPD ymm, vm32y, ymm
+        /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
         /// </summary>
         public static unsafe Vector256<double> GatherMaskVector256(Vector256<double> source, double* baseAddress, Vector256<long> index, Vector256<double> mask, byte scale) { throw new PlatformNotSupportedException(); }
 
index 1f92cbf..2e949dc 100644 (file)
@@ -545,244 +545,1012 @@ namespace System.Runtime.Intrinsics.X86
         /// <summary>
         /// __m128i _mm_i32gather_epi32 (int const* base_addr, __m128i vindex, const int scale)
         ///   VPGATHERDD xmm, vm32x, xmm
+        /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
         /// </summary>
-        public static unsafe Vector128<int> GatherVector128(int* baseAddress, Vector128<int> index, byte scale) => GatherVector128(baseAddress, index, scale);
+        public static unsafe Vector128<int> GatherVector128(int* baseAddress, Vector128<int> index, byte scale)
+        {
+            switch (scale)
+            {
+                case 1:
+                    return GatherVector128(baseAddress, index, 1);
+                case 2:
+                    return GatherVector128(baseAddress, index, 2);
+                case 4:
+                    return GatherVector128(baseAddress, index, 4);
+                case 8:
+                    return GatherVector128(baseAddress, index, 8);
+                default:
+                    throw new ArgumentOutOfRangeException(nameof(scale));
+            }
+        }
         /// <summary>
         /// __m128i _mm_i32gather_epi32 (int const* base_addr, __m128i vindex, const int scale)
         ///   VPGATHERDD xmm, vm32x, xmm
+        /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
         /// </summary>
-        public static unsafe Vector128<uint> GatherVector128(uint* baseAddress, Vector128<int> index, byte scale) => GatherVector128(baseAddress, index, scale);
+        public static unsafe Vector128<uint> GatherVector128(uint* baseAddress, Vector128<int> index, byte scale)
+        {
+            switch (scale)
+            {
+                case 1:
+                    return GatherVector128(baseAddress, index, 1);
+                case 2:
+                    return GatherVector128(baseAddress, index, 2);
+                case 4:
+                    return GatherVector128(baseAddress, index, 4);
+                case 8:
+                    return GatherVector128(baseAddress, index, 8);
+                default:
+                    throw new ArgumentOutOfRangeException(nameof(scale));
+            }
+        }
         /// <summary>
         /// __m128i _mm_i32gather_epi64 (__int64 const* base_addr, __m128i vindex, const int scale)
         ///   VPGATHERDQ xmm, vm32x, xmm
+        /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
         /// </summary>
-        public static unsafe Vector128<long> GatherVector128(long* baseAddress, Vector128<int> index, byte scale) => GatherVector128(baseAddress, index, scale);
+        public static unsafe Vector128<long> GatherVector128(long* baseAddress, Vector128<int> index, byte scale)
+        {
+            switch (scale)
+            {
+                case 1:
+                    return GatherVector128(baseAddress, index, 1);
+                case 2:
+                    return GatherVector128(baseAddress, index, 2);
+                case 4:
+                    return GatherVector128(baseAddress, index, 4);
+                case 8:
+                    return GatherVector128(baseAddress, index, 8);
+                default:
+                    throw new ArgumentOutOfRangeException(nameof(scale));
+            }
+        }
         /// <summary>
         /// __m128i _mm_i32gather_epi64 (__int64 const* base_addr, __m128i vindex, const int scale)
         ///   VPGATHERDQ xmm, vm32x, xmm
+        /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
         /// </summary>
-        public static unsafe Vector128<ulong> GatherVector128(ulong* baseAddress, Vector128<int> index, byte scale) => GatherVector128(baseAddress, index, scale);
+        public static unsafe Vector128<ulong> GatherVector128(ulong* baseAddress, Vector128<int> index, byte scale)
+        {
+            switch (scale)
+            {
+                case 1:
+                    return GatherVector128(baseAddress, index, 1);
+                case 2:
+                    return GatherVector128(baseAddress, index, 2);
+                case 4:
+                    return GatherVector128(baseAddress, index, 4);
+                case 8:
+                    return GatherVector128(baseAddress, index, 8);
+                default:
+                    throw new ArgumentOutOfRangeException(nameof(scale));
+            }
+        }
         /// <summary>
         /// __m128 _mm_i32gather_ps (float const* base_addr, __m128i vindex, const int scale)
         ///   VGATHERDPS xmm, vm32x, xmm
+        /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
         /// </summary>
-        public static unsafe Vector128<float> GatherVector128(float* baseAddress, Vector128<int> index, byte scale) => GatherVector128(baseAddress, index, scale);
+        public static unsafe Vector128<float> GatherVector128(float* baseAddress, Vector128<int> index, byte scale)
+        {
+            switch (scale)
+            {
+                case 1:
+                    return GatherVector128(baseAddress, index, 1);
+                case 2:
+                    return GatherVector128(baseAddress, index, 2);
+                case 4:
+                    return GatherVector128(baseAddress, index, 4);
+                case 8:
+                    return GatherVector128(baseAddress, index, 8);
+                default:
+                    throw new ArgumentOutOfRangeException(nameof(scale));
+            }
+        }
         /// <summary>
         /// __m128d _mm_i32gather_pd (double const* base_addr, __m128i vindex, const int scale)
         ///   VGATHERDPD xmm, vm32x, xmm
+        /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
         /// </summary>
-        public static unsafe Vector128<double> GatherVector128(double* baseAddress, Vector128<int> index, byte scale) => GatherVector128(baseAddress, index, scale);
+        public static unsafe Vector128<double> GatherVector128(double* baseAddress, Vector128<int> index, byte scale)
+        {
+            switch (scale)
+            {
+                case 1:
+                    return GatherVector128(baseAddress, index, 1);
+                case 2:
+                    return GatherVector128(baseAddress, index, 2);
+                case 4:
+                    return GatherVector128(baseAddress, index, 4);
+                case 8:
+                    return GatherVector128(baseAddress, index, 8);
+                default:
+                    throw new ArgumentOutOfRangeException(nameof(scale));
+            }
+        }
         /// <summary>
         /// __m128i _mm_i64gather_epi32 (int const* base_addr, __m128i vindex, const int scale)
         ///   VPGATHERQD xmm, vm64x, xmm
+        /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
         /// </summary>
-        public static unsafe Vector128<int> GatherVector128(int* baseAddress, Vector128<long> index, byte scale) => GatherVector128(baseAddress, index, scale);
+        public static unsafe Vector128<int> GatherVector128(int* baseAddress, Vector128<long> index, byte scale)
+        {
+            switch (scale)
+            {
+                case 1:
+                    return GatherVector128(baseAddress, index, 1);
+                case 2:
+                    return GatherVector128(baseAddress, index, 2);
+                case 4:
+                    return GatherVector128(baseAddress, index, 4);
+                case 8:
+                    return GatherVector128(baseAddress, index, 8);
+                default:
+                    throw new ArgumentOutOfRangeException(nameof(scale));
+            }
+        }
         /// <summary>
         /// __m128i _mm_i64gather_epi32 (int const* base_addr, __m128i vindex, const int scale)
         ///   VPGATHERQD xmm, vm64x, xmm
+        /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
         /// </summary>
-        public static unsafe Vector128<uint> GatherVector128(uint* baseAddress, Vector128<long> index, byte scale) => GatherVector128(baseAddress, index, scale);
+        public static unsafe Vector128<uint> GatherVector128(uint* baseAddress, Vector128<long> index, byte scale)
+        {
+            switch (scale)
+            {
+                case 1:
+                    return GatherVector128(baseAddress, index, 1);
+                case 2:
+                    return GatherVector128(baseAddress, index, 2);
+                case 4:
+                    return GatherVector128(baseAddress, index, 4);
+                case 8:
+                    return GatherVector128(baseAddress, index, 8);
+                default:
+                    throw new ArgumentOutOfRangeException(nameof(scale));
+            }
+        }
         /// <summary>
         /// __m128i _mm_i64gather_epi64 (__int64 const* base_addr, __m128i vindex, const int scale)
         ///   VPGATHERQQ xmm, vm64x, xmm
+        /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
         /// </summary>
-        public static unsafe Vector128<long> GatherVector128(long* baseAddress, Vector128<long> index, byte scale) => GatherVector128(baseAddress, index, scale);
+        public static unsafe Vector128<long> GatherVector128(long* baseAddress, Vector128<long> index, byte scale)
+        {
+            switch (scale)
+            {
+                case 1:
+                    return GatherVector128(baseAddress, index, 1);
+                case 2:
+                    return GatherVector128(baseAddress, index, 2);
+                case 4:
+                    return GatherVector128(baseAddress, index, 4);
+                case 8:
+                    return GatherVector128(baseAddress, index, 8);
+                default:
+                    throw new ArgumentOutOfRangeException(nameof(scale));
+            }
+        }
         /// <summary>
         /// __m128i _mm_i64gather_epi64 (__int64 const* base_addr, __m128i vindex, const int scale)
         ///   VPGATHERQQ xmm, vm64x, xmm
+        /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
         /// </summary>
-        public static unsafe Vector128<ulong> GatherVector128(ulong* baseAddress, Vector128<long> index, byte scale) => GatherVector128(baseAddress, index, scale);
+        public static unsafe Vector128<ulong> GatherVector128(ulong* baseAddress, Vector128<long> index, byte scale)
+        {
+            switch (scale)
+            {
+                case 1:
+                    return GatherVector128(baseAddress, index, 1);
+                case 2:
+                    return GatherVector128(baseAddress, index, 2);
+                case 4:
+                    return GatherVector128(baseAddress, index, 4);
+                case 8:
+                    return GatherVector128(baseAddress, index, 8);
+                default:
+                    throw new ArgumentOutOfRangeException(nameof(scale));
+            }
+        }
         /// <summary>
         /// __m128 _mm_i64gather_ps (float const* base_addr, __m128i vindex, const int scale)
         ///   VGATHERQPS xmm, vm64x, xmm
+        /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
         /// </summary>
-        public static unsafe Vector128<float> GatherVector128(float* baseAddress, Vector128<long> index, byte scale) => GatherVector128(baseAddress, index, scale);
+        public static unsafe Vector128<float> GatherVector128(float* baseAddress, Vector128<long> index, byte scale)
+        {
+            switch (scale)
+            {
+                case 1:
+                    return GatherVector128(baseAddress, index, 1);
+                case 2:
+                    return GatherVector128(baseAddress, index, 2);
+                case 4:
+                    return GatherVector128(baseAddress, index, 4);
+                case 8:
+                    return GatherVector128(baseAddress, index, 8);
+                default:
+                    throw new ArgumentOutOfRangeException(nameof(scale));
+            }
+        }
         /// <summary>
         /// __m128d _mm_i64gather_pd (double const* base_addr, __m128i vindex, const int scale)
         ///   VGATHERQPD xmm, vm64x, xmm
+        /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
         /// </summary>
-        public static unsafe Vector128<double> GatherVector128(double* baseAddress, Vector128<long> index, byte scale) => GatherVector128(baseAddress, index, scale);
+        public static unsafe Vector128<double> GatherVector128(double* baseAddress, Vector128<long> index, byte scale)
+        {
+            switch (scale)
+            {
+                case 1:
+                    return GatherVector128(baseAddress, index, 1);
+                case 2:
+                    return GatherVector128(baseAddress, index, 2);
+                case 4:
+                    return GatherVector128(baseAddress, index, 4);
+                case 8:
+                    return GatherVector128(baseAddress, index, 8);
+                default:
+                    throw new ArgumentOutOfRangeException(nameof(scale));
+            }
+        }
         /// <summary>
         /// __m256i _mm256_i32gather_epi32 (int const* base_addr, __m256i vindex, const int scale)
         ///   VPGATHERDD ymm, vm32y, ymm
+        /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
         /// </summary>
-        public static unsafe Vector256<int> GatherVector256(int* baseAddress, Vector256<int> index, byte scale) => GatherVector256(baseAddress, index, scale);
+        public static unsafe Vector256<int> GatherVector256(int* baseAddress, Vector256<int> index, byte scale)
+        {
+            switch (scale)
+            {
+                case 1:
+                    return GatherVector256(baseAddress, index, 1);
+                case 2:
+                    return GatherVector256(baseAddress, index, 2);
+                case 4:
+                    return GatherVector256(baseAddress, index, 4);
+                case 8:
+                    return GatherVector256(baseAddress, index, 8);
+                default:
+                    throw new ArgumentOutOfRangeException(nameof(scale));
+            }
+        }
         /// <summary>
         /// __m256i _mm256_i32gather_epi32 (int const* base_addr, __m256i vindex, const int scale)
         ///   VPGATHERDD ymm, vm32y, ymm
+        /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
         /// </summary>
-        public static unsafe Vector256<uint> GatherVector256(uint* baseAddress, Vector256<int> index, byte scale) => GatherVector256(baseAddress, index, scale);
+        public static unsafe Vector256<uint> GatherVector256(uint* baseAddress, Vector256<int> index, byte scale)
+        {
+            switch (scale)
+            {
+                case 1:
+                    return GatherVector256(baseAddress, index, 1);
+                case 2:
+                    return GatherVector256(baseAddress, index, 2);
+                case 4:
+                    return GatherVector256(baseAddress, index, 4);
+                case 8:
+                    return GatherVector256(baseAddress, index, 8);
+                default:
+                    throw new ArgumentOutOfRangeException(nameof(scale));
+            }
+        }
         /// <summary>
         /// __m256i _mm256_i32gather_epi64 (__int64 const* base_addr, __m128i vindex, const int scale)
         ///   VPGATHERDQ ymm, vm32y, ymm
+        /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
         /// </summary>
-        public static unsafe Vector256<long> GatherVector256(long* baseAddress, Vector128<int> index, byte scale) => GatherVector256(baseAddress, index, scale);
+        public static unsafe Vector256<long> GatherVector256(long* baseAddress, Vector128<int> index, byte scale)
+        {
+            switch (scale)
+            {
+                case 1:
+                    return GatherVector256(baseAddress, index, 1);
+                case 2:
+                    return GatherVector256(baseAddress, index, 2);
+                case 4:
+                    return GatherVector256(baseAddress, index, 4);
+                case 8:
+                    return GatherVector256(baseAddress, index, 8);
+                default:
+                    throw new ArgumentOutOfRangeException(nameof(scale));
+            }
+        }
         /// <summary>
         /// __m256i _mm256_i32gather_epi64 (__int64 const* base_addr, __m128i vindex, const int scale)
         ///   VPGATHERDQ ymm, vm32y, ymm
+        /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
         /// </summary>
-        public static unsafe Vector256<ulong> GatherVector256(ulong* baseAddress, Vector128<int> index, byte scale) => GatherVector256(baseAddress, index, scale);
+        public static unsafe Vector256<ulong> GatherVector256(ulong* baseAddress, Vector128<int> index, byte scale)
+        {
+            switch (scale)
+            {
+                case 1:
+                    return GatherVector256(baseAddress, index, 1);
+                case 2:
+                    return GatherVector256(baseAddress, index, 2);
+                case 4:
+                    return GatherVector256(baseAddress, index, 4);
+                case 8:
+                    return GatherVector256(baseAddress, index, 8);
+                default:
+                    throw new ArgumentOutOfRangeException(nameof(scale));
+            }
+        }
         /// <summary>
         /// __m256 _mm256_i32gather_ps (float const* base_addr, __m256i vindex, const int scale)
         ///   VGATHERDPS ymm, vm32y, ymm
+        /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
         /// </summary>
-        public static unsafe Vector256<float> GatherVector256(float* baseAddress, Vector256<int> index, byte scale) => GatherVector256(baseAddress, index, scale);
+        public static unsafe Vector256<float> GatherVector256(float* baseAddress, Vector256<int> index, byte scale)
+        {
+            switch (scale)
+            {
+                case 1:
+                    return GatherVector256(baseAddress, index, 1);
+                case 2:
+                    return GatherVector256(baseAddress, index, 2);
+                case 4:
+                    return GatherVector256(baseAddress, index, 4);
+                case 8:
+                    return GatherVector256(baseAddress, index, 8);
+                default:
+                    throw new ArgumentOutOfRangeException(nameof(scale));
+            }
+        }
         /// <summary>
         /// __m256d _mm256_i32gather_pd (double const* base_addr, __m128i vindex, const int scale)
         ///   VGATHERDPD ymm, vm32y, ymm
+        /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
         /// </summary>
-        public static unsafe Vector256<double> GatherVector256(double* baseAddress, Vector128<int> index, byte scale) => GatherVector256(baseAddress, index, scale);
+        public static unsafe Vector256<double> GatherVector256(double* baseAddress, Vector128<int> index, byte scale)
+        {
+            switch (scale)
+            {
+                case 1:
+                    return GatherVector256(baseAddress, index, 1);
+                case 2:
+                    return GatherVector256(baseAddress, index, 2);
+                case 4:
+                    return GatherVector256(baseAddress, index, 4);
+                case 8:
+                    return GatherVector256(baseAddress, index, 8);
+                default:
+                    throw new ArgumentOutOfRangeException(nameof(scale));
+            }
+        }
         /// <summary>
         /// __m128i _mm256_i64gather_epi32 (int const* base_addr, __m256i vindex, const int scale)
-        ///   VPGATHERQD ymm, vm64y, ymm
+        ///   VPGATHERQD xmm, vm64y, xmm
+        /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
         /// </summary>
-        public static unsafe Vector128<int> GatherVector128(int* baseAddress, Vector256<long> index, byte scale) => GatherVector128(baseAddress, index, scale);
+        public static unsafe Vector128<int> GatherVector128(int* baseAddress, Vector256<long> index, byte scale)
+        {
+            switch (scale)
+            {
+                case 1:
+                    return GatherVector128(baseAddress, index, 1);
+                case 2:
+                    return GatherVector128(baseAddress, index, 2);
+                case 4:
+                    return GatherVector128(baseAddress, index, 4);
+                case 8:
+                    return GatherVector128(baseAddress, index, 8);
+                default:
+                    throw new ArgumentOutOfRangeException(nameof(scale));
+            }
+        }
         /// <summary>
         /// __m128i _mm256_i64gather_epi32 (int const* base_addr, __m256i vindex, const int scale)
-        ///   VPGATHERQD ymm, vm64y, ymm
+        ///   VPGATHERQD xmm, vm64y, xmm
+        /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
         /// </summary>
-        public static unsafe Vector128<uint> GatherVector128(uint* baseAddress, Vector256<long> index, byte scale) => GatherVector128(baseAddress, index, scale);
+        public static unsafe Vector128<uint> GatherVector128(uint* baseAddress, Vector256<long> index, byte scale)
+        {
+            switch (scale)
+            {
+                case 1:
+                    return GatherVector128(baseAddress, index, 1);
+                case 2:
+                    return GatherVector128(baseAddress, index, 2);
+                case 4:
+                    return GatherVector128(baseAddress, index, 4);
+                case 8:
+                    return GatherVector128(baseAddress, index, 8);
+                default:
+                    throw new ArgumentOutOfRangeException(nameof(scale));
+            }
+        }
         /// <summary>
         /// __m256i _mm256_i64gather_epi64 (__int64 const* base_addr, __m256i vindex, const int scale)
         ///   VPGATHERQQ ymm, vm64y, ymm
+        /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
         /// </summary>
-        public static unsafe Vector256<long> GatherVector256(long* baseAddress, Vector256<long> index, byte scale) => GatherVector256(baseAddress, index, scale);
+        public static unsafe Vector256<long> GatherVector256(long* baseAddress, Vector256<long> index, byte scale)
+        {
+            switch (scale)
+            {
+                case 1:
+                    return GatherVector256(baseAddress, index, 1);
+                case 2:
+                    return GatherVector256(baseAddress, index, 2);
+                case 4:
+                    return GatherVector256(baseAddress, index, 4);
+                case 8:
+                    return GatherVector256(baseAddress, index, 8);
+                default:
+                    throw new ArgumentOutOfRangeException(nameof(scale));
+            }
+        }
         /// <summary>
         /// __m256i _mm256_i64gather_epi64 (__int64 const* base_addr, __m256i vindex, const int scale)
         ///   VPGATHERQQ ymm, vm64y, ymm
+        /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
         /// </summary>
-        public static unsafe Vector256<ulong> GatherVector256(ulong* baseAddress, Vector256<long> index, byte scale) => GatherVector256(baseAddress, index, scale);
+        public static unsafe Vector256<ulong> GatherVector256(ulong* baseAddress, Vector256<long> index, byte scale)
+        {
+            switch (scale)
+            {
+                case 1:
+                    return GatherVector256(baseAddress, index, 1);
+                case 2:
+                    return GatherVector256(baseAddress, index, 2);
+                case 4:
+                    return GatherVector256(baseAddress, index, 4);
+                case 8:
+                    return GatherVector256(baseAddress, index, 8);
+                default:
+                    throw new ArgumentOutOfRangeException(nameof(scale));
+            }
+        }
         /// <summary>
         /// __m128 _mm256_i64gather_ps (float const* base_addr, __m256i vindex, const int scale)
-        ///   VGATHERQPS ymm, vm64y, ymm
+        ///   VGATHERQPS xmm, vm64y, xmm
+        /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
         /// </summary>
-        public static unsafe Vector128<float> GatherVector128(float* baseAddress, Vector256<long> index, byte scale) => GatherVector128(baseAddress, index, scale);
+        public static unsafe Vector128<float> GatherVector128(float* baseAddress, Vector256<long> index, byte scale) 
+        {
+            switch (scale)
+            {
+                case 1:
+                    return GatherVector128(baseAddress, index, 1);
+                case 2:
+                    return GatherVector128(baseAddress, index, 2);
+                case 4:
+                    return GatherVector128(baseAddress, index, 4);
+                case 8:
+                    return GatherVector128(baseAddress, index, 8);
+                default:
+                    throw new ArgumentOutOfRangeException(nameof(scale));
+            }
+        }
         /// <summary>
         /// __m256d _mm256_i64gather_pd (double const* base_addr, __m256i vindex, const int scale)
         ///   VGATHERQPD ymm, vm64y, ymm
+        /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
         /// </summary>
-        public static unsafe Vector256<double> GatherVector256(double* baseAddress, Vector256<long> index, byte scale) => GatherVector256(baseAddress, index, scale);
+        public static unsafe Vector256<double> GatherVector256(double* baseAddress, Vector256<long> index, byte scale)
+        {
+            switch (scale)
+            {
+                case 1:
+                    return GatherVector256(baseAddress, index, 1);
+                case 2:
+                    return GatherVector256(baseAddress, index, 2);
+                case 4:
+                    return GatherVector256(baseAddress, index, 4);
+                case 8:
+                    return GatherVector256(baseAddress, index, 8);
+                default:
+                    throw new ArgumentOutOfRangeException(nameof(scale));
+            }
+        }
 
         /// <summary>
         /// __m128i _mm_mask_i32gather_epi32 (__m128i src, int const* base_addr, __m128i vindex, __m128i mask, const int scale)
         ///   VPGATHERDD xmm, vm32x, xmm
+        /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
         /// </summary>
-        public static unsafe Vector128<int> GatherMaskVector128(Vector128<int> source, int* baseAddress, Vector128<int> index, Vector128<int> mask, byte scale) => GatherMaskVector128(source, baseAddress, index, mask, scale);
+        public static unsafe Vector128<int> GatherMaskVector128(Vector128<int> source, int* baseAddress, Vector128<int> index, Vector128<int> mask, byte scale)
+        {
+            switch (scale)
+            {
+                case 1:
+                    return GatherMaskVector128(source, baseAddress, index, mask, 1);
+                case 2:
+                    return GatherMaskVector128(source, baseAddress, index, mask, 2);
+                case 4:
+                    return GatherMaskVector128(source, baseAddress, index, mask, 4);
+                case 8:
+                    return GatherMaskVector128(source, baseAddress, index, mask, 8);
+                default:
+                    throw new ArgumentOutOfRangeException(nameof(scale));
+            }
+        }
         /// <summary>
         /// __m128i _mm_mask_i32gather_epi32 (__m128i src, int const* base_addr, __m128i vindex, __m128i mask, const int scale)
         ///   VPGATHERDD xmm, vm32x, xmm
+        /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
         /// </summary>
-        public static unsafe Vector128<uint> GatherMaskVector128(Vector128<uint> source, uint* baseAddress, Vector128<int> index, Vector128<uint> mask, byte scale) => GatherMaskVector128(source, baseAddress, index, mask, scale);
+        public static unsafe Vector128<uint> GatherMaskVector128(Vector128<uint> source, uint* baseAddress, Vector128<int> index, Vector128<uint> mask, byte scale)
+        {
+            switch (scale)
+            {
+                case 1:
+                    return GatherMaskVector128(source, baseAddress, index, mask, 1);
+                case 2:
+                    return GatherMaskVector128(source, baseAddress, index, mask, 2);
+                case 4:
+                    return GatherMaskVector128(source, baseAddress, index, mask, 4);
+                case 8:
+                    return GatherMaskVector128(source, baseAddress, index, mask, 8);
+                default:
+                    throw new ArgumentOutOfRangeException(nameof(scale));
+            }
+        }
         /// <summary>
         /// __m128i _mm_mask_i32gather_epi64 (__m128i src, __int64 const* base_addr, __m128i vindex, __m128i mask, const int scale)
         ///   VPGATHERDQ xmm, vm32x, xmm
+        /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
         /// </summary>
-        public static unsafe Vector128<long> GatherMaskVector128(Vector128<long> source, long* baseAddress, Vector128<int> index, Vector128<long> mask, byte scale) => GatherMaskVector128(source, baseAddress, index, mask, scale);
+        public static unsafe Vector128<long> GatherMaskVector128(Vector128<long> source, long* baseAddress, Vector128<int> index, Vector128<long> mask, byte scale)
+        {
+            switch (scale)
+            {
+                case 1:
+                    return GatherMaskVector128(source, baseAddress, index, mask, 1);
+                case 2:
+                    return GatherMaskVector128(source, baseAddress, index, mask, 2);
+                case 4:
+                    return GatherMaskVector128(source, baseAddress, index, mask, 4);
+                case 8:
+                    return GatherMaskVector128(source, baseAddress, index, mask, 8);
+                default:
+                    throw new ArgumentOutOfRangeException(nameof(scale));
+            }
+        }
         /// <summary>
         /// __m128i _mm_mask_i32gather_epi64 (__m128i src, __int64 const* base_addr, __m128i vindex, __m128i mask, const int scale)
         ///   VPGATHERDQ xmm, vm32x, xmm
+        /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
         /// </summary>
-        public static unsafe Vector128<ulong> GatherMaskVector128(Vector128<ulong> source, ulong* baseAddress, Vector128<int> index, Vector128<ulong> mask, byte scale) => GatherMaskVector128(source, baseAddress, index, mask, scale);
+        public static unsafe Vector128<ulong> GatherMaskVector128(Vector128<ulong> source, ulong* baseAddress, Vector128<int> index, Vector128<ulong> mask, byte scale)
+        {
+            switch (scale)
+            {
+                case 1:
+                    return GatherMaskVector128(source, baseAddress, index, mask, 1);
+                case 2:
+                    return GatherMaskVector128(source, baseAddress, index, mask, 2);
+                case 4:
+                    return GatherMaskVector128(source, baseAddress, index, mask, 4);
+                case 8:
+                    return GatherMaskVector128(source, baseAddress, index, mask, 8);
+                default:
+                    throw new ArgumentOutOfRangeException(nameof(scale));
+            }
+        }
         /// <summary>
         /// __m128 _mm_mask_i32gather_ps (__m128 src, float const* base_addr, __m128i vindex, __m128 mask, const int scale)
         ///   VGATHERDPS xmm, vm32x, xmm
+        /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
         /// </summary>
-        public static unsafe Vector128<float> GatherMaskVector128(Vector128<float> source, float* baseAddress, Vector128<int> index, Vector128<float> mask, byte scale) => GatherMaskVector128(source, baseAddress, index, mask, scale);
+        public static unsafe Vector128<float> GatherMaskVector128(Vector128<float> source, float* baseAddress, Vector128<int> index, Vector128<float> mask, byte scale)
+        {
+            switch (scale)
+            {
+                case 1:
+                    return GatherMaskVector128(source, baseAddress, index, mask, 1);
+                case 2:
+                    return GatherMaskVector128(source, baseAddress, index, mask, 2);
+                case 4:
+                    return GatherMaskVector128(source, baseAddress, index, mask, 4);
+                case 8:
+                    return GatherMaskVector128(source, baseAddress, index, mask, 8);
+                default:
+                    throw new ArgumentOutOfRangeException(nameof(scale));
+            }
+        }
         /// <summary>
         /// __m128d _mm_mask_i32gather_pd (__m128d src, double const* base_addr, __m128i vindex, __m128d mask, const int scale)
         ///   VGATHERDPD xmm, vm32x, xmm
+        /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
         /// </summary>
-        public static unsafe Vector128<double> GatherMaskVector128(Vector128<double> source, double* baseAddress, Vector128<int> index, Vector128<double> mask, byte scale) => GatherMaskVector128(source, baseAddress, index, mask, scale);
+        public static unsafe Vector128<double> GatherMaskVector128(Vector128<double> source, double* baseAddress, Vector128<int> index, Vector128<double> mask, byte scale)
+        {
+            switch (scale)
+            {
+                case 1:
+                    return GatherMaskVector128(source, baseAddress, index, mask, 1);
+                case 2:
+                    return GatherMaskVector128(source, baseAddress, index, mask, 2);
+                case 4:
+                    return GatherMaskVector128(source, baseAddress, index, mask, 4);
+                case 8:
+                    return GatherMaskVector128(source, baseAddress, index, mask, 8);
+                default:
+                    throw new ArgumentOutOfRangeException(nameof(scale));
+            }
+        }
         /// <summary>
         /// __m128i _mm_mask_i64gather_epi32 (__m128i src, int const* base_addr, __m128i vindex, __m128i mask, const int scale)
         ///   VPGATHERQD xmm, vm64x, xmm
+        /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
         /// </summary>
-        public static unsafe Vector128<int> GatherMaskVector128(Vector128<int> source, int* baseAddress, Vector128<long> index, Vector128<int> mask, byte scale) => GatherMaskVector128(source, baseAddress, index, mask, scale);
+        public static unsafe Vector128<int> GatherMaskVector128(Vector128<int> source, int* baseAddress, Vector128<long> index, Vector128<int> mask, byte scale)
+        {
+            switch (scale)
+            {
+                case 1:
+                    return GatherMaskVector128(source, baseAddress, index, mask, 1);
+                case 2:
+                    return GatherMaskVector128(source, baseAddress, index, mask, 2);
+                case 4:
+                    return GatherMaskVector128(source, baseAddress, index, mask, 4);
+                case 8:
+                    return GatherMaskVector128(source, baseAddress, index, mask, 8);
+                default:
+                    throw new ArgumentOutOfRangeException(nameof(scale));
+            }
+        }
         /// <summary>
         /// __m128i _mm_mask_i64gather_epi32 (__m128i src, int const* base_addr, __m128i vindex, __m128i mask, const int scale)
         ///   VPGATHERQD xmm, vm64x, xmm
+        /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
         /// </summary>
-        public static unsafe Vector128<uint> GatherMaskVector128(Vector128<uint> source, uint* baseAddress, Vector128<long> index, Vector128<uint> mask, byte scale) => GatherMaskVector128(source, baseAddress, index, mask, scale);
+        public static unsafe Vector128<uint> GatherMaskVector128(Vector128<uint> source, uint* baseAddress, Vector128<long> index, Vector128<uint> mask, byte scale)
+        {
+            switch (scale)
+            {
+                case 1:
+                    return GatherMaskVector128(source, baseAddress, index, mask, 1);
+                case 2:
+                    return GatherMaskVector128(source, baseAddress, index, mask, 2);
+                case 4:
+                    return GatherMaskVector128(source, baseAddress, index, mask, 4);
+                case 8:
+                    return GatherMaskVector128(source, baseAddress, index, mask, 8);
+                default:
+                    throw new ArgumentOutOfRangeException(nameof(scale));
+            }
+        }
         /// <summary>
         /// __m128i _mm_mask_i64gather_epi64 (__m128i src, __int64 const* base_addr, __m128i vindex, __m128i mask, const int scale)
         ///   VPGATHERQQ xmm, vm64x, xmm
+        /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
         /// </summary>
-        public static unsafe Vector128<long> GatherMaskVector128(Vector128<long> source, long* baseAddress, Vector128<long> index, Vector128<long> mask, byte scale) => GatherMaskVector128(source, baseAddress, index, mask, scale);
+        public static unsafe Vector128<long> GatherMaskVector128(Vector128<long> source, long* baseAddress, Vector128<long> index, Vector128<long> mask, byte scale)
+        {
+            switch (scale)
+            {
+                case 1:
+                    return GatherMaskVector128(source, baseAddress, index, mask, 1);
+                case 2:
+                    return GatherMaskVector128(source, baseAddress, index, mask, 2);
+                case 4:
+                    return GatherMaskVector128(source, baseAddress, index, mask, 4);
+                case 8:
+                    return GatherMaskVector128(source, baseAddress, index, mask, 8);
+                default:
+                    throw new ArgumentOutOfRangeException(nameof(scale));
+            }
+        }
         /// <summary>
         /// __m128i _mm_mask_i64gather_epi64 (__m128i src, __int64 const* base_addr, __m128i vindex, __m128i mask, const int scale)
         ///   VPGATHERQQ xmm, vm64x, xmm
+        /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
         /// </summary>
-        public static unsafe Vector128<ulong> GatherMaskVector128(Vector128<ulong> source, ulong* baseAddress, Vector128<long> index, Vector128<ulong> mask, byte scale) => GatherMaskVector128(source, baseAddress, index, mask, scale);
+        public static unsafe Vector128<ulong> GatherMaskVector128(Vector128<ulong> source, ulong* baseAddress, Vector128<long> index, Vector128<ulong> mask, byte scale)
+        {
+            switch (scale)
+            {
+                case 1:
+                    return GatherMaskVector128(source, baseAddress, index, mask, 1);
+                case 2:
+                    return GatherMaskVector128(source, baseAddress, index, mask, 2);
+                case 4:
+                    return GatherMaskVector128(source, baseAddress, index, mask, 4);
+                case 8:
+                    return GatherMaskVector128(source, baseAddress, index, mask, 8);
+                default:
+                    throw new ArgumentOutOfRangeException(nameof(scale));
+            }
+        }
         /// <summary>
         /// __m128 _mm_mask_i64gather_ps (__m128 src, float const* base_addr, __m128i vindex, __m128 mask, const int scale)
-        ///   VPGATHERQPS xmm, vm64x, xmm
+        ///   VGATHERQPS xmm, vm64x, xmm
+        /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
         /// </summary>
-        public static unsafe Vector128<float> GatherMaskVector128(Vector128<float> source, float* baseAddress, Vector128<long> index, Vector128<float> mask, byte scale) => GatherMaskVector128(source, baseAddress, index, mask, scale);
+        public static unsafe Vector128<float> GatherMaskVector128(Vector128<float> source, float* baseAddress, Vector128<long> index, Vector128<float> mask, byte scale)
+        {
+            switch (scale)
+            {
+                case 1:
+                    return GatherMaskVector128(source, baseAddress, index, mask, 1);
+                case 2:
+                    return GatherMaskVector128(source, baseAddress, index, mask, 2);
+                case 4:
+                    return GatherMaskVector128(source, baseAddress, index, mask, 4);
+                case 8:
+                    return GatherMaskVector128(source, baseAddress, index, mask, 8);
+                default:
+                    throw new ArgumentOutOfRangeException(nameof(scale));
+            }
+        }
         /// <summary>
         /// __m128d _mm_mask_i64gather_pd (__m128d src, double const* base_addr, __m128i vindex, __m128d mask, const int scale)
-        ///   VPGATHERQPD xmm, vm64x, xmm
+        ///   VGATHERQPD xmm, vm64x, xmm
+        /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
         /// </summary>
-        public static unsafe Vector128<double> GatherMaskVector128(Vector128<double> source, double* baseAddress, Vector128<long> index, Vector128<double> mask, byte scale) => GatherMaskVector128(source, baseAddress, index, mask, scale);
+        public static unsafe Vector128<double> GatherMaskVector128(Vector128<double> source, double* baseAddress, Vector128<long> index, Vector128<double> mask, byte scale)
+        {
+            switch (scale)
+            {
+                case 1:
+                    return GatherMaskVector128(source, baseAddress, index, mask, 1);
+                case 2:
+                    return GatherMaskVector128(source, baseAddress, index, mask, 2);
+                case 4:
+                    return GatherMaskVector128(source, baseAddress, index, mask, 4);
+                case 8:
+                    return GatherMaskVector128(source, baseAddress, index, mask, 8);
+                default:
+                    throw new ArgumentOutOfRangeException(nameof(scale));
+            }
+        }
         /// <summary>
         /// __m256i _mm256_mask_i32gather_epi32 (__m256i src, int const* base_addr, __m256i vindex, __m256i mask, const int scale)
         ///   VPGATHERDD ymm, vm32y, ymm
+        /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
         /// </summary>
-        public static unsafe Vector256<int> GatherMaskVector256(Vector256<int> source, int* baseAddress, Vector256<int> index, Vector256<int> mask, byte scale) => GatherMaskVector256(source, baseAddress, index, mask, scale);
+        public static unsafe Vector256<int> GatherMaskVector256(Vector256<int> source, int* baseAddress, Vector256<int> index, Vector256<int> mask, byte scale)
+        {
+            switch (scale)
+            {
+                case 1:
+                    return GatherMaskVector256(source, baseAddress, index, mask, 1);
+                case 2:
+                    return GatherMaskVector256(source, baseAddress, index, mask, 2);
+                case 4:
+                    return GatherMaskVector256(source, baseAddress, index, mask, 4);
+                case 8:
+                    return GatherMaskVector256(source, baseAddress, index, mask, 8);
+                default:
+                    throw new ArgumentOutOfRangeException(nameof(scale));
+            }
+        }
         /// <summary>
         /// __m256i _mm256_mask_i32gather_epi32 (__m256i src, int const* base_addr, __m256i vindex, __m256i mask, const int scale)
         ///   VPGATHERDD ymm, vm32y, ymm
+        /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
         /// </summary>
-        public static unsafe Vector256<uint> GatherMaskVector256(Vector256<uint> source, uint* baseAddress, Vector256<int> index, Vector256<uint> mask, byte scale) => GatherMaskVector256(source, baseAddress, index, mask, scale);
+        public static unsafe Vector256<uint> GatherMaskVector256(Vector256<uint> source, uint* baseAddress, Vector256<int> index, Vector256<uint> mask, byte scale)
+        {
+            switch (scale)
+            {
+                case 1:
+                    return GatherMaskVector256(source, baseAddress, index, mask, 1);
+                case 2:
+                    return GatherMaskVector256(source, baseAddress, index, mask, 2);
+                case 4:
+                    return GatherMaskVector256(source, baseAddress, index, mask, 4);
+                case 8:
+                    return GatherMaskVector256(source, baseAddress, index, mask, 8);
+                default:
+                    throw new ArgumentOutOfRangeException(nameof(scale));
+            }
+        }
         /// <summary>
         /// __m256i _mm256_mask_i32gather_epi64 (__m256i src, __int64 const* base_addr, __m128i vindex, __m256i mask, const int scale)
         ///   VPGATHERDQ ymm, vm32y, ymm
+        /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
         /// </summary>
-        public static unsafe Vector256<long> GatherMaskVector256(Vector256<long> source, long* baseAddress, Vector128<int> index, Vector256<long> mask, byte scale) => GatherMaskVector256(source, baseAddress, index, mask, scale);
+        public static unsafe Vector256<long> GatherMaskVector256(Vector256<long> source, long* baseAddress, Vector128<int> index, Vector256<long> mask, byte scale)
+        {
+            switch (scale)
+            {
+                case 1:
+                    return GatherMaskVector256(source, baseAddress, index, mask, 1);
+                case 2:
+                    return GatherMaskVector256(source, baseAddress, index, mask, 2);
+                case 4:
+                    return GatherMaskVector256(source, baseAddress, index, mask, 4);
+                case 8:
+                    return GatherMaskVector256(source, baseAddress, index, mask, 8);
+                default:
+                    throw new ArgumentOutOfRangeException(nameof(scale));
+            }
+        }
         /// <summary>
         /// __m256i _mm256_mask_i32gather_epi64 (__m256i src, __int64 const* base_addr, __m128i vindex, __m256i mask, const int scale)
         ///   VPGATHERDQ ymm, vm32y, ymm
+        /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
         /// </summary>
-        public static unsafe Vector256<ulong> GatherMaskVector256(Vector256<ulong> source, ulong* baseAddress, Vector128<int> index, Vector256<ulong> mask, byte scale) => GatherMaskVector256(source, baseAddress, index, mask, scale);
+        public static unsafe Vector256<ulong> GatherMaskVector256(Vector256<ulong> source, ulong* baseAddress, Vector128<int> index, Vector256<ulong> mask, byte scale)
+        {
+            switch (scale)
+            {
+                case 1:
+                    return GatherMaskVector256(source, baseAddress, index, mask, 1);
+                case 2:
+                    return GatherMaskVector256(source, baseAddress, index, mask, 2);
+                case 4:
+                    return GatherMaskVector256(source, baseAddress, index, mask, 4);
+                case 8:
+                    return GatherMaskVector256(source, baseAddress, index, mask, 8);
+                default:
+                    throw new ArgumentOutOfRangeException(nameof(scale));
+            }
+        }
         /// <summary>
         /// __m256 _mm256_mask_i32gather_ps (__m256 src, float const* base_addr, __m256i vindex, __m256 mask, const int scale)
         ///   VPGATHERDPS ymm, vm32y, ymm
+        /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
         /// </summary>
-        public static unsafe Vector256<float> GatherMaskVector256(Vector256<float> source, float* baseAddress, Vector256<int> index, Vector256<float> mask, byte scale) => GatherMaskVector256(source, baseAddress, index, mask, scale);
+        public static unsafe Vector256<float> GatherMaskVector256(Vector256<float> source, float* baseAddress, Vector256<int> index, Vector256<float> mask, byte scale)
+        {
+            switch (scale)
+            {
+                case 1:
+                    return GatherMaskVector256(source, baseAddress, index, mask, 1);
+                case 2:
+                    return GatherMaskVector256(source, baseAddress, index, mask, 2);
+                case 4:
+                    return GatherMaskVector256(source, baseAddress, index, mask, 4);
+                case 8:
+                    return GatherMaskVector256(source, baseAddress, index, mask, 8);
+                default:
+                    throw new ArgumentOutOfRangeException(nameof(scale));
+            }
+        }
         /// <summary>
         /// __m256d _mm256_mask_i32gather_pd (__m256d src, double const* base_addr, __m128i vindex, __m256d mask, const int scale)
         ///   VPGATHERDPD ymm, vm32y, ymm
+        /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
         /// </summary>
-        public static unsafe Vector256<double> GatherMaskVector256(Vector256<double> source, double* baseAddress, Vector128<int> index, Vector256<double> mask, byte scale) => GatherMaskVector256(source, baseAddress, index, mask, scale);
+        public static unsafe Vector256<double> GatherMaskVector256(Vector256<double> source, double* baseAddress, Vector128<int> index, Vector256<double> mask, byte scale)
+        {
+            switch (scale)
+            {
+                case 1:
+                    return GatherMaskVector256(source, baseAddress, index, mask, 1);
+                case 2:
+                    return GatherMaskVector256(source, baseAddress, index, mask, 2);
+                case 4:
+                    return GatherMaskVector256(source, baseAddress, index, mask, 4);
+                case 8:
+                    return GatherMaskVector256(source, baseAddress, index, mask, 8);
+                default:
+                    throw new ArgumentOutOfRangeException(nameof(scale));
+            }
+        }
         /// <summary>
         /// __m128i _mm256_mask_i64gather_epi32 (__m128i src, int const* base_addr, __m256i vindex, __m128i mask, const int scale)
-        ///   VPGATHERQD ymm, vm32y, ymm
+        ///   VPGATHERQD xmm, vm32y, xmm
+        /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
         /// </summary>
-        public static unsafe Vector128<int> GatherMaskVector128(Vector128<int> source, int* baseAddress, Vector256<long> index, Vector128<int> mask, byte scale) => GatherMaskVector128(source, baseAddress, index, mask, scale);
+        public static unsafe Vector128<int> GatherMaskVector128(Vector128<int> source, int* baseAddress, Vector256<long> index, Vector128<int> mask, byte scale)
+        {
+            switch (scale)
+            {
+                case 1:
+                    return GatherMaskVector128(source, baseAddress, index, mask, 1);
+                case 2:
+                    return GatherMaskVector128(source, baseAddress, index, mask, 2);
+                case 4:
+                    return GatherMaskVector128(source, baseAddress, index, mask, 4);
+                case 8:
+                    return GatherMaskVector128(source, baseAddress, index, mask, 8);
+                default:
+                    throw new ArgumentOutOfRangeException(nameof(scale));
+            }
+        }
         /// <summary>
         /// __m128i _mm256_mask_i64gather_epi32 (__m128i src, int const* base_addr, __m256i vindex, __m128i mask, const int scale)
-        ///   VPGATHERQD ymm, vm32y, ymm
+        ///   VPGATHERQD xmm, vm32y, xmm
+        /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
         /// </summary>
-        public static unsafe Vector128<uint> GatherMaskVector128(Vector128<uint> source, uint* baseAddress, Vector256<long> index, Vector128<uint> mask, byte scale) => GatherMaskVector128(source, baseAddress, index, mask, scale);
+        public static unsafe Vector128<uint> GatherMaskVector128(Vector128<uint> source, uint* baseAddress, Vector256<long> index, Vector128<uint> mask, byte scale)
+        {
+            switch (scale)
+            {
+                case 1:
+                    return GatherMaskVector128(source, baseAddress, index, mask, 1);
+                case 2:
+                    return GatherMaskVector128(source, baseAddress, index, mask, 2);
+                case 4:
+                    return GatherMaskVector128(source, baseAddress, index, mask, 4);
+                case 8:
+                    return GatherMaskVector128(source, baseAddress, index, mask, 8);
+                default:
+                    throw new ArgumentOutOfRangeException(nameof(scale));
+            }
+        }
         /// <summary>
         /// __m256i _mm256_mask_i64gather_epi64 (__m256i src, __int64 const* base_addr, __m256i vindex, __m256i mask, const int scale)
         ///   VPGATHERQQ ymm, vm32y, ymm
+        /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
         /// </summary>
-        public static unsafe Vector256<long> GatherMaskVector256(Vector256<long> source, long* baseAddress, Vector256<long> index, Vector256<long> mask, byte scale) => GatherMaskVector256(source, baseAddress, index, mask, scale);
+        public static unsafe Vector256<long> GatherMaskVector256(Vector256<long> source, long* baseAddress, Vector256<long> index, Vector256<long> mask, byte scale)
+        {
+            switch (scale)
+            {
+                case 1:
+                    return GatherMaskVector256(source, baseAddress, index, mask, 1);
+                case 2:
+                    return GatherMaskVector256(source, baseAddress, index, mask, 2);
+                case 4:
+                    return GatherMaskVector256(source, baseAddress, index, mask, 4);
+                case 8:
+                    return GatherMaskVector256(source, baseAddress, index, mask, 8);
+                default:
+                    throw new ArgumentOutOfRangeException(nameof(scale));
+            }
+        }
         /// <summary>
         /// __m256i _mm256_mask_i64gather_epi64 (__m256i src, __int64 const* base_addr, __m256i vindex, __m256i mask, const int scale)
         ///   VPGATHERQQ ymm, vm32y, ymm
+        /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
         /// </summary>
-        public static unsafe Vector256<ulong> GatherMaskVector256(Vector256<ulong> source, ulong* baseAddress, Vector256<long> index, Vector256<ulong> mask, byte scale) => GatherMaskVector256(source, baseAddress, index, mask, scale);
+        public static unsafe Vector256<ulong> GatherMaskVector256(Vector256<ulong> source, ulong* baseAddress, Vector256<long> index, Vector256<ulong> mask, byte scale)
+        {
+            switch (scale)
+            {
+                case 1:
+                    return GatherMaskVector256(source, baseAddress, index, mask, 1);
+                case 2:
+                    return GatherMaskVector256(source, baseAddress, index, mask, 2);
+                case 4:
+                    return GatherMaskVector256(source, baseAddress, index, mask, 4);
+                case 8:
+                    return GatherMaskVector256(source, baseAddress, index, mask, 8);
+                default:
+                    throw new ArgumentOutOfRangeException(nameof(scale));
+            }
+        }
         /// <summary>
         /// __m128 _mm256_mask_i64gather_ps (__m128 src, float const* base_addr, __m256i vindex, __m128 mask, const int scale)
-        ///   VPGATHERQPS ymm, vm32y, ymm
+        ///   VGATHERQPS xmm, vm32y, xmm
+        /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
         /// </summary>
-        public static unsafe Vector128<float> GatherMaskVector128(Vector128<float> source, float* baseAddress, Vector256<long> index, Vector128<float> mask, byte scale) => GatherMaskVector128(source, baseAddress, index, mask, scale);
+        public static unsafe Vector128<float> GatherMaskVector128(Vector128<float> source, float* baseAddress, Vector256<long> index, Vector128<float> mask, byte scale)
+        {
+            switch (scale)
+            {
+                case 1:
+                    return GatherMaskVector128(source, baseAddress, index, mask, 1);
+                case 2:
+                    return GatherMaskVector128(source, baseAddress, index, mask, 2);
+                case 4:
+                    return GatherMaskVector128(source, baseAddress, index, mask, 4);
+                case 8:
+                    return GatherMaskVector128(source, baseAddress, index, mask, 8);
+                default:
+                    throw new ArgumentOutOfRangeException(nameof(scale));
+            }
+        }
         /// <summary>
         /// __m256d _mm256_mask_i64gather_pd (__m256d src, double const* base_addr, __m256i vindex, __m256d mask, const int scale)
-        ///   VPGATHERQPD ymm, vm32y, ymm
+        ///   VGATHERQPD ymm, vm32y, ymm
+        /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
         /// </summary>
-        public static unsafe Vector256<double> GatherMaskVector256(Vector256<double> source, double* baseAddress, Vector256<long> index, Vector256<double> mask, byte scale) => GatherMaskVector256(source, baseAddress, index, mask, scale);
+        public static unsafe Vector256<double> GatherMaskVector256(Vector256<double> source, double* baseAddress, Vector256<long> index, Vector256<double> mask, byte scale)
+        {
+            switch (scale)
+            {
+                case 1:
+                    return GatherMaskVector256(source, baseAddress, index, mask, 1);
+                case 2:
+                    return GatherMaskVector256(source, baseAddress, index, mask, 2);
+                case 4:
+                    return GatherMaskVector256(source, baseAddress, index, mask, 4);
+                case 8:
+                    return GatherMaskVector256(source, baseAddress, index, mask, 8);
+                default:
+                    throw new ArgumentOutOfRangeException(nameof(scale));
+            }
+        }
 
         /// <summary>
         /// __m256i _mm256_hadd_epi16 (__m256i a, __m256i b)