Enable the HWIntrinsic extension methods and remove the instance implementations...
authorTanner Gooding <tagoo@outlook.com>
Thu, 21 Feb 2019 11:09:40 +0000 (03:09 -0800)
committerGitHub <noreply@github.com>
Thu, 21 Feb 2019 11:09:40 +0000 (03:09 -0800)
* Removing various S.R.I.Vector instance method APIs, since they should now be exposed as extension methods

* Updating the JIT to recognize the S.R.I.Vector extension methods.

* Updating various S.R.I.Vector test templates

* Regenerating the S.R.I tests that are created from a template.

* Fixing the numArgs for Base_Vector256_GetLower

* Fixing the handling for `Base_VectorXXX_As` to normalize the struct type.

* Adding the Base_Vector128_As intrinsics back for arm64

196 files changed:
src/System.Private.CoreLib/shared/System/Runtime/Intrinsics/Vector128.cs
src/System.Private.CoreLib/shared/System/Runtime/Intrinsics/Vector128_1.cs
src/System.Private.CoreLib/shared/System/Runtime/Intrinsics/Vector256.cs
src/System.Private.CoreLib/shared/System/Runtime/Intrinsics/Vector256_1.cs
src/System.Private.CoreLib/shared/System/Runtime/Intrinsics/Vector64_1.cs
src/jit/compiler.h
src/jit/hwintrinsicArm64.cpp
src/jit/hwintrinsiclistxarch.h
src/jit/hwintrinsicxarch.cpp
src/jit/importer.cpp
tests/src/JIT/HardwareIntrinsics/General/Shared/VectorAsTest.template
tests/src/JIT/HardwareIntrinsics/General/Shared/VectorExtendTest.template
tests/src/JIT/HardwareIntrinsics/General/Shared/VectorGetAndWithElementTest.template
tests/src/JIT/HardwareIntrinsics/General/Shared/VectorGetAndWithLowerAndUpperTest.template
tests/src/JIT/HardwareIntrinsics/General/Shared/VectorToScalarTest.template
tests/src/JIT/HardwareIntrinsics/General/Vector128_1/As.Byte.cs
tests/src/JIT/HardwareIntrinsics/General/Vector128_1/As.Double.cs
tests/src/JIT/HardwareIntrinsics/General/Vector128_1/As.Int16.cs
tests/src/JIT/HardwareIntrinsics/General/Vector128_1/As.Int32.cs
tests/src/JIT/HardwareIntrinsics/General/Vector128_1/As.Int64.cs
tests/src/JIT/HardwareIntrinsics/General/Vector128_1/As.SByte.cs
tests/src/JIT/HardwareIntrinsics/General/Vector128_1/As.Single.cs
tests/src/JIT/HardwareIntrinsics/General/Vector128_1/As.UInt16.cs
tests/src/JIT/HardwareIntrinsics/General/Vector128_1/As.UInt32.cs
tests/src/JIT/HardwareIntrinsics/General/Vector128_1/As.UInt64.cs
tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.Byte.0.cs
tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.Byte.15.cs
tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.Byte.7.cs
tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.Double.0.cs
tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.Double.1.cs
tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.Int16.0.cs
tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.Int16.3.cs
tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.Int16.7.cs
tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.Int32.0.cs
tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.Int32.1.cs
tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.Int32.3.cs
tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.Int64.0.cs
tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.Int64.1.cs
tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.SByte.0.cs
tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.SByte.15.cs
tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.SByte.7.cs
tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.Single.0.cs
tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.Single.1.cs
tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.Single.3.cs
tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.UInt16.0.cs
tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.UInt16.3.cs
tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.UInt16.7.cs
tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.UInt32.0.cs
tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.UInt32.1.cs
tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.UInt32.3.cs
tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.UInt64.0.cs
tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.UInt64.1.cs
tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithLowerAndUpper.Byte.cs
tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithLowerAndUpper.Double.cs
tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithLowerAndUpper.Int16.cs
tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithLowerAndUpper.Int32.cs
tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithLowerAndUpper.Int64.cs
tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithLowerAndUpper.SByte.cs
tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithLowerAndUpper.Single.cs
tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithLowerAndUpper.UInt16.cs
tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithLowerAndUpper.UInt32.cs
tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithLowerAndUpper.UInt64.cs
tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToScalar.Byte.cs
tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToScalar.Double.cs
tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToScalar.Int16.cs
tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToScalar.Int32.cs
tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToScalar.Int64.cs
tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToScalar.SByte.cs
tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToScalar.Single.cs
tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToScalar.UInt16.cs
tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToScalar.UInt32.cs
tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToScalar.UInt64.cs
tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToVector256.Byte.cs
tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToVector256.Double.cs
tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToVector256.Int16.cs
tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToVector256.Int32.cs
tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToVector256.Int64.cs
tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToVector256.SByte.cs
tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToVector256.Single.cs
tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToVector256.UInt16.cs
tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToVector256.UInt32.cs
tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToVector256.UInt64.cs
tests/src/JIT/HardwareIntrinsics/General/Vector256_1/As.Byte.cs
tests/src/JIT/HardwareIntrinsics/General/Vector256_1/As.Double.cs
tests/src/JIT/HardwareIntrinsics/General/Vector256_1/As.Int16.cs
tests/src/JIT/HardwareIntrinsics/General/Vector256_1/As.Int32.cs
tests/src/JIT/HardwareIntrinsics/General/Vector256_1/As.Int64.cs
tests/src/JIT/HardwareIntrinsics/General/Vector256_1/As.SByte.cs
tests/src/JIT/HardwareIntrinsics/General/Vector256_1/As.Single.cs
tests/src/JIT/HardwareIntrinsics/General/Vector256_1/As.UInt16.cs
tests/src/JIT/HardwareIntrinsics/General/Vector256_1/As.UInt32.cs
tests/src/JIT/HardwareIntrinsics/General/Vector256_1/As.UInt64.cs
tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.Byte.0.cs
tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.Byte.15.cs
tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.Byte.31.cs
tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.Byte.7.cs
tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.Double.0.cs
tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.Double.1.cs
tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.Double.3.cs
tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.Int16.0.cs
tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.Int16.15.cs
tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.Int16.3.cs
tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.Int16.7.cs
tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.Int32.0.cs
tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.Int32.1.cs
tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.Int32.3.cs
tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.Int32.7.cs
tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.Int64.0.cs
tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.Int64.1.cs
tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.Int64.3.cs
tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.SByte.0.cs
tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.SByte.15.cs
tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.SByte.31.cs
tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.SByte.7.cs
tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.Single.0.cs
tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.Single.1.cs
tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.Single.3.cs
tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.Single.7.cs
tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.UInt16.0.cs
tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.UInt16.15.cs
tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.UInt16.3.cs
tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.UInt16.7.cs
tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.UInt32.0.cs
tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.UInt32.1.cs
tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.UInt32.3.cs
tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.UInt32.7.cs
tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.UInt64.0.cs
tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.UInt64.1.cs
tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.UInt64.3.cs
tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithLowerAndUpper.Byte.cs
tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithLowerAndUpper.Double.cs
tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithLowerAndUpper.Int16.cs
tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithLowerAndUpper.Int32.cs
tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithLowerAndUpper.Int64.cs
tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithLowerAndUpper.SByte.cs
tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithLowerAndUpper.Single.cs
tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithLowerAndUpper.UInt16.cs
tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithLowerAndUpper.UInt32.cs
tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithLowerAndUpper.UInt64.cs
tests/src/JIT/HardwareIntrinsics/General/Vector256_1/ToScalar.Byte.cs
tests/src/JIT/HardwareIntrinsics/General/Vector256_1/ToScalar.Double.cs
tests/src/JIT/HardwareIntrinsics/General/Vector256_1/ToScalar.Int16.cs
tests/src/JIT/HardwareIntrinsics/General/Vector256_1/ToScalar.Int32.cs
tests/src/JIT/HardwareIntrinsics/General/Vector256_1/ToScalar.Int64.cs
tests/src/JIT/HardwareIntrinsics/General/Vector256_1/ToScalar.SByte.cs
tests/src/JIT/HardwareIntrinsics/General/Vector256_1/ToScalar.Single.cs
tests/src/JIT/HardwareIntrinsics/General/Vector256_1/ToScalar.UInt16.cs
tests/src/JIT/HardwareIntrinsics/General/Vector256_1/ToScalar.UInt32.cs
tests/src/JIT/HardwareIntrinsics/General/Vector256_1/ToScalar.UInt64.cs
tests/src/JIT/HardwareIntrinsics/General/Vector64_1/As.Byte.cs
tests/src/JIT/HardwareIntrinsics/General/Vector64_1/As.Double.cs
tests/src/JIT/HardwareIntrinsics/General/Vector64_1/As.Int16.cs
tests/src/JIT/HardwareIntrinsics/General/Vector64_1/As.Int32.cs
tests/src/JIT/HardwareIntrinsics/General/Vector64_1/As.Int64.cs
tests/src/JIT/HardwareIntrinsics/General/Vector64_1/As.SByte.cs
tests/src/JIT/HardwareIntrinsics/General/Vector64_1/As.Single.cs
tests/src/JIT/HardwareIntrinsics/General/Vector64_1/As.UInt16.cs
tests/src/JIT/HardwareIntrinsics/General/Vector64_1/As.UInt32.cs
tests/src/JIT/HardwareIntrinsics/General/Vector64_1/As.UInt64.cs
tests/src/JIT/HardwareIntrinsics/General/Vector64_1/GetAndWithElement.Byte.0.cs
tests/src/JIT/HardwareIntrinsics/General/Vector64_1/GetAndWithElement.Byte.7.cs
tests/src/JIT/HardwareIntrinsics/General/Vector64_1/GetAndWithElement.Double.0.cs
tests/src/JIT/HardwareIntrinsics/General/Vector64_1/GetAndWithElement.Int16.0.cs
tests/src/JIT/HardwareIntrinsics/General/Vector64_1/GetAndWithElement.Int16.3.cs
tests/src/JIT/HardwareIntrinsics/General/Vector64_1/GetAndWithElement.Int32.0.cs
tests/src/JIT/HardwareIntrinsics/General/Vector64_1/GetAndWithElement.Int32.1.cs
tests/src/JIT/HardwareIntrinsics/General/Vector64_1/GetAndWithElement.Int64.0.cs
tests/src/JIT/HardwareIntrinsics/General/Vector64_1/GetAndWithElement.SByte.0.cs
tests/src/JIT/HardwareIntrinsics/General/Vector64_1/GetAndWithElement.SByte.7.cs
tests/src/JIT/HardwareIntrinsics/General/Vector64_1/GetAndWithElement.Single.0.cs
tests/src/JIT/HardwareIntrinsics/General/Vector64_1/GetAndWithElement.Single.1.cs
tests/src/JIT/HardwareIntrinsics/General/Vector64_1/GetAndWithElement.UInt16.0.cs
tests/src/JIT/HardwareIntrinsics/General/Vector64_1/GetAndWithElement.UInt16.3.cs
tests/src/JIT/HardwareIntrinsics/General/Vector64_1/GetAndWithElement.UInt32.0.cs
tests/src/JIT/HardwareIntrinsics/General/Vector64_1/GetAndWithElement.UInt32.1.cs
tests/src/JIT/HardwareIntrinsics/General/Vector64_1/GetAndWithElement.UInt64.0.cs
tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToScalar.Byte.cs
tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToScalar.Double.cs
tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToScalar.Int16.cs
tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToScalar.Int32.cs
tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToScalar.Int64.cs
tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToScalar.SByte.cs
tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToScalar.Single.cs
tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToScalar.UInt16.cs
tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToScalar.UInt32.cs
tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToScalar.UInt64.cs
tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToVector128.Byte.cs
tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToVector128.Double.cs
tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToVector128.Int16.cs
tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToVector128.Int32.cs
tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToVector128.Int64.cs
tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToVector128.SByte.cs
tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToVector128.Single.cs
tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToVector128.UInt16.cs
tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToVector128.UInt32.cs
tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToVector128.UInt64.cs

index c2e530b..4c32326 100644 (file)
@@ -1630,6 +1630,7 @@ namespace System.Runtime.Intrinsics
         /// <returns>The value of the element at <paramref name="index" />.</returns>
         /// <exception cref="NotSupportedException">The type of <paramref name="vector" /> (<typeparamref name="T" />) is not supported.</exception>
         /// <exception cref="ArgumentOutOfRangeException"><paramref name="index" /> was less than zero or greater than the number of elements.</exception>
+        [Intrinsic]
         public static T GetElement<T>(this Vector128<T> vector, int index)
             where T : struct
         {
@@ -1652,6 +1653,7 @@ namespace System.Runtime.Intrinsics
         /// <returns>A <see cref="Vector128{T}" /> with the value of the element at <paramref name="index" /> set to <paramref name="value" /> and the remaining elements set to the same value as that in <paramref name="vector" />.</returns>
         /// <exception cref="NotSupportedException">The type of <paramref name="vector" /> (<typeparamref name="T" />) is not supported.</exception>
         /// <exception cref="ArgumentOutOfRangeException"><paramref name="index" /> was less than zero or greater than the number of elements.</exception>
+        [Intrinsic]
         public static Vector128<T> WithElement<T>(this Vector128<T> vector, int index, T value)
             where T : struct
         {
@@ -1677,7 +1679,6 @@ namespace System.Runtime.Intrinsics
             where T : struct
         {
             ThrowHelper.ThrowForUnsupportedVectorBaseType<T>();
-
             return Unsafe.As<Vector128<T>, Vector64<T>>(ref vector);
         }
 
index 80da2c4..6598a57 100644 (file)
@@ -91,83 +91,6 @@ namespace System.Runtime.Intrinsics
             }
         }
 
-        /// <summary>Reinterprets the current instance as a new <see cref="Vector128{U}" />.</summary>
-        /// <typeparam name="U">The type of the vector the current instance should be reinterpreted as.</typeparam>
-        /// <returns>The current instance reinterpreted as a new <see cref="Vector128{U}" />.</returns>
-        /// <exception cref="NotSupportedException">The type of the current instance (<typeparamref name="T" />) or the type of the target (<typeparamref name="U" />) is not supported.</exception>
-        [Intrinsic]
-        [MethodImpl(MethodImplOptions.AggressiveInlining)]
-        public Vector128<U> As<U>() where U : struct
-        {
-            ThrowHelper.ThrowForUnsupportedVectorBaseType<T>();
-            ThrowHelper.ThrowForUnsupportedVectorBaseType<U>();
-            return Unsafe.As<Vector128<T>, Vector128<U>>(ref Unsafe.AsRef(in this));
-        }
-
-        /// <summary>Reinterprets the current instance as a new <see cref="Vector128{Byte}" />.</summary>
-        /// <returns>The current instance reinterpreted as a new <see cref="Vector128{Byte}" />.</returns>
-        /// <exception cref="NotSupportedException">The type of the current instance (<typeparamref name="T" />) is not supported.</exception>
-        [Intrinsic]
-        public Vector128<byte> AsByte() => As<byte>();
-
-        /// <summary>Reinterprets the current instance as a new <see cref="Vector128{Double}" />.</summary>
-        /// <returns>The current instance reinterpreted as a new <see cref="Vector128{Double}" />.</returns>
-        /// <exception cref="NotSupportedException">The type of the current instance (<typeparamref name="T" />) is not supported.</exception>
-        [Intrinsic]
-        public Vector128<double> AsDouble() => As<double>();
-
-        /// <summary>Reinterprets the current instance as a new <see cref="Vector128{Int16}" />.</summary>
-        /// <returns>The current instance reinterpreted as a new <see cref="Vector128{Int16}" />.</returns>
-        /// <exception cref="NotSupportedException">The type of the current instance (<typeparamref name="T" />) is not supported.</exception>
-        [Intrinsic]
-        public Vector128<short> AsInt16() => As<short>();
-
-        /// <summary>Reinterprets the current instance as a new <see cref="Vector128{Int32}" />.</summary>
-        /// <returns>The current instance reinterpreted as a new <see cref="Vector128{Int32}" />.</returns>
-        /// <exception cref="NotSupportedException">The type of the current instance (<typeparamref name="T" />) is not supported.</exception>
-        [Intrinsic]
-        public Vector128<int> AsInt32() => As<int>();
-
-        /// <summary>Reinterprets the current instance as a new <see cref="Vector128{Int64}" />.</summary>
-        /// <returns>The current instance reinterpreted as a new <see cref="Vector128{Int64}" />.</returns>
-        /// <exception cref="NotSupportedException">The type of the current instance (<typeparamref name="T" />) is not supported.</exception>
-        [Intrinsic]
-        public Vector128<long> AsInt64() => As<long>();
-
-        /// <summary>Reinterprets the current instance as a new <see cref="Vector128{SByte}" />.</summary>
-        /// <returns>The current instance reinterpreted as a new <see cref="Vector128{SByte}" />.</returns>
-        /// <exception cref="NotSupportedException">The type of the current instance (<typeparamref name="T" />) is not supported.</exception>
-        [Intrinsic]
-        [CLSCompliant(false)]
-        public Vector128<sbyte> AsSByte() => As<sbyte>();
-
-        /// <summary>Reinterprets the current instance as a new <see cref="Vector128{Single}" />.</summary>
-        /// <returns>The current instance reinterpreted as a new <see cref="Vector128{Single}" />.</returns>
-        /// <exception cref="NotSupportedException">The type of the current instance (<typeparamref name="T" />) is not supported.</exception>
-        [Intrinsic]
-        public Vector128<float> AsSingle() => As<float>();
-
-        /// <summary>Reinterprets the current instance as a new <see cref="Vector128{UInt16}" />.</summary>
-        /// <returns>The current instance reinterpreted as a new <see cref="Vector128{UInt16}" />.</returns>
-        /// <exception cref="NotSupportedException">The type of the current instance (<typeparamref name="T" />) is not supported.</exception>
-        [Intrinsic]
-        [CLSCompliant(false)]
-        public Vector128<ushort> AsUInt16() => As<ushort>();
-
-        /// <summary>Reinterprets the current instance as a new <see cref="Vector128{UInt32}" />.</summary>
-        /// <returns>The current instance reinterpreted as a new <see cref="Vector128{UInt32}" />.</returns>
-        /// <exception cref="NotSupportedException">The type of the current instance (<typeparamref name="T" />) is not supported.</exception>
-        [Intrinsic]
-        [CLSCompliant(false)]
-        public Vector128<uint> AsUInt32() => As<uint>();
-
-        /// <summary>Reinterprets the current instance as a new <see cref="Vector128{UInt64}" />.</summary>
-        /// <returns>The current instance reinterpreted as a new <see cref="Vector128{UInt64}" />.</returns>
-        /// <exception cref="NotSupportedException">The type of the current instance (<typeparamref name="T" />) is not supported.</exception>
-        [Intrinsic]
-        [CLSCompliant(false)]
-        public Vector128<ulong> AsUInt64() => As<ulong>();
-
         /// <summary>Determines whether the specified <see cref="Vector128{T}" /> is equal to the current instance.</summary>
         /// <param name="other">The <see cref="Vector128{T}" /> to compare with the current instance.</param>
         /// <returns><c>true</c> if <paramref name="other" /> is equal to the current instance; otherwise, <c>false</c>.</returns>
@@ -179,7 +102,7 @@ namespace System.Runtime.Intrinsics
 
             if (Sse.IsSupported && (typeof(T) == typeof(float)))
             {
-                Vector128<float> result = Sse.CompareEqual(AsSingle(), other.AsSingle());
+                Vector128<float> result = Sse.CompareEqual(this.AsSingle(), other.AsSingle());
                 return Sse.MoveMask(result) == 0b1111; // We have one bit per element
             }
 
@@ -187,7 +110,7 @@ namespace System.Runtime.Intrinsics
             {
                 if (typeof(T) == typeof(double))
                 {
-                    Vector128<double> result = Sse2.CompareEqual(AsDouble(), other.AsDouble());
+                    Vector128<double> result = Sse2.CompareEqual(this.AsDouble(), other.AsDouble());
                     return Sse2.MoveMask(result) == 0b11; // We have one bit per element
                 }
                 else
@@ -197,7 +120,7 @@ namespace System.Runtime.Intrinsics
                     // bytes are exactly the same.
 
                     Debug.Assert((typeof(T) != typeof(float)) && (typeof(T) != typeof(double)));
-                    Vector128<byte> result = Sse2.CompareEqual(AsByte(), other.AsByte());
+                    Vector128<byte> result = Sse2.CompareEqual(this.AsByte(), other.AsByte());
                     return Sse2.MoveMask(result) == 0b1111_1111_1111_1111; // We have one bit per element
                 }
             }
@@ -227,47 +150,6 @@ namespace System.Runtime.Intrinsics
             return (obj is Vector128<T>) && Equals((Vector128<T>)(obj));
         }
 
-        /// <summary>Gets the element at the specified index.</summary>
-        /// <param name="index">The index of the element to get.</param>
-        /// <returns>The value of the element at <paramref name="index" />.</returns>
-        /// <exception cref="NotSupportedException">The type of the current instance (<typeparamref name="T" />) is not supported.</exception>
-        /// <exception cref="ArgumentOutOfRangeException"><paramref name="index" /> was less than zero or greater than the number of elements.</exception>
-        [Intrinsic]
-        public T GetElement(int index)
-        {
-            ThrowHelper.ThrowForUnsupportedVectorBaseType<T>();
-
-            if ((uint)(index) >= (uint)(Count))
-            {
-                ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.index);
-            }
-
-            ref T e0 = ref Unsafe.As<Vector128<T>, T>(ref Unsafe.AsRef(in this));
-            return Unsafe.Add(ref e0, index);
-        }
-
-        /// <summary>Creates a new <see cref="Vector128{T}" /> with the element at the specified index set to the specified value and the remaining elements set to the same value as that in the current instance.</summary>
-        /// <param name="index">The index of the element to set.</param>
-        /// <param name="value">The value to set the value to.</param>
-        /// <returns>A <see cref="Vector128{T}" /> with the value of the element at <paramref name="index" /> set to <paramref name="value" /> and the remaining elements set to the same value as that in the current instance.</returns>
-        /// <exception cref="NotSupportedException">The type of the current instance (<typeparamref name="T" />) is not supported.</exception>
-        /// <exception cref="ArgumentOutOfRangeException"><paramref name="index" /> was less than zero or greater than the number of elements.</exception>
-        [Intrinsic]
-        public Vector128<T> WithElement(int index, T value)
-        {
-            ThrowHelper.ThrowForUnsupportedVectorBaseType<T>();
-
-            if ((uint)(index) >= (uint)(Count))
-            {
-                ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.index);
-            }
-
-            Vector128<T> result = this;
-            ref T e0 = ref Unsafe.As<Vector128<T>, T>(ref result);
-            Unsafe.Add(ref e0, index) = value;
-            return result;
-        }
-
         /// <summary>Gets the hash code for the instance.</summary>
         /// <returns>The hash code for the instance.</returns>
         /// <exception cref="NotSupportedException">The type of the current instance (<typeparamref name="T" />) is not supported.</exception>
@@ -279,70 +161,12 @@ namespace System.Runtime.Intrinsics
 
             for (int i = 0; i < Count; i++)
             {
-                hashCode = HashCode.Combine(hashCode, GetElement(i).GetHashCode());
+                hashCode = HashCode.Combine(hashCode, this.GetElement(i).GetHashCode());
             }
 
             return hashCode;
         }
 
-        /// <summary>Gets the value of the lower 64-bits as a new <see cref="Vector64{T}" />.</summary>
-        /// <returns>The value of the lower 64-bits as a new <see cref="Vector64{T}" />.</returns>
-        /// <exception cref="NotSupportedException">The type of the current instance (<typeparamref name="T" />) is not supported.</exception>
-        public Vector64<T> GetLower()
-        {
-            ThrowHelper.ThrowForUnsupportedVectorBaseType<T>();
-
-            return Unsafe.As<Vector128<T>, Vector64<T>>(ref Unsafe.AsRef(in this));
-        }
-
-        /// <summary>Creates a new <see cref="Vector128{T}" /> with the lower 64-bits set to the specified value and the upper 64-bits set to the same value as that in the current instance.</summary>
-        /// <param name="value">The value of the lower 64-bits as a <see cref="Vector64{T}" />.</param>
-        /// <returns>A new <see cref="Vector128{T}" /> with the lower 64-bits set to the specified value and the upper 64-bits set to the same value as that in the current instance.</returns>
-        /// <exception cref="NotSupportedException">The type of the current instance (<typeparamref name="T" />) is not supported.</exception>
-        public Vector128<T> WithLower(Vector64<T> value)
-        {
-            ThrowHelper.ThrowForUnsupportedVectorBaseType<T>();
-
-            Vector128<T> result = this;
-            Unsafe.As<Vector128<T>, Vector64<T>>(ref result) = value;
-            return result;
-        }
-
-        /// <summary>Gets the value of the upper 64-bits as a new <see cref="Vector64{T}" />.</summary>
-        /// <returns>The value of the upper 64-bits as a new <see cref="Vector64{T}" />.</returns>
-        /// <exception cref="NotSupportedException">The type of the current instance (<typeparamref name="T" />) is not supported.</exception>
-        public Vector64<T> GetUpper()
-        {
-            ThrowHelper.ThrowForUnsupportedVectorBaseType<T>();
-
-            ref Vector64<T> lower = ref Unsafe.As<Vector128<T>, Vector64<T>>(ref Unsafe.AsRef(in this));
-            return Unsafe.Add(ref lower, 1);
-        }
-
-        /// <summary>Creates a new <see cref="Vector128{T}" /> with the upper 64-bits set to the specified value and the upper 64-bits set to the same value as that in the current instance.</summary>
-        /// <param name="value">The value of the upper 64-bits as a <see cref="Vector64{T}" />.</param>
-        /// <returns>A new <see cref="Vector128{T}" /> with the upper 64-bits set to the specified value and the upper 64-bits set to the same value as that in the current instance.</returns>
-        /// <exception cref="NotSupportedException">The type of the current instance (<typeparamref name="T" />) is not supported.</exception>
-        public Vector128<T> WithUpper(Vector64<T> value)
-        {
-            ThrowHelper.ThrowForUnsupportedVectorBaseType<T>();
-
-            Vector128<T> result = this;
-            ref Vector64<T> lower = ref Unsafe.As<Vector128<T>, Vector64<T>>(ref result);
-            Unsafe.Add(ref lower, 1) = value;
-            return result;
-        }
-
-        /// <summary>Converts the current instance to a scalar containing the value of the first element.</summary>
-        /// <returns>A scalar <typeparamref name="T" /> containing the value of the first element.</returns>
-        /// <exception cref="NotSupportedException">The type of the current instance (<typeparamref name="T" />) is not supported.</exception>
-        [Intrinsic]
-        public T ToScalar()
-        {
-            ThrowHelper.ThrowForUnsupportedVectorBaseType<T>();
-            return Unsafe.As<Vector128<T>, T>(ref Unsafe.AsRef(in this));
-        }
-
         /// <summary>Converts the current instance to an equivalent string representation.</summary>
         /// <returns>An equivalent string representation of the current instance.</returns>
         /// <exception cref="NotSupportedException">The type of the current instance (<typeparamref name="T" />) is not supported.</exception>
@@ -377,43 +201,14 @@ namespace System.Runtime.Intrinsics
 
             for (int i = 0; i < lastElement; i++)
             {
-                sb.Append(((IFormattable)(GetElement(i))).ToString(format, formatProvider));
+                sb.Append(((IFormattable)(this.GetElement(i))).ToString(format, formatProvider));
                 sb.Append(separator);
                 sb.Append(' ');
             }
-            sb.Append(((IFormattable)(GetElement(lastElement))).ToString(format, formatProvider));
+            sb.Append(((IFormattable)(this.GetElement(lastElement))).ToString(format, formatProvider));
 
             sb.Append('>');
             return StringBuilderCache.GetStringAndRelease(sb);
         }
-
-        /// <summary>Converts the current instance to a new <see cref="Vector256{T}" /> with the lower 128-bits set to the value of the current instance and the upper 128-bits initialized to zero.</summary>
-        /// <returns>A new <see cref="Vector256{T}" /> with the lower 128-bits set to the value of the current instance and the upper 128-bits initialized to zero.</returns>
-        /// <exception cref="NotSupportedException">The type of the current instance (<typeparamref name="T" />) is not supported.</exception>
-        [Intrinsic]
-        public Vector256<T> ToVector256()
-        {
-            ThrowHelper.ThrowForUnsupportedVectorBaseType<T>();
-
-            Vector256<T> result = Vector256<T>.Zero;
-            Unsafe.As<Vector256<T>, Vector128<T>>(ref result) = this;
-            return result;
-        }
-
-        /// <summary>Converts the current instance to a new <see cref="Vector256{T}" /> with the lower 128-bits set to the value of the current instance and the upper 128-bits left uninitialized.</summary>
-        /// <returns>A new <see cref="Vector256{T}" /> with the lower 128-bits set to the value of the current instance and the upper 128-bits left uninitialized.</returns>
-        /// <exception cref="NotSupportedException">The type of the current instance (<typeparamref name="T" />) is not supported.</exception>
-        [Intrinsic]
-        public unsafe Vector256<T> ToVector256Unsafe()
-        {
-            ThrowHelper.ThrowForUnsupportedVectorBaseType<T>();
-
-            // This relies on us stripping the "init" flag from the ".locals"
-            // declaration to let the upper bits be uninitialized.
-
-            var pResult = stackalloc byte[Vector256.Size];
-            Unsafe.AsRef<Vector128<T>>(pResult) = this;
-            return Unsafe.AsRef<Vector256<T>>(pResult);
-        }
     }
 }
index 1af31dc..adf8207 100644 (file)
@@ -1758,6 +1758,7 @@ namespace System.Runtime.Intrinsics
         /// <returns>The value of the element at <paramref name="index" />.</returns>
         /// <exception cref="NotSupportedException">The type of <paramref name="vector" /> (<typeparamref name="T" />) is not supported.</exception>
         /// <exception cref="ArgumentOutOfRangeException"><paramref name="index" /> was less than zero or greater than the number of elements.</exception>
+        [Intrinsic]
         public static T GetElement<T>(this Vector256<T> vector, int index)
             where T : struct
         {
@@ -1780,6 +1781,7 @@ namespace System.Runtime.Intrinsics
         /// <returns>A <see cref="Vector256{T}" /> with the value of the element at <paramref name="index" /> set to <paramref name="value" /> and the remaining elements set to the same value as that in <paramref name="vector" />.</returns>
         /// <exception cref="NotSupportedException">The type of <paramref name="vector" /> (<typeparamref name="T" />) is not supported.</exception>
         /// <exception cref="ArgumentOutOfRangeException"><paramref name="index" /> was less than zero or greater than the number of elements.</exception>
+        [Intrinsic]
         public static Vector256<T> WithElement<T>(this Vector256<T> vector, int index, T value)
             where T : struct
         {
@@ -1801,11 +1803,11 @@ namespace System.Runtime.Intrinsics
         /// <param name="vector">The vector to get the lower 128-bits from.</param>
         /// <returns>The value of the lower 128-bits as a new <see cref="Vector128{T}" />.</returns>
         /// <exception cref="NotSupportedException">The type of <paramref name="vector" /> (<typeparamref name="T" />) is not supported.</exception>
+        [Intrinsic]
         public static Vector128<T> GetLower<T>(this Vector256<T> vector)
             where T : struct
         {
             ThrowHelper.ThrowForUnsupportedVectorBaseType<T>();
-
             return Unsafe.As<Vector256<T>, Vector128<T>>(ref vector);
         }
 
@@ -1815,14 +1817,33 @@ namespace System.Runtime.Intrinsics
         /// <param name="value">The value of the lower 128-bits as a <see cref="Vector128{T}" />.</param>
         /// <returns>A new <see cref="Vector256{T}" /> with the lower 128-bits set to the specified value and the upper 128-bits set to the same value as that in <paramref name="vector" />.</returns>
         /// <exception cref="NotSupportedException">The type of <paramref name="vector" /> (<typeparamref name="T" />) is not supported.</exception>
+        [MethodImpl(MethodImplOptions.AggressiveInlining)]
         public static Vector256<T> WithLower<T>(this Vector256<T> vector, Vector128<T> value)
             where T : struct
         {
             ThrowHelper.ThrowForUnsupportedVectorBaseType<T>();
 
-            Vector256<T> result = vector;
-            Unsafe.As<Vector256<T>, Vector128<T>>(ref result) = value;
-            return result;
+            if (Avx2.IsSupported && ((typeof(T) != typeof(float)) && (typeof(T) != typeof(double))))
+            {
+                // All integral types generate the same instruction, so just pick one rather than handling each T separately
+                return Avx2.InsertVector128(vector.AsByte(), value.AsByte(), 0).As<byte, T>();
+            }
+
+            if (Avx.IsSupported)
+            {
+                // All floating-point types generate the same instruction, so just pick one rather than handling each T separately
+                // We also just fallback to this for integral types if AVX2 isn't supported, since that is still faster than software
+                return Avx.InsertVector128(vector.AsSingle(), value.AsSingle(), 0).As<float, T>();
+            }
+
+            return SoftwareFallback(vector, value);
+
+            static Vector256<T> SoftwareFallback(Vector256<T> vector, Vector128<T> value)
+            {
+                Vector256<T> result = vector;
+                Unsafe.As<Vector256<T>, Vector128<T>>(ref result) = value;
+                return result;
+            }
         }
 
         /// <summary>Gets the value of the upper 128-bits as a new <see cref="Vector128{T}" />.</summary>
@@ -1830,13 +1851,32 @@ namespace System.Runtime.Intrinsics
         /// <param name="vector">The vector to get the upper 128-bits from.</param>
         /// <returns>The value of the upper 128-bits as a new <see cref="Vector128{T}" />.</returns>
         /// <exception cref="NotSupportedException">The type of <paramref name="vector" /> (<typeparamref name="T" />) is not supported.</exception>
+        [MethodImpl(MethodImplOptions.AggressiveInlining)]
         public static Vector128<T> GetUpper<T>(this Vector256<T> vector)
             where T : struct
         {
             ThrowHelper.ThrowForUnsupportedVectorBaseType<T>();
 
-            ref Vector128<T> lower = ref Unsafe.As<Vector256<T>, Vector128<T>>(ref vector);
-            return Unsafe.Add(ref lower, 1);
+            if (Avx2.IsSupported && ((typeof(T) != typeof(float)) && (typeof(T) != typeof(double))))
+            {
+                // All integral types generate the same instruction, so just pick one rather than handling each T separately
+                return Avx2.ExtractVector128(vector.AsByte(), 1).As<byte, T>();
+            }
+
+            if (Avx.IsSupported)
+            {
+                // All floating-point types generate the same instruction, so just pick one rather than handling each T separately
+                // We also just fallback to this for integral types if AVX2 isn't supported, since that is still faster than software
+                return Avx.ExtractVector128(vector.AsSingle(), 1).As<float, T>();
+            }
+
+            return SoftwareFallback(vector);
+
+            static Vector128<T> SoftwareFallback(Vector256<T> vector)
+            {
+                ref Vector128<T> lower = ref Unsafe.As<Vector256<T>, Vector128<T>>(ref vector);
+                return Unsafe.Add(ref lower, 1);
+            }
         }
 
         /// <summary>Creates a new <see cref="Vector256{T}" /> with the upper 128-bits set to the specified value and the upper 128-bits set to the same value as that in the given vector.</summary>
@@ -1845,15 +1885,34 @@ namespace System.Runtime.Intrinsics
         /// <param name="value">The value of the upper 128-bits as a <see cref="Vector128{T}" />.</param>
         /// <returns>A new <see cref="Vector256{T}" /> with the upper 128-bits set to the specified value and the upper 128-bits set to the same value as that in <paramref name="vector" />.</returns>
         /// <exception cref="NotSupportedException">The type of <paramref name="vector" /> (<typeparamref name="T" />) is not supported.</exception>
+        [MethodImpl(MethodImplOptions.AggressiveInlining)]
         public static Vector256<T> WithUpper<T>(this Vector256<T> vector, Vector128<T> value)
             where T : struct
         {
             ThrowHelper.ThrowForUnsupportedVectorBaseType<T>();
 
-            Vector256<T> result = vector;
-            ref Vector128<T> lower = ref Unsafe.As<Vector256<T>, Vector128<T>>(ref result);
-            Unsafe.Add(ref lower, 1) = value;
-            return result;
+            if (Avx2.IsSupported && ((typeof(T) != typeof(float)) && (typeof(T) != typeof(double))))
+            {
+                // All integral types generate the same instruction, so just pick one rather than handling each T separately
+                return Avx2.InsertVector128(vector.AsByte(), value.AsByte(), 1).As<byte, T>();
+            }
+
+            if (Avx.IsSupported)
+            {
+                // All floating-point types generate the same instruction, so just pick one rather than handling each T separately
+                // We also just fallback to this for integral types if AVX2 isn't supported, since that is still faster than software
+                return Avx.InsertVector128(vector.AsSingle(), value.AsSingle(), 1).As<float, T>();
+            }
+
+            return SoftwareFallback(vector, value);
+
+            static Vector256<T> SoftwareFallback(Vector256<T> vector, Vector128<T> value)
+            {
+                Vector256<T> result = vector;
+                ref Vector128<T> lower = ref Unsafe.As<Vector256<T>, Vector128<T>>(ref result);
+                Unsafe.Add(ref lower, 1) = value;
+                return result;
+            }
         }
 
         /// <summary>Converts the given vector to a scalar containing the value of the first element.</summary>
index 968faf1..07ba971 100644 (file)
@@ -93,83 +93,6 @@ namespace System.Runtime.Intrinsics
             }
         }
 
-        /// <summary>Reinterprets the current instance as a new <see cref="Vector256{U}" />.</summary>
-        /// <typeparam name="U">The type of the vector the current instance should be reinterpreted as.</typeparam>
-        /// <returns>The current instance reinterpreted as a new <see cref="Vector256{U}" />.</returns>
-        /// <exception cref="NotSupportedException">The type of the current instance (<typeparamref name="T" />) or the type of the target (<typeparamref name="U" />) is not supported.</exception>
-        [Intrinsic]
-        [MethodImpl(MethodImplOptions.AggressiveInlining)]
-        public Vector256<U> As<U>() where U : struct
-        {
-            ThrowHelper.ThrowForUnsupportedVectorBaseType<T>();
-            ThrowHelper.ThrowForUnsupportedVectorBaseType<U>();
-            return Unsafe.As<Vector256<T>, Vector256<U>>(ref Unsafe.AsRef(in this));
-        }
-
-        /// <summary>Reinterprets the current instance as a new <see cref="Vector256{Byte}" />.</summary>
-        /// <returns>The current instance reinterpreted as a new <see cref="Vector256{Byte}" />.</returns>
-        /// <exception cref="NotSupportedException">The type of the current instance (<typeparamref name="T" />) is not supported.</exception>
-        [Intrinsic]
-        public Vector256<byte> AsByte() => As<byte>();
-
-        /// <summary>Reinterprets the current instance as a new <see cref="Vector256{Double}" />.</summary>
-        /// <returns>The current instance reinterpreted as a new <see cref="Vector256{Double}" />.</returns>
-        /// <exception cref="NotSupportedException">The type of the current instance (<typeparamref name="T" />) is not supported.</exception>
-        [Intrinsic]
-        public Vector256<double> AsDouble() => As<double>();
-
-        /// <summary>Reinterprets the current instance as a new <see cref="Vector256{Int16}" />.</summary>
-        /// <returns>The current instance reinterpreted as a new <see cref="Vector256{Int16}" />.</returns>
-        /// <exception cref="NotSupportedException">The type of the current instance (<typeparamref name="T" />) is not supported.</exception>
-        [Intrinsic]
-        public Vector256<short> AsInt16() => As<short>();
-
-        /// <summary>Reinterprets the current instance as a new <see cref="Vector256{Int32}" />.</summary>
-        /// <returns>The current instance reinterpreted as a new <see cref="Vector256{Int32}" />.</returns>
-        /// <exception cref="NotSupportedException">The type of the current instance (<typeparamref name="T" />) is not supported.</exception>
-        [Intrinsic]
-        public Vector256<int> AsInt32() => As<int>();
-
-        /// <summary>Reinterprets the current instance as a new <see cref="Vector256{Int64}" />.</summary>
-        /// <returns>The current instance reinterpreted as a new <see cref="Vector256{Int64}" />.</returns>
-        /// <exception cref="NotSupportedException">The type of the current instance (<typeparamref name="T" />) is not supported.</exception>
-        [Intrinsic]
-        public Vector256<long> AsInt64() => As<long>();
-
-        /// <summary>Reinterprets the current instance as a new <see cref="Vector256{SByte}" />.</summary>
-        /// <returns>The current instance reinterpreted as a new <see cref="Vector256{SByte}" />.</returns>
-        /// <exception cref="NotSupportedException">The type of the current instance (<typeparamref name="T" />) is not supported.</exception>
-        [Intrinsic]
-        [CLSCompliant(false)]
-        public Vector256<sbyte> AsSByte() => As<sbyte>();
-
-        /// <summary>Reinterprets the current instance as a new <see cref="Vector256{Single}" />.</summary>
-        /// <returns>The current instance reinterpreted as a new <see cref="Vector256{Single}" />.</returns>
-        /// <exception cref="NotSupportedException">The type of the current instance (<typeparamref name="T" />) is not supported.</exception>
-        [Intrinsic]
-        public Vector256<float> AsSingle() => As<float>();
-
-        /// <summary>Reinterprets the current instance as a new <see cref="Vector256{UInt16}" />.</summary>
-        /// <returns>The current instance reinterpreted as a new <see cref="Vector256{UInt16}" />.</returns>
-        /// <exception cref="NotSupportedException">The type of the current instance (<typeparamref name="T" />) is not supported.</exception>
-        [Intrinsic]
-        [CLSCompliant(false)]
-        public Vector256<ushort> AsUInt16() => As<ushort>();
-
-        /// <summary>Reinterprets the current instance as a new <see cref="Vector256{UInt32}" />.</summary>
-        /// <returns>The current instance reinterpreted as a new <see cref="Vector256{UInt32}" />.</returns>
-        /// <exception cref="NotSupportedException">The type of the current instance (<typeparamref name="T" />) is not supported.</exception>
-        [Intrinsic]
-        [CLSCompliant(false)]
-        public Vector256<uint> AsUInt32() => As<uint>();
-
-        /// <summary>Reinterprets the current instance as a new <see cref="Vector256{UInt64}" />.</summary>
-        /// <returns>The current instance reinterpreted as a new <see cref="Vector256{UInt64}" />.</returns>
-        /// <exception cref="NotSupportedException">The type of the current instance (<typeparamref name="T" />) is not supported.</exception>
-        [Intrinsic]
-        [CLSCompliant(false)]
-        public Vector256<ulong> AsUInt64() => As<ulong>();
-
         /// <summary>Determines whether the specified <see cref="Vector256{T}" /> is equal to the current instance.</summary>
         /// <param name="other">The <see cref="Vector256{T}" /> to compare with the current instance.</param>
         /// <returns><c>true</c> if <paramref name="other" /> is equal to the current instance; otherwise, <c>false</c>.</returns>
@@ -181,13 +104,13 @@ namespace System.Runtime.Intrinsics
             {
                 if (typeof(T) == typeof(float))
                 {
-                    Vector256<float> result = Avx.Compare(AsSingle(), other.AsSingle(), FloatComparisonMode.EqualOrderedNonSignaling);
+                    Vector256<float> result = Avx.Compare(this.AsSingle(), other.AsSingle(), FloatComparisonMode.EqualOrderedNonSignaling);
                     return Avx.MoveMask(result) == 0b1111_1111; // We have one bit per element
                 }
 
                 if (typeof(T) == typeof(double))
                 {
-                    Vector256<double> result = Avx.Compare(AsDouble(), other.AsDouble(), FloatComparisonMode.EqualOrderedNonSignaling);
+                    Vector256<double> result = Avx.Compare(this.AsDouble(), other.AsDouble(), FloatComparisonMode.EqualOrderedNonSignaling);
                     return Avx.MoveMask(result) == 0b1111; // We have one bit per element
                 }
             }
@@ -199,7 +122,7 @@ namespace System.Runtime.Intrinsics
                 // bytes are exactly the same.
 
                 Debug.Assert((typeof(T) != typeof(float)) && (typeof(T) != typeof(double)));
-                Vector256<byte> result = Avx2.CompareEqual(AsByte(), other.AsByte());
+                Vector256<byte> result = Avx2.CompareEqual(this.AsByte(), other.AsByte());
                 return Avx2.MoveMask(result) == unchecked((int)(0b1111_1111_1111_1111_1111_1111_1111_1111)); // We have one bit per element
             }
 
@@ -228,47 +151,6 @@ namespace System.Runtime.Intrinsics
             return (obj is Vector256<T>) && Equals((Vector256<T>)(obj));
         }
 
-        /// <summary>Gets the element at the specified index.</summary>
-        /// <param name="index">The index of the element to get.</param>
-        /// <returns>The value of the element at <paramref name="index" />.</returns>
-        /// <exception cref="NotSupportedException">The type of the current instance (<typeparamref name="T" />) is not supported.</exception>
-        /// <exception cref="ArgumentOutOfRangeException"><paramref name="index" /> was less than zero or greater than the number of elements.</exception>
-        [Intrinsic]
-        public T GetElement(int index)
-        {
-            ThrowHelper.ThrowForUnsupportedVectorBaseType<T>();
-
-            if ((uint)(index) >= (uint)(Count))
-            {
-                ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.index);
-            }
-
-            ref T e0 = ref Unsafe.As<Vector256<T>, T>(ref Unsafe.AsRef(in this));
-            return Unsafe.Add(ref e0, index);
-        }
-
-        /// <summary>Creates a new <see cref="Vector256{T}" /> with the element at the specified index set to the specified value and the remaining elements set to the same value as that in the current instance.</summary>
-        /// <param name="index">The index of the element to set.</param>
-        /// <param name="value">The value to set the value to.</param>
-        /// <returns>A <see cref="Vector256{T}" /> with the value of the element at <paramref name="index" /> set to <paramref name="value" /> and the remaining elements set to the same value as that in the current instance.</returns>
-        /// <exception cref="NotSupportedException">The type of the current instance (<typeparamref name="T" />) is not supported.</exception>
-        /// <exception cref="ArgumentOutOfRangeException"><paramref name="index" /> was less than zero or greater than the number of elements.</exception>
-        [Intrinsic]
-        public Vector256<T> WithElement(int index, T value)
-        {
-            ThrowHelper.ThrowForUnsupportedVectorBaseType<T>();
-
-            if ((uint)(index) >= (uint)(Count))
-            {
-                ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.index);
-            }
-
-            Vector256<T> result = this;
-            ref T e0 = ref Unsafe.As<Vector256<T>, T>(ref result);
-            Unsafe.Add(ref e0, index) = value;
-            return result;
-        }
-
         /// <summary>Gets the hash code for the instance.</summary>
         /// <returns>The hash code for the instance.</returns>
         /// <exception cref="NotSupportedException">The type of the current instance (<typeparamref name="T" />) is not supported.</exception>
@@ -280,127 +162,12 @@ namespace System.Runtime.Intrinsics
 
             for (int i = 0; i < Count; i++)
             {
-                hashCode = HashCode.Combine(hashCode, GetElement(i).GetHashCode());
+                hashCode = HashCode.Combine(hashCode, this.GetElement(i).GetHashCode());
             }
 
             return hashCode;
         }
 
-        /// <summary>Gets the value of the lower 128-bits as a new <see cref="Vector128{T}" />.</summary>
-        /// <returns>The value of the lower 128-bits as a new <see cref="Vector128{T}" />.</returns>
-        /// <exception cref="NotSupportedException">The type of the current instance (<typeparamref name="T" />) is not supported.</exception>
-        [Intrinsic]
-        public Vector128<T> GetLower()
-        {
-            ThrowHelper.ThrowForUnsupportedVectorBaseType<T>();
-            return Unsafe.As<Vector256<T>, Vector128<T>>(ref Unsafe.AsRef(in this));
-        }
-
-        /// <summary>Creates a new <see cref="Vector256{T}" /> with the lower 128-bits set to the specified value and the lower 128-bits set to the same value as that in the current instance.</summary>
-        /// <param name="value">The value of the lower 128-bits as a <see cref="Vector128{T}" />.</param>
-        /// <returns>A new <see cref="Vector256{T}" /> with the lower 128-bits set to the specified value and the lower 128-bits set to the same value as that in the current instance.</returns>
-        /// <exception cref="NotSupportedException">The type of the current instance (<typeparamref name="T" />) is not supported.</exception>
-        [MethodImpl(MethodImplOptions.AggressiveInlining)]
-        public Vector256<T> WithLower(Vector128<T> value)
-        {
-            ThrowHelper.ThrowForUnsupportedVectorBaseType<T>();
-
-            if (Avx2.IsSupported && ((typeof(T) != typeof(float)) && (typeof(T) != typeof(double))))
-            {
-                // All integral types generate the same instruction, so just pick one rather than handling each T separately
-                return Avx2.InsertVector128(AsByte(), value.AsByte(), 0).As<T>();
-            }
-
-            if (Avx.IsSupported)
-            {
-                // All floating-point types generate the same instruction, so just pick one rather than handling each T separately
-                // We also just fallback to this for integral types if AVX2 isn't supported, since that is still faster than software
-                return Avx.InsertVector128(AsSingle(), value.AsSingle(), 0).As<T>();
-            }
-
-            return SoftwareFallback(in this, value);
-
-            static Vector256<T> SoftwareFallback(in Vector256<T> vector, Vector128<T> value)
-            {
-                Vector256<T> result = vector;
-                Unsafe.As<Vector256<T>, Vector128<T>>(ref result) = value;
-                return result;
-            }
-        }
-
-        /// <summary>Gets the value of the upper 128-bits as a new <see cref="Vector128{T}" />.</summary>
-        /// <returns>The value of the upper 128-bits as a new <see cref="Vector128{T}" />.</returns>
-        /// <exception cref="NotSupportedException">The type of the current instance (<typeparamref name="T" />) is not supported.</exception>
-        [MethodImpl(MethodImplOptions.AggressiveInlining)]
-        public Vector128<T> GetUpper()
-        {
-            ThrowHelper.ThrowForUnsupportedVectorBaseType<T>();
-
-            if (Avx2.IsSupported && ((typeof(T) != typeof(float)) && (typeof(T) != typeof(double))))
-            {
-                // All integral types generate the same instruction, so just pick one rather than handling each T separately
-                return Avx2.ExtractVector128(AsByte(), 1).As<T>();
-            }
-
-            if (Avx.IsSupported)
-            {
-                // All floating-point types generate the same instruction, so just pick one rather than handling each T separately
-                // We also just fallback to this for integral types if AVX2 isn't supported, since that is still faster than software
-                return Avx.ExtractVector128(AsSingle(), 1).As<T>();
-            }
-
-            return SoftwareFallback(in this);
-
-            static Vector128<T> SoftwareFallback(in Vector256<T> vector)
-            {
-                ref Vector128<T> lower = ref Unsafe.As<Vector256<T>, Vector128<T>>(ref Unsafe.AsRef(in vector));
-                return Unsafe.Add(ref lower, 1);
-            }
-        }
-
-        /// <summary>Creates a new <see cref="Vector256{T}" /> with the upper 128-bits set to the specified value and the upper 128-bits set to the same value as that in the current instance.</summary>
-        /// <param name="value">The value of the upper 128-bits as a <see cref="Vector128{T}" />.</param>
-        /// <returns>A new <see cref="Vector256{T}" /> with the upper 128-bits set to the specified value and the upper 128-bits set to the same value as that in the current instance.</returns>
-        /// <exception cref="NotSupportedException">The type of the current instance (<typeparamref name="T" />) is not supported.</exception>
-        [MethodImpl(MethodImplOptions.AggressiveInlining)]
-        public Vector256<T> WithUpper(Vector128<T> value)
-        {
-            ThrowHelper.ThrowForUnsupportedVectorBaseType<T>();
-
-            if (Avx2.IsSupported && ((typeof(T) != typeof(float)) && (typeof(T) != typeof(double))))
-            {
-                // All integral types generate the same instruction, so just pick one rather than handling each T separately
-                return Avx2.InsertVector128(AsByte(), value.AsByte(), 1).As<T>();
-            }
-
-            if (Avx.IsSupported)
-            {
-                // All floating-point types generate the same instruction, so just pick one rather than handling each T separately
-                // We also just fallback to this for integral types if AVX2 isn't supported, since that is still faster than software
-                return Avx.InsertVector128(AsSingle(), value.AsSingle(), 1).As<T>();
-            }
-
-            return SoftwareFallback(in this, value);
-
-            static Vector256<T> SoftwareFallback(in Vector256<T> vector, Vector128<T> value)
-            {
-                Vector256<T> result = vector;
-                ref Vector128<T> lower = ref Unsafe.As<Vector256<T>, Vector128<T>>(ref result);
-                Unsafe.Add(ref lower, 1) = value;
-                return result;
-            }
-        }
-
-        /// <summary>Converts the current instance to a scalar containing the value of the first element.</summary>
-        /// <returns>A scalar <typeparamref name="T" /> containing the value of the first element.</returns>
-        /// <exception cref="NotSupportedException">The type of the current instance (<typeparamref name="T" />) is not supported.</exception>
-        [Intrinsic]
-        public T ToScalar()
-        {
-            ThrowHelper.ThrowForUnsupportedVectorBaseType<T>();
-            return Unsafe.As<Vector256<T>, T>(ref Unsafe.AsRef(in this));
-        }
-
         /// <summary>Converts the current instance to an equivalent string representation.</summary>
         /// <returns>An equivalent string representation of the current instance.</returns>
         /// <exception cref="NotSupportedException">The type of the current instance (<typeparamref name="T" />) is not supported.</exception>
@@ -435,11 +202,11 @@ namespace System.Runtime.Intrinsics
 
             for (int i = 0; i < lastElement; i++)
             {
-                sb.Append(((IFormattable)(GetElement(i))).ToString(format, formatProvider));
+                sb.Append(((IFormattable)(this.GetElement(i))).ToString(format, formatProvider));
                 sb.Append(separator);
                 sb.Append(' ');
             }
-            sb.Append(((IFormattable)(GetElement(lastElement))).ToString(format, formatProvider));
+            sb.Append(((IFormattable)(this.GetElement(lastElement))).ToString(format, formatProvider));
 
             sb.Append('>');
             return StringBuilderCache.GetStringAndRelease(sb);
index d6b1883..99db8c0 100644 (file)
@@ -77,83 +77,6 @@ namespace System.Runtime.Intrinsics
             }
         }
 
-        /// <summary>Reinterprets the current instance as a new <see cref="Vector64{U}" />.</summary>
-        /// <typeparam name="U">The type of the vector the current instance should be reinterpreted as.</typeparam>
-        /// <returns>The current instance reinterpreted as a new <see cref="Vector64{U}" />.</returns>
-        /// <exception cref="NotSupportedException">The type of the current instance (<typeparamref name="T" />) or the type of the target (<typeparamref name="U" />) is not supported.</exception>
-        [Intrinsic]
-        [MethodImpl(MethodImplOptions.AggressiveInlining)]
-        public Vector64<U> As<U>() where U : struct
-        {
-            ThrowHelper.ThrowForUnsupportedVectorBaseType<T>();
-            ThrowHelper.ThrowForUnsupportedVectorBaseType<U>();
-            return Unsafe.As<Vector64<T>, Vector64<U>>(ref Unsafe.AsRef(in this));
-        }
-
-        /// <summary>Reinterprets the current instance as a new <see cref="Vector64{Byte}" />.</summary>
-        /// <returns>The current instance reinterpreted as a new <see cref="Vector64{Byte}" />.</returns>
-        /// <exception cref="NotSupportedException">The type of the current instance (<typeparamref name="T" />) is not supported.</exception>
-        [Intrinsic]
-        public Vector64<byte> AsByte() => As<byte>();
-
-        /// <summary>Reinterprets the current instance as a new <see cref="Vector64{Double}" />.</summary>
-        /// <returns>The current instance reinterpreted as a new <see cref="Vector64{Double}" />.</returns>
-        /// <exception cref="NotSupportedException">The type of the current instance (<typeparamref name="T" />) is not supported.</exception>
-        [Intrinsic]
-        public Vector64<double> AsDouble() => As<double>();
-
-        /// <summary>Reinterprets the current instance as a new <see cref="Vector64{Int16}" />.</summary>
-        /// <returns>The current instance reinterpreted as a new <see cref="Vector64{Int16}" />.</returns>
-        /// <exception cref="NotSupportedException">The type of the current instance (<typeparamref name="T" />) is not supported.</exception>
-        [Intrinsic]
-        public Vector64<short> AsInt16() => As<short>();
-
-        /// <summary>Reinterprets the current instance as a new <see cref="Vector64{Int32}" />.</summary>
-        /// <returns>The current instance reinterpreted as a new <see cref="Vector64{Int32}" />.</returns>
-        /// <exception cref="NotSupportedException">The type of the current instance (<typeparamref name="T" />) is not supported.</exception>
-        [Intrinsic]
-        public Vector64<int> AsInt32() => As<int>();
-
-        /// <summary>Reinterprets the current instance as a new <see cref="Vector64{Int64}" />.</summary>
-        /// <returns>The current instance reinterpreted as a new <see cref="Vector64{Int64}" />.</returns>
-        /// <exception cref="NotSupportedException">The type of the current instance (<typeparamref name="T" />) is not supported.</exception>
-        [Intrinsic]
-        public Vector64<long> AsInt64() => As<long>();
-
-        /// <summary>Reinterprets the current instance as a new <see cref="Vector64{SByte}" />.</summary>
-        /// <returns>The current instance reinterpreted as a new <see cref="Vector64{SByte}" />.</returns>
-        /// <exception cref="NotSupportedException">The type of the current instance (<typeparamref name="T" />) is not supported.</exception>
-        [Intrinsic]
-        [CLSCompliant(false)]
-        public Vector64<sbyte> AsSByte() => As<sbyte>();
-
-        /// <summary>Reinterprets the current instance as a new <see cref="Vector64{Single}" />.</summary>
-        /// <returns>The current instance reinterpreted as a new <see cref="Vector64{Single}" />.</returns>
-        /// <exception cref="NotSupportedException">The type of the current instance (<typeparamref name="T" />) is not supported.</exception>
-        [Intrinsic]
-        public Vector64<float> AsSingle() => As<float>();
-
-        /// <summary>Reinterprets the current instance as a new <see cref="Vector64{Int16}" />.</summary>
-        /// <returns>The current instance reinterpreted as a new <see cref="Vector64{Int16}" />.</returns>
-        /// <exception cref="NotSupportedException">The type of the current instance (<typeparamref name="T" />) is not supported.</exception>
-        [Intrinsic]
-        [CLSCompliant(false)]
-        public Vector64<ushort> AsUInt16() => As<ushort>();
-
-        /// <summary>Reinterprets the current instance as a new <see cref="Vector64{UInt32}" />.</summary>
-        /// <returns>The current instance reinterpreted as a new <see cref="Vector64{UInt32}" />.</returns>
-        /// <exception cref="NotSupportedException">The type of the current instance (<typeparamref name="T" />) is not supported.</exception>
-        [Intrinsic]
-        [CLSCompliant(false)]
-        public Vector64<uint> AsUInt32() => As<uint>();
-
-        /// <summary>Reinterprets the current instance as a new <see cref="Vector64{UInt64}" />.</summary>
-        /// <returns>The current instance reinterpreted as a new <see cref="Vector64{UInt64}" />.</returns>
-        /// <exception cref="NotSupportedException">The type of the current instance (<typeparamref name="T" />) is not supported.</exception>
-        [Intrinsic]
-        [CLSCompliant(false)]
-        public Vector64<ulong> AsUInt64() => As<ulong>();
-
         /// <summary>Determines whether the specified <see cref="Vector64{T}" /> is equal to the current instance.</summary>
         /// <param name="other">The <see cref="Vector64{T}" /> to compare with the current instance.</param>
         /// <returns><c>true</c> if <paramref name="other" /> is equal to the current instance; otherwise, <c>false</c>.</returns>
@@ -164,7 +87,7 @@ namespace System.Runtime.Intrinsics
 
             for (int i = 0; i < Count; i++)
             {
-                if (!((IEquatable<T>)(GetElement(i))).Equals(other.GetElement(i)))
+                if (!((IEquatable<T>)(this.GetElement(i))).Equals(other.GetElement(i)))
                 {
                     return false;
                 }
@@ -182,45 +105,6 @@ namespace System.Runtime.Intrinsics
             return (obj is Vector64<T>) && Equals((Vector64<T>)(obj));
         }
 
-        /// <summary>Gets the element at the specified index.</summary>
-        /// <param name="index">The index of the element to get.</param>
-        /// <returns>The value of the element at <paramref name="index" />.</returns>
-        /// <exception cref="NotSupportedException">The type of the current instance (<typeparamref name="T" />) is not supported.</exception>
-        /// <exception cref="ArgumentOutOfRangeException"><paramref name="index" /> was less than zero or greater than the number of elements.</exception>
-        public T GetElement(int index)
-        {
-            ThrowHelper.ThrowForUnsupportedVectorBaseType<T>();
-
-            if ((uint)(index) >= (uint)(Count))
-            {
-                ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.index);
-            }
-
-            ref T e0 = ref Unsafe.As<Vector64<T>, T>(ref Unsafe.AsRef(in this));
-            return Unsafe.Add(ref e0, index);
-        }
-
-        /// <summary>Creates a new <see cref="Vector64{T}" /> with the element at the specified index set to the specified value and the remaining elements set to the same value as that in the current instance.</summary>
-        /// <param name="index">The index of the element to set.</param>
-        /// <param name="value">The value to set the value to.</param>
-        /// <returns>A <see cref="Vector64{T}" /> with the value of the element at <paramref name="index" /> set to <paramref name="value" /> and the remaining elements set to the same value as that in the current instance.</returns>
-        /// <exception cref="NotSupportedException">The type of the current instance (<typeparamref name="T" />) is not supported.</exception>
-        /// <exception cref="ArgumentOutOfRangeException"><paramref name="index" /> was less than zero or greater than the number of elements.</exception>
-        public Vector64<T> WithElement(int index, T value)
-        {
-            ThrowHelper.ThrowForUnsupportedVectorBaseType<T>();
-
-            if ((uint)(index) >= (uint)(Count))
-            {
-                throw new ArgumentOutOfRangeException(nameof(index));
-            }
-
-            Vector64<T> result = this;
-            ref T e0 = ref Unsafe.As<Vector64<T>, T>(ref result);
-            Unsafe.Add(ref e0, index) = value;
-            return result;
-        }
-
         /// <summary>Gets the hash code for the instance.</summary>
         /// <returns>The hash code for the instance.</returns>
         /// <exception cref="NotSupportedException">The type of the current instance (<typeparamref name="T" />) is not supported.</exception>
@@ -232,21 +116,12 @@ namespace System.Runtime.Intrinsics
 
             for (int i = 0; i < Count; i++)
             {
-                hashCode = HashCode.Combine(hashCode, GetElement(i).GetHashCode());
+                hashCode = HashCode.Combine(hashCode, this.GetElement(i).GetHashCode());
             }
 
             return hashCode;
         }
 
-        /// <summary>Converts the current instance to a scalar containing the value of the first element.</summary>
-        /// <returns>A scalar <typeparamref name="T" /> containing the value of the first element.</returns>
-        /// <exception cref="NotSupportedException">The type of the current instance (<typeparamref name="T" />) is not supported.</exception>
-        public T ToScalar()
-        {
-            ThrowHelper.ThrowForUnsupportedVectorBaseType<T>();
-            return Unsafe.As<Vector64<T>, T>(ref Unsafe.AsRef(in this));
-        }
-
         /// <summary>Converts the current instance to an equivalent string representation.</summary>
         /// <returns>An equivalent string representation of the current instance.</returns>
         /// <exception cref="NotSupportedException">The type of the current instance (<typeparamref name="T" />) is not supported.</exception>
@@ -281,41 +156,14 @@ namespace System.Runtime.Intrinsics
 
             for (int i = 0; i < lastElement; i++)
             {
-                sb.Append(((IFormattable)(GetElement(i))).ToString(format, formatProvider));
+                sb.Append(((IFormattable)(this.GetElement(i))).ToString(format, formatProvider));
                 sb.Append(separator);
                 sb.Append(' ');
             }
-            sb.Append(((IFormattable)(GetElement(lastElement))).ToString(format, formatProvider));
+            sb.Append(((IFormattable)(this.GetElement(lastElement))).ToString(format, formatProvider));
 
             sb.Append('>');
             return StringBuilderCache.GetStringAndRelease(sb);
         }
-
-        /// <summary>Converts the current instance to a new <see cref="Vector128{T}" /> with the lower 64-bits set to the value of the current instance and the upper 64-bits initialized to zero.</summary>
-        /// <returns>A new <see cref="Vector128{T}" /> with the lower 64-bits set to the value of the current instance and the upper 64-bits initialized to zero.</returns>
-        /// <exception cref="NotSupportedException">The type of the current instance (<typeparamref name="T" />) is not supported.</exception>
-        public Vector128<T> ToVector128()
-        {
-            ThrowHelper.ThrowForUnsupportedVectorBaseType<T>();
-
-            Vector128<T> result = Vector128<T>.Zero;
-            Unsafe.As<Vector128<T>, Vector64<T>>(ref result) = this;
-            return result;
-        }
-
-        /// <summary>Converts the current instance to a new <see cref="Vector128{T}" /> with the lower 64-bits set to the value of the current instance and the upper 64-bits left uninitialized.</summary>
-        /// <returns>A new <see cref="Vector128{T}" /> with the lower 64-bits set to the value of the current instance and the upper 64-bits initialized to zero.</returns>
-        /// <exception cref="NotSupportedException">The type of the current instance (<typeparamref name="T" />) is not supported.</exception>
-        public unsafe Vector128<T> ToVector128Unsafe()
-        {
-            ThrowHelper.ThrowForUnsupportedVectorBaseType<T>();
-
-            // This relies on us stripping the "init" flag from the ".locals"
-            // declaration to let the upper bits be uninitialized.
-
-            var pResult = stackalloc byte[Vector128.Size];
-            Unsafe.AsRef<Vector64<T>>(pResult) = this;
-            return Unsafe.AsRef<Vector128<T>>(pResult);
-        }
     }
 }
index ca47df7..ab98059 100644 (file)
@@ -3444,10 +3444,6 @@ protected:
     NamedIntrinsic lookupNamedIntrinsic(CORINFO_METHOD_HANDLE method);
 
 #ifdef FEATURE_HW_INTRINSICS
-    GenTree* impBaseIntrinsic(NamedIntrinsic        intrinsic,
-                              CORINFO_CLASS_HANDLE  clsHnd,
-                              CORINFO_METHOD_HANDLE method,
-                              CORINFO_SIG_INFO*     sig);
     GenTree* impHWIntrinsic(NamedIntrinsic        intrinsic,
                             CORINFO_METHOD_HANDLE method,
                             CORINFO_SIG_INFO*     sig,
@@ -3461,6 +3457,10 @@ protected:
     bool compSupportsHWIntrinsic(InstructionSet isa);
 
 #ifdef _TARGET_XARCH_
+    GenTree* impBaseIntrinsic(NamedIntrinsic        intrinsic,
+                              CORINFO_METHOD_HANDLE method,
+                              CORINFO_SIG_INFO*     sig,
+                              bool                  mustExpand);
     GenTree* impSSEIntrinsic(NamedIntrinsic        intrinsic,
                              CORINFO_METHOD_HANDLE method,
                              CORINFO_SIG_INFO*     sig,
index d82eef5..2309f75 100644 (file)
@@ -291,6 +291,56 @@ GenTree* Compiler::impHWIntrinsic(NamedIntrinsic        intrinsic,
     var_types            simdBaseType  = TYP_UNKNOWN;
     unsigned             simdSizeBytes = 0;
 
+    switch (intrinsic)
+    {
+        case NI_Base_Vector64_AsByte:
+        case NI_Base_Vector64_AsInt16:
+        case NI_Base_Vector64_AsInt32:
+        case NI_Base_Vector64_AsSByte:
+        case NI_Base_Vector64_AsSingle:
+        case NI_Base_Vector64_AsUInt16:
+        case NI_Base_Vector64_AsUInt32:
+        case NI_Base_Vector128_As:
+        case NI_Base_Vector128_AsByte:
+        case NI_Base_Vector128_AsDouble:
+        case NI_Base_Vector128_AsInt16:
+        case NI_Base_Vector128_AsInt32:
+        case NI_Base_Vector128_AsInt64:
+        case NI_Base_Vector128_AsSByte:
+        case NI_Base_Vector128_AsSingle:
+        case NI_Base_Vector128_AsUInt16:
+        case NI_Base_Vector128_AsUInt32:
+        case NI_Base_Vector128_AsUInt64:
+        {
+            // We fold away the cast here, as it only exists to satisfy
+            // the type system. It is safe to do this here since the retNode type
+            // and the signature return type are both the same TYP_SIMD.
+
+            var_types op1SimdBaseType = TYP_UNKNOWN;
+
+            assert(!sig->hasThis());
+            assert(sig->numArgs == 1);
+            assert(JITtype2varType(sig->retType) == TYP_STRUCT);
+
+            simdBaseType    = getBaseTypeAndSizeOfSIMDType(sig->retTypeClass, &simdSizeBytes);
+            op1SimdBaseType = getBaseTypeOfSIMDType(info.compCompHnd->getArgClass(sig, sig->args));
+
+            if (!varTypeIsArithmetic(simdBaseType) || !varTypeIsArithmetic(op1SimdBaseType))
+            {
+                return nullptr;
+            }
+
+            retNode = impSIMDPopStack(getSIMDTypeForSize(simdSizeBytes), /* expectAddr: */ false, sig->retTypeClass);
+            SetOpLclRelatedToSIMDIntrinsic(retNode);
+            assert(retNode->gtType == getSIMDTypeForSize(getSIMDTypeSizeInBytes(sig->retTypeSigClass)));
+
+            return retNode;
+        }
+
+        default:
+            break;
+    }
+
     switch (HWIntrinsicInfo::lookup(intrinsic).form)
     {
         case HWIntrinsicInfo::SimdBinaryOp:
index 8e02aab..69fb795 100644 (file)
 //                                                                                                                                                                      {TYP_BYTE,              TYP_UBYTE,          TYP_SHORT,          TYP_USHORT,         TYP_INT,            TYP_UINT,           TYP_LONG,           TYP_ULONG,          TYP_FLOAT,          TYP_DOUBLE}
 // ***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************
 //  Base Intrinsics
-HARDWARE_INTRINSIC(Base_Vector128_As,                               "As",                                          Base,          -1,              16,           0,     {INS_invalid,           INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid},           HW_Category_Helper,                 HW_Flag_NoContainment|HW_Flag_NoRMWSemantics)
-HARDWARE_INTRINSIC(Base_Vector128_AsByte,                           "AsByte",                                      Base,          -1,              16,           0,     {INS_invalid,           INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid},           HW_Category_Helper,                 HW_Flag_NoContainment|HW_Flag_NoRMWSemantics)
-HARDWARE_INTRINSIC(Base_Vector128_AsDouble,                         "AsDouble",                                    Base,          -1,              16,           0,     {INS_invalid,           INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid},           HW_Category_Helper,                 HW_Flag_NoContainment|HW_Flag_NoRMWSemantics)
-HARDWARE_INTRINSIC(Base_Vector128_AsInt16,                          "AsInt16",                                     Base,          -1,              16,           0,     {INS_invalid,           INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid},           HW_Category_Helper,                 HW_Flag_NoContainment|HW_Flag_NoRMWSemantics)
-HARDWARE_INTRINSIC(Base_Vector128_AsInt32,                          "AsInt32",                                     Base,          -1,              16,           0,     {INS_invalid,           INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid},           HW_Category_Helper,                 HW_Flag_NoContainment|HW_Flag_NoRMWSemantics)
-HARDWARE_INTRINSIC(Base_Vector128_AsInt64,                          "AsInt64",                                     Base,          -1,              16,           0,     {INS_invalid,           INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid},           HW_Category_Helper,                 HW_Flag_NoContainment|HW_Flag_NoRMWSemantics)
-HARDWARE_INTRINSIC(Base_Vector128_AsSByte,                          "AsSByte",                                     Base,          -1,              16,           0,     {INS_invalid,           INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid},           HW_Category_Helper,                 HW_Flag_NoContainment|HW_Flag_NoRMWSemantics)
-HARDWARE_INTRINSIC(Base_Vector128_AsSingle,                         "AsSingle",                                    Base,          -1,              16,           0,     {INS_invalid,           INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid},           HW_Category_Helper,                 HW_Flag_NoContainment|HW_Flag_NoRMWSemantics)
-HARDWARE_INTRINSIC(Base_Vector128_AsUInt16,                         "AsUInt16",                                    Base,          -1,              16,           0,     {INS_invalid,           INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid},           HW_Category_Helper,                 HW_Flag_NoContainment|HW_Flag_NoRMWSemantics)
-HARDWARE_INTRINSIC(Base_Vector128_AsUInt32,                         "AsUInt32",                                    Base,          -1,              16,           0,     {INS_invalid,           INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid},           HW_Category_Helper,                 HW_Flag_NoContainment|HW_Flag_NoRMWSemantics)
-HARDWARE_INTRINSIC(Base_Vector128_AsUInt64,                         "AsUInt64",                                    Base,          -1,              16,           0,     {INS_invalid,           INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid},           HW_Category_Helper,                 HW_Flag_NoContainment|HW_Flag_NoRMWSemantics)
-HARDWARE_INTRINSIC(Base_Vector128_CreateScalarUnsafe,               "CreateScalarUnsafe",                          Base,          -1,              16,           1,     {INS_mov_i2xmm,         INS_mov_i2xmm,      INS_mov_i2xmm,      INS_mov_i2xmm,      INS_mov_i2xmm,      INS_mov_i2xmm,      INS_mov_i2xmm,      INS_mov_i2xmm,      INS_movss,          INS_movsdsse2},         HW_Category_SIMDScalar,             HW_Flag_SpecialCodeGen|HW_Flag_NoRMWSemantics)
-HARDWARE_INTRINSIC(Base_Vector128_GetElement,                       "GetElement",                                  Base,          -1,              16,           1,     {INS_invalid,           INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid},           HW_Category_Helper,                 HW_Flag_SpecialImport)
-HARDWARE_INTRINSIC(Base_Vector128_WithElement,                      "WithElement",                                 Base,          -1,              16,           2,     {INS_invalid,           INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid},           HW_Category_Helper,                 HW_Flag_SpecialImport)
-HARDWARE_INTRINSIC(Base_Vector128_ToScalar,                         "ToScalar",                                    Base,          -1,              16,           1,     {INS_invalid,           INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_movss,          INS_movsdsse2},         HW_Category_SimpleSIMD,             HW_Flag_SpecialCodeGen|HW_Flag_NoRMWSemantics)
-HARDWARE_INTRINSIC(Base_Vector128_ToVector256,                      "ToVector256",                                 Base,          -1,              16,           1,     {INS_movdqu,            INS_movdqu,         INS_movdqu,         INS_movdqu,         INS_movdqu,         INS_movdqu,         INS_movdqu,         INS_movdqu,         INS_movups,         INS_movupd},            HW_Category_SimpleSIMD,             HW_Flag_SpecialCodeGen|HW_Flag_NoRMWSemantics)
-HARDWARE_INTRINSIC(Base_Vector128_ToVector256Unsafe,                "ToVector256Unsafe",                           Base,          -1,              16,           1,     {INS_movdqu,            INS_movdqu,         INS_movdqu,         INS_movdqu,         INS_movdqu,         INS_movdqu,         INS_movdqu,         INS_movdqu,         INS_movups,         INS_movupd},            HW_Category_SimpleSIMD,             HW_Flag_SpecialCodeGen|HW_Flag_NoRMWSemantics)
-HARDWARE_INTRINSIC(Base_Vector128_Zero,                             "get_Zero",                                    Base,          -1,              16,           0,     {INS_xorps,             INS_xorps,          INS_xorps,          INS_xorps,          INS_xorps,          INS_xorps,          INS_xorps,          INS_xorps,          INS_xorps,          INS_xorps},             HW_Category_Helper,                 HW_Flag_NoContainment|HW_Flag_NoRMWSemantics)
-HARDWARE_INTRINSIC(Base_Vector256_As,                               "As",                                          Base,          -1,              32,           0,     {INS_invalid,           INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid},           HW_Category_Helper,                 HW_Flag_NoContainment|HW_Flag_NoRMWSemantics)
-HARDWARE_INTRINSIC(Base_Vector256_AsByte,                           "AsByte",                                      Base,          -1,              32,           0,     {INS_invalid,           INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid},           HW_Category_Helper,                 HW_Flag_NoContainment|HW_Flag_NoRMWSemantics)
-HARDWARE_INTRINSIC(Base_Vector256_AsDouble,                         "AsDouble",                                    Base,          -1,              32,           0,     {INS_invalid,           INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid},           HW_Category_Helper,                 HW_Flag_NoContainment|HW_Flag_NoRMWSemantics)
-HARDWARE_INTRINSIC(Base_Vector256_AsInt16,                          "AsInt16",                                     Base,          -1,              32,           0,     {INS_invalid,           INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid},           HW_Category_Helper,                 HW_Flag_NoContainment|HW_Flag_NoRMWSemantics)
-HARDWARE_INTRINSIC(Base_Vector256_AsInt32,                          "AsInt32",                                     Base,          -1,              32,           0,     {INS_invalid,           INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid},           HW_Category_Helper,                 HW_Flag_NoContainment|HW_Flag_NoRMWSemantics)
-HARDWARE_INTRINSIC(Base_Vector256_AsInt64,                          "AsInt64",                                     Base,          -1,              32,           0,     {INS_invalid,           INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid},           HW_Category_Helper,                 HW_Flag_NoContainment|HW_Flag_NoRMWSemantics)
-HARDWARE_INTRINSIC(Base_Vector256_AsSByte,                          "AsSByte",                                     Base,          -1,              32,           0,     {INS_invalid,           INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid},           HW_Category_Helper,                 HW_Flag_NoContainment|HW_Flag_NoRMWSemantics)
-HARDWARE_INTRINSIC(Base_Vector256_AsSingle,                         "AsSingle",                                    Base,          -1,              32,           0,     {INS_invalid,           INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid},           HW_Category_Helper,                 HW_Flag_NoContainment|HW_Flag_NoRMWSemantics)
-HARDWARE_INTRINSIC(Base_Vector256_AsUInt16,                         "AsUInt16",                                    Base,          -1,              32,           0,     {INS_invalid,           INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid},           HW_Category_Helper,                 HW_Flag_NoContainment|HW_Flag_NoRMWSemantics)
-HARDWARE_INTRINSIC(Base_Vector256_AsUInt32,                         "AsUInt32",                                    Base,          -1,              32,           0,     {INS_invalid,           INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid},           HW_Category_Helper,                 HW_Flag_NoContainment|HW_Flag_NoRMWSemantics)
-HARDWARE_INTRINSIC(Base_Vector256_AsUInt64,                         "AsUInt64",                                    Base,          -1,              32,           0,     {INS_invalid,           INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid},           HW_Category_Helper,                 HW_Flag_NoContainment|HW_Flag_NoRMWSemantics)
-HARDWARE_INTRINSIC(Base_Vector256_CreateScalarUnsafe,               "CreateScalarUnsafe",                          Base,          -1,              32,           1,     {INS_mov_i2xmm,         INS_mov_i2xmm,      INS_mov_i2xmm,      INS_mov_i2xmm,      INS_mov_i2xmm,      INS_mov_i2xmm,      INS_mov_i2xmm,      INS_mov_i2xmm,      INS_movss,          INS_movsdsse2},         HW_Category_SIMDScalar,             HW_Flag_SpecialCodeGen|HW_Flag_NoRMWSemantics)
-HARDWARE_INTRINSIC(Base_Vector256_GetElement,                       "GetElement",                                  Base,          -1,              32,           1,     {INS_invalid,           INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid},           HW_Category_Helper,                 HW_Flag_SpecialImport)
-HARDWARE_INTRINSIC(Base_Vector256_WithElement,                      "WithElement",                                 Base,          -1,              32,           2,     {INS_invalid,           INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid},           HW_Category_Helper,                 HW_Flag_SpecialImport)
-HARDWARE_INTRINSIC(Base_Vector256_GetLower,                         "GetLower",                                    Base,          -1,              32,           1,     {INS_movdqu,            INS_movdqu,         INS_movdqu,         INS_movdqu,         INS_movdqu,         INS_movdqu,         INS_movdqu,         INS_movdqu,         INS_movups,         INS_movupd},            HW_Category_SimpleSIMD,             HW_Flag_SpecialCodeGen|HW_Flag_NoRMWSemantics)
-HARDWARE_INTRINSIC(Base_Vector256_ToScalar,                         "ToScalar",                                    Base,          -1,              32,           1,     {INS_invalid,           INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_movss,          INS_movsdsse2},         HW_Category_SimpleSIMD,             HW_Flag_SpecialCodeGen|HW_Flag_NoRMWSemantics)
-HARDWARE_INTRINSIC(Base_Vector256_Zero,                             "get_Zero",                                    Base,          -1,              32,           0,     {INS_xorps,             INS_xorps,          INS_xorps,          INS_xorps,          INS_xorps,          INS_xorps,          INS_xorps,          INS_xorps,          INS_xorps,          INS_xorps},             HW_Category_Helper,                 HW_Flag_NoContainment|HW_Flag_NoRMWSemantics)
+HARDWARE_INTRINSIC(Base_Vector128_As,                               "As",                                          Base,          -1,              16,           1,     {INS_invalid,           INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid},           HW_Category_Helper,                 HW_Flag_SpecialImport|HW_Flag_NoContainment|HW_Flag_BaseTypeFromFirstArg|HW_Flag_NoRMWSemantics)
+HARDWARE_INTRINSIC(Base_Vector128_AsByte,                           "AsByte",                                      Base,          -1,              16,           1,     {INS_invalid,           INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid},           HW_Category_Helper,                 HW_Flag_SpecialImport|HW_Flag_NoContainment|HW_Flag_BaseTypeFromFirstArg|HW_Flag_NoRMWSemantics)
+HARDWARE_INTRINSIC(Base_Vector128_AsDouble,                         "AsDouble",                                    Base,          -1,              16,           1,     {INS_invalid,           INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid},           HW_Category_Helper,                 HW_Flag_SpecialImport|HW_Flag_NoContainment|HW_Flag_BaseTypeFromFirstArg|HW_Flag_NoRMWSemantics)
+HARDWARE_INTRINSIC(Base_Vector128_AsInt16,                          "AsInt16",                                     Base,          -1,              16,           1,     {INS_invalid,           INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid},           HW_Category_Helper,                 HW_Flag_SpecialImport|HW_Flag_NoContainment|HW_Flag_BaseTypeFromFirstArg|HW_Flag_NoRMWSemantics)
+HARDWARE_INTRINSIC(Base_Vector128_AsInt32,                          "AsInt32",                                     Base,          -1,              16,           1,     {INS_invalid,           INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid},           HW_Category_Helper,                 HW_Flag_SpecialImport|HW_Flag_NoContainment|HW_Flag_BaseTypeFromFirstArg|HW_Flag_NoRMWSemantics)
+HARDWARE_INTRINSIC(Base_Vector128_AsInt64,                          "AsInt64",                                     Base,          -1,              16,           1,     {INS_invalid,           INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid},           HW_Category_Helper,                 HW_Flag_SpecialImport|HW_Flag_NoContainment|HW_Flag_BaseTypeFromFirstArg|HW_Flag_NoRMWSemantics)
+HARDWARE_INTRINSIC(Base_Vector128_AsSByte,                          "AsSByte",                                     Base,          -1,              16,           1,     {INS_invalid,           INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid},           HW_Category_Helper,                 HW_Flag_SpecialImport|HW_Flag_NoContainment|HW_Flag_BaseTypeFromFirstArg|HW_Flag_NoRMWSemantics)
+HARDWARE_INTRINSIC(Base_Vector128_AsSingle,                         "AsSingle",                                    Base,          -1,              16,           1,     {INS_invalid,           INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid},           HW_Category_Helper,                 HW_Flag_SpecialImport|HW_Flag_NoContainment|HW_Flag_BaseTypeFromFirstArg|HW_Flag_NoRMWSemantics)
+HARDWARE_INTRINSIC(Base_Vector128_AsUInt16,                         "AsUInt16",                                    Base,          -1,              16,           1,     {INS_invalid,           INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid},           HW_Category_Helper,                 HW_Flag_SpecialImport|HW_Flag_NoContainment|HW_Flag_BaseTypeFromFirstArg|HW_Flag_NoRMWSemantics)
+HARDWARE_INTRINSIC(Base_Vector128_AsUInt32,                         "AsUInt32",                                    Base,          -1,              16,           1,     {INS_invalid,           INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid},           HW_Category_Helper,                 HW_Flag_SpecialImport|HW_Flag_NoContainment|HW_Flag_BaseTypeFromFirstArg|HW_Flag_NoRMWSemantics)
+HARDWARE_INTRINSIC(Base_Vector128_AsUInt64,                         "AsUInt64",                                    Base,          -1,              16,           1,     {INS_invalid,           INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid},           HW_Category_Helper,                 HW_Flag_SpecialImport|HW_Flag_NoContainment|HW_Flag_BaseTypeFromFirstArg|HW_Flag_NoRMWSemantics)
+HARDWARE_INTRINSIC(Base_Vector128_CreateScalarUnsafe,               "CreateScalarUnsafe",                          Base,          -1,              16,           1,     {INS_mov_i2xmm,         INS_mov_i2xmm,      INS_mov_i2xmm,      INS_mov_i2xmm,      INS_mov_i2xmm,      INS_mov_i2xmm,      INS_mov_i2xmm,      INS_mov_i2xmm,      INS_movss,          INS_movsdsse2},         HW_Category_SIMDScalar,             HW_Flag_SpecialImport|HW_Flag_SpecialCodeGen|HW_Flag_NoRMWSemantics)
+HARDWARE_INTRINSIC(Base_Vector128_GetElement,                       "GetElement",                                  Base,          -1,              16,           2,     {INS_invalid,           INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid},           HW_Category_Helper,                 HW_Flag_SpecialImport|HW_Flag_BaseTypeFromFirstArg)
+HARDWARE_INTRINSIC(Base_Vector128_WithElement,                      "WithElement",                                 Base,          -1,              16,           3,     {INS_invalid,           INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid},           HW_Category_Helper,                 HW_Flag_SpecialImport|HW_Flag_BaseTypeFromFirstArg)
+HARDWARE_INTRINSIC(Base_Vector128_ToScalar,                         "ToScalar",                                    Base,          -1,              16,           1,     {INS_invalid,           INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_movss,          INS_movsdsse2},         HW_Category_SimpleSIMD,             HW_Flag_SpecialImport|HW_Flag_SpecialCodeGen|HW_Flag_BaseTypeFromFirstArg|HW_Flag_NoRMWSemantics)
+HARDWARE_INTRINSIC(Base_Vector128_ToVector256,                      "ToVector256",                                 Base,          -1,              16,           1,     {INS_movdqu,            INS_movdqu,         INS_movdqu,         INS_movdqu,         INS_movdqu,         INS_movdqu,         INS_movdqu,         INS_movdqu,         INS_movups,         INS_movupd},            HW_Category_SimpleSIMD,             HW_Flag_SpecialImport|HW_Flag_SpecialCodeGen|HW_Flag_BaseTypeFromFirstArg|HW_Flag_NoRMWSemantics)
+HARDWARE_INTRINSIC(Base_Vector128_ToVector256Unsafe,                "ToVector256Unsafe",                           Base,          -1,              16,           1,     {INS_movdqu,            INS_movdqu,         INS_movdqu,         INS_movdqu,         INS_movdqu,         INS_movdqu,         INS_movdqu,         INS_movdqu,         INS_movups,         INS_movupd},            HW_Category_SimpleSIMD,             HW_Flag_SpecialImport|HW_Flag_SpecialCodeGen|HW_Flag_BaseTypeFromFirstArg|HW_Flag_NoRMWSemantics)
+HARDWARE_INTRINSIC(Base_Vector128_Zero,                             "get_Zero",                                    Base,          -1,              16,           0,     {INS_xorps,             INS_xorps,          INS_xorps,          INS_xorps,          INS_xorps,          INS_xorps,          INS_xorps,          INS_xorps,          INS_xorps,          INS_xorps},             HW_Category_Helper,                 HW_Flag_SpecialImport|HW_Flag_NoContainment|HW_Flag_NoRMWSemantics)
+HARDWARE_INTRINSIC(Base_Vector256_As,                               "As",                                          Base,          -1,              32,           1,     {INS_invalid,           INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid},           HW_Category_Helper,                 HW_Flag_SpecialImport|HW_Flag_NoContainment|HW_Flag_BaseTypeFromFirstArg|HW_Flag_NoRMWSemantics)
+HARDWARE_INTRINSIC(Base_Vector256_AsByte,                           "AsByte",                                      Base,          -1,              32,           1,     {INS_invalid,           INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid},           HW_Category_Helper,                 HW_Flag_SpecialImport|HW_Flag_NoContainment|HW_Flag_BaseTypeFromFirstArg|HW_Flag_NoRMWSemantics)
+HARDWARE_INTRINSIC(Base_Vector256_AsDouble,                         "AsDouble",                                    Base,          -1,              32,           1,     {INS_invalid,           INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid},           HW_Category_Helper,                 HW_Flag_SpecialImport|HW_Flag_NoContainment|HW_Flag_BaseTypeFromFirstArg|HW_Flag_NoRMWSemantics)
+HARDWARE_INTRINSIC(Base_Vector256_AsInt16,                          "AsInt16",                                     Base,          -1,              32,           1,     {INS_invalid,           INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid},           HW_Category_Helper,                 HW_Flag_SpecialImport|HW_Flag_NoContainment|HW_Flag_BaseTypeFromFirstArg|HW_Flag_NoRMWSemantics)
+HARDWARE_INTRINSIC(Base_Vector256_AsInt32,                          "AsInt32",                                     Base,          -1,              32,           1,     {INS_invalid,           INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid},           HW_Category_Helper,                 HW_Flag_SpecialImport|HW_Flag_NoContainment|HW_Flag_BaseTypeFromFirstArg|HW_Flag_NoRMWSemantics)
+HARDWARE_INTRINSIC(Base_Vector256_AsInt64,                          "AsInt64",                                     Base,          -1,              32,           1,     {INS_invalid,           INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid},           HW_Category_Helper,                 HW_Flag_SpecialImport|HW_Flag_NoContainment|HW_Flag_BaseTypeFromFirstArg|HW_Flag_NoRMWSemantics)
+HARDWARE_INTRINSIC(Base_Vector256_AsSByte,                          "AsSByte",                                     Base,          -1,              32,           1,     {INS_invalid,           INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid},           HW_Category_Helper,                 HW_Flag_SpecialImport|HW_Flag_NoContainment|HW_Flag_BaseTypeFromFirstArg|HW_Flag_NoRMWSemantics)
+HARDWARE_INTRINSIC(Base_Vector256_AsSingle,                         "AsSingle",                                    Base,          -1,              32,           1,     {INS_invalid,           INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid},           HW_Category_Helper,                 HW_Flag_SpecialImport|HW_Flag_NoContainment|HW_Flag_BaseTypeFromFirstArg|HW_Flag_NoRMWSemantics)
+HARDWARE_INTRINSIC(Base_Vector256_AsUInt16,                         "AsUInt16",                                    Base,          -1,              32,           1,     {INS_invalid,           INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid},           HW_Category_Helper,                 HW_Flag_SpecialImport|HW_Flag_NoContainment|HW_Flag_BaseTypeFromFirstArg|HW_Flag_NoRMWSemantics)
+HARDWARE_INTRINSIC(Base_Vector256_AsUInt32,                         "AsUInt32",                                    Base,          -1,              32,           1,     {INS_invalid,           INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid},           HW_Category_Helper,                 HW_Flag_SpecialImport|HW_Flag_NoContainment|HW_Flag_BaseTypeFromFirstArg|HW_Flag_NoRMWSemantics)
+HARDWARE_INTRINSIC(Base_Vector256_AsUInt64,                         "AsUInt64",                                    Base,          -1,              32,           1,     {INS_invalid,           INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid},           HW_Category_Helper,                 HW_Flag_SpecialImport|HW_Flag_NoContainment|HW_Flag_BaseTypeFromFirstArg|HW_Flag_NoRMWSemantics)
+HARDWARE_INTRINSIC(Base_Vector256_CreateScalarUnsafe,               "CreateScalarUnsafe",                          Base,          -1,              32,           1,     {INS_mov_i2xmm,         INS_mov_i2xmm,      INS_mov_i2xmm,      INS_mov_i2xmm,      INS_mov_i2xmm,      INS_mov_i2xmm,      INS_mov_i2xmm,      INS_mov_i2xmm,      INS_movss,          INS_movsdsse2},         HW_Category_SIMDScalar,             HW_Flag_SpecialImport|HW_Flag_SpecialCodeGen|HW_Flag_NoRMWSemantics)
+HARDWARE_INTRINSIC(Base_Vector256_GetElement,                       "GetElement",                                  Base,          -1,              32,           2,     {INS_invalid,           INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid},           HW_Category_Helper,                 HW_Flag_SpecialImport|HW_Flag_BaseTypeFromFirstArg)
+HARDWARE_INTRINSIC(Base_Vector256_WithElement,                      "WithElement",                                 Base,          -1,              32,           3,     {INS_invalid,           INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid},           HW_Category_Helper,                 HW_Flag_SpecialImport|HW_Flag_BaseTypeFromFirstArg)
+HARDWARE_INTRINSIC(Base_Vector256_GetLower,                         "GetLower",                                    Base,          -1,              32,           1,     {INS_movdqu,            INS_movdqu,         INS_movdqu,         INS_movdqu,         INS_movdqu,         INS_movdqu,         INS_movdqu,         INS_movdqu,         INS_movups,         INS_movupd},            HW_Category_SimpleSIMD,             HW_Flag_SpecialImport|HW_Flag_SpecialCodeGen|HW_Flag_BaseTypeFromFirstArg|HW_Flag_NoRMWSemantics)
+HARDWARE_INTRINSIC(Base_Vector256_ToScalar,                         "ToScalar",                                    Base,          -1,              32,           1,     {INS_invalid,           INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_invalid,        INS_movss,          INS_movsdsse2},         HW_Category_SimpleSIMD,             HW_Flag_SpecialImport|HW_Flag_SpecialCodeGen|HW_Flag_BaseTypeFromFirstArg|HW_Flag_NoRMWSemantics)
+HARDWARE_INTRINSIC(Base_Vector256_Zero,                             "get_Zero",                                    Base,          -1,              32,           0,     {INS_xorps,             INS_xorps,          INS_xorps,          INS_xorps,          INS_xorps,          INS_xorps,          INS_xorps,          INS_xorps,          INS_xorps,          INS_xorps},             HW_Category_Helper,                 HW_Flag_SpecialImport|HW_Flag_NoContainment|HW_Flag_NoRMWSemantics)
 
 // ***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************
 //                 Intrinsic ID                                     Function name                                   ISA         ival        SIMD size       NumArg                                                                                                     instructions                                                                                                     Category                            Flags
index c2602bd..14a76de 100644 (file)
@@ -504,6 +504,7 @@ bool HWIntrinsicInfo::isFullyImplementedIsa(InstructionSet isa)
         case InstructionSet_AES:
         case InstructionSet_AVX:
         case InstructionSet_AVX2:
+        case InstructionSet_Base:
         case InstructionSet_BMI1:
         case InstructionSet_BMI2:
         case InstructionSet_BMI1_X64:
@@ -918,6 +919,8 @@ GenTree* Compiler::impHWIntrinsic(NamedIntrinsic        intrinsic,
     // other intrinsics need special importation
     switch (isa)
     {
+        case InstructionSet_Base:
+            return impBaseIntrinsic(intrinsic, method, sig, mustExpand);
         case InstructionSet_SSE:
             return impSSEIntrinsic(intrinsic, method, sig, mustExpand);
         case InstructionSet_SSE2:
@@ -952,6 +955,641 @@ GenTree* Compiler::impHWIntrinsic(NamedIntrinsic        intrinsic,
     }
 }
 
+//------------------------------------------------------------------------
+// impBaseIntrinsic: dispatch intrinsics to their own implementation
+//
+// Arguments:
+//    intrinsic  -- id of the intrinsic function.
+//    method     -- method handle of the intrinsic function.
+//    sig        -- signature of the intrinsic call
+//    mustExpand -- true if the compiler is compiling the fallback(GT_CALL) of this intrinsics
+//
+// Return Value:
+//    the expanded intrinsic.
+//
+GenTree* Compiler::impBaseIntrinsic(NamedIntrinsic        intrinsic,
+                                    CORINFO_METHOD_HANDLE method,
+                                    CORINFO_SIG_INFO*     sig,
+                                    bool                  mustExpand)
+{
+    GenTree* retNode = nullptr;
+    GenTree* op1     = nullptr;
+
+    if (!featureSIMD)
+    {
+        return nullptr;
+    }
+
+    unsigned  simdSize = 0;
+    var_types baseType = TYP_UNKNOWN;
+    var_types retType  = JITtype2varType(sig->retType);
+
+    assert(!sig->hasThis());
+
+    if (HWIntrinsicInfo::BaseTypeFromFirstArg(intrinsic))
+    {
+        baseType = getBaseTypeAndSizeOfSIMDType(info.compCompHnd->getArgClass(sig, sig->args), &simdSize);
+
+        if (retType == TYP_STRUCT)
+        {
+            unsigned  retSimdSize = 0;
+            var_types retBasetype = getBaseTypeAndSizeOfSIMDType(sig->retTypeClass, &retSimdSize);
+            if (!varTypeIsArithmetic(retBasetype))
+            {
+                return nullptr;
+            }
+            retType = getSIMDTypeForSize(retSimdSize);
+        }
+    }
+    else
+    {
+        assert(retType == TYP_STRUCT);
+        baseType = getBaseTypeAndSizeOfSIMDType(sig->retTypeClass, &simdSize);
+        retType  = getSIMDTypeForSize(simdSize);
+    }
+
+    if (!varTypeIsArithmetic(baseType))
+    {
+        return nullptr;
+    }
+
+    switch (intrinsic)
+    {
+        case NI_Base_Vector256_As:
+        case NI_Base_Vector256_AsByte:
+        case NI_Base_Vector256_AsDouble:
+        case NI_Base_Vector256_AsInt16:
+        case NI_Base_Vector256_AsInt32:
+        case NI_Base_Vector256_AsInt64:
+        case NI_Base_Vector256_AsSByte:
+        case NI_Base_Vector256_AsSingle:
+        case NI_Base_Vector256_AsUInt16:
+        case NI_Base_Vector256_AsUInt32:
+        case NI_Base_Vector256_AsUInt64:
+        {
+            if (!compSupports(InstructionSet_AVX))
+            {
+                // We don't want to deal with TYP_SIMD32 if the compiler doesn't otherwise support the type.
+                break;
+            }
+
+            __fallthrough;
+        }
+
+        case NI_Base_Vector128_As:
+        case NI_Base_Vector128_AsByte:
+        case NI_Base_Vector128_AsDouble:
+        case NI_Base_Vector128_AsInt16:
+        case NI_Base_Vector128_AsInt32:
+        case NI_Base_Vector128_AsInt64:
+        case NI_Base_Vector128_AsSByte:
+        case NI_Base_Vector128_AsSingle:
+        case NI_Base_Vector128_AsUInt16:
+        case NI_Base_Vector128_AsUInt32:
+        case NI_Base_Vector128_AsUInt64:
+        {
+            // We fold away the cast here, as it only exists to satisfy
+            // the type system. It is safe to do this here since the retNode type
+            // and the signature return type are both the same TYP_SIMD.
+
+            assert(sig->numArgs == 1);
+
+            retNode = impSIMDPopStack(retType, /* expectAddr: */ false, sig->retTypeClass);
+            SetOpLclRelatedToSIMDIntrinsic(retNode);
+            assert(retNode->gtType == getSIMDTypeForSize(getSIMDTypeSizeInBytes(sig->retTypeSigClass)));
+            break;
+        }
+
+        case NI_Base_Vector128_CreateScalarUnsafe:
+        {
+            assert(sig->numArgs == 1);
+
+#ifdef _TARGET_X86_
+            if (varTypeIsLong(baseType))
+            {
+                // TODO-XARCH-CQ: It may be beneficial to emit the movq
+                // instruction, which takes a 64-bit memory address and
+                // works on 32-bit x86 systems.
+                break;
+            }
+#endif // _TARGET_X86_
+
+            if (compSupports(InstructionSet_SSE2) || (compSupports(InstructionSet_SSE) && (baseType == TYP_FLOAT)))
+            {
+                op1     = impPopStack().val;
+                retNode = gtNewSimdHWIntrinsicNode(retType, op1, intrinsic, baseType, simdSize);
+            }
+            break;
+        }
+
+        case NI_Base_Vector128_ToScalar:
+        {
+            assert(sig->numArgs == 1);
+
+            if (compSupports(InstructionSet_SSE) && varTypeIsFloating(baseType))
+            {
+                op1     = impSIMDPopStack(getSIMDTypeForSize(simdSize));
+                retNode = gtNewSimdHWIntrinsicNode(retType, op1, intrinsic, baseType, 16);
+            }
+            break;
+        }
+
+        case NI_Base_Vector128_ToVector256:
+        case NI_Base_Vector128_ToVector256Unsafe:
+        case NI_Base_Vector256_GetLower:
+        {
+            assert(sig->numArgs == 1);
+
+            if (compSupports(InstructionSet_AVX))
+            {
+                op1     = impSIMDPopStack(getSIMDTypeForSize(simdSize));
+                retNode = gtNewSimdHWIntrinsicNode(retType, op1, intrinsic, baseType, simdSize);
+            }
+            break;
+        }
+
+        case NI_Base_Vector128_Zero:
+        {
+            assert(sig->numArgs == 0);
+
+            if (compSupports(InstructionSet_SSE))
+            {
+                retNode = gtNewSimdHWIntrinsicNode(retType, intrinsic, baseType, simdSize);
+            }
+            break;
+        }
+
+        case NI_Base_Vector256_CreateScalarUnsafe:
+        {
+            assert(sig->numArgs == 1);
+
+#ifdef _TARGET_X86_
+            if (varTypeIsLong(baseType))
+            {
+                // TODO-XARCH-CQ: It may be beneficial to emit the movq
+                // instruction, which takes a 64-bit memory address and
+                // works on 32-bit x86 systems.
+                break;
+            }
+#endif // _TARGET_X86_
+
+            if (compSupports(InstructionSet_AVX))
+            {
+                op1     = impPopStack().val;
+                retNode = gtNewSimdHWIntrinsicNode(retType, op1, intrinsic, baseType, simdSize);
+            }
+            break;
+        }
+
+        case NI_Base_Vector256_ToScalar:
+        {
+            assert(sig->numArgs == 1);
+
+            if (compSupports(InstructionSet_AVX) && varTypeIsFloating(baseType))
+            {
+                op1     = impSIMDPopStack(getSIMDTypeForSize(simdSize));
+                retNode = gtNewSimdHWIntrinsicNode(retType, op1, intrinsic, baseType, 32);
+            }
+            break;
+        }
+
+        case NI_Base_Vector256_Zero:
+        {
+            assert(sig->numArgs == 0);
+
+            if (compSupports(InstructionSet_AVX))
+            {
+                retNode = gtNewSimdHWIntrinsicNode(retType, intrinsic, baseType, simdSize);
+            }
+            break;
+        }
+
+        case NI_Base_Vector256_WithElement:
+        {
+            if (!compSupports(InstructionSet_AVX))
+            {
+                // Using software fallback if JIT/hardware don't support AVX instructions and YMM registers
+                return nullptr;
+            }
+            __fallthrough;
+        }
+
+        case NI_Base_Vector128_WithElement:
+        {
+            assert(sig->numArgs == 3);
+            GenTree* indexOp = impStackTop(1).val;
+            if (!compSupports(InstructionSet_SSE2) || !varTypeIsArithmetic(baseType) || !indexOp->OperIsConst())
+            {
+                // Using software fallback if
+                // 1. JIT/hardware don't support SSE2 instructions
+                // 2. baseType is not a numeric type (throw execptions)
+                // 3. index is not a constant
+                return nullptr;
+            }
+
+            switch (baseType)
+            {
+                // Using software fallback if baseType is not supported by hardware
+                case TYP_BYTE:
+                case TYP_UBYTE:
+                case TYP_INT:
+                case TYP_UINT:
+                    if (!compSupports(InstructionSet_SSE41))
+                    {
+                        return nullptr;
+                    }
+                    break;
+
+                case TYP_LONG:
+                case TYP_ULONG:
+                    if (!compSupports(InstructionSet_SSE41_X64))
+                    {
+                        return nullptr;
+                    }
+                    break;
+
+                case TYP_DOUBLE:
+                case TYP_FLOAT:
+                case TYP_SHORT:
+                case TYP_USHORT:
+                    // short/ushort/float/double is supported by SSE2
+                    break;
+
+                default:
+                    unreached();
+                    break;
+            }
+
+            ssize_t imm8       = indexOp->AsIntCon()->IconValue();
+            ssize_t cachedImm8 = imm8;
+            ssize_t count      = simdSize / genTypeSize(baseType);
+
+            if (imm8 >= count || imm8 < 0)
+            {
+                // Using software fallback if index is out of range (throw exeception)
+                return nullptr;
+            }
+
+            GenTree* valueOp = impPopStack().val;
+            impPopStack();
+            GenTree* vectorOp = impSIMDPopStack(getSIMDTypeForSize(simdSize));
+
+            GenTree* clonedVectorOp = nullptr;
+
+            if (simdSize == 32)
+            {
+                // Extract the half vector that will be modified
+                assert(compSupports(InstructionSet_AVX));
+
+                // copy `vectorOp` to accept the modified half vector
+                vectorOp = impCloneExpr(vectorOp, &clonedVectorOp, NO_CLASS_HANDLE, (unsigned)CHECK_SPILL_ALL,
+                                        nullptr DEBUGARG("Clone Vector for Vector256<T>.WithElement"));
+
+                if (imm8 >= count / 2)
+                {
+                    imm8 -= count / 2;
+                    vectorOp = gtNewSimdHWIntrinsicNode(TYP_SIMD16, vectorOp, gtNewIconNode(1), NI_AVX_ExtractVector128,
+                                                        baseType, simdSize);
+                }
+                else
+                {
+                    vectorOp =
+                        gtNewSimdHWIntrinsicNode(TYP_SIMD16, vectorOp, NI_Base_Vector256_GetLower, baseType, simdSize);
+                }
+            }
+
+            GenTree* immNode = gtNewIconNode(imm8);
+
+            switch (baseType)
+            {
+                case TYP_LONG:
+                case TYP_ULONG:
+                    retNode = gtNewSimdHWIntrinsicNode(TYP_SIMD16, vectorOp, valueOp, immNode, NI_SSE41_X64_Insert,
+                                                       baseType, 16);
+                    break;
+
+                case TYP_FLOAT:
+                {
+                    if (!compSupports(InstructionSet_SSE41))
+                    {
+                        // Emulate Vector128<float>.WithElement by SSE instructions
+                        if (imm8 == 0)
+                        {
+                            // vector.WithElement(0, value)
+                            // =>
+                            // movss   xmm0, xmm1 (xmm0 = vector, xmm1 = value)
+                            valueOp = gtNewSimdHWIntrinsicNode(TYP_SIMD16, valueOp,
+                                                               NI_Base_Vector128_CreateScalarUnsafe, TYP_FLOAT, 16);
+                            retNode = gtNewSimdHWIntrinsicNode(TYP_SIMD16, vectorOp, valueOp, NI_SSE_MoveScalar,
+                                                               TYP_FLOAT, 16);
+                        }
+                        else if (imm8 == 1)
+                        {
+                            // vector.WithElement(1, value)
+                            // =>
+                            // shufps  xmm1, xmm0, 0   (xmm0 = vector, xmm1 = value)
+                            // shufps  xmm1, xmm0, 226
+                            GenTree* tmpOp =
+                                gtNewSimdHWIntrinsicNode(TYP_SIMD16, valueOp, NI_Base_Vector128_CreateScalarUnsafe,
+                                                         TYP_FLOAT, 16);
+                            GenTree* dupVectorOp = nullptr;
+                            vectorOp = impCloneExpr(vectorOp, &dupVectorOp, NO_CLASS_HANDLE, (unsigned)CHECK_SPILL_ALL,
+                                                    nullptr DEBUGARG("Clone Vector for Vector128<float>.WithElement"));
+                            tmpOp = gtNewSimdHWIntrinsicNode(TYP_SIMD16, tmpOp, vectorOp, gtNewIconNode(0),
+                                                             NI_SSE_Shuffle, TYP_FLOAT, 16);
+                            retNode = gtNewSimdHWIntrinsicNode(TYP_SIMD16, tmpOp, dupVectorOp, gtNewIconNode(226),
+                                                               NI_SSE_Shuffle, TYP_FLOAT, 16);
+                        }
+                        else
+                        {
+                            ssize_t controlBits1 = 0;
+                            ssize_t controlBits2 = 0;
+                            if (imm8 == 2)
+                            {
+                                controlBits1 = 48;
+                                controlBits2 = 132;
+                            }
+                            else
+                            {
+                                controlBits1 = 32;
+                                controlBits2 = 36;
+                            }
+                            // vector.WithElement(2, value)
+                            // =>
+                            // shufps  xmm1, xmm0, 48   (xmm0 = vector, xmm1 = value)
+                            // shufps  xmm0, xmm1, 132
+                            //
+                            // vector.WithElement(3, value)
+                            // =>
+                            // shufps  xmm1, xmm0, 32   (xmm0 = vector, xmm1 = value)
+                            // shufps  xmm0, xmm1, 36
+                            GenTree* tmpOp =
+                                gtNewSimdHWIntrinsicNode(TYP_SIMD16, valueOp, NI_Base_Vector128_CreateScalarUnsafe,
+                                                         TYP_FLOAT, 16);
+                            GenTree* dupVectorOp = nullptr;
+                            vectorOp = impCloneExpr(vectorOp, &dupVectorOp, NO_CLASS_HANDLE, (unsigned)CHECK_SPILL_ALL,
+                                                    nullptr DEBUGARG("Clone Vector for Vector128<float>.WithElement"));
+                            valueOp = gtNewSimdHWIntrinsicNode(TYP_SIMD16, vectorOp, tmpOp, gtNewIconNode(controlBits1),
+                                                               NI_SSE_Shuffle, TYP_FLOAT, 16);
+                            retNode =
+                                gtNewSimdHWIntrinsicNode(TYP_SIMD16, valueOp, dupVectorOp, gtNewIconNode(controlBits2),
+                                                         NI_SSE_Shuffle, TYP_FLOAT, 16);
+                        }
+                        break;
+                    }
+                    else
+                    {
+                        valueOp = gtNewSimdHWIntrinsicNode(TYP_SIMD16, valueOp, NI_Base_Vector128_CreateScalarUnsafe,
+                                                           TYP_FLOAT, 16);
+                        immNode->AsIntCon()->SetIconValue(imm8 * 16);
+                        __fallthrough;
+                    }
+                }
+
+                case TYP_BYTE:
+                case TYP_UBYTE:
+                case TYP_INT:
+                case TYP_UINT:
+                    retNode =
+                        gtNewSimdHWIntrinsicNode(TYP_SIMD16, vectorOp, valueOp, immNode, NI_SSE41_Insert, baseType, 16);
+                    break;
+
+                case TYP_SHORT:
+                case TYP_USHORT:
+                    retNode =
+                        gtNewSimdHWIntrinsicNode(TYP_SIMD16, vectorOp, valueOp, immNode, NI_SSE2_Insert, baseType, 16);
+                    break;
+
+                case TYP_DOUBLE:
+                {
+                    // vector.WithElement(0, value)
+                    // =>
+                    // movsd   xmm0, xmm1  (xmm0 = vector, xmm1 = value)
+                    //
+                    // vector.WithElement(1, value)
+                    // =>
+                    // unpcklpd  xmm0, xmm1  (xmm0 = vector, xmm1 = value)
+                    valueOp = gtNewSimdHWIntrinsicNode(TYP_SIMD16, valueOp, NI_Base_Vector128_CreateScalarUnsafe,
+                                                       TYP_DOUBLE, 16);
+                    NamedIntrinsic in = (imm8 == 0) ? NI_SSE2_MoveScalar : NI_SSE2_UnpackLow;
+                    retNode           = gtNewSimdHWIntrinsicNode(TYP_SIMD16, vectorOp, valueOp, in, TYP_DOUBLE, 16);
+                    break;
+                }
+
+                default:
+                    unreached();
+                    break;
+            }
+
+            if (simdSize == 32)
+            {
+                assert(clonedVectorOp);
+                int upperOrLower = (cachedImm8 >= count / 2) ? 1 : 0;
+                retNode = gtNewSimdHWIntrinsicNode(retType, clonedVectorOp, retNode, gtNewIconNode(upperOrLower),
+                                                   NI_AVX_InsertVector128, baseType, simdSize);
+            }
+
+            break;
+        }
+
+        case NI_Base_Vector256_GetElement:
+        {
+            if (!compSupports(InstructionSet_AVX))
+            {
+                // Using software fallback if JIT/hardware don't support AVX instructions and YMM registers
+                return nullptr;
+            }
+            __fallthrough;
+        }
+
+        case NI_Base_Vector128_GetElement:
+        {
+            assert(sig->numArgs == 2);
+            GenTree* indexOp = impStackTop().val;
+            if (!compSupports(InstructionSet_SSE2) || !varTypeIsArithmetic(baseType) || !indexOp->OperIsConst())
+            {
+                // Using software fallback if
+                // 1. JIT/hardware don't support SSE2 instructions
+                // 2. baseType is not a numeric type (throw execptions)
+                // 3. index is not a constant
+                return nullptr;
+            }
+
+            switch (baseType)
+            {
+                // Using software fallback if baseType is not supported by hardware
+                case TYP_BYTE:
+                case TYP_UBYTE:
+                case TYP_INT:
+                case TYP_UINT:
+                    if (!compSupports(InstructionSet_SSE41))
+                    {
+                        return nullptr;
+                    }
+                    break;
+
+                case TYP_LONG:
+                case TYP_ULONG:
+                    if (!compSupports(InstructionSet_SSE41_X64))
+                    {
+                        return nullptr;
+                    }
+                    break;
+
+                case TYP_DOUBLE:
+                case TYP_FLOAT:
+                case TYP_SHORT:
+                case TYP_USHORT:
+                    // short/ushort/float/double is supported by SSE2
+                    break;
+
+                default:
+                    break;
+            }
+
+            ssize_t imm8  = indexOp->AsIntCon()->IconValue();
+            ssize_t count = simdSize / genTypeSize(baseType);
+
+            if (imm8 >= count || imm8 < 0)
+            {
+                // Using software fallback if index is out of range (throw exeception)
+                return nullptr;
+            }
+
+            impPopStack();
+            GenTree*       vectorOp     = impSIMDPopStack(getSIMDTypeForSize(simdSize));
+            NamedIntrinsic resIntrinsic = NI_Illegal;
+
+            if (simdSize == 32)
+            {
+                assert(compSupports(InstructionSet_AVX));
+
+                if (imm8 >= count / 2)
+                {
+                    imm8 -= count / 2;
+                    vectorOp = gtNewSimdHWIntrinsicNode(TYP_SIMD16, vectorOp, gtNewIconNode(1), NI_AVX_ExtractVector128,
+                                                        baseType, simdSize);
+                }
+                else
+                {
+                    vectorOp =
+                        gtNewSimdHWIntrinsicNode(TYP_SIMD16, vectorOp, NI_Base_Vector256_GetLower, baseType, simdSize);
+                }
+            }
+
+            if (imm8 == 0 && (genTypeSize(baseType) >= 4))
+            {
+                switch (baseType)
+                {
+                    case TYP_LONG:
+                        resIntrinsic = NI_SSE2_X64_ConvertToInt64;
+                        break;
+
+                    case TYP_ULONG:
+                        resIntrinsic = NI_SSE2_X64_ConvertToUInt64;
+                        break;
+
+                    case TYP_INT:
+                        resIntrinsic = NI_SSE2_ConvertToInt32;
+                        break;
+
+                    case TYP_UINT:
+                        resIntrinsic = NI_SSE2_ConvertToUInt32;
+                        break;
+
+                    case TYP_FLOAT:
+                    case TYP_DOUBLE:
+                        resIntrinsic = NI_Base_Vector128_ToScalar;
+                        break;
+
+                    default:
+                        unreached();
+                }
+
+                return gtNewSimdHWIntrinsicNode(retType, vectorOp, resIntrinsic, baseType, 16);
+            }
+
+            GenTree* immNode = gtNewIconNode(imm8);
+
+            switch (baseType)
+            {
+                case TYP_LONG:
+                case TYP_ULONG:
+                    retNode = gtNewSimdHWIntrinsicNode(retType, vectorOp, immNode, NI_SSE41_X64_Extract, baseType, 16);
+                    break;
+
+                case TYP_FLOAT:
+                {
+                    if (!compSupports(InstructionSet_SSE41))
+                    {
+                        assert(imm8 >= 1);
+                        assert(imm8 <= 3);
+                        // Emulate Vector128<float>.GetElement(i) by SSE instructions
+                        // vector.GetElement(i)
+                        // =>
+                        // shufps  xmm0, xmm0, control
+                        // (xmm0 = vector, control = i + 228)
+                        immNode->AsIntCon()->SetIconValue(228 + imm8);
+                        GenTree* clonedVectorOp = nullptr;
+                        vectorOp = impCloneExpr(vectorOp, &clonedVectorOp, NO_CLASS_HANDLE, (unsigned)CHECK_SPILL_ALL,
+                                                nullptr DEBUGARG("Clone Vector for Vector128<float>.GetElement"));
+                        vectorOp = gtNewSimdHWIntrinsicNode(TYP_SIMD16, vectorOp, clonedVectorOp, immNode,
+                                                            NI_SSE_Shuffle, TYP_FLOAT, 16);
+                        return gtNewSimdHWIntrinsicNode(retType, vectorOp, NI_Base_Vector128_ToScalar, TYP_FLOAT, 16);
+                    }
+                    __fallthrough;
+                }
+
+                case TYP_UBYTE:
+                case TYP_INT:
+                case TYP_UINT:
+                    retNode = gtNewSimdHWIntrinsicNode(retType, vectorOp, immNode, NI_SSE41_Extract, baseType, 16);
+                    break;
+
+                case TYP_BYTE:
+                    // We do not have SSE41/SSE2 Extract APIs on signed small int, so need a CAST on the result
+                    retNode = gtNewSimdHWIntrinsicNode(TYP_UBYTE, vectorOp, immNode, NI_SSE41_Extract, TYP_UBYTE, 16);
+                    retNode = gtNewCastNode(TYP_INT, retNode, true, TYP_BYTE);
+                    break;
+
+                case TYP_SHORT:
+                case TYP_USHORT:
+                    // We do not have SSE41/SSE2 Extract APIs on signed small int, so need a CAST on the result
+                    retNode = gtNewSimdHWIntrinsicNode(TYP_USHORT, vectorOp, immNode, NI_SSE2_Extract, TYP_USHORT, 16);
+                    if (baseType == TYP_SHORT)
+                    {
+                        retNode = gtNewCastNode(TYP_INT, retNode, true, TYP_SHORT);
+                    }
+                    break;
+
+                case TYP_DOUBLE:
+                    assert(imm8 == 1);
+                    // vector.GetElement(1)
+                    // =>
+                    // pshufd xmm1, xmm0, 0xEE (xmm0 = vector)
+                    vectorOp = gtNewSimdHWIntrinsicNode(TYP_SIMD16, vectorOp, gtNewIconNode(0xEE), NI_SSE2_Shuffle,
+                                                        TYP_INT, 16);
+                    retNode =
+                        gtNewSimdHWIntrinsicNode(TYP_DOUBLE, vectorOp, NI_Base_Vector128_ToScalar, TYP_DOUBLE, 16);
+                    break;
+
+                default:
+                    unreached();
+            }
+
+            break;
+        }
+
+        default:
+        {
+            unreached();
+            break;
+        }
+    }
+
+    return retNode;
+}
+
 GenTree* Compiler::impSSEIntrinsic(NamedIntrinsic        intrinsic,
                                    CORINFO_METHOD_HANDLE method,
                                    CORINFO_SIG_INFO*     sig,
index e677d37..5d3a82e 100644 (file)
@@ -3458,64 +3458,6 @@ GenTree* Compiler::impIntrinsic(GenTree*                newobjThis,
             ni = lookupNamedIntrinsic(method);
 
 #ifdef FEATURE_HW_INTRINSICS
-            switch (ni)
-            {
-#if defined(_TARGET_ARM64_)
-                case NI_Base_Vector64_AsByte:
-                case NI_Base_Vector64_AsInt16:
-                case NI_Base_Vector64_AsInt32:
-                case NI_Base_Vector64_AsSByte:
-                case NI_Base_Vector64_AsSingle:
-                case NI_Base_Vector64_AsUInt16:
-                case NI_Base_Vector64_AsUInt32:
-#endif // _TARGET_ARM64_
-                case NI_Base_Vector128_As:
-                case NI_Base_Vector128_AsByte:
-                case NI_Base_Vector128_AsDouble:
-                case NI_Base_Vector128_AsInt16:
-                case NI_Base_Vector128_AsInt32:
-                case NI_Base_Vector128_AsInt64:
-                case NI_Base_Vector128_AsSByte:
-                case NI_Base_Vector128_AsSingle:
-                case NI_Base_Vector128_AsUInt16:
-                case NI_Base_Vector128_AsUInt32:
-                case NI_Base_Vector128_AsUInt64:
-#if defined(_TARGET_XARCH_)
-                case NI_Base_Vector128_CreateScalarUnsafe:
-                case NI_Base_Vector128_GetElement:
-                case NI_Base_Vector128_WithElement:
-                case NI_Base_Vector128_ToScalar:
-                case NI_Base_Vector128_ToVector256:
-                case NI_Base_Vector128_ToVector256Unsafe:
-                case NI_Base_Vector128_Zero:
-                case NI_Base_Vector256_As:
-                case NI_Base_Vector256_AsByte:
-                case NI_Base_Vector256_AsDouble:
-                case NI_Base_Vector256_AsInt16:
-                case NI_Base_Vector256_AsInt32:
-                case NI_Base_Vector256_AsInt64:
-                case NI_Base_Vector256_AsSByte:
-                case NI_Base_Vector256_AsSingle:
-                case NI_Base_Vector256_AsUInt16:
-                case NI_Base_Vector256_AsUInt32:
-                case NI_Base_Vector256_AsUInt64:
-                case NI_Base_Vector256_CreateScalarUnsafe:
-                case NI_Base_Vector256_GetElement:
-                case NI_Base_Vector256_WithElement:
-                case NI_Base_Vector256_GetLower:
-                case NI_Base_Vector256_ToScalar:
-                case NI_Base_Vector256_Zero:
-#endif // _TARGET_XARCH_
-                {
-                    return impBaseIntrinsic(ni, clsHnd, method, sig);
-                }
-
-                default:
-                {
-                    break;
-                }
-            }
-
             if ((ni > NI_HW_INTRINSIC_START) && (ni < NI_HW_INTRINSIC_END))
             {
                 GenTree* hwintrinsic = impHWIntrinsic(ni, method, sig, mustExpand);
@@ -4171,643 +4113,6 @@ GenTree* Compiler::impIntrinsic(GenTree*                newobjThis,
     return retNode;
 }
 
-#ifdef FEATURE_HW_INTRINSICS
-//------------------------------------------------------------------------
-// impBaseIntrinsic: dispatch intrinsics to their own implementation
-//
-// Arguments:
-//    intrinsic  -- id of the intrinsic function.
-//    clsHnd     -- handle for the intrinsic method's class
-//    method     -- method handle of the intrinsic function.
-//    sig        -- signature of the intrinsic call
-//
-// Return Value:
-//    the expanded intrinsic.
-//
-GenTree* Compiler::impBaseIntrinsic(NamedIntrinsic        intrinsic,
-                                    CORINFO_CLASS_HANDLE  clsHnd,
-                                    CORINFO_METHOD_HANDLE method,
-                                    CORINFO_SIG_INFO*     sig)
-{
-    GenTree* retNode = nullptr;
-    GenTree* op1     = nullptr;
-
-    if (!featureSIMD)
-    {
-        return nullptr;
-    }
-
-    unsigned  simdSize = 0;
-    var_types baseType = TYP_UNKNOWN;
-    var_types retType  = JITtype2varType(sig->retType);
-
-    if (sig->hasThis())
-    {
-        baseType = getBaseTypeAndSizeOfSIMDType(clsHnd, &simdSize);
-
-        if (retType == TYP_STRUCT)
-        {
-            unsigned  retSimdSize = 0;
-            var_types retBasetype = getBaseTypeAndSizeOfSIMDType(sig->retTypeClass, &retSimdSize);
-            if (!varTypeIsArithmetic(retBasetype))
-            {
-                return nullptr;
-            }
-            retType = getSIMDTypeForSize(retSimdSize);
-        }
-    }
-    else
-    {
-        assert(retType == TYP_STRUCT);
-        baseType = getBaseTypeAndSizeOfSIMDType(sig->retTypeClass, &simdSize);
-        retType  = getSIMDTypeForSize(simdSize);
-    }
-
-    if (!varTypeIsArithmetic(baseType))
-    {
-        return nullptr;
-    }
-
-    switch (intrinsic)
-    {
-#if defined(_TARGET_XARCH_)
-        case NI_Base_Vector256_As:
-        case NI_Base_Vector256_AsByte:
-        case NI_Base_Vector256_AsDouble:
-        case NI_Base_Vector256_AsInt16:
-        case NI_Base_Vector256_AsInt32:
-        case NI_Base_Vector256_AsInt64:
-        case NI_Base_Vector256_AsSByte:
-        case NI_Base_Vector256_AsSingle:
-        case NI_Base_Vector256_AsUInt16:
-        case NI_Base_Vector256_AsUInt32:
-        case NI_Base_Vector256_AsUInt64:
-        {
-            if (!compSupports(InstructionSet_AVX))
-            {
-                // We don't want to deal with TYP_SIMD32 if the compiler doesn't otherwise support the type.
-                break;
-            }
-
-            __fallthrough;
-        }
-#endif // _TARGET_XARCH_
-
-#if defined(_TARGET_ARM64_)
-        case NI_Base_Vector64_AsByte:
-        case NI_Base_Vector64_AsInt16:
-        case NI_Base_Vector64_AsInt32:
-        case NI_Base_Vector64_AsSByte:
-        case NI_Base_Vector64_AsSingle:
-        case NI_Base_Vector64_AsUInt16:
-        case NI_Base_Vector64_AsUInt32:
-#endif // _TARGET_ARM64_
-        case NI_Base_Vector128_As:
-        case NI_Base_Vector128_AsByte:
-        case NI_Base_Vector128_AsDouble:
-        case NI_Base_Vector128_AsInt16:
-        case NI_Base_Vector128_AsInt32:
-        case NI_Base_Vector128_AsInt64:
-        case NI_Base_Vector128_AsSByte:
-        case NI_Base_Vector128_AsSingle:
-        case NI_Base_Vector128_AsUInt16:
-        case NI_Base_Vector128_AsUInt32:
-        case NI_Base_Vector128_AsUInt64:
-        {
-            // We fold away the cast here, as it only exists to satisfy
-            // the type system. It is safe to do this here since the retNode type
-            // and the signature return type are both the same TYP_SIMD.
-
-            assert(sig->numArgs == 0);
-            assert(sig->hasThis());
-
-            retNode = impSIMDPopStack(retType, true, sig->retTypeClass);
-            SetOpLclRelatedToSIMDIntrinsic(retNode);
-            assert(retNode->gtType == getSIMDTypeForSize(getSIMDTypeSizeInBytes(sig->retTypeSigClass)));
-            break;
-        }
-
-#ifdef _TARGET_XARCH_
-        case NI_Base_Vector128_CreateScalarUnsafe:
-        {
-            assert(sig->numArgs == 1);
-
-#ifdef _TARGET_X86_
-            if (varTypeIsLong(baseType))
-            {
-                // TODO-XARCH-CQ: It may be beneficial to emit the movq
-                // instruction, which takes a 64-bit memory address and
-                // works on 32-bit x86 systems.
-                break;
-            }
-#endif // _TARGET_X86_
-
-            if (compSupports(InstructionSet_SSE2) || (compSupports(InstructionSet_SSE) && (baseType == TYP_FLOAT)))
-            {
-                op1     = impPopStack().val;
-                retNode = gtNewSimdHWIntrinsicNode(retType, op1, intrinsic, baseType, simdSize);
-            }
-            break;
-        }
-
-        case NI_Base_Vector128_ToScalar:
-        {
-            assert(sig->numArgs == 0);
-            assert(sig->hasThis());
-
-            if (compSupports(InstructionSet_SSE) && varTypeIsFloating(baseType))
-            {
-                op1     = impSIMDPopStack(getSIMDTypeForSize(simdSize), true, clsHnd);
-                retNode = gtNewSimdHWIntrinsicNode(retType, op1, intrinsic, baseType, 16);
-            }
-            break;
-        }
-
-        case NI_Base_Vector128_ToVector256:
-        case NI_Base_Vector128_ToVector256Unsafe:
-        case NI_Base_Vector256_GetLower:
-        {
-            assert(sig->numArgs == 0);
-            assert(sig->hasThis());
-
-            if (compSupports(InstructionSet_AVX))
-            {
-                op1     = impSIMDPopStack(getSIMDTypeForSize(simdSize), true, clsHnd);
-                retNode = gtNewSimdHWIntrinsicNode(retType, op1, intrinsic, baseType, simdSize);
-            }
-            break;
-        }
-
-        case NI_Base_Vector128_Zero:
-        {
-            assert(sig->numArgs == 0);
-
-            if (compSupports(InstructionSet_SSE))
-            {
-                retNode = gtNewSimdHWIntrinsicNode(retType, intrinsic, baseType, simdSize);
-            }
-            break;
-        }
-
-        case NI_Base_Vector256_CreateScalarUnsafe:
-        {
-            assert(sig->numArgs == 1);
-
-#ifdef _TARGET_X86_
-            if (varTypeIsLong(baseType))
-            {
-                // TODO-XARCH-CQ: It may be beneficial to emit the movq
-                // instruction, which takes a 64-bit memory address and
-                // works on 32-bit x86 systems.
-                break;
-            }
-#endif // _TARGET_X86_
-
-            if (compSupports(InstructionSet_AVX))
-            {
-                op1     = impPopStack().val;
-                retNode = gtNewSimdHWIntrinsicNode(retType, op1, intrinsic, baseType, simdSize);
-            }
-            break;
-        }
-
-        case NI_Base_Vector256_ToScalar:
-        {
-            assert(sig->numArgs == 0);
-            assert(sig->hasThis());
-
-            if (compSupports(InstructionSet_AVX) && varTypeIsFloating(baseType))
-            {
-                op1     = impSIMDPopStack(getSIMDTypeForSize(simdSize), true, clsHnd);
-                retNode = gtNewSimdHWIntrinsicNode(retType, op1, intrinsic, baseType, 32);
-            }
-            break;
-        }
-
-        case NI_Base_Vector256_Zero:
-        {
-            assert(sig->numArgs == 0);
-
-            if (compSupports(InstructionSet_AVX))
-            {
-                retNode = gtNewSimdHWIntrinsicNode(retType, intrinsic, baseType, simdSize);
-            }
-            break;
-        }
-
-        case NI_Base_Vector256_WithElement:
-        {
-            if (!compSupports(InstructionSet_AVX))
-            {
-                // Using software fallback if JIT/hardware don't support AVX instructions and YMM registers
-                return nullptr;
-            }
-            __fallthrough;
-        }
-        case NI_Base_Vector128_WithElement:
-        {
-            assert(sig->numArgs == 2);
-            GenTree* indexOp = impStackTop(1).val;
-            if (!compSupports(InstructionSet_SSE2) || !varTypeIsArithmetic(baseType) || !indexOp->OperIsConst())
-            {
-                // Using software fallback if
-                // 1. JIT/hardware don't support SSE2 instructions
-                // 2. baseType is not a numeric type (throw execptions)
-                // 3. index is not a constant
-                return nullptr;
-            }
-
-            switch (baseType)
-            {
-                // Using software fallback if baseType is not supported by hardware
-                case TYP_BYTE:
-                case TYP_UBYTE:
-                case TYP_INT:
-                case TYP_UINT:
-                    if (!compSupports(InstructionSet_SSE41))
-                    {
-                        return nullptr;
-                    }
-                    break;
-                case TYP_LONG:
-                case TYP_ULONG:
-                    if (!compSupports(InstructionSet_SSE41_X64))
-                    {
-                        return nullptr;
-                    }
-                    break;
-                case TYP_DOUBLE:
-                case TYP_FLOAT:
-                case TYP_SHORT:
-                case TYP_USHORT:
-                    // short/ushort/float/double is supported by SSE2
-                    break;
-                default:
-                    unreached();
-                    break;
-            }
-
-            ssize_t imm8       = indexOp->AsIntCon()->IconValue();
-            ssize_t cachedImm8 = imm8;
-            ssize_t count      = simdSize / genTypeSize(baseType);
-
-            if (imm8 >= count || imm8 < 0)
-            {
-                // Using software fallback if index is out of range (throw exeception)
-                return nullptr;
-            }
-
-            GenTree* valueOp = impPopStack().val;
-            impPopStack();
-            GenTree* vectorOp = impSIMDPopStack(getSIMDTypeForSize(simdSize), true, clsHnd);
-
-            GenTree* clonedVectorOp = nullptr;
-
-            if (simdSize == 32)
-            {
-                // Extract the half vector that will be modified
-                assert(compSupports(InstructionSet_AVX));
-
-                // copy `vectorOp` to accept the modified half vector
-                vectorOp = impCloneExpr(vectorOp, &clonedVectorOp, NO_CLASS_HANDLE, (unsigned)CHECK_SPILL_ALL,
-                                        nullptr DEBUGARG("Clone Vector for Vector256<T>.WithElement"));
-
-                if (imm8 >= count / 2)
-                {
-                    imm8 -= count / 2;
-                    vectorOp = gtNewSimdHWIntrinsicNode(TYP_SIMD16, vectorOp, gtNewIconNode(1), NI_AVX_ExtractVector128,
-                                                        baseType, simdSize);
-                }
-                else
-                {
-                    vectorOp =
-                        gtNewSimdHWIntrinsicNode(TYP_SIMD16, vectorOp, NI_Base_Vector256_GetLower, baseType, simdSize);
-                }
-            }
-
-            GenTree* immNode = gtNewIconNode(imm8);
-
-            switch (baseType)
-            {
-                case TYP_LONG:
-                case TYP_ULONG:
-                    retNode = gtNewSimdHWIntrinsicNode(TYP_SIMD16, vectorOp, valueOp, immNode, NI_SSE41_X64_Insert,
-                                                       baseType, 16);
-                    break;
-
-                case TYP_FLOAT:
-                {
-                    if (!compSupports(InstructionSet_SSE41))
-                    {
-                        // Emulate Vector128<float>.WithElement by SSE instructions
-                        if (imm8 == 0)
-                        {
-                            // vector.WithElement(0, value)
-                            // =>
-                            // movss   xmm0, xmm1 (xmm0 = vector, xmm1 = value)
-                            valueOp = gtNewSimdHWIntrinsicNode(TYP_SIMD16, valueOp,
-                                                               NI_Base_Vector128_CreateScalarUnsafe, TYP_FLOAT, 16);
-                            retNode = gtNewSimdHWIntrinsicNode(TYP_SIMD16, vectorOp, valueOp, NI_SSE_MoveScalar,
-                                                               TYP_FLOAT, 16);
-                        }
-                        else if (imm8 == 1)
-                        {
-                            // vector.WithElement(1, value)
-                            // =>
-                            // shufps  xmm1, xmm0, 0   (xmm0 = vector, xmm1 = value)
-                            // shufps  xmm1, xmm0, 226
-                            GenTree* tmpOp =
-                                gtNewSimdHWIntrinsicNode(TYP_SIMD16, valueOp, NI_Base_Vector128_CreateScalarUnsafe,
-                                                         TYP_FLOAT, 16);
-                            GenTree* dupVectorOp = nullptr;
-                            vectorOp = impCloneExpr(vectorOp, &dupVectorOp, NO_CLASS_HANDLE, (unsigned)CHECK_SPILL_ALL,
-                                                    nullptr DEBUGARG("Clone Vector for Vector128<float>.WithElement"));
-                            tmpOp = gtNewSimdHWIntrinsicNode(TYP_SIMD16, tmpOp, vectorOp, gtNewIconNode(0),
-                                                             NI_SSE_Shuffle, TYP_FLOAT, 16);
-                            retNode = gtNewSimdHWIntrinsicNode(TYP_SIMD16, tmpOp, dupVectorOp, gtNewIconNode(226),
-                                                               NI_SSE_Shuffle, TYP_FLOAT, 16);
-                        }
-                        else
-                        {
-                            ssize_t controlBits1 = 0;
-                            ssize_t controlBits2 = 0;
-                            if (imm8 == 2)
-                            {
-                                controlBits1 = 48;
-                                controlBits2 = 132;
-                            }
-                            else
-                            {
-                                controlBits1 = 32;
-                                controlBits2 = 36;
-                            }
-                            // vector.WithElement(2, value)
-                            // =>
-                            // shufps  xmm1, xmm0, 48   (xmm0 = vector, xmm1 = value)
-                            // shufps  xmm0, xmm1, 132
-                            //
-                            // vector.WithElement(3, value)
-                            // =>
-                            // shufps  xmm1, xmm0, 32   (xmm0 = vector, xmm1 = value)
-                            // shufps  xmm0, xmm1, 36
-                            GenTree* tmpOp =
-                                gtNewSimdHWIntrinsicNode(TYP_SIMD16, valueOp, NI_Base_Vector128_CreateScalarUnsafe,
-                                                         TYP_FLOAT, 16);
-                            GenTree* dupVectorOp = nullptr;
-                            vectorOp = impCloneExpr(vectorOp, &dupVectorOp, NO_CLASS_HANDLE, (unsigned)CHECK_SPILL_ALL,
-                                                    nullptr DEBUGARG("Clone Vector for Vector128<float>.WithElement"));
-                            valueOp = gtNewSimdHWIntrinsicNode(TYP_SIMD16, vectorOp, tmpOp, gtNewIconNode(controlBits1),
-                                                               NI_SSE_Shuffle, TYP_FLOAT, 16);
-                            retNode =
-                                gtNewSimdHWIntrinsicNode(TYP_SIMD16, valueOp, dupVectorOp, gtNewIconNode(controlBits2),
-                                                         NI_SSE_Shuffle, TYP_FLOAT, 16);
-                        }
-                        break;
-                    }
-                    else
-                    {
-                        valueOp = gtNewSimdHWIntrinsicNode(TYP_SIMD16, valueOp, NI_Base_Vector128_CreateScalarUnsafe,
-                                                           TYP_FLOAT, 16);
-                        immNode->AsIntCon()->SetIconValue(imm8 * 16);
-                        __fallthrough;
-                    }
-                }
-
-                case TYP_BYTE:
-                case TYP_UBYTE:
-                case TYP_INT:
-                case TYP_UINT:
-                    retNode =
-                        gtNewSimdHWIntrinsicNode(TYP_SIMD16, vectorOp, valueOp, immNode, NI_SSE41_Insert, baseType, 16);
-                    break;
-
-                case TYP_SHORT:
-                case TYP_USHORT:
-                    retNode =
-                        gtNewSimdHWIntrinsicNode(TYP_SIMD16, vectorOp, valueOp, immNode, NI_SSE2_Insert, baseType, 16);
-                    break;
-
-                case TYP_DOUBLE:
-                {
-                    // vector.WithElement(0, value)
-                    // =>
-                    // movsd   xmm0, xmm1  (xmm0 = vector, xmm1 = value)
-                    //
-                    // vector.WithElement(1, value)
-                    // =>
-                    // unpcklpd  xmm0, xmm1  (xmm0 = vector, xmm1 = value)
-                    valueOp = gtNewSimdHWIntrinsicNode(TYP_SIMD16, valueOp, NI_Base_Vector128_CreateScalarUnsafe,
-                                                       TYP_DOUBLE, 16);
-                    NamedIntrinsic in = (imm8 == 0) ? NI_SSE2_MoveScalar : NI_SSE2_UnpackLow;
-                    retNode           = gtNewSimdHWIntrinsicNode(TYP_SIMD16, vectorOp, valueOp, in, TYP_DOUBLE, 16);
-                    break;
-                }
-
-                default:
-                    unreached();
-                    break;
-            }
-
-            if (simdSize == 32)
-            {
-                assert(clonedVectorOp);
-                int upperOrLower = (cachedImm8 >= count / 2) ? 1 : 0;
-                retNode = gtNewSimdHWIntrinsicNode(retType, clonedVectorOp, retNode, gtNewIconNode(upperOrLower),
-                                                   NI_AVX_InsertVector128, baseType, simdSize);
-            }
-
-            break;
-        }
-
-        case NI_Base_Vector256_GetElement:
-        {
-            if (!compSupports(InstructionSet_AVX))
-            {
-                // Using software fallback if JIT/hardware don't support AVX instructions and YMM registers
-                return nullptr;
-            }
-            __fallthrough;
-        }
-        case NI_Base_Vector128_GetElement:
-        {
-            assert(sig->numArgs == 1);
-            GenTree* indexOp = impStackTop().val;
-            if (!compSupports(InstructionSet_SSE2) || !varTypeIsArithmetic(baseType) || !indexOp->OperIsConst())
-            {
-                // Using software fallback if
-                // 1. JIT/hardware don't support SSE2 instructions
-                // 2. baseType is not a numeric type (throw execptions)
-                // 3. index is not a constant
-                return nullptr;
-            }
-
-            switch (baseType)
-            {
-                // Using software fallback if baseType is not supported by hardware
-                case TYP_BYTE:
-                case TYP_UBYTE:
-                case TYP_INT:
-                case TYP_UINT:
-                    if (!compSupports(InstructionSet_SSE41))
-                    {
-                        return nullptr;
-                    }
-                    break;
-                case TYP_LONG:
-                case TYP_ULONG:
-                    if (!compSupports(InstructionSet_SSE41_X64))
-                    {
-                        return nullptr;
-                    }
-                    break;
-                case TYP_DOUBLE:
-                case TYP_FLOAT:
-                case TYP_SHORT:
-                case TYP_USHORT:
-                    // short/ushort/float/double is supported by SSE2
-                    break;
-                default:
-                    break;
-            }
-
-            ssize_t imm8  = indexOp->AsIntCon()->IconValue();
-            ssize_t count = simdSize / genTypeSize(baseType);
-
-            if (imm8 >= count || imm8 < 0)
-            {
-                // Using software fallback if index is out of range (throw exeception)
-                return nullptr;
-            }
-
-            impPopStack();
-            GenTree*       vectorOp     = impSIMDPopStack(getSIMDTypeForSize(simdSize), true, clsHnd);
-            NamedIntrinsic resIntrinsic = NI_Illegal;
-
-            if (simdSize == 32)
-            {
-                assert(compSupports(InstructionSet_AVX));
-                if (imm8 >= count / 2)
-                {
-                    imm8 -= count / 2;
-                    vectorOp = gtNewSimdHWIntrinsicNode(TYP_SIMD16, vectorOp, gtNewIconNode(1), NI_AVX_ExtractVector128,
-                                                        baseType, simdSize);
-                }
-                else
-                {
-                    vectorOp =
-                        gtNewSimdHWIntrinsicNode(TYP_SIMD16, vectorOp, NI_Base_Vector256_GetLower, baseType, simdSize);
-                }
-            }
-
-            if (imm8 == 0 && (genTypeSize(baseType) >= 4))
-            {
-                switch (baseType)
-                {
-                    case TYP_LONG:
-                        resIntrinsic = NI_SSE2_X64_ConvertToInt64;
-                        break;
-                    case TYP_ULONG:
-                        resIntrinsic = NI_SSE2_X64_ConvertToUInt64;
-                        break;
-                    case TYP_INT:
-                        resIntrinsic = NI_SSE2_ConvertToInt32;
-                        break;
-                    case TYP_UINT:
-                        resIntrinsic = NI_SSE2_ConvertToUInt32;
-                        break;
-                    case TYP_FLOAT:
-                    case TYP_DOUBLE:
-                        resIntrinsic = NI_Base_Vector128_ToScalar;
-                        break;
-                    default:
-                        unreached();
-                }
-                return gtNewSimdHWIntrinsicNode(retType, vectorOp, resIntrinsic, baseType, 16);
-            }
-
-            GenTree* immNode = gtNewIconNode(imm8);
-
-            switch (baseType)
-            {
-                case TYP_LONG:
-                case TYP_ULONG:
-                    retNode = gtNewSimdHWIntrinsicNode(retType, vectorOp, immNode, NI_SSE41_X64_Extract, baseType, 16);
-                    break;
-
-                case TYP_FLOAT:
-                {
-                    if (!compSupports(InstructionSet_SSE41))
-                    {
-                        assert(imm8 >= 1);
-                        assert(imm8 <= 3);
-                        // Emulate Vector128<float>.GetElement(i) by SSE instructions
-                        // vector.GetElement(i)
-                        // =>
-                        // shufps  xmm0, xmm0, control
-                        // (xmm0 = vector, control = i + 228)
-                        immNode->AsIntCon()->SetIconValue(228 + imm8);
-                        GenTree* clonedVectorOp = nullptr;
-                        vectorOp = impCloneExpr(vectorOp, &clonedVectorOp, NO_CLASS_HANDLE, (unsigned)CHECK_SPILL_ALL,
-                                                nullptr DEBUGARG("Clone Vector for Vector128<float>.GetElement"));
-                        vectorOp = gtNewSimdHWIntrinsicNode(TYP_SIMD16, vectorOp, clonedVectorOp, immNode,
-                                                            NI_SSE_Shuffle, TYP_FLOAT, 16);
-                        return gtNewSimdHWIntrinsicNode(retType, vectorOp, NI_Base_Vector128_ToScalar, TYP_FLOAT, 16);
-                    }
-                    __fallthrough;
-                }
-                case TYP_UBYTE:
-                case TYP_INT:
-                case TYP_UINT:
-                    retNode = gtNewSimdHWIntrinsicNode(retType, vectorOp, immNode, NI_SSE41_Extract, baseType, 16);
-                    break;
-
-                case TYP_BYTE:
-                    // We do not have SSE41/SSE2 Extract APIs on signed small int, so need a CAST on the result
-                    retNode = gtNewSimdHWIntrinsicNode(TYP_UBYTE, vectorOp, immNode, NI_SSE41_Extract, TYP_UBYTE, 16);
-                    retNode = gtNewCastNode(TYP_INT, retNode, true, TYP_BYTE);
-                    break;
-
-                case TYP_SHORT:
-                case TYP_USHORT:
-                    // We do not have SSE41/SSE2 Extract APIs on signed small int, so need a CAST on the result
-                    retNode = gtNewSimdHWIntrinsicNode(TYP_USHORT, vectorOp, immNode, NI_SSE2_Extract, TYP_USHORT, 16);
-                    if (baseType == TYP_SHORT)
-                    {
-                        retNode = gtNewCastNode(TYP_INT, retNode, true, TYP_SHORT);
-                    }
-                    break;
-
-                case TYP_DOUBLE:
-                    assert(imm8 == 1);
-                    // vector.GetElement(1)
-                    // =>
-                    // pshufd xmm1, xmm0, 0xEE (xmm0 = vector)
-                    vectorOp = gtNewSimdHWIntrinsicNode(TYP_SIMD16, vectorOp, gtNewIconNode(0xEE), NI_SSE2_Shuffle,
-                                                        TYP_INT, 16);
-                    retNode =
-                        gtNewSimdHWIntrinsicNode(TYP_DOUBLE, vectorOp, NI_Base_Vector128_ToScalar, TYP_DOUBLE, 16);
-                    break;
-
-                default:
-                    unreached();
-            }
-
-            break;
-        }
-
-#endif // _TARGET_XARCH_
-
-        default:
-        {
-            unreached();
-            break;
-        }
-    }
-
-    return retNode;
-}
-#endif // FEATURE_HW_INTRINSICS
-
 GenTree* Compiler::impMathIntrinsic(CORINFO_METHOD_HANDLE method,
                                     CORINFO_SIG_INFO*     sig,
                                     var_types             callType,
@@ -4979,7 +4284,7 @@ NamedIntrinsic Compiler::lookupNamedIntrinsic(CORINFO_METHOD_HANDLE method)
                 {
                     className += 2;
 
-                    if (strcmp(className, "`1") == 0)
+                    if (className[0] == '\0')
                     {
                         if (strncmp(methodName, "As", 2) == 0)
                         {
@@ -5026,18 +4331,8 @@ NamedIntrinsic Compiler::lookupNamedIntrinsic(CORINFO_METHOD_HANDLE method)
                 {
                     className += 3;
 
-#if defined(_TARGET_XARCH_)
                     if (className[0] == '\0')
                     {
-                        if (strcmp(methodName, "CreateScalarUnsafe") == 0)
-                        {
-                            result = NI_Base_Vector128_CreateScalarUnsafe;
-                        }
-                    }
-                    else
-#endif // _TARGET_XARCH_
-                        if (strcmp(className, "`1") == 0)
-                    {
                         if (strncmp(methodName, "As", 2) == 0)
                         {
                             methodName += 2;
@@ -5088,17 +4383,13 @@ NamedIntrinsic Compiler::lookupNamedIntrinsic(CORINFO_METHOD_HANDLE method)
                             }
                         }
 #if defined(_TARGET_XARCH_)
-                        else if (strcmp(methodName, "GetElement") == 0)
-                        {
-                            result = NI_Base_Vector128_GetElement;
-                        }
-                        else if (strcmp(methodName, "WithElement") == 0)
+                        else if (strcmp(methodName, "CreateScalarUnsafe") == 0)
                         {
-                            result = NI_Base_Vector128_WithElement;
+                            result = NI_Base_Vector128_CreateScalarUnsafe;
                         }
-                        else if (strcmp(methodName, "get_Zero") == 0)
+                        else if (strcmp(methodName, "GetElement") == 0)
                         {
-                            result = NI_Base_Vector128_Zero;
+                            result = NI_Base_Vector128_GetElement;
                         }
                         else if (strncmp(methodName, "To", 2) == 0)
                         {
@@ -5122,8 +4413,21 @@ NamedIntrinsic Compiler::lookupNamedIntrinsic(CORINFO_METHOD_HANDLE method)
                                 }
                             }
                         }
+                        else if (strcmp(methodName, "WithElement") == 0)
+                        {
+                            result = NI_Base_Vector128_WithElement;
+                        }
 #endif // _TARGET_XARCH_
                     }
+#if defined(_TARGET_XARCH_)
+                    else if (strcmp(className, "`1") == 0)
+                    {
+                        if (strcmp(methodName, "get_Zero") == 0)
+                        {
+                            result = NI_Base_Vector128_Zero;
+                        }
+                    }
+#endif // _TARGET_XARCH_
                 }
 #if defined(_TARGET_XARCH_)
                 else if (strncmp(className, "256", 3) == 0)
@@ -5132,13 +4436,6 @@ NamedIntrinsic Compiler::lookupNamedIntrinsic(CORINFO_METHOD_HANDLE method)
 
                     if (className[0] == '\0')
                     {
-                        if (strcmp(methodName, "CreateScalarUnsafe") == 0)
-                        {
-                            result = NI_Base_Vector256_CreateScalarUnsafe;
-                        }
-                    }
-                    else if (strcmp(className, "`1") == 0)
-                    {
                         if (strncmp(methodName, "As", 2) == 0)
                         {
                             methodName += 2;
@@ -5188,25 +4485,32 @@ NamedIntrinsic Compiler::lookupNamedIntrinsic(CORINFO_METHOD_HANDLE method)
                                 result = NI_Base_Vector256_AsUInt64;
                             }
                         }
-                        else if (strcmp(methodName, "get_Zero") == 0)
+                        else if (strcmp(methodName, "CreateScalarUnsafe") == 0)
                         {
-                            result = NI_Base_Vector256_Zero;
+                            result = NI_Base_Vector256_CreateScalarUnsafe;
+                        }
+                        else if (strcmp(methodName, "GetElement") == 0)
+                        {
+                            result = NI_Base_Vector256_GetElement;
                         }
                         else if (strcmp(methodName, "GetLower") == 0)
                         {
                             result = NI_Base_Vector256_GetLower;
                         }
-                        else if (strcmp(methodName, "GetElement") == 0)
+                        else if (strcmp(methodName, "ToScalar") == 0)
                         {
-                            result = NI_Base_Vector256_GetElement;
+                            result = NI_Base_Vector256_ToScalar;
                         }
                         else if (strcmp(methodName, "WithElement") == 0)
                         {
                             result = NI_Base_Vector256_WithElement;
                         }
-                        else if (strcmp(methodName, "ToScalar") == 0)
+                    }
+                    else if (strcmp(className, "`1") == 0)
+                    {
+                        if (strcmp(methodName, "get_Zero") == 0)
                         {
-                            result = NI_Base_Vector256_ToScalar;
+                            result = NI_Base_Vector256_Zero;
                         }
                     }
                 }
index 1d190fd..0006581 100644 (file)
@@ -144,63 +144,73 @@ namespace JIT.HardwareIntrinsics.General
             {VectorType}<{BaseType}> value;
 
             value = {VectorType}.Create({NextValueOp});
-            object byteResult = typeof({VectorType}<{BaseType}>)
-                                    .GetMethod(nameof({VectorType}.{Method}Byte), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object byteResult = typeof({VectorType})
+                                    .GetMethod(nameof({VectorType}.{Method}Byte))
+                                    .MakeGenericMethod(typeof({BaseType}))
+                                    .Invoke(null, new object[] { value });
             ValidateResult(({VectorType}<byte>)(byteResult), value);
 
             value = {VectorType}.Create({NextValueOp});
-            object doubleResult = typeof({VectorType}<{BaseType}>)
-                                    .GetMethod(nameof({VectorType}.{Method}Double), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object doubleResult = typeof({VectorType})
+                                    .GetMethod(nameof({VectorType}.{Method}Double))
+                                    .MakeGenericMethod(typeof({BaseType}))
+                                    .Invoke(null, new object[] { value });
             ValidateResult(({VectorType}<double>)(doubleResult), value);
 
             value = {VectorType}.Create({NextValueOp});
-            object shortResult = typeof({VectorType}<{BaseType}>)
-                                    .GetMethod(nameof({VectorType}.{Method}Int16), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object shortResult = typeof({VectorType})
+                                    .GetMethod(nameof({VectorType}.{Method}Int16))
+                                    .MakeGenericMethod(typeof({BaseType}))
+                                    .Invoke(null, new object[] { value });
             ValidateResult(({VectorType}<short>)(shortResult), value);
 
             value = {VectorType}.Create({NextValueOp});
-            object intResult = typeof({VectorType}<{BaseType}>)
-                                    .GetMethod(nameof({VectorType}.{Method}Int32), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object intResult = typeof({VectorType})
+                                    .GetMethod(nameof({VectorType}.{Method}Int32))
+                                    .MakeGenericMethod(typeof({BaseType}))
+                                    .Invoke(null, new object[] { value });
             ValidateResult(({VectorType}<int>)(intResult), value);
 
             value = {VectorType}.Create({NextValueOp});
-            object longResult = typeof({VectorType}<{BaseType}>)
-                                    .GetMethod(nameof({VectorType}.{Method}Int64), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object longResult = typeof({VectorType})
+                                    .GetMethod(nameof({VectorType}.{Method}Int64))
+                                    .MakeGenericMethod(typeof({BaseType}))
+                                    .Invoke(null, new object[] { value });
             ValidateResult(({VectorType}<long>)(longResult), value);
 
             value = {VectorType}.Create({NextValueOp});
-            object sbyteResult = typeof({VectorType}<{BaseType}>)
-                                    .GetMethod(nameof({VectorType}.{Method}SByte), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object sbyteResult = typeof({VectorType})
+                                    .GetMethod(nameof({VectorType}.{Method}SByte))
+                                    .MakeGenericMethod(typeof({BaseType}))
+                                    .Invoke(null, new object[] { value });
             ValidateResult(({VectorType}<sbyte>)(sbyteResult), value);
 
             value = {VectorType}.Create({NextValueOp});
-            object floatResult = typeof({VectorType}<{BaseType}>)
-                                    .GetMethod(nameof({VectorType}.{Method}Single), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object floatResult = typeof({VectorType})
+                                    .GetMethod(nameof({VectorType}.{Method}Single))
+                                    .MakeGenericMethod(typeof({BaseType}))
+                                    .Invoke(null, new object[] { value });
             ValidateResult(({VectorType}<float>)(floatResult), value);
 
             value = {VectorType}.Create({NextValueOp});
-            object ushortResult = typeof({VectorType}<{BaseType}>)
-                                    .GetMethod(nameof({VectorType}.{Method}UInt16), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object ushortResult = typeof({VectorType})
+                                    .GetMethod(nameof({VectorType}.{Method}UInt16))
+                                    .MakeGenericMethod(typeof({BaseType}))
+                                    .Invoke(null, new object[] { value });
             ValidateResult(({VectorType}<ushort>)(ushortResult), value);
 
             value = {VectorType}.Create({NextValueOp});
-            object uintResult = typeof({VectorType}<{BaseType}>)
-                                    .GetMethod(nameof({VectorType}.{Method}UInt32), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object uintResult = typeof({VectorType})
+                                    .GetMethod(nameof({VectorType}.{Method}UInt32))
+                                    .MakeGenericMethod(typeof({BaseType}))
+                                    .Invoke(null, new object[] { value });
             ValidateResult(({VectorType}<uint>)(uintResult), value);
 
             value = {VectorType}.Create({NextValueOp});
-            object ulongResult = typeof({VectorType}<{BaseType}>)
-                                    .GetMethod(nameof({VectorType}.{Method}UInt64), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object ulongResult = typeof({VectorType})
+                                    .GetMethod(nameof({VectorType}.{Method}UInt64))
+                                    .MakeGenericMethod(typeof({BaseType}))
+                                    .Invoke(null, new object[] { value });
             ValidateResult(({VectorType}<ulong>)(ulongResult), value);
         }
 
index 6e5b7c2..fb1a113 100644 (file)
@@ -76,14 +76,16 @@ namespace JIT.HardwareIntrinsics.General
 
             {VectorType}<{BaseType}> value = {VectorType}.Create({ConsumeValues});
 
-            object result = typeof({VectorType}<{BaseType}>)
-                                .GetMethod(nameof({VectorType}.{Method}), new Type[] { })
-                                .Invoke(value, new object[] { });
+            object result = typeof({VectorType})
+                                .GetMethod(nameof({VectorType}.{Method}))
+                                .MakeGenericMethod(typeof({BaseType}))
+                                .Invoke(null, new object[] { value });
             ValidateResult(({TgtVectorType}<{BaseType}>)(result), values, isUnsafe: false);
 
-            object unsafeResult = typeof({VectorType}<{BaseType}>)
-                                    .GetMethod(nameof({VectorType}.{Method}), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object unsafeResult = typeof({VectorType})
+                                    .GetMethod(nameof({VectorType}.{Method}))
+                                    .MakeGenericMethod(typeof({BaseType}))
+                                    .Invoke(null, new object[] { value });
             ValidateResult(({TgtVectorType}<{BaseType}>)(unsafeResult), values, isUnsafe: true);
         }
 
index d6b9811..d19e56f 100644 (file)
@@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result = typeof({VectorType}<{BaseType}>)
-                                    .GetMethod(nameof({VectorType}.GetElement), new Type[] { typeof(int) })
-                                    .Invoke(value, new object[] { imm });
+                object result = typeof({VectorType})
+                                    .GetMethod(nameof({VectorType}.GetElement))
+                                    .MakeGenericMethod(typeof({BaseType}))
+                                    .Invoke(null, new object[] { value, imm });
                 ValidateGetResult(({BaseType})(result), values);
             }
             catch (TargetInvocationException e)
@@ -145,9 +146,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result2 = typeof({VectorType}<{BaseType}>)
-                                    .GetMethod(nameof({VectorType}.WithElement), new Type[] { typeof(int), typeof({BaseType}) })
-                                    .Invoke(value, new object[] { imm, insertedValue });
+                object result2 = typeof({VectorType})
+                                    .GetMethod(nameof({VectorType}.WithElement))
+                                    .MakeGenericMethod(typeof({BaseType}))
+                                    .Invoke(null, new object[] { value, imm, insertedValue });
                 ValidateWithResult(({VectorType}<{BaseType}>)(result2), values, insertedValue);
             }
             catch (TargetInvocationException e)
index ae0bde2..0cec735 100644 (file)
@@ -78,20 +78,24 @@ namespace JIT.HardwareIntrinsics.General
 
             {VectorType}<{BaseType}> value = {VectorType}.Create({ConsumeValues});
 
-            object lowerResult = typeof({VectorType}<{BaseType}>)
-                                    .GetMethod(nameof({VectorType}.GetLower), new Type[] { })
-                                    .Invoke(value, new object[] { });
-            object upperResult = typeof({VectorType}<{BaseType}>)
-                                    .GetMethod(nameof({VectorType}.GetUpper), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object lowerResult = typeof({VectorType})
+                                    .GetMethod(nameof({VectorType}.GetLower))
+                                    .MakeGenericMethod(typeof({BaseType}))
+                                    .Invoke(null, new object[] { value });
+            object upperResult = typeof({VectorType})
+                                    .GetMethod(nameof({VectorType}.GetUpper))
+                                    .MakeGenericMethod(typeof({BaseType}))
+                                    .Invoke(null, new object[] { value });
             ValidateGetResult(({TgtVectorType}<{BaseType}>)(lowerResult), ({TgtVectorType}<{BaseType}>)(upperResult), values);
 
-            object result = typeof({VectorType}<{BaseType}>)
-                                .GetMethod(nameof({VectorType}.WithLower), new Type[] { typeof({TgtVectorType}<{BaseType}>) })
-                                .Invoke(value, new object[] { upperResult });
-            result = typeof({VectorType}<{BaseType}>)
-                        .GetMethod(nameof({VectorType}.WithUpper), new Type[] { typeof({TgtVectorType}<{BaseType}>) })
-                        .Invoke(result, new object[] { lowerResult });
+            object result = typeof({VectorType})
+                                .GetMethod(nameof({VectorType}.WithLower))
+                                .MakeGenericMethod(typeof({BaseType}))
+                                .Invoke(null, new object[] { value, upperResult });
+            result = typeof({VectorType})
+                        .GetMethod(nameof({VectorType}.WithUpper))
+                        .MakeGenericMethod(typeof({BaseType}))
+                        .Invoke(null, new object[] { result, lowerResult });
             ValidateWithResult(({VectorType}<{BaseType}>)(result), values);
         }
 
index 04432b3..3b87de0 100644 (file)
@@ -73,9 +73,10 @@ namespace JIT.HardwareIntrinsics.General
 
             {VectorType}<{BaseType}> value = {VectorType}.Create({ConsumeValues});
 
-            object result = typeof({VectorType}<{BaseType}>)
-                                .GetMethod(nameof({VectorType}.{Method}), new Type[] { })
-                                .Invoke(value, new object[] { });
+            object result = typeof({VectorType})
+                                .GetMethod(nameof({VectorType}.{Method}))
+                                .MakeGenericMethod(typeof({BaseType}))
+                                .Invoke(null, new object[] { value });
 
             ValidateResult(({BaseType})(result), values);
         }
index 8e1d687..e08c250 100644 (file)
@@ -144,63 +144,73 @@ namespace JIT.HardwareIntrinsics.General
             Vector128<Byte> value;
 
             value = Vector128.Create(TestLibrary.Generator.GetByte());
-            object byteResult = typeof(Vector128<Byte>)
-                                    .GetMethod(nameof(Vector128.AsByte), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object byteResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.AsByte))
+                                    .MakeGenericMethod(typeof(Byte))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector128<byte>)(byteResult), value);
 
             value = Vector128.Create(TestLibrary.Generator.GetByte());
-            object doubleResult = typeof(Vector128<Byte>)
-                                    .GetMethod(nameof(Vector128.AsDouble), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object doubleResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.AsDouble))
+                                    .MakeGenericMethod(typeof(Byte))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector128<double>)(doubleResult), value);
 
             value = Vector128.Create(TestLibrary.Generator.GetByte());
-            object shortResult = typeof(Vector128<Byte>)
-                                    .GetMethod(nameof(Vector128.AsInt16), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object shortResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.AsInt16))
+                                    .MakeGenericMethod(typeof(Byte))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector128<short>)(shortResult), value);
 
             value = Vector128.Create(TestLibrary.Generator.GetByte());
-            object intResult = typeof(Vector128<Byte>)
-                                    .GetMethod(nameof(Vector128.AsInt32), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object intResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.AsInt32))
+                                    .MakeGenericMethod(typeof(Byte))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector128<int>)(intResult), value);
 
             value = Vector128.Create(TestLibrary.Generator.GetByte());
-            object longResult = typeof(Vector128<Byte>)
-                                    .GetMethod(nameof(Vector128.AsInt64), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object longResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.AsInt64))
+                                    .MakeGenericMethod(typeof(Byte))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector128<long>)(longResult), value);
 
             value = Vector128.Create(TestLibrary.Generator.GetByte());
-            object sbyteResult = typeof(Vector128<Byte>)
-                                    .GetMethod(nameof(Vector128.AsSByte), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object sbyteResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.AsSByte))
+                                    .MakeGenericMethod(typeof(Byte))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector128<sbyte>)(sbyteResult), value);
 
             value = Vector128.Create(TestLibrary.Generator.GetByte());
-            object floatResult = typeof(Vector128<Byte>)
-                                    .GetMethod(nameof(Vector128.AsSingle), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object floatResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.AsSingle))
+                                    .MakeGenericMethod(typeof(Byte))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector128<float>)(floatResult), value);
 
             value = Vector128.Create(TestLibrary.Generator.GetByte());
-            object ushortResult = typeof(Vector128<Byte>)
-                                    .GetMethod(nameof(Vector128.AsUInt16), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object ushortResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.AsUInt16))
+                                    .MakeGenericMethod(typeof(Byte))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector128<ushort>)(ushortResult), value);
 
             value = Vector128.Create(TestLibrary.Generator.GetByte());
-            object uintResult = typeof(Vector128<Byte>)
-                                    .GetMethod(nameof(Vector128.AsUInt32), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object uintResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.AsUInt32))
+                                    .MakeGenericMethod(typeof(Byte))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector128<uint>)(uintResult), value);
 
             value = Vector128.Create(TestLibrary.Generator.GetByte());
-            object ulongResult = typeof(Vector128<Byte>)
-                                    .GetMethod(nameof(Vector128.AsUInt64), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object ulongResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.AsUInt64))
+                                    .MakeGenericMethod(typeof(Byte))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector128<ulong>)(ulongResult), value);
         }
 
index 475cfac..9124824 100644 (file)
@@ -144,63 +144,73 @@ namespace JIT.HardwareIntrinsics.General
             Vector128<Double> value;
 
             value = Vector128.Create(TestLibrary.Generator.GetDouble());
-            object byteResult = typeof(Vector128<Double>)
-                                    .GetMethod(nameof(Vector128.AsByte), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object byteResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.AsByte))
+                                    .MakeGenericMethod(typeof(Double))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector128<byte>)(byteResult), value);
 
             value = Vector128.Create(TestLibrary.Generator.GetDouble());
-            object doubleResult = typeof(Vector128<Double>)
-                                    .GetMethod(nameof(Vector128.AsDouble), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object doubleResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.AsDouble))
+                                    .MakeGenericMethod(typeof(Double))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector128<double>)(doubleResult), value);
 
             value = Vector128.Create(TestLibrary.Generator.GetDouble());
-            object shortResult = typeof(Vector128<Double>)
-                                    .GetMethod(nameof(Vector128.AsInt16), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object shortResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.AsInt16))
+                                    .MakeGenericMethod(typeof(Double))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector128<short>)(shortResult), value);
 
             value = Vector128.Create(TestLibrary.Generator.GetDouble());
-            object intResult = typeof(Vector128<Double>)
-                                    .GetMethod(nameof(Vector128.AsInt32), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object intResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.AsInt32))
+                                    .MakeGenericMethod(typeof(Double))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector128<int>)(intResult), value);
 
             value = Vector128.Create(TestLibrary.Generator.GetDouble());
-            object longResult = typeof(Vector128<Double>)
-                                    .GetMethod(nameof(Vector128.AsInt64), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object longResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.AsInt64))
+                                    .MakeGenericMethod(typeof(Double))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector128<long>)(longResult), value);
 
             value = Vector128.Create(TestLibrary.Generator.GetDouble());
-            object sbyteResult = typeof(Vector128<Double>)
-                                    .GetMethod(nameof(Vector128.AsSByte), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object sbyteResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.AsSByte))
+                                    .MakeGenericMethod(typeof(Double))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector128<sbyte>)(sbyteResult), value);
 
             value = Vector128.Create(TestLibrary.Generator.GetDouble());
-            object floatResult = typeof(Vector128<Double>)
-                                    .GetMethod(nameof(Vector128.AsSingle), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object floatResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.AsSingle))
+                                    .MakeGenericMethod(typeof(Double))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector128<float>)(floatResult), value);
 
             value = Vector128.Create(TestLibrary.Generator.GetDouble());
-            object ushortResult = typeof(Vector128<Double>)
-                                    .GetMethod(nameof(Vector128.AsUInt16), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object ushortResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.AsUInt16))
+                                    .MakeGenericMethod(typeof(Double))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector128<ushort>)(ushortResult), value);
 
             value = Vector128.Create(TestLibrary.Generator.GetDouble());
-            object uintResult = typeof(Vector128<Double>)
-                                    .GetMethod(nameof(Vector128.AsUInt32), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object uintResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.AsUInt32))
+                                    .MakeGenericMethod(typeof(Double))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector128<uint>)(uintResult), value);
 
             value = Vector128.Create(TestLibrary.Generator.GetDouble());
-            object ulongResult = typeof(Vector128<Double>)
-                                    .GetMethod(nameof(Vector128.AsUInt64), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object ulongResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.AsUInt64))
+                                    .MakeGenericMethod(typeof(Double))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector128<ulong>)(ulongResult), value);
         }
 
index 75aeeb1..98ba477 100644 (file)
@@ -144,63 +144,73 @@ namespace JIT.HardwareIntrinsics.General
             Vector128<Int16> value;
 
             value = Vector128.Create(TestLibrary.Generator.GetInt16());
-            object byteResult = typeof(Vector128<Int16>)
-                                    .GetMethod(nameof(Vector128.AsByte), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object byteResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.AsByte))
+                                    .MakeGenericMethod(typeof(Int16))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector128<byte>)(byteResult), value);
 
             value = Vector128.Create(TestLibrary.Generator.GetInt16());
-            object doubleResult = typeof(Vector128<Int16>)
-                                    .GetMethod(nameof(Vector128.AsDouble), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object doubleResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.AsDouble))
+                                    .MakeGenericMethod(typeof(Int16))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector128<double>)(doubleResult), value);
 
             value = Vector128.Create(TestLibrary.Generator.GetInt16());
-            object shortResult = typeof(Vector128<Int16>)
-                                    .GetMethod(nameof(Vector128.AsInt16), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object shortResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.AsInt16))
+                                    .MakeGenericMethod(typeof(Int16))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector128<short>)(shortResult), value);
 
             value = Vector128.Create(TestLibrary.Generator.GetInt16());
-            object intResult = typeof(Vector128<Int16>)
-                                    .GetMethod(nameof(Vector128.AsInt32), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object intResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.AsInt32))
+                                    .MakeGenericMethod(typeof(Int16))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector128<int>)(intResult), value);
 
             value = Vector128.Create(TestLibrary.Generator.GetInt16());
-            object longResult = typeof(Vector128<Int16>)
-                                    .GetMethod(nameof(Vector128.AsInt64), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object longResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.AsInt64))
+                                    .MakeGenericMethod(typeof(Int16))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector128<long>)(longResult), value);
 
             value = Vector128.Create(TestLibrary.Generator.GetInt16());
-            object sbyteResult = typeof(Vector128<Int16>)
-                                    .GetMethod(nameof(Vector128.AsSByte), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object sbyteResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.AsSByte))
+                                    .MakeGenericMethod(typeof(Int16))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector128<sbyte>)(sbyteResult), value);
 
             value = Vector128.Create(TestLibrary.Generator.GetInt16());
-            object floatResult = typeof(Vector128<Int16>)
-                                    .GetMethod(nameof(Vector128.AsSingle), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object floatResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.AsSingle))
+                                    .MakeGenericMethod(typeof(Int16))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector128<float>)(floatResult), value);
 
             value = Vector128.Create(TestLibrary.Generator.GetInt16());
-            object ushortResult = typeof(Vector128<Int16>)
-                                    .GetMethod(nameof(Vector128.AsUInt16), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object ushortResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.AsUInt16))
+                                    .MakeGenericMethod(typeof(Int16))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector128<ushort>)(ushortResult), value);
 
             value = Vector128.Create(TestLibrary.Generator.GetInt16());
-            object uintResult = typeof(Vector128<Int16>)
-                                    .GetMethod(nameof(Vector128.AsUInt32), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object uintResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.AsUInt32))
+                                    .MakeGenericMethod(typeof(Int16))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector128<uint>)(uintResult), value);
 
             value = Vector128.Create(TestLibrary.Generator.GetInt16());
-            object ulongResult = typeof(Vector128<Int16>)
-                                    .GetMethod(nameof(Vector128.AsUInt64), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object ulongResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.AsUInt64))
+                                    .MakeGenericMethod(typeof(Int16))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector128<ulong>)(ulongResult), value);
         }
 
index c6faa0b..bf35ffd 100644 (file)
@@ -144,63 +144,73 @@ namespace JIT.HardwareIntrinsics.General
             Vector128<Int32> value;
 
             value = Vector128.Create(TestLibrary.Generator.GetInt32());
-            object byteResult = typeof(Vector128<Int32>)
-                                    .GetMethod(nameof(Vector128.AsByte), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object byteResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.AsByte))
+                                    .MakeGenericMethod(typeof(Int32))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector128<byte>)(byteResult), value);
 
             value = Vector128.Create(TestLibrary.Generator.GetInt32());
-            object doubleResult = typeof(Vector128<Int32>)
-                                    .GetMethod(nameof(Vector128.AsDouble), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object doubleResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.AsDouble))
+                                    .MakeGenericMethod(typeof(Int32))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector128<double>)(doubleResult), value);
 
             value = Vector128.Create(TestLibrary.Generator.GetInt32());
-            object shortResult = typeof(Vector128<Int32>)
-                                    .GetMethod(nameof(Vector128.AsInt16), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object shortResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.AsInt16))
+                                    .MakeGenericMethod(typeof(Int32))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector128<short>)(shortResult), value);
 
             value = Vector128.Create(TestLibrary.Generator.GetInt32());
-            object intResult = typeof(Vector128<Int32>)
-                                    .GetMethod(nameof(Vector128.AsInt32), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object intResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.AsInt32))
+                                    .MakeGenericMethod(typeof(Int32))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector128<int>)(intResult), value);
 
             value = Vector128.Create(TestLibrary.Generator.GetInt32());
-            object longResult = typeof(Vector128<Int32>)
-                                    .GetMethod(nameof(Vector128.AsInt64), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object longResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.AsInt64))
+                                    .MakeGenericMethod(typeof(Int32))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector128<long>)(longResult), value);
 
             value = Vector128.Create(TestLibrary.Generator.GetInt32());
-            object sbyteResult = typeof(Vector128<Int32>)
-                                    .GetMethod(nameof(Vector128.AsSByte), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object sbyteResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.AsSByte))
+                                    .MakeGenericMethod(typeof(Int32))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector128<sbyte>)(sbyteResult), value);
 
             value = Vector128.Create(TestLibrary.Generator.GetInt32());
-            object floatResult = typeof(Vector128<Int32>)
-                                    .GetMethod(nameof(Vector128.AsSingle), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object floatResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.AsSingle))
+                                    .MakeGenericMethod(typeof(Int32))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector128<float>)(floatResult), value);
 
             value = Vector128.Create(TestLibrary.Generator.GetInt32());
-            object ushortResult = typeof(Vector128<Int32>)
-                                    .GetMethod(nameof(Vector128.AsUInt16), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object ushortResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.AsUInt16))
+                                    .MakeGenericMethod(typeof(Int32))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector128<ushort>)(ushortResult), value);
 
             value = Vector128.Create(TestLibrary.Generator.GetInt32());
-            object uintResult = typeof(Vector128<Int32>)
-                                    .GetMethod(nameof(Vector128.AsUInt32), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object uintResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.AsUInt32))
+                                    .MakeGenericMethod(typeof(Int32))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector128<uint>)(uintResult), value);
 
             value = Vector128.Create(TestLibrary.Generator.GetInt32());
-            object ulongResult = typeof(Vector128<Int32>)
-                                    .GetMethod(nameof(Vector128.AsUInt64), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object ulongResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.AsUInt64))
+                                    .MakeGenericMethod(typeof(Int32))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector128<ulong>)(ulongResult), value);
         }
 
index 4fccff8..1ec98ac 100644 (file)
@@ -144,63 +144,73 @@ namespace JIT.HardwareIntrinsics.General
             Vector128<Int64> value;
 
             value = Vector128.Create(TestLibrary.Generator.GetInt64());
-            object byteResult = typeof(Vector128<Int64>)
-                                    .GetMethod(nameof(Vector128.AsByte), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object byteResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.AsByte))
+                                    .MakeGenericMethod(typeof(Int64))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector128<byte>)(byteResult), value);
 
             value = Vector128.Create(TestLibrary.Generator.GetInt64());
-            object doubleResult = typeof(Vector128<Int64>)
-                                    .GetMethod(nameof(Vector128.AsDouble), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object doubleResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.AsDouble))
+                                    .MakeGenericMethod(typeof(Int64))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector128<double>)(doubleResult), value);
 
             value = Vector128.Create(TestLibrary.Generator.GetInt64());
-            object shortResult = typeof(Vector128<Int64>)
-                                    .GetMethod(nameof(Vector128.AsInt16), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object shortResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.AsInt16))
+                                    .MakeGenericMethod(typeof(Int64))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector128<short>)(shortResult), value);
 
             value = Vector128.Create(TestLibrary.Generator.GetInt64());
-            object intResult = typeof(Vector128<Int64>)
-                                    .GetMethod(nameof(Vector128.AsInt32), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object intResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.AsInt32))
+                                    .MakeGenericMethod(typeof(Int64))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector128<int>)(intResult), value);
 
             value = Vector128.Create(TestLibrary.Generator.GetInt64());
-            object longResult = typeof(Vector128<Int64>)
-                                    .GetMethod(nameof(Vector128.AsInt64), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object longResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.AsInt64))
+                                    .MakeGenericMethod(typeof(Int64))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector128<long>)(longResult), value);
 
             value = Vector128.Create(TestLibrary.Generator.GetInt64());
-            object sbyteResult = typeof(Vector128<Int64>)
-                                    .GetMethod(nameof(Vector128.AsSByte), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object sbyteResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.AsSByte))
+                                    .MakeGenericMethod(typeof(Int64))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector128<sbyte>)(sbyteResult), value);
 
             value = Vector128.Create(TestLibrary.Generator.GetInt64());
-            object floatResult = typeof(Vector128<Int64>)
-                                    .GetMethod(nameof(Vector128.AsSingle), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object floatResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.AsSingle))
+                                    .MakeGenericMethod(typeof(Int64))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector128<float>)(floatResult), value);
 
             value = Vector128.Create(TestLibrary.Generator.GetInt64());
-            object ushortResult = typeof(Vector128<Int64>)
-                                    .GetMethod(nameof(Vector128.AsUInt16), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object ushortResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.AsUInt16))
+                                    .MakeGenericMethod(typeof(Int64))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector128<ushort>)(ushortResult), value);
 
             value = Vector128.Create(TestLibrary.Generator.GetInt64());
-            object uintResult = typeof(Vector128<Int64>)
-                                    .GetMethod(nameof(Vector128.AsUInt32), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object uintResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.AsUInt32))
+                                    .MakeGenericMethod(typeof(Int64))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector128<uint>)(uintResult), value);
 
             value = Vector128.Create(TestLibrary.Generator.GetInt64());
-            object ulongResult = typeof(Vector128<Int64>)
-                                    .GetMethod(nameof(Vector128.AsUInt64), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object ulongResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.AsUInt64))
+                                    .MakeGenericMethod(typeof(Int64))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector128<ulong>)(ulongResult), value);
         }
 
index b4b62cd..a7ca785 100644 (file)
@@ -144,63 +144,73 @@ namespace JIT.HardwareIntrinsics.General
             Vector128<SByte> value;
 
             value = Vector128.Create(TestLibrary.Generator.GetSByte());
-            object byteResult = typeof(Vector128<SByte>)
-                                    .GetMethod(nameof(Vector128.AsByte), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object byteResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.AsByte))
+                                    .MakeGenericMethod(typeof(SByte))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector128<byte>)(byteResult), value);
 
             value = Vector128.Create(TestLibrary.Generator.GetSByte());
-            object doubleResult = typeof(Vector128<SByte>)
-                                    .GetMethod(nameof(Vector128.AsDouble), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object doubleResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.AsDouble))
+                                    .MakeGenericMethod(typeof(SByte))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector128<double>)(doubleResult), value);
 
             value = Vector128.Create(TestLibrary.Generator.GetSByte());
-            object shortResult = typeof(Vector128<SByte>)
-                                    .GetMethod(nameof(Vector128.AsInt16), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object shortResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.AsInt16))
+                                    .MakeGenericMethod(typeof(SByte))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector128<short>)(shortResult), value);
 
             value = Vector128.Create(TestLibrary.Generator.GetSByte());
-            object intResult = typeof(Vector128<SByte>)
-                                    .GetMethod(nameof(Vector128.AsInt32), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object intResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.AsInt32))
+                                    .MakeGenericMethod(typeof(SByte))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector128<int>)(intResult), value);
 
             value = Vector128.Create(TestLibrary.Generator.GetSByte());
-            object longResult = typeof(Vector128<SByte>)
-                                    .GetMethod(nameof(Vector128.AsInt64), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object longResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.AsInt64))
+                                    .MakeGenericMethod(typeof(SByte))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector128<long>)(longResult), value);
 
             value = Vector128.Create(TestLibrary.Generator.GetSByte());
-            object sbyteResult = typeof(Vector128<SByte>)
-                                    .GetMethod(nameof(Vector128.AsSByte), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object sbyteResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.AsSByte))
+                                    .MakeGenericMethod(typeof(SByte))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector128<sbyte>)(sbyteResult), value);
 
             value = Vector128.Create(TestLibrary.Generator.GetSByte());
-            object floatResult = typeof(Vector128<SByte>)
-                                    .GetMethod(nameof(Vector128.AsSingle), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object floatResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.AsSingle))
+                                    .MakeGenericMethod(typeof(SByte))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector128<float>)(floatResult), value);
 
             value = Vector128.Create(TestLibrary.Generator.GetSByte());
-            object ushortResult = typeof(Vector128<SByte>)
-                                    .GetMethod(nameof(Vector128.AsUInt16), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object ushortResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.AsUInt16))
+                                    .MakeGenericMethod(typeof(SByte))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector128<ushort>)(ushortResult), value);
 
             value = Vector128.Create(TestLibrary.Generator.GetSByte());
-            object uintResult = typeof(Vector128<SByte>)
-                                    .GetMethod(nameof(Vector128.AsUInt32), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object uintResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.AsUInt32))
+                                    .MakeGenericMethod(typeof(SByte))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector128<uint>)(uintResult), value);
 
             value = Vector128.Create(TestLibrary.Generator.GetSByte());
-            object ulongResult = typeof(Vector128<SByte>)
-                                    .GetMethod(nameof(Vector128.AsUInt64), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object ulongResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.AsUInt64))
+                                    .MakeGenericMethod(typeof(SByte))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector128<ulong>)(ulongResult), value);
         }
 
index 6b1a4a3..990e4ec 100644 (file)
@@ -144,63 +144,73 @@ namespace JIT.HardwareIntrinsics.General
             Vector128<Single> value;
 
             value = Vector128.Create(TestLibrary.Generator.GetSingle());
-            object byteResult = typeof(Vector128<Single>)
-                                    .GetMethod(nameof(Vector128.AsByte), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object byteResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.AsByte))
+                                    .MakeGenericMethod(typeof(Single))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector128<byte>)(byteResult), value);
 
             value = Vector128.Create(TestLibrary.Generator.GetSingle());
-            object doubleResult = typeof(Vector128<Single>)
-                                    .GetMethod(nameof(Vector128.AsDouble), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object doubleResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.AsDouble))
+                                    .MakeGenericMethod(typeof(Single))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector128<double>)(doubleResult), value);
 
             value = Vector128.Create(TestLibrary.Generator.GetSingle());
-            object shortResult = typeof(Vector128<Single>)
-                                    .GetMethod(nameof(Vector128.AsInt16), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object shortResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.AsInt16))
+                                    .MakeGenericMethod(typeof(Single))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector128<short>)(shortResult), value);
 
             value = Vector128.Create(TestLibrary.Generator.GetSingle());
-            object intResult = typeof(Vector128<Single>)
-                                    .GetMethod(nameof(Vector128.AsInt32), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object intResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.AsInt32))
+                                    .MakeGenericMethod(typeof(Single))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector128<int>)(intResult), value);
 
             value = Vector128.Create(TestLibrary.Generator.GetSingle());
-            object longResult = typeof(Vector128<Single>)
-                                    .GetMethod(nameof(Vector128.AsInt64), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object longResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.AsInt64))
+                                    .MakeGenericMethod(typeof(Single))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector128<long>)(longResult), value);
 
             value = Vector128.Create(TestLibrary.Generator.GetSingle());
-            object sbyteResult = typeof(Vector128<Single>)
-                                    .GetMethod(nameof(Vector128.AsSByte), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object sbyteResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.AsSByte))
+                                    .MakeGenericMethod(typeof(Single))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector128<sbyte>)(sbyteResult), value);
 
             value = Vector128.Create(TestLibrary.Generator.GetSingle());
-            object floatResult = typeof(Vector128<Single>)
-                                    .GetMethod(nameof(Vector128.AsSingle), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object floatResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.AsSingle))
+                                    .MakeGenericMethod(typeof(Single))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector128<float>)(floatResult), value);
 
             value = Vector128.Create(TestLibrary.Generator.GetSingle());
-            object ushortResult = typeof(Vector128<Single>)
-                                    .GetMethod(nameof(Vector128.AsUInt16), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object ushortResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.AsUInt16))
+                                    .MakeGenericMethod(typeof(Single))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector128<ushort>)(ushortResult), value);
 
             value = Vector128.Create(TestLibrary.Generator.GetSingle());
-            object uintResult = typeof(Vector128<Single>)
-                                    .GetMethod(nameof(Vector128.AsUInt32), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object uintResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.AsUInt32))
+                                    .MakeGenericMethod(typeof(Single))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector128<uint>)(uintResult), value);
 
             value = Vector128.Create(TestLibrary.Generator.GetSingle());
-            object ulongResult = typeof(Vector128<Single>)
-                                    .GetMethod(nameof(Vector128.AsUInt64), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object ulongResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.AsUInt64))
+                                    .MakeGenericMethod(typeof(Single))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector128<ulong>)(ulongResult), value);
         }
 
index a1b6411..21f892e 100644 (file)
@@ -144,63 +144,73 @@ namespace JIT.HardwareIntrinsics.General
             Vector128<UInt16> value;
 
             value = Vector128.Create(TestLibrary.Generator.GetUInt16());
-            object byteResult = typeof(Vector128<UInt16>)
-                                    .GetMethod(nameof(Vector128.AsByte), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object byteResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.AsByte))
+                                    .MakeGenericMethod(typeof(UInt16))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector128<byte>)(byteResult), value);
 
             value = Vector128.Create(TestLibrary.Generator.GetUInt16());
-            object doubleResult = typeof(Vector128<UInt16>)
-                                    .GetMethod(nameof(Vector128.AsDouble), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object doubleResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.AsDouble))
+                                    .MakeGenericMethod(typeof(UInt16))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector128<double>)(doubleResult), value);
 
             value = Vector128.Create(TestLibrary.Generator.GetUInt16());
-            object shortResult = typeof(Vector128<UInt16>)
-                                    .GetMethod(nameof(Vector128.AsInt16), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object shortResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.AsInt16))
+                                    .MakeGenericMethod(typeof(UInt16))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector128<short>)(shortResult), value);
 
             value = Vector128.Create(TestLibrary.Generator.GetUInt16());
-            object intResult = typeof(Vector128<UInt16>)
-                                    .GetMethod(nameof(Vector128.AsInt32), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object intResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.AsInt32))
+                                    .MakeGenericMethod(typeof(UInt16))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector128<int>)(intResult), value);
 
             value = Vector128.Create(TestLibrary.Generator.GetUInt16());
-            object longResult = typeof(Vector128<UInt16>)
-                                    .GetMethod(nameof(Vector128.AsInt64), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object longResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.AsInt64))
+                                    .MakeGenericMethod(typeof(UInt16))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector128<long>)(longResult), value);
 
             value = Vector128.Create(TestLibrary.Generator.GetUInt16());
-            object sbyteResult = typeof(Vector128<UInt16>)
-                                    .GetMethod(nameof(Vector128.AsSByte), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object sbyteResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.AsSByte))
+                                    .MakeGenericMethod(typeof(UInt16))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector128<sbyte>)(sbyteResult), value);
 
             value = Vector128.Create(TestLibrary.Generator.GetUInt16());
-            object floatResult = typeof(Vector128<UInt16>)
-                                    .GetMethod(nameof(Vector128.AsSingle), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object floatResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.AsSingle))
+                                    .MakeGenericMethod(typeof(UInt16))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector128<float>)(floatResult), value);
 
             value = Vector128.Create(TestLibrary.Generator.GetUInt16());
-            object ushortResult = typeof(Vector128<UInt16>)
-                                    .GetMethod(nameof(Vector128.AsUInt16), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object ushortResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.AsUInt16))
+                                    .MakeGenericMethod(typeof(UInt16))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector128<ushort>)(ushortResult), value);
 
             value = Vector128.Create(TestLibrary.Generator.GetUInt16());
-            object uintResult = typeof(Vector128<UInt16>)
-                                    .GetMethod(nameof(Vector128.AsUInt32), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object uintResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.AsUInt32))
+                                    .MakeGenericMethod(typeof(UInt16))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector128<uint>)(uintResult), value);
 
             value = Vector128.Create(TestLibrary.Generator.GetUInt16());
-            object ulongResult = typeof(Vector128<UInt16>)
-                                    .GetMethod(nameof(Vector128.AsUInt64), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object ulongResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.AsUInt64))
+                                    .MakeGenericMethod(typeof(UInt16))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector128<ulong>)(ulongResult), value);
         }
 
index 06af6b0..4a1c2f5 100644 (file)
@@ -144,63 +144,73 @@ namespace JIT.HardwareIntrinsics.General
             Vector128<UInt32> value;
 
             value = Vector128.Create(TestLibrary.Generator.GetUInt32());
-            object byteResult = typeof(Vector128<UInt32>)
-                                    .GetMethod(nameof(Vector128.AsByte), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object byteResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.AsByte))
+                                    .MakeGenericMethod(typeof(UInt32))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector128<byte>)(byteResult), value);
 
             value = Vector128.Create(TestLibrary.Generator.GetUInt32());
-            object doubleResult = typeof(Vector128<UInt32>)
-                                    .GetMethod(nameof(Vector128.AsDouble), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object doubleResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.AsDouble))
+                                    .MakeGenericMethod(typeof(UInt32))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector128<double>)(doubleResult), value);
 
             value = Vector128.Create(TestLibrary.Generator.GetUInt32());
-            object shortResult = typeof(Vector128<UInt32>)
-                                    .GetMethod(nameof(Vector128.AsInt16), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object shortResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.AsInt16))
+                                    .MakeGenericMethod(typeof(UInt32))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector128<short>)(shortResult), value);
 
             value = Vector128.Create(TestLibrary.Generator.GetUInt32());
-            object intResult = typeof(Vector128<UInt32>)
-                                    .GetMethod(nameof(Vector128.AsInt32), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object intResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.AsInt32))
+                                    .MakeGenericMethod(typeof(UInt32))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector128<int>)(intResult), value);
 
             value = Vector128.Create(TestLibrary.Generator.GetUInt32());
-            object longResult = typeof(Vector128<UInt32>)
-                                    .GetMethod(nameof(Vector128.AsInt64), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object longResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.AsInt64))
+                                    .MakeGenericMethod(typeof(UInt32))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector128<long>)(longResult), value);
 
             value = Vector128.Create(TestLibrary.Generator.GetUInt32());
-            object sbyteResult = typeof(Vector128<UInt32>)
-                                    .GetMethod(nameof(Vector128.AsSByte), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object sbyteResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.AsSByte))
+                                    .MakeGenericMethod(typeof(UInt32))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector128<sbyte>)(sbyteResult), value);
 
             value = Vector128.Create(TestLibrary.Generator.GetUInt32());
-            object floatResult = typeof(Vector128<UInt32>)
-                                    .GetMethod(nameof(Vector128.AsSingle), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object floatResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.AsSingle))
+                                    .MakeGenericMethod(typeof(UInt32))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector128<float>)(floatResult), value);
 
             value = Vector128.Create(TestLibrary.Generator.GetUInt32());
-            object ushortResult = typeof(Vector128<UInt32>)
-                                    .GetMethod(nameof(Vector128.AsUInt16), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object ushortResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.AsUInt16))
+                                    .MakeGenericMethod(typeof(UInt32))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector128<ushort>)(ushortResult), value);
 
             value = Vector128.Create(TestLibrary.Generator.GetUInt32());
-            object uintResult = typeof(Vector128<UInt32>)
-                                    .GetMethod(nameof(Vector128.AsUInt32), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object uintResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.AsUInt32))
+                                    .MakeGenericMethod(typeof(UInt32))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector128<uint>)(uintResult), value);
 
             value = Vector128.Create(TestLibrary.Generator.GetUInt32());
-            object ulongResult = typeof(Vector128<UInt32>)
-                                    .GetMethod(nameof(Vector128.AsUInt64), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object ulongResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.AsUInt64))
+                                    .MakeGenericMethod(typeof(UInt32))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector128<ulong>)(ulongResult), value);
         }
 
index c036ef4..27321f9 100644 (file)
@@ -144,63 +144,73 @@ namespace JIT.HardwareIntrinsics.General
             Vector128<UInt64> value;
 
             value = Vector128.Create(TestLibrary.Generator.GetUInt64());
-            object byteResult = typeof(Vector128<UInt64>)
-                                    .GetMethod(nameof(Vector128.AsByte), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object byteResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.AsByte))
+                                    .MakeGenericMethod(typeof(UInt64))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector128<byte>)(byteResult), value);
 
             value = Vector128.Create(TestLibrary.Generator.GetUInt64());
-            object doubleResult = typeof(Vector128<UInt64>)
-                                    .GetMethod(nameof(Vector128.AsDouble), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object doubleResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.AsDouble))
+                                    .MakeGenericMethod(typeof(UInt64))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector128<double>)(doubleResult), value);
 
             value = Vector128.Create(TestLibrary.Generator.GetUInt64());
-            object shortResult = typeof(Vector128<UInt64>)
-                                    .GetMethod(nameof(Vector128.AsInt16), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object shortResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.AsInt16))
+                                    .MakeGenericMethod(typeof(UInt64))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector128<short>)(shortResult), value);
 
             value = Vector128.Create(TestLibrary.Generator.GetUInt64());
-            object intResult = typeof(Vector128<UInt64>)
-                                    .GetMethod(nameof(Vector128.AsInt32), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object intResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.AsInt32))
+                                    .MakeGenericMethod(typeof(UInt64))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector128<int>)(intResult), value);
 
             value = Vector128.Create(TestLibrary.Generator.GetUInt64());
-            object longResult = typeof(Vector128<UInt64>)
-                                    .GetMethod(nameof(Vector128.AsInt64), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object longResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.AsInt64))
+                                    .MakeGenericMethod(typeof(UInt64))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector128<long>)(longResult), value);
 
             value = Vector128.Create(TestLibrary.Generator.GetUInt64());
-            object sbyteResult = typeof(Vector128<UInt64>)
-                                    .GetMethod(nameof(Vector128.AsSByte), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object sbyteResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.AsSByte))
+                                    .MakeGenericMethod(typeof(UInt64))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector128<sbyte>)(sbyteResult), value);
 
             value = Vector128.Create(TestLibrary.Generator.GetUInt64());
-            object floatResult = typeof(Vector128<UInt64>)
-                                    .GetMethod(nameof(Vector128.AsSingle), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object floatResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.AsSingle))
+                                    .MakeGenericMethod(typeof(UInt64))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector128<float>)(floatResult), value);
 
             value = Vector128.Create(TestLibrary.Generator.GetUInt64());
-            object ushortResult = typeof(Vector128<UInt64>)
-                                    .GetMethod(nameof(Vector128.AsUInt16), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object ushortResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.AsUInt16))
+                                    .MakeGenericMethod(typeof(UInt64))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector128<ushort>)(ushortResult), value);
 
             value = Vector128.Create(TestLibrary.Generator.GetUInt64());
-            object uintResult = typeof(Vector128<UInt64>)
-                                    .GetMethod(nameof(Vector128.AsUInt32), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object uintResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.AsUInt32))
+                                    .MakeGenericMethod(typeof(UInt64))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector128<uint>)(uintResult), value);
 
             value = Vector128.Create(TestLibrary.Generator.GetUInt64());
-            object ulongResult = typeof(Vector128<UInt64>)
-                                    .GetMethod(nameof(Vector128.AsUInt64), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object ulongResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.AsUInt64))
+                                    .MakeGenericMethod(typeof(UInt64))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector128<ulong>)(ulongResult), value);
         }
 
index 2227e24..27256f9 100644 (file)
@@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result = typeof(Vector128<Byte>)
-                                    .GetMethod(nameof(Vector128.GetElement), new Type[] { typeof(int) })
-                                    .Invoke(value, new object[] { imm });
+                object result = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.GetElement))
+                                    .MakeGenericMethod(typeof(Byte))
+                                    .Invoke(null, new object[] { value, imm });
                 ValidateGetResult((Byte)(result), values);
             }
             catch (TargetInvocationException e)
@@ -145,9 +146,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result2 = typeof(Vector128<Byte>)
-                                    .GetMethod(nameof(Vector128.WithElement), new Type[] { typeof(int), typeof(Byte) })
-                                    .Invoke(value, new object[] { imm, insertedValue });
+                object result2 = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.WithElement))
+                                    .MakeGenericMethod(typeof(Byte))
+                                    .Invoke(null, new object[] { value, imm, insertedValue });
                 ValidateWithResult((Vector128<Byte>)(result2), values, insertedValue);
             }
             catch (TargetInvocationException e)
index cc96ebd..8092e5a 100644 (file)
@@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result = typeof(Vector128<Byte>)
-                                    .GetMethod(nameof(Vector128.GetElement), new Type[] { typeof(int) })
-                                    .Invoke(value, new object[] { imm });
+                object result = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.GetElement))
+                                    .MakeGenericMethod(typeof(Byte))
+                                    .Invoke(null, new object[] { value, imm });
                 ValidateGetResult((Byte)(result), values);
             }
             catch (TargetInvocationException e)
@@ -145,9 +146,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result2 = typeof(Vector128<Byte>)
-                                    .GetMethod(nameof(Vector128.WithElement), new Type[] { typeof(int), typeof(Byte) })
-                                    .Invoke(value, new object[] { imm, insertedValue });
+                object result2 = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.WithElement))
+                                    .MakeGenericMethod(typeof(Byte))
+                                    .Invoke(null, new object[] { value, imm, insertedValue });
                 ValidateWithResult((Vector128<Byte>)(result2), values, insertedValue);
             }
             catch (TargetInvocationException e)
index 43fd60a..ce7b163 100644 (file)
@@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result = typeof(Vector128<Byte>)
-                                    .GetMethod(nameof(Vector128.GetElement), new Type[] { typeof(int) })
-                                    .Invoke(value, new object[] { imm });
+                object result = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.GetElement))
+                                    .MakeGenericMethod(typeof(Byte))
+                                    .Invoke(null, new object[] { value, imm });
                 ValidateGetResult((Byte)(result), values);
             }
             catch (TargetInvocationException e)
@@ -145,9 +146,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result2 = typeof(Vector128<Byte>)
-                                    .GetMethod(nameof(Vector128.WithElement), new Type[] { typeof(int), typeof(Byte) })
-                                    .Invoke(value, new object[] { imm, insertedValue });
+                object result2 = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.WithElement))
+                                    .MakeGenericMethod(typeof(Byte))
+                                    .Invoke(null, new object[] { value, imm, insertedValue });
                 ValidateWithResult((Vector128<Byte>)(result2), values, insertedValue);
             }
             catch (TargetInvocationException e)
index 93a8444..da711cc 100644 (file)
@@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result = typeof(Vector128<Double>)
-                                    .GetMethod(nameof(Vector128.GetElement), new Type[] { typeof(int) })
-                                    .Invoke(value, new object[] { imm });
+                object result = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.GetElement))
+                                    .MakeGenericMethod(typeof(Double))
+                                    .Invoke(null, new object[] { value, imm });
                 ValidateGetResult((Double)(result), values);
             }
             catch (TargetInvocationException e)
@@ -145,9 +146,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result2 = typeof(Vector128<Double>)
-                                    .GetMethod(nameof(Vector128.WithElement), new Type[] { typeof(int), typeof(Double) })
-                                    .Invoke(value, new object[] { imm, insertedValue });
+                object result2 = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.WithElement))
+                                    .MakeGenericMethod(typeof(Double))
+                                    .Invoke(null, new object[] { value, imm, insertedValue });
                 ValidateWithResult((Vector128<Double>)(result2), values, insertedValue);
             }
             catch (TargetInvocationException e)
index 707f3e4..32a0c0c 100644 (file)
@@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result = typeof(Vector128<Double>)
-                                    .GetMethod(nameof(Vector128.GetElement), new Type[] { typeof(int) })
-                                    .Invoke(value, new object[] { imm });
+                object result = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.GetElement))
+                                    .MakeGenericMethod(typeof(Double))
+                                    .Invoke(null, new object[] { value, imm });
                 ValidateGetResult((Double)(result), values);
             }
             catch (TargetInvocationException e)
@@ -145,9 +146,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result2 = typeof(Vector128<Double>)
-                                    .GetMethod(nameof(Vector128.WithElement), new Type[] { typeof(int), typeof(Double) })
-                                    .Invoke(value, new object[] { imm, insertedValue });
+                object result2 = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.WithElement))
+                                    .MakeGenericMethod(typeof(Double))
+                                    .Invoke(null, new object[] { value, imm, insertedValue });
                 ValidateWithResult((Vector128<Double>)(result2), values, insertedValue);
             }
             catch (TargetInvocationException e)
index de33fd3..861b0b3 100644 (file)
@@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result = typeof(Vector128<Int16>)
-                                    .GetMethod(nameof(Vector128.GetElement), new Type[] { typeof(int) })
-                                    .Invoke(value, new object[] { imm });
+                object result = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.GetElement))
+                                    .MakeGenericMethod(typeof(Int16))
+                                    .Invoke(null, new object[] { value, imm });
                 ValidateGetResult((Int16)(result), values);
             }
             catch (TargetInvocationException e)
@@ -145,9 +146,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result2 = typeof(Vector128<Int16>)
-                                    .GetMethod(nameof(Vector128.WithElement), new Type[] { typeof(int), typeof(Int16) })
-                                    .Invoke(value, new object[] { imm, insertedValue });
+                object result2 = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.WithElement))
+                                    .MakeGenericMethod(typeof(Int16))
+                                    .Invoke(null, new object[] { value, imm, insertedValue });
                 ValidateWithResult((Vector128<Int16>)(result2), values, insertedValue);
             }
             catch (TargetInvocationException e)
index 90c960b..0480db9 100644 (file)
@@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result = typeof(Vector128<Int16>)
-                                    .GetMethod(nameof(Vector128.GetElement), new Type[] { typeof(int) })
-                                    .Invoke(value, new object[] { imm });
+                object result = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.GetElement))
+                                    .MakeGenericMethod(typeof(Int16))
+                                    .Invoke(null, new object[] { value, imm });
                 ValidateGetResult((Int16)(result), values);
             }
             catch (TargetInvocationException e)
@@ -145,9 +146,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result2 = typeof(Vector128<Int16>)
-                                    .GetMethod(nameof(Vector128.WithElement), new Type[] { typeof(int), typeof(Int16) })
-                                    .Invoke(value, new object[] { imm, insertedValue });
+                object result2 = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.WithElement))
+                                    .MakeGenericMethod(typeof(Int16))
+                                    .Invoke(null, new object[] { value, imm, insertedValue });
                 ValidateWithResult((Vector128<Int16>)(result2), values, insertedValue);
             }
             catch (TargetInvocationException e)
index ce470bb..5bf886d 100644 (file)
@@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result = typeof(Vector128<Int16>)
-                                    .GetMethod(nameof(Vector128.GetElement), new Type[] { typeof(int) })
-                                    .Invoke(value, new object[] { imm });
+                object result = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.GetElement))
+                                    .MakeGenericMethod(typeof(Int16))
+                                    .Invoke(null, new object[] { value, imm });
                 ValidateGetResult((Int16)(result), values);
             }
             catch (TargetInvocationException e)
@@ -145,9 +146,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result2 = typeof(Vector128<Int16>)
-                                    .GetMethod(nameof(Vector128.WithElement), new Type[] { typeof(int), typeof(Int16) })
-                                    .Invoke(value, new object[] { imm, insertedValue });
+                object result2 = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.WithElement))
+                                    .MakeGenericMethod(typeof(Int16))
+                                    .Invoke(null, new object[] { value, imm, insertedValue });
                 ValidateWithResult((Vector128<Int16>)(result2), values, insertedValue);
             }
             catch (TargetInvocationException e)
index f4fd637..0032d4d 100644 (file)
@@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result = typeof(Vector128<Int32>)
-                                    .GetMethod(nameof(Vector128.GetElement), new Type[] { typeof(int) })
-                                    .Invoke(value, new object[] { imm });
+                object result = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.GetElement))
+                                    .MakeGenericMethod(typeof(Int32))
+                                    .Invoke(null, new object[] { value, imm });
                 ValidateGetResult((Int32)(result), values);
             }
             catch (TargetInvocationException e)
@@ -145,9 +146,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result2 = typeof(Vector128<Int32>)
-                                    .GetMethod(nameof(Vector128.WithElement), new Type[] { typeof(int), typeof(Int32) })
-                                    .Invoke(value, new object[] { imm, insertedValue });
+                object result2 = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.WithElement))
+                                    .MakeGenericMethod(typeof(Int32))
+                                    .Invoke(null, new object[] { value, imm, insertedValue });
                 ValidateWithResult((Vector128<Int32>)(result2), values, insertedValue);
             }
             catch (TargetInvocationException e)
index 2bec545..c3fc82b 100644 (file)
@@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result = typeof(Vector128<Int32>)
-                                    .GetMethod(nameof(Vector128.GetElement), new Type[] { typeof(int) })
-                                    .Invoke(value, new object[] { imm });
+                object result = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.GetElement))
+                                    .MakeGenericMethod(typeof(Int32))
+                                    .Invoke(null, new object[] { value, imm });
                 ValidateGetResult((Int32)(result), values);
             }
             catch (TargetInvocationException e)
@@ -145,9 +146,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result2 = typeof(Vector128<Int32>)
-                                    .GetMethod(nameof(Vector128.WithElement), new Type[] { typeof(int), typeof(Int32) })
-                                    .Invoke(value, new object[] { imm, insertedValue });
+                object result2 = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.WithElement))
+                                    .MakeGenericMethod(typeof(Int32))
+                                    .Invoke(null, new object[] { value, imm, insertedValue });
                 ValidateWithResult((Vector128<Int32>)(result2), values, insertedValue);
             }
             catch (TargetInvocationException e)
index 64c0cad..5a943d4 100644 (file)
@@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result = typeof(Vector128<Int32>)
-                                    .GetMethod(nameof(Vector128.GetElement), new Type[] { typeof(int) })
-                                    .Invoke(value, new object[] { imm });
+                object result = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.GetElement))
+                                    .MakeGenericMethod(typeof(Int32))
+                                    .Invoke(null, new object[] { value, imm });
                 ValidateGetResult((Int32)(result), values);
             }
             catch (TargetInvocationException e)
@@ -145,9 +146,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result2 = typeof(Vector128<Int32>)
-                                    .GetMethod(nameof(Vector128.WithElement), new Type[] { typeof(int), typeof(Int32) })
-                                    .Invoke(value, new object[] { imm, insertedValue });
+                object result2 = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.WithElement))
+                                    .MakeGenericMethod(typeof(Int32))
+                                    .Invoke(null, new object[] { value, imm, insertedValue });
                 ValidateWithResult((Vector128<Int32>)(result2), values, insertedValue);
             }
             catch (TargetInvocationException e)
index 71442bf..ea3bb54 100644 (file)
@@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result = typeof(Vector128<Int64>)
-                                    .GetMethod(nameof(Vector128.GetElement), new Type[] { typeof(int) })
-                                    .Invoke(value, new object[] { imm });
+                object result = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.GetElement))
+                                    .MakeGenericMethod(typeof(Int64))
+                                    .Invoke(null, new object[] { value, imm });
                 ValidateGetResult((Int64)(result), values);
             }
             catch (TargetInvocationException e)
@@ -145,9 +146,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result2 = typeof(Vector128<Int64>)
-                                    .GetMethod(nameof(Vector128.WithElement), new Type[] { typeof(int), typeof(Int64) })
-                                    .Invoke(value, new object[] { imm, insertedValue });
+                object result2 = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.WithElement))
+                                    .MakeGenericMethod(typeof(Int64))
+                                    .Invoke(null, new object[] { value, imm, insertedValue });
                 ValidateWithResult((Vector128<Int64>)(result2), values, insertedValue);
             }
             catch (TargetInvocationException e)
index d9ac4a1..065a467 100644 (file)
@@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result = typeof(Vector128<Int64>)
-                                    .GetMethod(nameof(Vector128.GetElement), new Type[] { typeof(int) })
-                                    .Invoke(value, new object[] { imm });
+                object result = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.GetElement))
+                                    .MakeGenericMethod(typeof(Int64))
+                                    .Invoke(null, new object[] { value, imm });
                 ValidateGetResult((Int64)(result), values);
             }
             catch (TargetInvocationException e)
@@ -145,9 +146,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result2 = typeof(Vector128<Int64>)
-                                    .GetMethod(nameof(Vector128.WithElement), new Type[] { typeof(int), typeof(Int64) })
-                                    .Invoke(value, new object[] { imm, insertedValue });
+                object result2 = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.WithElement))
+                                    .MakeGenericMethod(typeof(Int64))
+                                    .Invoke(null, new object[] { value, imm, insertedValue });
                 ValidateWithResult((Vector128<Int64>)(result2), values, insertedValue);
             }
             catch (TargetInvocationException e)
index ed20f9d..80812a9 100644 (file)
@@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result = typeof(Vector128<SByte>)
-                                    .GetMethod(nameof(Vector128.GetElement), new Type[] { typeof(int) })
-                                    .Invoke(value, new object[] { imm });
+                object result = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.GetElement))
+                                    .MakeGenericMethod(typeof(SByte))
+                                    .Invoke(null, new object[] { value, imm });
                 ValidateGetResult((SByte)(result), values);
             }
             catch (TargetInvocationException e)
@@ -145,9 +146,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result2 = typeof(Vector128<SByte>)
-                                    .GetMethod(nameof(Vector128.WithElement), new Type[] { typeof(int), typeof(SByte) })
-                                    .Invoke(value, new object[] { imm, insertedValue });
+                object result2 = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.WithElement))
+                                    .MakeGenericMethod(typeof(SByte))
+                                    .Invoke(null, new object[] { value, imm, insertedValue });
                 ValidateWithResult((Vector128<SByte>)(result2), values, insertedValue);
             }
             catch (TargetInvocationException e)
index 010241a..0b5c6d8 100644 (file)
@@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result = typeof(Vector128<SByte>)
-                                    .GetMethod(nameof(Vector128.GetElement), new Type[] { typeof(int) })
-                                    .Invoke(value, new object[] { imm });
+                object result = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.GetElement))
+                                    .MakeGenericMethod(typeof(SByte))
+                                    .Invoke(null, new object[] { value, imm });
                 ValidateGetResult((SByte)(result), values);
             }
             catch (TargetInvocationException e)
@@ -145,9 +146,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result2 = typeof(Vector128<SByte>)
-                                    .GetMethod(nameof(Vector128.WithElement), new Type[] { typeof(int), typeof(SByte) })
-                                    .Invoke(value, new object[] { imm, insertedValue });
+                object result2 = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.WithElement))
+                                    .MakeGenericMethod(typeof(SByte))
+                                    .Invoke(null, new object[] { value, imm, insertedValue });
                 ValidateWithResult((Vector128<SByte>)(result2), values, insertedValue);
             }
             catch (TargetInvocationException e)
index 02750db..b134c2e 100644 (file)
@@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result = typeof(Vector128<SByte>)
-                                    .GetMethod(nameof(Vector128.GetElement), new Type[] { typeof(int) })
-                                    .Invoke(value, new object[] { imm });
+                object result = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.GetElement))
+                                    .MakeGenericMethod(typeof(SByte))
+                                    .Invoke(null, new object[] { value, imm });
                 ValidateGetResult((SByte)(result), values);
             }
             catch (TargetInvocationException e)
@@ -145,9 +146,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result2 = typeof(Vector128<SByte>)
-                                    .GetMethod(nameof(Vector128.WithElement), new Type[] { typeof(int), typeof(SByte) })
-                                    .Invoke(value, new object[] { imm, insertedValue });
+                object result2 = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.WithElement))
+                                    .MakeGenericMethod(typeof(SByte))
+                                    .Invoke(null, new object[] { value, imm, insertedValue });
                 ValidateWithResult((Vector128<SByte>)(result2), values, insertedValue);
             }
             catch (TargetInvocationException e)
index 9dad036..803d8d7 100644 (file)
@@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result = typeof(Vector128<Single>)
-                                    .GetMethod(nameof(Vector128.GetElement), new Type[] { typeof(int) })
-                                    .Invoke(value, new object[] { imm });
+                object result = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.GetElement))
+                                    .MakeGenericMethod(typeof(Single))
+                                    .Invoke(null, new object[] { value, imm });
                 ValidateGetResult((Single)(result), values);
             }
             catch (TargetInvocationException e)
@@ -145,9 +146,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result2 = typeof(Vector128<Single>)
-                                    .GetMethod(nameof(Vector128.WithElement), new Type[] { typeof(int), typeof(Single) })
-                                    .Invoke(value, new object[] { imm, insertedValue });
+                object result2 = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.WithElement))
+                                    .MakeGenericMethod(typeof(Single))
+                                    .Invoke(null, new object[] { value, imm, insertedValue });
                 ValidateWithResult((Vector128<Single>)(result2), values, insertedValue);
             }
             catch (TargetInvocationException e)
index 4e0d461..3565ac4 100644 (file)
@@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result = typeof(Vector128<Single>)
-                                    .GetMethod(nameof(Vector128.GetElement), new Type[] { typeof(int) })
-                                    .Invoke(value, new object[] { imm });
+                object result = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.GetElement))
+                                    .MakeGenericMethod(typeof(Single))
+                                    .Invoke(null, new object[] { value, imm });
                 ValidateGetResult((Single)(result), values);
             }
             catch (TargetInvocationException e)
@@ -145,9 +146,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result2 = typeof(Vector128<Single>)
-                                    .GetMethod(nameof(Vector128.WithElement), new Type[] { typeof(int), typeof(Single) })
-                                    .Invoke(value, new object[] { imm, insertedValue });
+                object result2 = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.WithElement))
+                                    .MakeGenericMethod(typeof(Single))
+                                    .Invoke(null, new object[] { value, imm, insertedValue });
                 ValidateWithResult((Vector128<Single>)(result2), values, insertedValue);
             }
             catch (TargetInvocationException e)
index 6e3164f..d919124 100644 (file)
@@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result = typeof(Vector128<Single>)
-                                    .GetMethod(nameof(Vector128.GetElement), new Type[] { typeof(int) })
-                                    .Invoke(value, new object[] { imm });
+                object result = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.GetElement))
+                                    .MakeGenericMethod(typeof(Single))
+                                    .Invoke(null, new object[] { value, imm });
                 ValidateGetResult((Single)(result), values);
             }
             catch (TargetInvocationException e)
@@ -145,9 +146,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result2 = typeof(Vector128<Single>)
-                                    .GetMethod(nameof(Vector128.WithElement), new Type[] { typeof(int), typeof(Single) })
-                                    .Invoke(value, new object[] { imm, insertedValue });
+                object result2 = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.WithElement))
+                                    .MakeGenericMethod(typeof(Single))
+                                    .Invoke(null, new object[] { value, imm, insertedValue });
                 ValidateWithResult((Vector128<Single>)(result2), values, insertedValue);
             }
             catch (TargetInvocationException e)
index f16ed2b..b2038ea 100644 (file)
@@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result = typeof(Vector128<UInt16>)
-                                    .GetMethod(nameof(Vector128.GetElement), new Type[] { typeof(int) })
-                                    .Invoke(value, new object[] { imm });
+                object result = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.GetElement))
+                                    .MakeGenericMethod(typeof(UInt16))
+                                    .Invoke(null, new object[] { value, imm });
                 ValidateGetResult((UInt16)(result), values);
             }
             catch (TargetInvocationException e)
@@ -145,9 +146,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result2 = typeof(Vector128<UInt16>)
-                                    .GetMethod(nameof(Vector128.WithElement), new Type[] { typeof(int), typeof(UInt16) })
-                                    .Invoke(value, new object[] { imm, insertedValue });
+                object result2 = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.WithElement))
+                                    .MakeGenericMethod(typeof(UInt16))
+                                    .Invoke(null, new object[] { value, imm, insertedValue });
                 ValidateWithResult((Vector128<UInt16>)(result2), values, insertedValue);
             }
             catch (TargetInvocationException e)
index 9844ef0..de5b5ed 100644 (file)
@@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result = typeof(Vector128<UInt16>)
-                                    .GetMethod(nameof(Vector128.GetElement), new Type[] { typeof(int) })
-                                    .Invoke(value, new object[] { imm });
+                object result = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.GetElement))
+                                    .MakeGenericMethod(typeof(UInt16))
+                                    .Invoke(null, new object[] { value, imm });
                 ValidateGetResult((UInt16)(result), values);
             }
             catch (TargetInvocationException e)
@@ -145,9 +146,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result2 = typeof(Vector128<UInt16>)
-                                    .GetMethod(nameof(Vector128.WithElement), new Type[] { typeof(int), typeof(UInt16) })
-                                    .Invoke(value, new object[] { imm, insertedValue });
+                object result2 = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.WithElement))
+                                    .MakeGenericMethod(typeof(UInt16))
+                                    .Invoke(null, new object[] { value, imm, insertedValue });
                 ValidateWithResult((Vector128<UInt16>)(result2), values, insertedValue);
             }
             catch (TargetInvocationException e)
index 1c8ee4d..1bd6f5d 100644 (file)
@@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result = typeof(Vector128<UInt16>)
-                                    .GetMethod(nameof(Vector128.GetElement), new Type[] { typeof(int) })
-                                    .Invoke(value, new object[] { imm });
+                object result = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.GetElement))
+                                    .MakeGenericMethod(typeof(UInt16))
+                                    .Invoke(null, new object[] { value, imm });
                 ValidateGetResult((UInt16)(result), values);
             }
             catch (TargetInvocationException e)
@@ -145,9 +146,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result2 = typeof(Vector128<UInt16>)
-                                    .GetMethod(nameof(Vector128.WithElement), new Type[] { typeof(int), typeof(UInt16) })
-                                    .Invoke(value, new object[] { imm, insertedValue });
+                object result2 = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.WithElement))
+                                    .MakeGenericMethod(typeof(UInt16))
+                                    .Invoke(null, new object[] { value, imm, insertedValue });
                 ValidateWithResult((Vector128<UInt16>)(result2), values, insertedValue);
             }
             catch (TargetInvocationException e)
index ce2ebe6..9aa6da2 100644 (file)
@@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result = typeof(Vector128<UInt32>)
-                                    .GetMethod(nameof(Vector128.GetElement), new Type[] { typeof(int) })
-                                    .Invoke(value, new object[] { imm });
+                object result = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.GetElement))
+                                    .MakeGenericMethod(typeof(UInt32))
+                                    .Invoke(null, new object[] { value, imm });
                 ValidateGetResult((UInt32)(result), values);
             }
             catch (TargetInvocationException e)
@@ -145,9 +146,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result2 = typeof(Vector128<UInt32>)
-                                    .GetMethod(nameof(Vector128.WithElement), new Type[] { typeof(int), typeof(UInt32) })
-                                    .Invoke(value, new object[] { imm, insertedValue });
+                object result2 = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.WithElement))
+                                    .MakeGenericMethod(typeof(UInt32))
+                                    .Invoke(null, new object[] { value, imm, insertedValue });
                 ValidateWithResult((Vector128<UInt32>)(result2), values, insertedValue);
             }
             catch (TargetInvocationException e)
index fc19ec5..8f94ec7 100644 (file)
@@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result = typeof(Vector128<UInt32>)
-                                    .GetMethod(nameof(Vector128.GetElement), new Type[] { typeof(int) })
-                                    .Invoke(value, new object[] { imm });
+                object result = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.GetElement))
+                                    .MakeGenericMethod(typeof(UInt32))
+                                    .Invoke(null, new object[] { value, imm });
                 ValidateGetResult((UInt32)(result), values);
             }
             catch (TargetInvocationException e)
@@ -145,9 +146,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result2 = typeof(Vector128<UInt32>)
-                                    .GetMethod(nameof(Vector128.WithElement), new Type[] { typeof(int), typeof(UInt32) })
-                                    .Invoke(value, new object[] { imm, insertedValue });
+                object result2 = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.WithElement))
+                                    .MakeGenericMethod(typeof(UInt32))
+                                    .Invoke(null, new object[] { value, imm, insertedValue });
                 ValidateWithResult((Vector128<UInt32>)(result2), values, insertedValue);
             }
             catch (TargetInvocationException e)
index 7b7c371..64e0fa3 100644 (file)
@@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result = typeof(Vector128<UInt32>)
-                                    .GetMethod(nameof(Vector128.GetElement), new Type[] { typeof(int) })
-                                    .Invoke(value, new object[] { imm });
+                object result = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.GetElement))
+                                    .MakeGenericMethod(typeof(UInt32))
+                                    .Invoke(null, new object[] { value, imm });
                 ValidateGetResult((UInt32)(result), values);
             }
             catch (TargetInvocationException e)
@@ -145,9 +146,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result2 = typeof(Vector128<UInt32>)
-                                    .GetMethod(nameof(Vector128.WithElement), new Type[] { typeof(int), typeof(UInt32) })
-                                    .Invoke(value, new object[] { imm, insertedValue });
+                object result2 = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.WithElement))
+                                    .MakeGenericMethod(typeof(UInt32))
+                                    .Invoke(null, new object[] { value, imm, insertedValue });
                 ValidateWithResult((Vector128<UInt32>)(result2), values, insertedValue);
             }
             catch (TargetInvocationException e)
index 240f5b6..d46786c 100644 (file)
@@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result = typeof(Vector128<UInt64>)
-                                    .GetMethod(nameof(Vector128.GetElement), new Type[] { typeof(int) })
-                                    .Invoke(value, new object[] { imm });
+                object result = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.GetElement))
+                                    .MakeGenericMethod(typeof(UInt64))
+                                    .Invoke(null, new object[] { value, imm });
                 ValidateGetResult((UInt64)(result), values);
             }
             catch (TargetInvocationException e)
@@ -145,9 +146,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result2 = typeof(Vector128<UInt64>)
-                                    .GetMethod(nameof(Vector128.WithElement), new Type[] { typeof(int), typeof(UInt64) })
-                                    .Invoke(value, new object[] { imm, insertedValue });
+                object result2 = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.WithElement))
+                                    .MakeGenericMethod(typeof(UInt64))
+                                    .Invoke(null, new object[] { value, imm, insertedValue });
                 ValidateWithResult((Vector128<UInt64>)(result2), values, insertedValue);
             }
             catch (TargetInvocationException e)
index 6d15598..ba593ec 100644 (file)
@@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result = typeof(Vector128<UInt64>)
-                                    .GetMethod(nameof(Vector128.GetElement), new Type[] { typeof(int) })
-                                    .Invoke(value, new object[] { imm });
+                object result = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.GetElement))
+                                    .MakeGenericMethod(typeof(UInt64))
+                                    .Invoke(null, new object[] { value, imm });
                 ValidateGetResult((UInt64)(result), values);
             }
             catch (TargetInvocationException e)
@@ -145,9 +146,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result2 = typeof(Vector128<UInt64>)
-                                    .GetMethod(nameof(Vector128.WithElement), new Type[] { typeof(int), typeof(UInt64) })
-                                    .Invoke(value, new object[] { imm, insertedValue });
+                object result2 = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.WithElement))
+                                    .MakeGenericMethod(typeof(UInt64))
+                                    .Invoke(null, new object[] { value, imm, insertedValue });
                 ValidateWithResult((Vector128<UInt64>)(result2), values, insertedValue);
             }
             catch (TargetInvocationException e)
index fdf64b0..638499d 100644 (file)
@@ -78,20 +78,24 @@ namespace JIT.HardwareIntrinsics.General
 
             Vector128<Byte> value = Vector128.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15]);
 
-            object lowerResult = typeof(Vector128<Byte>)
-                                    .GetMethod(nameof(Vector128.GetLower), new Type[] { })
-                                    .Invoke(value, new object[] { });
-            object upperResult = typeof(Vector128<Byte>)
-                                    .GetMethod(nameof(Vector128.GetUpper), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object lowerResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.GetLower))
+                                    .MakeGenericMethod(typeof(Byte))
+                                    .Invoke(null, new object[] { value });
+            object upperResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.GetUpper))
+                                    .MakeGenericMethod(typeof(Byte))
+                                    .Invoke(null, new object[] { value });
             ValidateGetResult((Vector64<Byte>)(lowerResult), (Vector64<Byte>)(upperResult), values);
 
-            object result = typeof(Vector128<Byte>)
-                                .GetMethod(nameof(Vector128.WithLower), new Type[] { typeof(Vector64<Byte>) })
-                                .Invoke(value, new object[] { upperResult });
-            result = typeof(Vector128<Byte>)
-                        .GetMethod(nameof(Vector128.WithUpper), new Type[] { typeof(Vector64<Byte>) })
-                        .Invoke(result, new object[] { lowerResult });
+            object result = typeof(Vector128)
+                                .GetMethod(nameof(Vector128.WithLower))
+                                .MakeGenericMethod(typeof(Byte))
+                                .Invoke(null, new object[] { value, upperResult });
+            result = typeof(Vector128)
+                        .GetMethod(nameof(Vector128.WithUpper))
+                        .MakeGenericMethod(typeof(Byte))
+                        .Invoke(null, new object[] { result, lowerResult });
             ValidateWithResult((Vector128<Byte>)(result), values);
         }
 
index 0436a5c..0aea72f 100644 (file)
@@ -78,20 +78,24 @@ namespace JIT.HardwareIntrinsics.General
 
             Vector128<Double> value = Vector128.Create(values[0], values[1]);
 
-            object lowerResult = typeof(Vector128<Double>)
-                                    .GetMethod(nameof(Vector128.GetLower), new Type[] { })
-                                    .Invoke(value, new object[] { });
-            object upperResult = typeof(Vector128<Double>)
-                                    .GetMethod(nameof(Vector128.GetUpper), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object lowerResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.GetLower))
+                                    .MakeGenericMethod(typeof(Double))
+                                    .Invoke(null, new object[] { value });
+            object upperResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.GetUpper))
+                                    .MakeGenericMethod(typeof(Double))
+                                    .Invoke(null, new object[] { value });
             ValidateGetResult((Vector64<Double>)(lowerResult), (Vector64<Double>)(upperResult), values);
 
-            object result = typeof(Vector128<Double>)
-                                .GetMethod(nameof(Vector128.WithLower), new Type[] { typeof(Vector64<Double>) })
-                                .Invoke(value, new object[] { upperResult });
-            result = typeof(Vector128<Double>)
-                        .GetMethod(nameof(Vector128.WithUpper), new Type[] { typeof(Vector64<Double>) })
-                        .Invoke(result, new object[] { lowerResult });
+            object result = typeof(Vector128)
+                                .GetMethod(nameof(Vector128.WithLower))
+                                .MakeGenericMethod(typeof(Double))
+                                .Invoke(null, new object[] { value, upperResult });
+            result = typeof(Vector128)
+                        .GetMethod(nameof(Vector128.WithUpper))
+                        .MakeGenericMethod(typeof(Double))
+                        .Invoke(null, new object[] { result, lowerResult });
             ValidateWithResult((Vector128<Double>)(result), values);
         }
 
index 17afe1c..a34d5eb 100644 (file)
@@ -78,20 +78,24 @@ namespace JIT.HardwareIntrinsics.General
 
             Vector128<Int16> value = Vector128.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]);
 
-            object lowerResult = typeof(Vector128<Int16>)
-                                    .GetMethod(nameof(Vector128.GetLower), new Type[] { })
-                                    .Invoke(value, new object[] { });
-            object upperResult = typeof(Vector128<Int16>)
-                                    .GetMethod(nameof(Vector128.GetUpper), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object lowerResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.GetLower))
+                                    .MakeGenericMethod(typeof(Int16))
+                                    .Invoke(null, new object[] { value });
+            object upperResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.GetUpper))
+                                    .MakeGenericMethod(typeof(Int16))
+                                    .Invoke(null, new object[] { value });
             ValidateGetResult((Vector64<Int16>)(lowerResult), (Vector64<Int16>)(upperResult), values);
 
-            object result = typeof(Vector128<Int16>)
-                                .GetMethod(nameof(Vector128.WithLower), new Type[] { typeof(Vector64<Int16>) })
-                                .Invoke(value, new object[] { upperResult });
-            result = typeof(Vector128<Int16>)
-                        .GetMethod(nameof(Vector128.WithUpper), new Type[] { typeof(Vector64<Int16>) })
-                        .Invoke(result, new object[] { lowerResult });
+            object result = typeof(Vector128)
+                                .GetMethod(nameof(Vector128.WithLower))
+                                .MakeGenericMethod(typeof(Int16))
+                                .Invoke(null, new object[] { value, upperResult });
+            result = typeof(Vector128)
+                        .GetMethod(nameof(Vector128.WithUpper))
+                        .MakeGenericMethod(typeof(Int16))
+                        .Invoke(null, new object[] { result, lowerResult });
             ValidateWithResult((Vector128<Int16>)(result), values);
         }
 
index cf470eb..df2aee4 100644 (file)
@@ -78,20 +78,24 @@ namespace JIT.HardwareIntrinsics.General
 
             Vector128<Int32> value = Vector128.Create(values[0], values[1], values[2], values[3]);
 
-            object lowerResult = typeof(Vector128<Int32>)
-                                    .GetMethod(nameof(Vector128.GetLower), new Type[] { })
-                                    .Invoke(value, new object[] { });
-            object upperResult = typeof(Vector128<Int32>)
-                                    .GetMethod(nameof(Vector128.GetUpper), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object lowerResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.GetLower))
+                                    .MakeGenericMethod(typeof(Int32))
+                                    .Invoke(null, new object[] { value });
+            object upperResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.GetUpper))
+                                    .MakeGenericMethod(typeof(Int32))
+                                    .Invoke(null, new object[] { value });
             ValidateGetResult((Vector64<Int32>)(lowerResult), (Vector64<Int32>)(upperResult), values);
 
-            object result = typeof(Vector128<Int32>)
-                                .GetMethod(nameof(Vector128.WithLower), new Type[] { typeof(Vector64<Int32>) })
-                                .Invoke(value, new object[] { upperResult });
-            result = typeof(Vector128<Int32>)
-                        .GetMethod(nameof(Vector128.WithUpper), new Type[] { typeof(Vector64<Int32>) })
-                        .Invoke(result, new object[] { lowerResult });
+            object result = typeof(Vector128)
+                                .GetMethod(nameof(Vector128.WithLower))
+                                .MakeGenericMethod(typeof(Int32))
+                                .Invoke(null, new object[] { value, upperResult });
+            result = typeof(Vector128)
+                        .GetMethod(nameof(Vector128.WithUpper))
+                        .MakeGenericMethod(typeof(Int32))
+                        .Invoke(null, new object[] { result, lowerResult });
             ValidateWithResult((Vector128<Int32>)(result), values);
         }
 
index 0c200fd..6408966 100644 (file)
@@ -78,20 +78,24 @@ namespace JIT.HardwareIntrinsics.General
 
             Vector128<Int64> value = Vector128.Create(values[0], values[1]);
 
-            object lowerResult = typeof(Vector128<Int64>)
-                                    .GetMethod(nameof(Vector128.GetLower), new Type[] { })
-                                    .Invoke(value, new object[] { });
-            object upperResult = typeof(Vector128<Int64>)
-                                    .GetMethod(nameof(Vector128.GetUpper), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object lowerResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.GetLower))
+                                    .MakeGenericMethod(typeof(Int64))
+                                    .Invoke(null, new object[] { value });
+            object upperResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.GetUpper))
+                                    .MakeGenericMethod(typeof(Int64))
+                                    .Invoke(null, new object[] { value });
             ValidateGetResult((Vector64<Int64>)(lowerResult), (Vector64<Int64>)(upperResult), values);
 
-            object result = typeof(Vector128<Int64>)
-                                .GetMethod(nameof(Vector128.WithLower), new Type[] { typeof(Vector64<Int64>) })
-                                .Invoke(value, new object[] { upperResult });
-            result = typeof(Vector128<Int64>)
-                        .GetMethod(nameof(Vector128.WithUpper), new Type[] { typeof(Vector64<Int64>) })
-                        .Invoke(result, new object[] { lowerResult });
+            object result = typeof(Vector128)
+                                .GetMethod(nameof(Vector128.WithLower))
+                                .MakeGenericMethod(typeof(Int64))
+                                .Invoke(null, new object[] { value, upperResult });
+            result = typeof(Vector128)
+                        .GetMethod(nameof(Vector128.WithUpper))
+                        .MakeGenericMethod(typeof(Int64))
+                        .Invoke(null, new object[] { result, lowerResult });
             ValidateWithResult((Vector128<Int64>)(result), values);
         }
 
index 18ff329..6c0fea2 100644 (file)
@@ -78,20 +78,24 @@ namespace JIT.HardwareIntrinsics.General
 
             Vector128<SByte> value = Vector128.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15]);
 
-            object lowerResult = typeof(Vector128<SByte>)
-                                    .GetMethod(nameof(Vector128.GetLower), new Type[] { })
-                                    .Invoke(value, new object[] { });
-            object upperResult = typeof(Vector128<SByte>)
-                                    .GetMethod(nameof(Vector128.GetUpper), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object lowerResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.GetLower))
+                                    .MakeGenericMethod(typeof(SByte))
+                                    .Invoke(null, new object[] { value });
+            object upperResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.GetUpper))
+                                    .MakeGenericMethod(typeof(SByte))
+                                    .Invoke(null, new object[] { value });
             ValidateGetResult((Vector64<SByte>)(lowerResult), (Vector64<SByte>)(upperResult), values);
 
-            object result = typeof(Vector128<SByte>)
-                                .GetMethod(nameof(Vector128.WithLower), new Type[] { typeof(Vector64<SByte>) })
-                                .Invoke(value, new object[] { upperResult });
-            result = typeof(Vector128<SByte>)
-                        .GetMethod(nameof(Vector128.WithUpper), new Type[] { typeof(Vector64<SByte>) })
-                        .Invoke(result, new object[] { lowerResult });
+            object result = typeof(Vector128)
+                                .GetMethod(nameof(Vector128.WithLower))
+                                .MakeGenericMethod(typeof(SByte))
+                                .Invoke(null, new object[] { value, upperResult });
+            result = typeof(Vector128)
+                        .GetMethod(nameof(Vector128.WithUpper))
+                        .MakeGenericMethod(typeof(SByte))
+                        .Invoke(null, new object[] { result, lowerResult });
             ValidateWithResult((Vector128<SByte>)(result), values);
         }
 
index 8ca3f9a..5914b30 100644 (file)
@@ -78,20 +78,24 @@ namespace JIT.HardwareIntrinsics.General
 
             Vector128<Single> value = Vector128.Create(values[0], values[1], values[2], values[3]);
 
-            object lowerResult = typeof(Vector128<Single>)
-                                    .GetMethod(nameof(Vector128.GetLower), new Type[] { })
-                                    .Invoke(value, new object[] { });
-            object upperResult = typeof(Vector128<Single>)
-                                    .GetMethod(nameof(Vector128.GetUpper), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object lowerResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.GetLower))
+                                    .MakeGenericMethod(typeof(Single))
+                                    .Invoke(null, new object[] { value });
+            object upperResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.GetUpper))
+                                    .MakeGenericMethod(typeof(Single))
+                                    .Invoke(null, new object[] { value });
             ValidateGetResult((Vector64<Single>)(lowerResult), (Vector64<Single>)(upperResult), values);
 
-            object result = typeof(Vector128<Single>)
-                                .GetMethod(nameof(Vector128.WithLower), new Type[] { typeof(Vector64<Single>) })
-                                .Invoke(value, new object[] { upperResult });
-            result = typeof(Vector128<Single>)
-                        .GetMethod(nameof(Vector128.WithUpper), new Type[] { typeof(Vector64<Single>) })
-                        .Invoke(result, new object[] { lowerResult });
+            object result = typeof(Vector128)
+                                .GetMethod(nameof(Vector128.WithLower))
+                                .MakeGenericMethod(typeof(Single))
+                                .Invoke(null, new object[] { value, upperResult });
+            result = typeof(Vector128)
+                        .GetMethod(nameof(Vector128.WithUpper))
+                        .MakeGenericMethod(typeof(Single))
+                        .Invoke(null, new object[] { result, lowerResult });
             ValidateWithResult((Vector128<Single>)(result), values);
         }
 
index b904c76..b25d023 100644 (file)
@@ -78,20 +78,24 @@ namespace JIT.HardwareIntrinsics.General
 
             Vector128<UInt16> value = Vector128.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]);
 
-            object lowerResult = typeof(Vector128<UInt16>)
-                                    .GetMethod(nameof(Vector128.GetLower), new Type[] { })
-                                    .Invoke(value, new object[] { });
-            object upperResult = typeof(Vector128<UInt16>)
-                                    .GetMethod(nameof(Vector128.GetUpper), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object lowerResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.GetLower))
+                                    .MakeGenericMethod(typeof(UInt16))
+                                    .Invoke(null, new object[] { value });
+            object upperResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.GetUpper))
+                                    .MakeGenericMethod(typeof(UInt16))
+                                    .Invoke(null, new object[] { value });
             ValidateGetResult((Vector64<UInt16>)(lowerResult), (Vector64<UInt16>)(upperResult), values);
 
-            object result = typeof(Vector128<UInt16>)
-                                .GetMethod(nameof(Vector128.WithLower), new Type[] { typeof(Vector64<UInt16>) })
-                                .Invoke(value, new object[] { upperResult });
-            result = typeof(Vector128<UInt16>)
-                        .GetMethod(nameof(Vector128.WithUpper), new Type[] { typeof(Vector64<UInt16>) })
-                        .Invoke(result, new object[] { lowerResult });
+            object result = typeof(Vector128)
+                                .GetMethod(nameof(Vector128.WithLower))
+                                .MakeGenericMethod(typeof(UInt16))
+                                .Invoke(null, new object[] { value, upperResult });
+            result = typeof(Vector128)
+                        .GetMethod(nameof(Vector128.WithUpper))
+                        .MakeGenericMethod(typeof(UInt16))
+                        .Invoke(null, new object[] { result, lowerResult });
             ValidateWithResult((Vector128<UInt16>)(result), values);
         }
 
index fec5894..7a6ae4d 100644 (file)
@@ -78,20 +78,24 @@ namespace JIT.HardwareIntrinsics.General
 
             Vector128<UInt32> value = Vector128.Create(values[0], values[1], values[2], values[3]);
 
-            object lowerResult = typeof(Vector128<UInt32>)
-                                    .GetMethod(nameof(Vector128.GetLower), new Type[] { })
-                                    .Invoke(value, new object[] { });
-            object upperResult = typeof(Vector128<UInt32>)
-                                    .GetMethod(nameof(Vector128.GetUpper), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object lowerResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.GetLower))
+                                    .MakeGenericMethod(typeof(UInt32))
+                                    .Invoke(null, new object[] { value });
+            object upperResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.GetUpper))
+                                    .MakeGenericMethod(typeof(UInt32))
+                                    .Invoke(null, new object[] { value });
             ValidateGetResult((Vector64<UInt32>)(lowerResult), (Vector64<UInt32>)(upperResult), values);
 
-            object result = typeof(Vector128<UInt32>)
-                                .GetMethod(nameof(Vector128.WithLower), new Type[] { typeof(Vector64<UInt32>) })
-                                .Invoke(value, new object[] { upperResult });
-            result = typeof(Vector128<UInt32>)
-                        .GetMethod(nameof(Vector128.WithUpper), new Type[] { typeof(Vector64<UInt32>) })
-                        .Invoke(result, new object[] { lowerResult });
+            object result = typeof(Vector128)
+                                .GetMethod(nameof(Vector128.WithLower))
+                                .MakeGenericMethod(typeof(UInt32))
+                                .Invoke(null, new object[] { value, upperResult });
+            result = typeof(Vector128)
+                        .GetMethod(nameof(Vector128.WithUpper))
+                        .MakeGenericMethod(typeof(UInt32))
+                        .Invoke(null, new object[] { result, lowerResult });
             ValidateWithResult((Vector128<UInt32>)(result), values);
         }
 
index 052ab00..deb8448 100644 (file)
@@ -78,20 +78,24 @@ namespace JIT.HardwareIntrinsics.General
 
             Vector128<UInt64> value = Vector128.Create(values[0], values[1]);
 
-            object lowerResult = typeof(Vector128<UInt64>)
-                                    .GetMethod(nameof(Vector128.GetLower), new Type[] { })
-                                    .Invoke(value, new object[] { });
-            object upperResult = typeof(Vector128<UInt64>)
-                                    .GetMethod(nameof(Vector128.GetUpper), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object lowerResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.GetLower))
+                                    .MakeGenericMethod(typeof(UInt64))
+                                    .Invoke(null, new object[] { value });
+            object upperResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.GetUpper))
+                                    .MakeGenericMethod(typeof(UInt64))
+                                    .Invoke(null, new object[] { value });
             ValidateGetResult((Vector64<UInt64>)(lowerResult), (Vector64<UInt64>)(upperResult), values);
 
-            object result = typeof(Vector128<UInt64>)
-                                .GetMethod(nameof(Vector128.WithLower), new Type[] { typeof(Vector64<UInt64>) })
-                                .Invoke(value, new object[] { upperResult });
-            result = typeof(Vector128<UInt64>)
-                        .GetMethod(nameof(Vector128.WithUpper), new Type[] { typeof(Vector64<UInt64>) })
-                        .Invoke(result, new object[] { lowerResult });
+            object result = typeof(Vector128)
+                                .GetMethod(nameof(Vector128.WithLower))
+                                .MakeGenericMethod(typeof(UInt64))
+                                .Invoke(null, new object[] { value, upperResult });
+            result = typeof(Vector128)
+                        .GetMethod(nameof(Vector128.WithUpper))
+                        .MakeGenericMethod(typeof(UInt64))
+                        .Invoke(null, new object[] { result, lowerResult });
             ValidateWithResult((Vector128<UInt64>)(result), values);
         }
 
index 480dbcb..c7b8ff4 100644 (file)
@@ -73,9 +73,10 @@ namespace JIT.HardwareIntrinsics.General
 
             Vector128<Byte> value = Vector128.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15]);
 
-            object result = typeof(Vector128<Byte>)
-                                .GetMethod(nameof(Vector128.ToScalar), new Type[] { })
-                                .Invoke(value, new object[] { });
+            object result = typeof(Vector128)
+                                .GetMethod(nameof(Vector128.ToScalar))
+                                .MakeGenericMethod(typeof(Byte))
+                                .Invoke(null, new object[] { value });
 
             ValidateResult((Byte)(result), values);
         }
index 902fb48..16beafa 100644 (file)
@@ -73,9 +73,10 @@ namespace JIT.HardwareIntrinsics.General
 
             Vector128<Double> value = Vector128.Create(values[0], values[1]);
 
-            object result = typeof(Vector128<Double>)
-                                .GetMethod(nameof(Vector128.ToScalar), new Type[] { })
-                                .Invoke(value, new object[] { });
+            object result = typeof(Vector128)
+                                .GetMethod(nameof(Vector128.ToScalar))
+                                .MakeGenericMethod(typeof(Double))
+                                .Invoke(null, new object[] { value });
 
             ValidateResult((Double)(result), values);
         }
index 3e2809e..814508a 100644 (file)
@@ -73,9 +73,10 @@ namespace JIT.HardwareIntrinsics.General
 
             Vector128<Int16> value = Vector128.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]);
 
-            object result = typeof(Vector128<Int16>)
-                                .GetMethod(nameof(Vector128.ToScalar), new Type[] { })
-                                .Invoke(value, new object[] { });
+            object result = typeof(Vector128)
+                                .GetMethod(nameof(Vector128.ToScalar))
+                                .MakeGenericMethod(typeof(Int16))
+                                .Invoke(null, new object[] { value });
 
             ValidateResult((Int16)(result), values);
         }
index 6e960f8..be6037e 100644 (file)
@@ -73,9 +73,10 @@ namespace JIT.HardwareIntrinsics.General
 
             Vector128<Int32> value = Vector128.Create(values[0], values[1], values[2], values[3]);
 
-            object result = typeof(Vector128<Int32>)
-                                .GetMethod(nameof(Vector128.ToScalar), new Type[] { })
-                                .Invoke(value, new object[] { });
+            object result = typeof(Vector128)
+                                .GetMethod(nameof(Vector128.ToScalar))
+                                .MakeGenericMethod(typeof(Int32))
+                                .Invoke(null, new object[] { value });
 
             ValidateResult((Int32)(result), values);
         }
index 50f2df5..75f18dc 100644 (file)
@@ -73,9 +73,10 @@ namespace JIT.HardwareIntrinsics.General
 
             Vector128<Int64> value = Vector128.Create(values[0], values[1]);
 
-            object result = typeof(Vector128<Int64>)
-                                .GetMethod(nameof(Vector128.ToScalar), new Type[] { })
-                                .Invoke(value, new object[] { });
+            object result = typeof(Vector128)
+                                .GetMethod(nameof(Vector128.ToScalar))
+                                .MakeGenericMethod(typeof(Int64))
+                                .Invoke(null, new object[] { value });
 
             ValidateResult((Int64)(result), values);
         }
index 50c6da0..393db30 100644 (file)
@@ -73,9 +73,10 @@ namespace JIT.HardwareIntrinsics.General
 
             Vector128<SByte> value = Vector128.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15]);
 
-            object result = typeof(Vector128<SByte>)
-                                .GetMethod(nameof(Vector128.ToScalar), new Type[] { })
-                                .Invoke(value, new object[] { });
+            object result = typeof(Vector128)
+                                .GetMethod(nameof(Vector128.ToScalar))
+                                .MakeGenericMethod(typeof(SByte))
+                                .Invoke(null, new object[] { value });
 
             ValidateResult((SByte)(result), values);
         }
index 51dca05..8052fc9 100644 (file)
@@ -73,9 +73,10 @@ namespace JIT.HardwareIntrinsics.General
 
             Vector128<Single> value = Vector128.Create(values[0], values[1], values[2], values[3]);
 
-            object result = typeof(Vector128<Single>)
-                                .GetMethod(nameof(Vector128.ToScalar), new Type[] { })
-                                .Invoke(value, new object[] { });
+            object result = typeof(Vector128)
+                                .GetMethod(nameof(Vector128.ToScalar))
+                                .MakeGenericMethod(typeof(Single))
+                                .Invoke(null, new object[] { value });
 
             ValidateResult((Single)(result), values);
         }
index 98833d5..b06ec8c 100644 (file)
@@ -73,9 +73,10 @@ namespace JIT.HardwareIntrinsics.General
 
             Vector128<UInt16> value = Vector128.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]);
 
-            object result = typeof(Vector128<UInt16>)
-                                .GetMethod(nameof(Vector128.ToScalar), new Type[] { })
-                                .Invoke(value, new object[] { });
+            object result = typeof(Vector128)
+                                .GetMethod(nameof(Vector128.ToScalar))
+                                .MakeGenericMethod(typeof(UInt16))
+                                .Invoke(null, new object[] { value });
 
             ValidateResult((UInt16)(result), values);
         }
index b012dec..e542d0c 100644 (file)
@@ -73,9 +73,10 @@ namespace JIT.HardwareIntrinsics.General
 
             Vector128<UInt32> value = Vector128.Create(values[0], values[1], values[2], values[3]);
 
-            object result = typeof(Vector128<UInt32>)
-                                .GetMethod(nameof(Vector128.ToScalar), new Type[] { })
-                                .Invoke(value, new object[] { });
+            object result = typeof(Vector128)
+                                .GetMethod(nameof(Vector128.ToScalar))
+                                .MakeGenericMethod(typeof(UInt32))
+                                .Invoke(null, new object[] { value });
 
             ValidateResult((UInt32)(result), values);
         }
index 228d96d..5255407 100644 (file)
@@ -73,9 +73,10 @@ namespace JIT.HardwareIntrinsics.General
 
             Vector128<UInt64> value = Vector128.Create(values[0], values[1]);
 
-            object result = typeof(Vector128<UInt64>)
-                                .GetMethod(nameof(Vector128.ToScalar), new Type[] { })
-                                .Invoke(value, new object[] { });
+            object result = typeof(Vector128)
+                                .GetMethod(nameof(Vector128.ToScalar))
+                                .MakeGenericMethod(typeof(UInt64))
+                                .Invoke(null, new object[] { value });
 
             ValidateResult((UInt64)(result), values);
         }
index 9e99f0d..1dbfe70 100644 (file)
@@ -76,14 +76,16 @@ namespace JIT.HardwareIntrinsics.General
 
             Vector128<Byte> value = Vector128.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15]);
 
-            object result = typeof(Vector128<Byte>)
-                                .GetMethod(nameof(Vector128.ToVector256), new Type[] { })
-                                .Invoke(value, new object[] { });
+            object result = typeof(Vector128)
+                                .GetMethod(nameof(Vector128.ToVector256))
+                                .MakeGenericMethod(typeof(Byte))
+                                .Invoke(null, new object[] { value });
             ValidateResult((Vector256<Byte>)(result), values, isUnsafe: false);
 
-            object unsafeResult = typeof(Vector128<Byte>)
-                                    .GetMethod(nameof(Vector128.ToVector256), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object unsafeResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.ToVector256))
+                                    .MakeGenericMethod(typeof(Byte))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector256<Byte>)(unsafeResult), values, isUnsafe: true);
         }
 
index 4af41ac..4d1917b 100644 (file)
@@ -76,14 +76,16 @@ namespace JIT.HardwareIntrinsics.General
 
             Vector128<Double> value = Vector128.Create(values[0], values[1]);
 
-            object result = typeof(Vector128<Double>)
-                                .GetMethod(nameof(Vector128.ToVector256), new Type[] { })
-                                .Invoke(value, new object[] { });
+            object result = typeof(Vector128)
+                                .GetMethod(nameof(Vector128.ToVector256))
+                                .MakeGenericMethod(typeof(Double))
+                                .Invoke(null, new object[] { value });
             ValidateResult((Vector256<Double>)(result), values, isUnsafe: false);
 
-            object unsafeResult = typeof(Vector128<Double>)
-                                    .GetMethod(nameof(Vector128.ToVector256), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object unsafeResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.ToVector256))
+                                    .MakeGenericMethod(typeof(Double))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector256<Double>)(unsafeResult), values, isUnsafe: true);
         }
 
index 585953e..cdf5482 100644 (file)
@@ -76,14 +76,16 @@ namespace JIT.HardwareIntrinsics.General
 
             Vector128<Int16> value = Vector128.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]);
 
-            object result = typeof(Vector128<Int16>)
-                                .GetMethod(nameof(Vector128.ToVector256), new Type[] { })
-                                .Invoke(value, new object[] { });
+            object result = typeof(Vector128)
+                                .GetMethod(nameof(Vector128.ToVector256))
+                                .MakeGenericMethod(typeof(Int16))
+                                .Invoke(null, new object[] { value });
             ValidateResult((Vector256<Int16>)(result), values, isUnsafe: false);
 
-            object unsafeResult = typeof(Vector128<Int16>)
-                                    .GetMethod(nameof(Vector128.ToVector256), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object unsafeResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.ToVector256))
+                                    .MakeGenericMethod(typeof(Int16))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector256<Int16>)(unsafeResult), values, isUnsafe: true);
         }
 
index bf6d554..5871923 100644 (file)
@@ -76,14 +76,16 @@ namespace JIT.HardwareIntrinsics.General
 
             Vector128<Int32> value = Vector128.Create(values[0], values[1], values[2], values[3]);
 
-            object result = typeof(Vector128<Int32>)
-                                .GetMethod(nameof(Vector128.ToVector256), new Type[] { })
-                                .Invoke(value, new object[] { });
+            object result = typeof(Vector128)
+                                .GetMethod(nameof(Vector128.ToVector256))
+                                .MakeGenericMethod(typeof(Int32))
+                                .Invoke(null, new object[] { value });
             ValidateResult((Vector256<Int32>)(result), values, isUnsafe: false);
 
-            object unsafeResult = typeof(Vector128<Int32>)
-                                    .GetMethod(nameof(Vector128.ToVector256), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object unsafeResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.ToVector256))
+                                    .MakeGenericMethod(typeof(Int32))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector256<Int32>)(unsafeResult), values, isUnsafe: true);
         }
 
index 5b634c8..64d1653 100644 (file)
@@ -76,14 +76,16 @@ namespace JIT.HardwareIntrinsics.General
 
             Vector128<Int64> value = Vector128.Create(values[0], values[1]);
 
-            object result = typeof(Vector128<Int64>)
-                                .GetMethod(nameof(Vector128.ToVector256), new Type[] { })
-                                .Invoke(value, new object[] { });
+            object result = typeof(Vector128)
+                                .GetMethod(nameof(Vector128.ToVector256))
+                                .MakeGenericMethod(typeof(Int64))
+                                .Invoke(null, new object[] { value });
             ValidateResult((Vector256<Int64>)(result), values, isUnsafe: false);
 
-            object unsafeResult = typeof(Vector128<Int64>)
-                                    .GetMethod(nameof(Vector128.ToVector256), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object unsafeResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.ToVector256))
+                                    .MakeGenericMethod(typeof(Int64))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector256<Int64>)(unsafeResult), values, isUnsafe: true);
         }
 
index 3e45e57..3bb6fb4 100644 (file)
@@ -76,14 +76,16 @@ namespace JIT.HardwareIntrinsics.General
 
             Vector128<SByte> value = Vector128.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15]);
 
-            object result = typeof(Vector128<SByte>)
-                                .GetMethod(nameof(Vector128.ToVector256), new Type[] { })
-                                .Invoke(value, new object[] { });
+            object result = typeof(Vector128)
+                                .GetMethod(nameof(Vector128.ToVector256))
+                                .MakeGenericMethod(typeof(SByte))
+                                .Invoke(null, new object[] { value });
             ValidateResult((Vector256<SByte>)(result), values, isUnsafe: false);
 
-            object unsafeResult = typeof(Vector128<SByte>)
-                                    .GetMethod(nameof(Vector128.ToVector256), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object unsafeResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.ToVector256))
+                                    .MakeGenericMethod(typeof(SByte))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector256<SByte>)(unsafeResult), values, isUnsafe: true);
         }
 
index 5943dd4..0a01c79 100644 (file)
@@ -76,14 +76,16 @@ namespace JIT.HardwareIntrinsics.General
 
             Vector128<Single> value = Vector128.Create(values[0], values[1], values[2], values[3]);
 
-            object result = typeof(Vector128<Single>)
-                                .GetMethod(nameof(Vector128.ToVector256), new Type[] { })
-                                .Invoke(value, new object[] { });
+            object result = typeof(Vector128)
+                                .GetMethod(nameof(Vector128.ToVector256))
+                                .MakeGenericMethod(typeof(Single))
+                                .Invoke(null, new object[] { value });
             ValidateResult((Vector256<Single>)(result), values, isUnsafe: false);
 
-            object unsafeResult = typeof(Vector128<Single>)
-                                    .GetMethod(nameof(Vector128.ToVector256), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object unsafeResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.ToVector256))
+                                    .MakeGenericMethod(typeof(Single))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector256<Single>)(unsafeResult), values, isUnsafe: true);
         }
 
index 72be04b..a5d3bf6 100644 (file)
@@ -76,14 +76,16 @@ namespace JIT.HardwareIntrinsics.General
 
             Vector128<UInt16> value = Vector128.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]);
 
-            object result = typeof(Vector128<UInt16>)
-                                .GetMethod(nameof(Vector128.ToVector256), new Type[] { })
-                                .Invoke(value, new object[] { });
+            object result = typeof(Vector128)
+                                .GetMethod(nameof(Vector128.ToVector256))
+                                .MakeGenericMethod(typeof(UInt16))
+                                .Invoke(null, new object[] { value });
             ValidateResult((Vector256<UInt16>)(result), values, isUnsafe: false);
 
-            object unsafeResult = typeof(Vector128<UInt16>)
-                                    .GetMethod(nameof(Vector128.ToVector256), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object unsafeResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.ToVector256))
+                                    .MakeGenericMethod(typeof(UInt16))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector256<UInt16>)(unsafeResult), values, isUnsafe: true);
         }
 
index d287820..9e85eee 100644 (file)
@@ -76,14 +76,16 @@ namespace JIT.HardwareIntrinsics.General
 
             Vector128<UInt32> value = Vector128.Create(values[0], values[1], values[2], values[3]);
 
-            object result = typeof(Vector128<UInt32>)
-                                .GetMethod(nameof(Vector128.ToVector256), new Type[] { })
-                                .Invoke(value, new object[] { });
+            object result = typeof(Vector128)
+                                .GetMethod(nameof(Vector128.ToVector256))
+                                .MakeGenericMethod(typeof(UInt32))
+                                .Invoke(null, new object[] { value });
             ValidateResult((Vector256<UInt32>)(result), values, isUnsafe: false);
 
-            object unsafeResult = typeof(Vector128<UInt32>)
-                                    .GetMethod(nameof(Vector128.ToVector256), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object unsafeResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.ToVector256))
+                                    .MakeGenericMethod(typeof(UInt32))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector256<UInt32>)(unsafeResult), values, isUnsafe: true);
         }
 
index 0ca70fe..2faa35e 100644 (file)
@@ -76,14 +76,16 @@ namespace JIT.HardwareIntrinsics.General
 
             Vector128<UInt64> value = Vector128.Create(values[0], values[1]);
 
-            object result = typeof(Vector128<UInt64>)
-                                .GetMethod(nameof(Vector128.ToVector256), new Type[] { })
-                                .Invoke(value, new object[] { });
+            object result = typeof(Vector128)
+                                .GetMethod(nameof(Vector128.ToVector256))
+                                .MakeGenericMethod(typeof(UInt64))
+                                .Invoke(null, new object[] { value });
             ValidateResult((Vector256<UInt64>)(result), values, isUnsafe: false);
 
-            object unsafeResult = typeof(Vector128<UInt64>)
-                                    .GetMethod(nameof(Vector128.ToVector256), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object unsafeResult = typeof(Vector128)
+                                    .GetMethod(nameof(Vector128.ToVector256))
+                                    .MakeGenericMethod(typeof(UInt64))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector256<UInt64>)(unsafeResult), values, isUnsafe: true);
         }
 
index c9f1d18..2015313 100644 (file)
@@ -144,63 +144,73 @@ namespace JIT.HardwareIntrinsics.General
             Vector256<Byte> value;
 
             value = Vector256.Create(TestLibrary.Generator.GetByte());
-            object byteResult = typeof(Vector256<Byte>)
-                                    .GetMethod(nameof(Vector256.AsByte), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object byteResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.AsByte))
+                                    .MakeGenericMethod(typeof(Byte))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector256<byte>)(byteResult), value);
 
             value = Vector256.Create(TestLibrary.Generator.GetByte());
-            object doubleResult = typeof(Vector256<Byte>)
-                                    .GetMethod(nameof(Vector256.AsDouble), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object doubleResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.AsDouble))
+                                    .MakeGenericMethod(typeof(Byte))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector256<double>)(doubleResult), value);
 
             value = Vector256.Create(TestLibrary.Generator.GetByte());
-            object shortResult = typeof(Vector256<Byte>)
-                                    .GetMethod(nameof(Vector256.AsInt16), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object shortResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.AsInt16))
+                                    .MakeGenericMethod(typeof(Byte))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector256<short>)(shortResult), value);
 
             value = Vector256.Create(TestLibrary.Generator.GetByte());
-            object intResult = typeof(Vector256<Byte>)
-                                    .GetMethod(nameof(Vector256.AsInt32), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object intResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.AsInt32))
+                                    .MakeGenericMethod(typeof(Byte))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector256<int>)(intResult), value);
 
             value = Vector256.Create(TestLibrary.Generator.GetByte());
-            object longResult = typeof(Vector256<Byte>)
-                                    .GetMethod(nameof(Vector256.AsInt64), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object longResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.AsInt64))
+                                    .MakeGenericMethod(typeof(Byte))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector256<long>)(longResult), value);
 
             value = Vector256.Create(TestLibrary.Generator.GetByte());
-            object sbyteResult = typeof(Vector256<Byte>)
-                                    .GetMethod(nameof(Vector256.AsSByte), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object sbyteResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.AsSByte))
+                                    .MakeGenericMethod(typeof(Byte))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector256<sbyte>)(sbyteResult), value);
 
             value = Vector256.Create(TestLibrary.Generator.GetByte());
-            object floatResult = typeof(Vector256<Byte>)
-                                    .GetMethod(nameof(Vector256.AsSingle), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object floatResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.AsSingle))
+                                    .MakeGenericMethod(typeof(Byte))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector256<float>)(floatResult), value);
 
             value = Vector256.Create(TestLibrary.Generator.GetByte());
-            object ushortResult = typeof(Vector256<Byte>)
-                                    .GetMethod(nameof(Vector256.AsUInt16), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object ushortResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.AsUInt16))
+                                    .MakeGenericMethod(typeof(Byte))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector256<ushort>)(ushortResult), value);
 
             value = Vector256.Create(TestLibrary.Generator.GetByte());
-            object uintResult = typeof(Vector256<Byte>)
-                                    .GetMethod(nameof(Vector256.AsUInt32), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object uintResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.AsUInt32))
+                                    .MakeGenericMethod(typeof(Byte))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector256<uint>)(uintResult), value);
 
             value = Vector256.Create(TestLibrary.Generator.GetByte());
-            object ulongResult = typeof(Vector256<Byte>)
-                                    .GetMethod(nameof(Vector256.AsUInt64), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object ulongResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.AsUInt64))
+                                    .MakeGenericMethod(typeof(Byte))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector256<ulong>)(ulongResult), value);
         }
 
index d6d427a..69f4e01 100644 (file)
@@ -144,63 +144,73 @@ namespace JIT.HardwareIntrinsics.General
             Vector256<Double> value;
 
             value = Vector256.Create(TestLibrary.Generator.GetDouble());
-            object byteResult = typeof(Vector256<Double>)
-                                    .GetMethod(nameof(Vector256.AsByte), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object byteResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.AsByte))
+                                    .MakeGenericMethod(typeof(Double))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector256<byte>)(byteResult), value);
 
             value = Vector256.Create(TestLibrary.Generator.GetDouble());
-            object doubleResult = typeof(Vector256<Double>)
-                                    .GetMethod(nameof(Vector256.AsDouble), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object doubleResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.AsDouble))
+                                    .MakeGenericMethod(typeof(Double))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector256<double>)(doubleResult), value);
 
             value = Vector256.Create(TestLibrary.Generator.GetDouble());
-            object shortResult = typeof(Vector256<Double>)
-                                    .GetMethod(nameof(Vector256.AsInt16), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object shortResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.AsInt16))
+                                    .MakeGenericMethod(typeof(Double))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector256<short>)(shortResult), value);
 
             value = Vector256.Create(TestLibrary.Generator.GetDouble());
-            object intResult = typeof(Vector256<Double>)
-                                    .GetMethod(nameof(Vector256.AsInt32), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object intResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.AsInt32))
+                                    .MakeGenericMethod(typeof(Double))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector256<int>)(intResult), value);
 
             value = Vector256.Create(TestLibrary.Generator.GetDouble());
-            object longResult = typeof(Vector256<Double>)
-                                    .GetMethod(nameof(Vector256.AsInt64), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object longResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.AsInt64))
+                                    .MakeGenericMethod(typeof(Double))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector256<long>)(longResult), value);
 
             value = Vector256.Create(TestLibrary.Generator.GetDouble());
-            object sbyteResult = typeof(Vector256<Double>)
-                                    .GetMethod(nameof(Vector256.AsSByte), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object sbyteResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.AsSByte))
+                                    .MakeGenericMethod(typeof(Double))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector256<sbyte>)(sbyteResult), value);
 
             value = Vector256.Create(TestLibrary.Generator.GetDouble());
-            object floatResult = typeof(Vector256<Double>)
-                                    .GetMethod(nameof(Vector256.AsSingle), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object floatResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.AsSingle))
+                                    .MakeGenericMethod(typeof(Double))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector256<float>)(floatResult), value);
 
             value = Vector256.Create(TestLibrary.Generator.GetDouble());
-            object ushortResult = typeof(Vector256<Double>)
-                                    .GetMethod(nameof(Vector256.AsUInt16), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object ushortResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.AsUInt16))
+                                    .MakeGenericMethod(typeof(Double))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector256<ushort>)(ushortResult), value);
 
             value = Vector256.Create(TestLibrary.Generator.GetDouble());
-            object uintResult = typeof(Vector256<Double>)
-                                    .GetMethod(nameof(Vector256.AsUInt32), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object uintResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.AsUInt32))
+                                    .MakeGenericMethod(typeof(Double))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector256<uint>)(uintResult), value);
 
             value = Vector256.Create(TestLibrary.Generator.GetDouble());
-            object ulongResult = typeof(Vector256<Double>)
-                                    .GetMethod(nameof(Vector256.AsUInt64), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object ulongResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.AsUInt64))
+                                    .MakeGenericMethod(typeof(Double))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector256<ulong>)(ulongResult), value);
         }
 
index d6c35d8..094971d 100644 (file)
@@ -144,63 +144,73 @@ namespace JIT.HardwareIntrinsics.General
             Vector256<Int16> value;
 
             value = Vector256.Create(TestLibrary.Generator.GetInt16());
-            object byteResult = typeof(Vector256<Int16>)
-                                    .GetMethod(nameof(Vector256.AsByte), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object byteResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.AsByte))
+                                    .MakeGenericMethod(typeof(Int16))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector256<byte>)(byteResult), value);
 
             value = Vector256.Create(TestLibrary.Generator.GetInt16());
-            object doubleResult = typeof(Vector256<Int16>)
-                                    .GetMethod(nameof(Vector256.AsDouble), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object doubleResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.AsDouble))
+                                    .MakeGenericMethod(typeof(Int16))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector256<double>)(doubleResult), value);
 
             value = Vector256.Create(TestLibrary.Generator.GetInt16());
-            object shortResult = typeof(Vector256<Int16>)
-                                    .GetMethod(nameof(Vector256.AsInt16), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object shortResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.AsInt16))
+                                    .MakeGenericMethod(typeof(Int16))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector256<short>)(shortResult), value);
 
             value = Vector256.Create(TestLibrary.Generator.GetInt16());
-            object intResult = typeof(Vector256<Int16>)
-                                    .GetMethod(nameof(Vector256.AsInt32), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object intResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.AsInt32))
+                                    .MakeGenericMethod(typeof(Int16))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector256<int>)(intResult), value);
 
             value = Vector256.Create(TestLibrary.Generator.GetInt16());
-            object longResult = typeof(Vector256<Int16>)
-                                    .GetMethod(nameof(Vector256.AsInt64), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object longResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.AsInt64))
+                                    .MakeGenericMethod(typeof(Int16))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector256<long>)(longResult), value);
 
             value = Vector256.Create(TestLibrary.Generator.GetInt16());
-            object sbyteResult = typeof(Vector256<Int16>)
-                                    .GetMethod(nameof(Vector256.AsSByte), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object sbyteResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.AsSByte))
+                                    .MakeGenericMethod(typeof(Int16))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector256<sbyte>)(sbyteResult), value);
 
             value = Vector256.Create(TestLibrary.Generator.GetInt16());
-            object floatResult = typeof(Vector256<Int16>)
-                                    .GetMethod(nameof(Vector256.AsSingle), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object floatResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.AsSingle))
+                                    .MakeGenericMethod(typeof(Int16))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector256<float>)(floatResult), value);
 
             value = Vector256.Create(TestLibrary.Generator.GetInt16());
-            object ushortResult = typeof(Vector256<Int16>)
-                                    .GetMethod(nameof(Vector256.AsUInt16), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object ushortResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.AsUInt16))
+                                    .MakeGenericMethod(typeof(Int16))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector256<ushort>)(ushortResult), value);
 
             value = Vector256.Create(TestLibrary.Generator.GetInt16());
-            object uintResult = typeof(Vector256<Int16>)
-                                    .GetMethod(nameof(Vector256.AsUInt32), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object uintResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.AsUInt32))
+                                    .MakeGenericMethod(typeof(Int16))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector256<uint>)(uintResult), value);
 
             value = Vector256.Create(TestLibrary.Generator.GetInt16());
-            object ulongResult = typeof(Vector256<Int16>)
-                                    .GetMethod(nameof(Vector256.AsUInt64), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object ulongResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.AsUInt64))
+                                    .MakeGenericMethod(typeof(Int16))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector256<ulong>)(ulongResult), value);
         }
 
index e2b61b4..09c19be 100644 (file)
@@ -144,63 +144,73 @@ namespace JIT.HardwareIntrinsics.General
             Vector256<Int32> value;
 
             value = Vector256.Create(TestLibrary.Generator.GetInt32());
-            object byteResult = typeof(Vector256<Int32>)
-                                    .GetMethod(nameof(Vector256.AsByte), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object byteResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.AsByte))
+                                    .MakeGenericMethod(typeof(Int32))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector256<byte>)(byteResult), value);
 
             value = Vector256.Create(TestLibrary.Generator.GetInt32());
-            object doubleResult = typeof(Vector256<Int32>)
-                                    .GetMethod(nameof(Vector256.AsDouble), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object doubleResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.AsDouble))
+                                    .MakeGenericMethod(typeof(Int32))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector256<double>)(doubleResult), value);
 
             value = Vector256.Create(TestLibrary.Generator.GetInt32());
-            object shortResult = typeof(Vector256<Int32>)
-                                    .GetMethod(nameof(Vector256.AsInt16), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object shortResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.AsInt16))
+                                    .MakeGenericMethod(typeof(Int32))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector256<short>)(shortResult), value);
 
             value = Vector256.Create(TestLibrary.Generator.GetInt32());
-            object intResult = typeof(Vector256<Int32>)
-                                    .GetMethod(nameof(Vector256.AsInt32), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object intResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.AsInt32))
+                                    .MakeGenericMethod(typeof(Int32))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector256<int>)(intResult), value);
 
             value = Vector256.Create(TestLibrary.Generator.GetInt32());
-            object longResult = typeof(Vector256<Int32>)
-                                    .GetMethod(nameof(Vector256.AsInt64), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object longResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.AsInt64))
+                                    .MakeGenericMethod(typeof(Int32))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector256<long>)(longResult), value);
 
             value = Vector256.Create(TestLibrary.Generator.GetInt32());
-            object sbyteResult = typeof(Vector256<Int32>)
-                                    .GetMethod(nameof(Vector256.AsSByte), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object sbyteResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.AsSByte))
+                                    .MakeGenericMethod(typeof(Int32))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector256<sbyte>)(sbyteResult), value);
 
             value = Vector256.Create(TestLibrary.Generator.GetInt32());
-            object floatResult = typeof(Vector256<Int32>)
-                                    .GetMethod(nameof(Vector256.AsSingle), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object floatResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.AsSingle))
+                                    .MakeGenericMethod(typeof(Int32))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector256<float>)(floatResult), value);
 
             value = Vector256.Create(TestLibrary.Generator.GetInt32());
-            object ushortResult = typeof(Vector256<Int32>)
-                                    .GetMethod(nameof(Vector256.AsUInt16), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object ushortResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.AsUInt16))
+                                    .MakeGenericMethod(typeof(Int32))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector256<ushort>)(ushortResult), value);
 
             value = Vector256.Create(TestLibrary.Generator.GetInt32());
-            object uintResult = typeof(Vector256<Int32>)
-                                    .GetMethod(nameof(Vector256.AsUInt32), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object uintResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.AsUInt32))
+                                    .MakeGenericMethod(typeof(Int32))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector256<uint>)(uintResult), value);
 
             value = Vector256.Create(TestLibrary.Generator.GetInt32());
-            object ulongResult = typeof(Vector256<Int32>)
-                                    .GetMethod(nameof(Vector256.AsUInt64), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object ulongResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.AsUInt64))
+                                    .MakeGenericMethod(typeof(Int32))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector256<ulong>)(ulongResult), value);
         }
 
index f93f73c..0bea200 100644 (file)
@@ -144,63 +144,73 @@ namespace JIT.HardwareIntrinsics.General
             Vector256<Int64> value;
 
             value = Vector256.Create(TestLibrary.Generator.GetInt64());
-            object byteResult = typeof(Vector256<Int64>)
-                                    .GetMethod(nameof(Vector256.AsByte), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object byteResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.AsByte))
+                                    .MakeGenericMethod(typeof(Int64))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector256<byte>)(byteResult), value);
 
             value = Vector256.Create(TestLibrary.Generator.GetInt64());
-            object doubleResult = typeof(Vector256<Int64>)
-                                    .GetMethod(nameof(Vector256.AsDouble), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object doubleResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.AsDouble))
+                                    .MakeGenericMethod(typeof(Int64))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector256<double>)(doubleResult), value);
 
             value = Vector256.Create(TestLibrary.Generator.GetInt64());
-            object shortResult = typeof(Vector256<Int64>)
-                                    .GetMethod(nameof(Vector256.AsInt16), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object shortResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.AsInt16))
+                                    .MakeGenericMethod(typeof(Int64))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector256<short>)(shortResult), value);
 
             value = Vector256.Create(TestLibrary.Generator.GetInt64());
-            object intResult = typeof(Vector256<Int64>)
-                                    .GetMethod(nameof(Vector256.AsInt32), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object intResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.AsInt32))
+                                    .MakeGenericMethod(typeof(Int64))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector256<int>)(intResult), value);
 
             value = Vector256.Create(TestLibrary.Generator.GetInt64());
-            object longResult = typeof(Vector256<Int64>)
-                                    .GetMethod(nameof(Vector256.AsInt64), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object longResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.AsInt64))
+                                    .MakeGenericMethod(typeof(Int64))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector256<long>)(longResult), value);
 
             value = Vector256.Create(TestLibrary.Generator.GetInt64());
-            object sbyteResult = typeof(Vector256<Int64>)
-                                    .GetMethod(nameof(Vector256.AsSByte), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object sbyteResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.AsSByte))
+                                    .MakeGenericMethod(typeof(Int64))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector256<sbyte>)(sbyteResult), value);
 
             value = Vector256.Create(TestLibrary.Generator.GetInt64());
-            object floatResult = typeof(Vector256<Int64>)
-                                    .GetMethod(nameof(Vector256.AsSingle), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object floatResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.AsSingle))
+                                    .MakeGenericMethod(typeof(Int64))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector256<float>)(floatResult), value);
 
             value = Vector256.Create(TestLibrary.Generator.GetInt64());
-            object ushortResult = typeof(Vector256<Int64>)
-                                    .GetMethod(nameof(Vector256.AsUInt16), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object ushortResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.AsUInt16))
+                                    .MakeGenericMethod(typeof(Int64))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector256<ushort>)(ushortResult), value);
 
             value = Vector256.Create(TestLibrary.Generator.GetInt64());
-            object uintResult = typeof(Vector256<Int64>)
-                                    .GetMethod(nameof(Vector256.AsUInt32), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object uintResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.AsUInt32))
+                                    .MakeGenericMethod(typeof(Int64))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector256<uint>)(uintResult), value);
 
             value = Vector256.Create(TestLibrary.Generator.GetInt64());
-            object ulongResult = typeof(Vector256<Int64>)
-                                    .GetMethod(nameof(Vector256.AsUInt64), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object ulongResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.AsUInt64))
+                                    .MakeGenericMethod(typeof(Int64))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector256<ulong>)(ulongResult), value);
         }
 
index 1e541f5..3bd14a0 100644 (file)
@@ -144,63 +144,73 @@ namespace JIT.HardwareIntrinsics.General
             Vector256<SByte> value;
 
             value = Vector256.Create(TestLibrary.Generator.GetSByte());
-            object byteResult = typeof(Vector256<SByte>)
-                                    .GetMethod(nameof(Vector256.AsByte), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object byteResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.AsByte))
+                                    .MakeGenericMethod(typeof(SByte))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector256<byte>)(byteResult), value);
 
             value = Vector256.Create(TestLibrary.Generator.GetSByte());
-            object doubleResult = typeof(Vector256<SByte>)
-                                    .GetMethod(nameof(Vector256.AsDouble), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object doubleResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.AsDouble))
+                                    .MakeGenericMethod(typeof(SByte))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector256<double>)(doubleResult), value);
 
             value = Vector256.Create(TestLibrary.Generator.GetSByte());
-            object shortResult = typeof(Vector256<SByte>)
-                                    .GetMethod(nameof(Vector256.AsInt16), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object shortResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.AsInt16))
+                                    .MakeGenericMethod(typeof(SByte))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector256<short>)(shortResult), value);
 
             value = Vector256.Create(TestLibrary.Generator.GetSByte());
-            object intResult = typeof(Vector256<SByte>)
-                                    .GetMethod(nameof(Vector256.AsInt32), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object intResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.AsInt32))
+                                    .MakeGenericMethod(typeof(SByte))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector256<int>)(intResult), value);
 
             value = Vector256.Create(TestLibrary.Generator.GetSByte());
-            object longResult = typeof(Vector256<SByte>)
-                                    .GetMethod(nameof(Vector256.AsInt64), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object longResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.AsInt64))
+                                    .MakeGenericMethod(typeof(SByte))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector256<long>)(longResult), value);
 
             value = Vector256.Create(TestLibrary.Generator.GetSByte());
-            object sbyteResult = typeof(Vector256<SByte>)
-                                    .GetMethod(nameof(Vector256.AsSByte), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object sbyteResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.AsSByte))
+                                    .MakeGenericMethod(typeof(SByte))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector256<sbyte>)(sbyteResult), value);
 
             value = Vector256.Create(TestLibrary.Generator.GetSByte());
-            object floatResult = typeof(Vector256<SByte>)
-                                    .GetMethod(nameof(Vector256.AsSingle), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object floatResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.AsSingle))
+                                    .MakeGenericMethod(typeof(SByte))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector256<float>)(floatResult), value);
 
             value = Vector256.Create(TestLibrary.Generator.GetSByte());
-            object ushortResult = typeof(Vector256<SByte>)
-                                    .GetMethod(nameof(Vector256.AsUInt16), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object ushortResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.AsUInt16))
+                                    .MakeGenericMethod(typeof(SByte))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector256<ushort>)(ushortResult), value);
 
             value = Vector256.Create(TestLibrary.Generator.GetSByte());
-            object uintResult = typeof(Vector256<SByte>)
-                                    .GetMethod(nameof(Vector256.AsUInt32), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object uintResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.AsUInt32))
+                                    .MakeGenericMethod(typeof(SByte))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector256<uint>)(uintResult), value);
 
             value = Vector256.Create(TestLibrary.Generator.GetSByte());
-            object ulongResult = typeof(Vector256<SByte>)
-                                    .GetMethod(nameof(Vector256.AsUInt64), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object ulongResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.AsUInt64))
+                                    .MakeGenericMethod(typeof(SByte))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector256<ulong>)(ulongResult), value);
         }
 
index 0430abf..d921f57 100644 (file)
@@ -144,63 +144,73 @@ namespace JIT.HardwareIntrinsics.General
             Vector256<Single> value;
 
             value = Vector256.Create(TestLibrary.Generator.GetSingle());
-            object byteResult = typeof(Vector256<Single>)
-                                    .GetMethod(nameof(Vector256.AsByte), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object byteResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.AsByte))
+                                    .MakeGenericMethod(typeof(Single))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector256<byte>)(byteResult), value);
 
             value = Vector256.Create(TestLibrary.Generator.GetSingle());
-            object doubleResult = typeof(Vector256<Single>)
-                                    .GetMethod(nameof(Vector256.AsDouble), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object doubleResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.AsDouble))
+                                    .MakeGenericMethod(typeof(Single))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector256<double>)(doubleResult), value);
 
             value = Vector256.Create(TestLibrary.Generator.GetSingle());
-            object shortResult = typeof(Vector256<Single>)
-                                    .GetMethod(nameof(Vector256.AsInt16), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object shortResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.AsInt16))
+                                    .MakeGenericMethod(typeof(Single))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector256<short>)(shortResult), value);
 
             value = Vector256.Create(TestLibrary.Generator.GetSingle());
-            object intResult = typeof(Vector256<Single>)
-                                    .GetMethod(nameof(Vector256.AsInt32), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object intResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.AsInt32))
+                                    .MakeGenericMethod(typeof(Single))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector256<int>)(intResult), value);
 
             value = Vector256.Create(TestLibrary.Generator.GetSingle());
-            object longResult = typeof(Vector256<Single>)
-                                    .GetMethod(nameof(Vector256.AsInt64), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object longResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.AsInt64))
+                                    .MakeGenericMethod(typeof(Single))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector256<long>)(longResult), value);
 
             value = Vector256.Create(TestLibrary.Generator.GetSingle());
-            object sbyteResult = typeof(Vector256<Single>)
-                                    .GetMethod(nameof(Vector256.AsSByte), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object sbyteResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.AsSByte))
+                                    .MakeGenericMethod(typeof(Single))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector256<sbyte>)(sbyteResult), value);
 
             value = Vector256.Create(TestLibrary.Generator.GetSingle());
-            object floatResult = typeof(Vector256<Single>)
-                                    .GetMethod(nameof(Vector256.AsSingle), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object floatResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.AsSingle))
+                                    .MakeGenericMethod(typeof(Single))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector256<float>)(floatResult), value);
 
             value = Vector256.Create(TestLibrary.Generator.GetSingle());
-            object ushortResult = typeof(Vector256<Single>)
-                                    .GetMethod(nameof(Vector256.AsUInt16), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object ushortResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.AsUInt16))
+                                    .MakeGenericMethod(typeof(Single))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector256<ushort>)(ushortResult), value);
 
             value = Vector256.Create(TestLibrary.Generator.GetSingle());
-            object uintResult = typeof(Vector256<Single>)
-                                    .GetMethod(nameof(Vector256.AsUInt32), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object uintResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.AsUInt32))
+                                    .MakeGenericMethod(typeof(Single))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector256<uint>)(uintResult), value);
 
             value = Vector256.Create(TestLibrary.Generator.GetSingle());
-            object ulongResult = typeof(Vector256<Single>)
-                                    .GetMethod(nameof(Vector256.AsUInt64), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object ulongResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.AsUInt64))
+                                    .MakeGenericMethod(typeof(Single))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector256<ulong>)(ulongResult), value);
         }
 
index fbb2b73..02af220 100644 (file)
@@ -144,63 +144,73 @@ namespace JIT.HardwareIntrinsics.General
             Vector256<UInt16> value;
 
             value = Vector256.Create(TestLibrary.Generator.GetUInt16());
-            object byteResult = typeof(Vector256<UInt16>)
-                                    .GetMethod(nameof(Vector256.AsByte), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object byteResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.AsByte))
+                                    .MakeGenericMethod(typeof(UInt16))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector256<byte>)(byteResult), value);
 
             value = Vector256.Create(TestLibrary.Generator.GetUInt16());
-            object doubleResult = typeof(Vector256<UInt16>)
-                                    .GetMethod(nameof(Vector256.AsDouble), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object doubleResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.AsDouble))
+                                    .MakeGenericMethod(typeof(UInt16))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector256<double>)(doubleResult), value);
 
             value = Vector256.Create(TestLibrary.Generator.GetUInt16());
-            object shortResult = typeof(Vector256<UInt16>)
-                                    .GetMethod(nameof(Vector256.AsInt16), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object shortResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.AsInt16))
+                                    .MakeGenericMethod(typeof(UInt16))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector256<short>)(shortResult), value);
 
             value = Vector256.Create(TestLibrary.Generator.GetUInt16());
-            object intResult = typeof(Vector256<UInt16>)
-                                    .GetMethod(nameof(Vector256.AsInt32), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object intResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.AsInt32))
+                                    .MakeGenericMethod(typeof(UInt16))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector256<int>)(intResult), value);
 
             value = Vector256.Create(TestLibrary.Generator.GetUInt16());
-            object longResult = typeof(Vector256<UInt16>)
-                                    .GetMethod(nameof(Vector256.AsInt64), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object longResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.AsInt64))
+                                    .MakeGenericMethod(typeof(UInt16))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector256<long>)(longResult), value);
 
             value = Vector256.Create(TestLibrary.Generator.GetUInt16());
-            object sbyteResult = typeof(Vector256<UInt16>)
-                                    .GetMethod(nameof(Vector256.AsSByte), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object sbyteResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.AsSByte))
+                                    .MakeGenericMethod(typeof(UInt16))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector256<sbyte>)(sbyteResult), value);
 
             value = Vector256.Create(TestLibrary.Generator.GetUInt16());
-            object floatResult = typeof(Vector256<UInt16>)
-                                    .GetMethod(nameof(Vector256.AsSingle), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object floatResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.AsSingle))
+                                    .MakeGenericMethod(typeof(UInt16))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector256<float>)(floatResult), value);
 
             value = Vector256.Create(TestLibrary.Generator.GetUInt16());
-            object ushortResult = typeof(Vector256<UInt16>)
-                                    .GetMethod(nameof(Vector256.AsUInt16), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object ushortResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.AsUInt16))
+                                    .MakeGenericMethod(typeof(UInt16))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector256<ushort>)(ushortResult), value);
 
             value = Vector256.Create(TestLibrary.Generator.GetUInt16());
-            object uintResult = typeof(Vector256<UInt16>)
-                                    .GetMethod(nameof(Vector256.AsUInt32), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object uintResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.AsUInt32))
+                                    .MakeGenericMethod(typeof(UInt16))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector256<uint>)(uintResult), value);
 
             value = Vector256.Create(TestLibrary.Generator.GetUInt16());
-            object ulongResult = typeof(Vector256<UInt16>)
-                                    .GetMethod(nameof(Vector256.AsUInt64), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object ulongResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.AsUInt64))
+                                    .MakeGenericMethod(typeof(UInt16))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector256<ulong>)(ulongResult), value);
         }
 
index 83e95da..8db55b5 100644 (file)
@@ -144,63 +144,73 @@ namespace JIT.HardwareIntrinsics.General
             Vector256<UInt32> value;
 
             value = Vector256.Create(TestLibrary.Generator.GetUInt32());
-            object byteResult = typeof(Vector256<UInt32>)
-                                    .GetMethod(nameof(Vector256.AsByte), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object byteResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.AsByte))
+                                    .MakeGenericMethod(typeof(UInt32))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector256<byte>)(byteResult), value);
 
             value = Vector256.Create(TestLibrary.Generator.GetUInt32());
-            object doubleResult = typeof(Vector256<UInt32>)
-                                    .GetMethod(nameof(Vector256.AsDouble), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object doubleResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.AsDouble))
+                                    .MakeGenericMethod(typeof(UInt32))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector256<double>)(doubleResult), value);
 
             value = Vector256.Create(TestLibrary.Generator.GetUInt32());
-            object shortResult = typeof(Vector256<UInt32>)
-                                    .GetMethod(nameof(Vector256.AsInt16), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object shortResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.AsInt16))
+                                    .MakeGenericMethod(typeof(UInt32))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector256<short>)(shortResult), value);
 
             value = Vector256.Create(TestLibrary.Generator.GetUInt32());
-            object intResult = typeof(Vector256<UInt32>)
-                                    .GetMethod(nameof(Vector256.AsInt32), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object intResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.AsInt32))
+                                    .MakeGenericMethod(typeof(UInt32))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector256<int>)(intResult), value);
 
             value = Vector256.Create(TestLibrary.Generator.GetUInt32());
-            object longResult = typeof(Vector256<UInt32>)
-                                    .GetMethod(nameof(Vector256.AsInt64), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object longResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.AsInt64))
+                                    .MakeGenericMethod(typeof(UInt32))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector256<long>)(longResult), value);
 
             value = Vector256.Create(TestLibrary.Generator.GetUInt32());
-            object sbyteResult = typeof(Vector256<UInt32>)
-                                    .GetMethod(nameof(Vector256.AsSByte), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object sbyteResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.AsSByte))
+                                    .MakeGenericMethod(typeof(UInt32))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector256<sbyte>)(sbyteResult), value);
 
             value = Vector256.Create(TestLibrary.Generator.GetUInt32());
-            object floatResult = typeof(Vector256<UInt32>)
-                                    .GetMethod(nameof(Vector256.AsSingle), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object floatResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.AsSingle))
+                                    .MakeGenericMethod(typeof(UInt32))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector256<float>)(floatResult), value);
 
             value = Vector256.Create(TestLibrary.Generator.GetUInt32());
-            object ushortResult = typeof(Vector256<UInt32>)
-                                    .GetMethod(nameof(Vector256.AsUInt16), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object ushortResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.AsUInt16))
+                                    .MakeGenericMethod(typeof(UInt32))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector256<ushort>)(ushortResult), value);
 
             value = Vector256.Create(TestLibrary.Generator.GetUInt32());
-            object uintResult = typeof(Vector256<UInt32>)
-                                    .GetMethod(nameof(Vector256.AsUInt32), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object uintResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.AsUInt32))
+                                    .MakeGenericMethod(typeof(UInt32))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector256<uint>)(uintResult), value);
 
             value = Vector256.Create(TestLibrary.Generator.GetUInt32());
-            object ulongResult = typeof(Vector256<UInt32>)
-                                    .GetMethod(nameof(Vector256.AsUInt64), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object ulongResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.AsUInt64))
+                                    .MakeGenericMethod(typeof(UInt32))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector256<ulong>)(ulongResult), value);
         }
 
index 5018324..0808d05 100644 (file)
@@ -144,63 +144,73 @@ namespace JIT.HardwareIntrinsics.General
             Vector256<UInt64> value;
 
             value = Vector256.Create(TestLibrary.Generator.GetUInt64());
-            object byteResult = typeof(Vector256<UInt64>)
-                                    .GetMethod(nameof(Vector256.AsByte), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object byteResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.AsByte))
+                                    .MakeGenericMethod(typeof(UInt64))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector256<byte>)(byteResult), value);
 
             value = Vector256.Create(TestLibrary.Generator.GetUInt64());
-            object doubleResult = typeof(Vector256<UInt64>)
-                                    .GetMethod(nameof(Vector256.AsDouble), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object doubleResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.AsDouble))
+                                    .MakeGenericMethod(typeof(UInt64))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector256<double>)(doubleResult), value);
 
             value = Vector256.Create(TestLibrary.Generator.GetUInt64());
-            object shortResult = typeof(Vector256<UInt64>)
-                                    .GetMethod(nameof(Vector256.AsInt16), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object shortResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.AsInt16))
+                                    .MakeGenericMethod(typeof(UInt64))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector256<short>)(shortResult), value);
 
             value = Vector256.Create(TestLibrary.Generator.GetUInt64());
-            object intResult = typeof(Vector256<UInt64>)
-                                    .GetMethod(nameof(Vector256.AsInt32), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object intResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.AsInt32))
+                                    .MakeGenericMethod(typeof(UInt64))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector256<int>)(intResult), value);
 
             value = Vector256.Create(TestLibrary.Generator.GetUInt64());
-            object longResult = typeof(Vector256<UInt64>)
-                                    .GetMethod(nameof(Vector256.AsInt64), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object longResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.AsInt64))
+                                    .MakeGenericMethod(typeof(UInt64))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector256<long>)(longResult), value);
 
             value = Vector256.Create(TestLibrary.Generator.GetUInt64());
-            object sbyteResult = typeof(Vector256<UInt64>)
-                                    .GetMethod(nameof(Vector256.AsSByte), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object sbyteResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.AsSByte))
+                                    .MakeGenericMethod(typeof(UInt64))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector256<sbyte>)(sbyteResult), value);
 
             value = Vector256.Create(TestLibrary.Generator.GetUInt64());
-            object floatResult = typeof(Vector256<UInt64>)
-                                    .GetMethod(nameof(Vector256.AsSingle), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object floatResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.AsSingle))
+                                    .MakeGenericMethod(typeof(UInt64))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector256<float>)(floatResult), value);
 
             value = Vector256.Create(TestLibrary.Generator.GetUInt64());
-            object ushortResult = typeof(Vector256<UInt64>)
-                                    .GetMethod(nameof(Vector256.AsUInt16), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object ushortResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.AsUInt16))
+                                    .MakeGenericMethod(typeof(UInt64))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector256<ushort>)(ushortResult), value);
 
             value = Vector256.Create(TestLibrary.Generator.GetUInt64());
-            object uintResult = typeof(Vector256<UInt64>)
-                                    .GetMethod(nameof(Vector256.AsUInt32), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object uintResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.AsUInt32))
+                                    .MakeGenericMethod(typeof(UInt64))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector256<uint>)(uintResult), value);
 
             value = Vector256.Create(TestLibrary.Generator.GetUInt64());
-            object ulongResult = typeof(Vector256<UInt64>)
-                                    .GetMethod(nameof(Vector256.AsUInt64), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object ulongResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.AsUInt64))
+                                    .MakeGenericMethod(typeof(UInt64))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector256<ulong>)(ulongResult), value);
         }
 
index c37df53..af3b1ac 100644 (file)
@@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result = typeof(Vector256<Byte>)
-                                    .GetMethod(nameof(Vector256.GetElement), new Type[] { typeof(int) })
-                                    .Invoke(value, new object[] { imm });
+                object result = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.GetElement))
+                                    .MakeGenericMethod(typeof(Byte))
+                                    .Invoke(null, new object[] { value, imm });
                 ValidateGetResult((Byte)(result), values);
             }
             catch (TargetInvocationException e)
@@ -145,9 +146,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result2 = typeof(Vector256<Byte>)
-                                    .GetMethod(nameof(Vector256.WithElement), new Type[] { typeof(int), typeof(Byte) })
-                                    .Invoke(value, new object[] { imm, insertedValue });
+                object result2 = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.WithElement))
+                                    .MakeGenericMethod(typeof(Byte))
+                                    .Invoke(null, new object[] { value, imm, insertedValue });
                 ValidateWithResult((Vector256<Byte>)(result2), values, insertedValue);
             }
             catch (TargetInvocationException e)
index 4a8e29d..e920b63 100644 (file)
@@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result = typeof(Vector256<Byte>)
-                                    .GetMethod(nameof(Vector256.GetElement), new Type[] { typeof(int) })
-                                    .Invoke(value, new object[] { imm });
+                object result = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.GetElement))
+                                    .MakeGenericMethod(typeof(Byte))
+                                    .Invoke(null, new object[] { value, imm });
                 ValidateGetResult((Byte)(result), values);
             }
             catch (TargetInvocationException e)
@@ -145,9 +146,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result2 = typeof(Vector256<Byte>)
-                                    .GetMethod(nameof(Vector256.WithElement), new Type[] { typeof(int), typeof(Byte) })
-                                    .Invoke(value, new object[] { imm, insertedValue });
+                object result2 = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.WithElement))
+                                    .MakeGenericMethod(typeof(Byte))
+                                    .Invoke(null, new object[] { value, imm, insertedValue });
                 ValidateWithResult((Vector256<Byte>)(result2), values, insertedValue);
             }
             catch (TargetInvocationException e)
index 25e8f03..3881967 100644 (file)
@@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result = typeof(Vector256<Byte>)
-                                    .GetMethod(nameof(Vector256.GetElement), new Type[] { typeof(int) })
-                                    .Invoke(value, new object[] { imm });
+                object result = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.GetElement))
+                                    .MakeGenericMethod(typeof(Byte))
+                                    .Invoke(null, new object[] { value, imm });
                 ValidateGetResult((Byte)(result), values);
             }
             catch (TargetInvocationException e)
@@ -145,9 +146,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result2 = typeof(Vector256<Byte>)
-                                    .GetMethod(nameof(Vector256.WithElement), new Type[] { typeof(int), typeof(Byte) })
-                                    .Invoke(value, new object[] { imm, insertedValue });
+                object result2 = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.WithElement))
+                                    .MakeGenericMethod(typeof(Byte))
+                                    .Invoke(null, new object[] { value, imm, insertedValue });
                 ValidateWithResult((Vector256<Byte>)(result2), values, insertedValue);
             }
             catch (TargetInvocationException e)
index c5af043..4257b98 100644 (file)
@@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result = typeof(Vector256<Byte>)
-                                    .GetMethod(nameof(Vector256.GetElement), new Type[] { typeof(int) })
-                                    .Invoke(value, new object[] { imm });
+                object result = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.GetElement))
+                                    .MakeGenericMethod(typeof(Byte))
+                                    .Invoke(null, new object[] { value, imm });
                 ValidateGetResult((Byte)(result), values);
             }
             catch (TargetInvocationException e)
@@ -145,9 +146,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result2 = typeof(Vector256<Byte>)
-                                    .GetMethod(nameof(Vector256.WithElement), new Type[] { typeof(int), typeof(Byte) })
-                                    .Invoke(value, new object[] { imm, insertedValue });
+                object result2 = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.WithElement))
+                                    .MakeGenericMethod(typeof(Byte))
+                                    .Invoke(null, new object[] { value, imm, insertedValue });
                 ValidateWithResult((Vector256<Byte>)(result2), values, insertedValue);
             }
             catch (TargetInvocationException e)
index 3a4de6a..35c7c75 100644 (file)
@@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result = typeof(Vector256<Double>)
-                                    .GetMethod(nameof(Vector256.GetElement), new Type[] { typeof(int) })
-                                    .Invoke(value, new object[] { imm });
+                object result = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.GetElement))
+                                    .MakeGenericMethod(typeof(Double))
+                                    .Invoke(null, new object[] { value, imm });
                 ValidateGetResult((Double)(result), values);
             }
             catch (TargetInvocationException e)
@@ -145,9 +146,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result2 = typeof(Vector256<Double>)
-                                    .GetMethod(nameof(Vector256.WithElement), new Type[] { typeof(int), typeof(Double) })
-                                    .Invoke(value, new object[] { imm, insertedValue });
+                object result2 = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.WithElement))
+                                    .MakeGenericMethod(typeof(Double))
+                                    .Invoke(null, new object[] { value, imm, insertedValue });
                 ValidateWithResult((Vector256<Double>)(result2), values, insertedValue);
             }
             catch (TargetInvocationException e)
index 0e16814..1b4b643 100644 (file)
@@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result = typeof(Vector256<Double>)
-                                    .GetMethod(nameof(Vector256.GetElement), new Type[] { typeof(int) })
-                                    .Invoke(value, new object[] { imm });
+                object result = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.GetElement))
+                                    .MakeGenericMethod(typeof(Double))
+                                    .Invoke(null, new object[] { value, imm });
                 ValidateGetResult((Double)(result), values);
             }
             catch (TargetInvocationException e)
@@ -145,9 +146,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result2 = typeof(Vector256<Double>)
-                                    .GetMethod(nameof(Vector256.WithElement), new Type[] { typeof(int), typeof(Double) })
-                                    .Invoke(value, new object[] { imm, insertedValue });
+                object result2 = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.WithElement))
+                                    .MakeGenericMethod(typeof(Double))
+                                    .Invoke(null, new object[] { value, imm, insertedValue });
                 ValidateWithResult((Vector256<Double>)(result2), values, insertedValue);
             }
             catch (TargetInvocationException e)
index e632c2f..0e0d6b7 100644 (file)
@@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result = typeof(Vector256<Double>)
-                                    .GetMethod(nameof(Vector256.GetElement), new Type[] { typeof(int) })
-                                    .Invoke(value, new object[] { imm });
+                object result = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.GetElement))
+                                    .MakeGenericMethod(typeof(Double))
+                                    .Invoke(null, new object[] { value, imm });
                 ValidateGetResult((Double)(result), values);
             }
             catch (TargetInvocationException e)
@@ -145,9 +146,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result2 = typeof(Vector256<Double>)
-                                    .GetMethod(nameof(Vector256.WithElement), new Type[] { typeof(int), typeof(Double) })
-                                    .Invoke(value, new object[] { imm, insertedValue });
+                object result2 = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.WithElement))
+                                    .MakeGenericMethod(typeof(Double))
+                                    .Invoke(null, new object[] { value, imm, insertedValue });
                 ValidateWithResult((Vector256<Double>)(result2), values, insertedValue);
             }
             catch (TargetInvocationException e)
index fddbba9..c18be60 100644 (file)
@@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result = typeof(Vector256<Int16>)
-                                    .GetMethod(nameof(Vector256.GetElement), new Type[] { typeof(int) })
-                                    .Invoke(value, new object[] { imm });
+                object result = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.GetElement))
+                                    .MakeGenericMethod(typeof(Int16))
+                                    .Invoke(null, new object[] { value, imm });
                 ValidateGetResult((Int16)(result), values);
             }
             catch (TargetInvocationException e)
@@ -145,9 +146,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result2 = typeof(Vector256<Int16>)
-                                    .GetMethod(nameof(Vector256.WithElement), new Type[] { typeof(int), typeof(Int16) })
-                                    .Invoke(value, new object[] { imm, insertedValue });
+                object result2 = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.WithElement))
+                                    .MakeGenericMethod(typeof(Int16))
+                                    .Invoke(null, new object[] { value, imm, insertedValue });
                 ValidateWithResult((Vector256<Int16>)(result2), values, insertedValue);
             }
             catch (TargetInvocationException e)
index 94a16bd..b1f0a86 100644 (file)
@@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result = typeof(Vector256<Int16>)
-                                    .GetMethod(nameof(Vector256.GetElement), new Type[] { typeof(int) })
-                                    .Invoke(value, new object[] { imm });
+                object result = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.GetElement))
+                                    .MakeGenericMethod(typeof(Int16))
+                                    .Invoke(null, new object[] { value, imm });
                 ValidateGetResult((Int16)(result), values);
             }
             catch (TargetInvocationException e)
@@ -145,9 +146,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result2 = typeof(Vector256<Int16>)
-                                    .GetMethod(nameof(Vector256.WithElement), new Type[] { typeof(int), typeof(Int16) })
-                                    .Invoke(value, new object[] { imm, insertedValue });
+                object result2 = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.WithElement))
+                                    .MakeGenericMethod(typeof(Int16))
+                                    .Invoke(null, new object[] { value, imm, insertedValue });
                 ValidateWithResult((Vector256<Int16>)(result2), values, insertedValue);
             }
             catch (TargetInvocationException e)
index ad1c6ae..21af023 100644 (file)
@@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result = typeof(Vector256<Int16>)
-                                    .GetMethod(nameof(Vector256.GetElement), new Type[] { typeof(int) })
-                                    .Invoke(value, new object[] { imm });
+                object result = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.GetElement))
+                                    .MakeGenericMethod(typeof(Int16))
+                                    .Invoke(null, new object[] { value, imm });
                 ValidateGetResult((Int16)(result), values);
             }
             catch (TargetInvocationException e)
@@ -145,9 +146,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result2 = typeof(Vector256<Int16>)
-                                    .GetMethod(nameof(Vector256.WithElement), new Type[] { typeof(int), typeof(Int16) })
-                                    .Invoke(value, new object[] { imm, insertedValue });
+                object result2 = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.WithElement))
+                                    .MakeGenericMethod(typeof(Int16))
+                                    .Invoke(null, new object[] { value, imm, insertedValue });
                 ValidateWithResult((Vector256<Int16>)(result2), values, insertedValue);
             }
             catch (TargetInvocationException e)
index f8b8ad3..21c1fdf 100644 (file)
@@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result = typeof(Vector256<Int16>)
-                                    .GetMethod(nameof(Vector256.GetElement), new Type[] { typeof(int) })
-                                    .Invoke(value, new object[] { imm });
+                object result = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.GetElement))
+                                    .MakeGenericMethod(typeof(Int16))
+                                    .Invoke(null, new object[] { value, imm });
                 ValidateGetResult((Int16)(result), values);
             }
             catch (TargetInvocationException e)
@@ -145,9 +146,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result2 = typeof(Vector256<Int16>)
-                                    .GetMethod(nameof(Vector256.WithElement), new Type[] { typeof(int), typeof(Int16) })
-                                    .Invoke(value, new object[] { imm, insertedValue });
+                object result2 = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.WithElement))
+                                    .MakeGenericMethod(typeof(Int16))
+                                    .Invoke(null, new object[] { value, imm, insertedValue });
                 ValidateWithResult((Vector256<Int16>)(result2), values, insertedValue);
             }
             catch (TargetInvocationException e)
index 634f26c..74f1a38 100644 (file)
@@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result = typeof(Vector256<Int32>)
-                                    .GetMethod(nameof(Vector256.GetElement), new Type[] { typeof(int) })
-                                    .Invoke(value, new object[] { imm });
+                object result = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.GetElement))
+                                    .MakeGenericMethod(typeof(Int32))
+                                    .Invoke(null, new object[] { value, imm });
                 ValidateGetResult((Int32)(result), values);
             }
             catch (TargetInvocationException e)
@@ -145,9 +146,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result2 = typeof(Vector256<Int32>)
-                                    .GetMethod(nameof(Vector256.WithElement), new Type[] { typeof(int), typeof(Int32) })
-                                    .Invoke(value, new object[] { imm, insertedValue });
+                object result2 = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.WithElement))
+                                    .MakeGenericMethod(typeof(Int32))
+                                    .Invoke(null, new object[] { value, imm, insertedValue });
                 ValidateWithResult((Vector256<Int32>)(result2), values, insertedValue);
             }
             catch (TargetInvocationException e)
index 4881452..a247d9e 100644 (file)
@@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result = typeof(Vector256<Int32>)
-                                    .GetMethod(nameof(Vector256.GetElement), new Type[] { typeof(int) })
-                                    .Invoke(value, new object[] { imm });
+                object result = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.GetElement))
+                                    .MakeGenericMethod(typeof(Int32))
+                                    .Invoke(null, new object[] { value, imm });
                 ValidateGetResult((Int32)(result), values);
             }
             catch (TargetInvocationException e)
@@ -145,9 +146,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result2 = typeof(Vector256<Int32>)
-                                    .GetMethod(nameof(Vector256.WithElement), new Type[] { typeof(int), typeof(Int32) })
-                                    .Invoke(value, new object[] { imm, insertedValue });
+                object result2 = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.WithElement))
+                                    .MakeGenericMethod(typeof(Int32))
+                                    .Invoke(null, new object[] { value, imm, insertedValue });
                 ValidateWithResult((Vector256<Int32>)(result2), values, insertedValue);
             }
             catch (TargetInvocationException e)
index c580789..abe22dc 100644 (file)
@@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result = typeof(Vector256<Int32>)
-                                    .GetMethod(nameof(Vector256.GetElement), new Type[] { typeof(int) })
-                                    .Invoke(value, new object[] { imm });
+                object result = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.GetElement))
+                                    .MakeGenericMethod(typeof(Int32))
+                                    .Invoke(null, new object[] { value, imm });
                 ValidateGetResult((Int32)(result), values);
             }
             catch (TargetInvocationException e)
@@ -145,9 +146,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result2 = typeof(Vector256<Int32>)
-                                    .GetMethod(nameof(Vector256.WithElement), new Type[] { typeof(int), typeof(Int32) })
-                                    .Invoke(value, new object[] { imm, insertedValue });
+                object result2 = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.WithElement))
+                                    .MakeGenericMethod(typeof(Int32))
+                                    .Invoke(null, new object[] { value, imm, insertedValue });
                 ValidateWithResult((Vector256<Int32>)(result2), values, insertedValue);
             }
             catch (TargetInvocationException e)
index f500a72..12e82ef 100644 (file)
@@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result = typeof(Vector256<Int32>)
-                                    .GetMethod(nameof(Vector256.GetElement), new Type[] { typeof(int) })
-                                    .Invoke(value, new object[] { imm });
+                object result = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.GetElement))
+                                    .MakeGenericMethod(typeof(Int32))
+                                    .Invoke(null, new object[] { value, imm });
                 ValidateGetResult((Int32)(result), values);
             }
             catch (TargetInvocationException e)
@@ -145,9 +146,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result2 = typeof(Vector256<Int32>)
-                                    .GetMethod(nameof(Vector256.WithElement), new Type[] { typeof(int), typeof(Int32) })
-                                    .Invoke(value, new object[] { imm, insertedValue });
+                object result2 = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.WithElement))
+                                    .MakeGenericMethod(typeof(Int32))
+                                    .Invoke(null, new object[] { value, imm, insertedValue });
                 ValidateWithResult((Vector256<Int32>)(result2), values, insertedValue);
             }
             catch (TargetInvocationException e)
index fe5c256..0bea519 100644 (file)
@@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result = typeof(Vector256<Int64>)
-                                    .GetMethod(nameof(Vector256.GetElement), new Type[] { typeof(int) })
-                                    .Invoke(value, new object[] { imm });
+                object result = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.GetElement))
+                                    .MakeGenericMethod(typeof(Int64))
+                                    .Invoke(null, new object[] { value, imm });
                 ValidateGetResult((Int64)(result), values);
             }
             catch (TargetInvocationException e)
@@ -145,9 +146,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result2 = typeof(Vector256<Int64>)
-                                    .GetMethod(nameof(Vector256.WithElement), new Type[] { typeof(int), typeof(Int64) })
-                                    .Invoke(value, new object[] { imm, insertedValue });
+                object result2 = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.WithElement))
+                                    .MakeGenericMethod(typeof(Int64))
+                                    .Invoke(null, new object[] { value, imm, insertedValue });
                 ValidateWithResult((Vector256<Int64>)(result2), values, insertedValue);
             }
             catch (TargetInvocationException e)
index 926f650..54eb058 100644 (file)
@@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result = typeof(Vector256<Int64>)
-                                    .GetMethod(nameof(Vector256.GetElement), new Type[] { typeof(int) })
-                                    .Invoke(value, new object[] { imm });
+                object result = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.GetElement))
+                                    .MakeGenericMethod(typeof(Int64))
+                                    .Invoke(null, new object[] { value, imm });
                 ValidateGetResult((Int64)(result), values);
             }
             catch (TargetInvocationException e)
@@ -145,9 +146,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result2 = typeof(Vector256<Int64>)
-                                    .GetMethod(nameof(Vector256.WithElement), new Type[] { typeof(int), typeof(Int64) })
-                                    .Invoke(value, new object[] { imm, insertedValue });
+                object result2 = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.WithElement))
+                                    .MakeGenericMethod(typeof(Int64))
+                                    .Invoke(null, new object[] { value, imm, insertedValue });
                 ValidateWithResult((Vector256<Int64>)(result2), values, insertedValue);
             }
             catch (TargetInvocationException e)
index 2c30d50..484a603 100644 (file)
@@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result = typeof(Vector256<Int64>)
-                                    .GetMethod(nameof(Vector256.GetElement), new Type[] { typeof(int) })
-                                    .Invoke(value, new object[] { imm });
+                object result = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.GetElement))
+                                    .MakeGenericMethod(typeof(Int64))
+                                    .Invoke(null, new object[] { value, imm });
                 ValidateGetResult((Int64)(result), values);
             }
             catch (TargetInvocationException e)
@@ -145,9 +146,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result2 = typeof(Vector256<Int64>)
-                                    .GetMethod(nameof(Vector256.WithElement), new Type[] { typeof(int), typeof(Int64) })
-                                    .Invoke(value, new object[] { imm, insertedValue });
+                object result2 = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.WithElement))
+                                    .MakeGenericMethod(typeof(Int64))
+                                    .Invoke(null, new object[] { value, imm, insertedValue });
                 ValidateWithResult((Vector256<Int64>)(result2), values, insertedValue);
             }
             catch (TargetInvocationException e)
index 0e9dba8..7a6dd99 100644 (file)
@@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result = typeof(Vector256<SByte>)
-                                    .GetMethod(nameof(Vector256.GetElement), new Type[] { typeof(int) })
-                                    .Invoke(value, new object[] { imm });
+                object result = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.GetElement))
+                                    .MakeGenericMethod(typeof(SByte))
+                                    .Invoke(null, new object[] { value, imm });
                 ValidateGetResult((SByte)(result), values);
             }
             catch (TargetInvocationException e)
@@ -145,9 +146,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result2 = typeof(Vector256<SByte>)
-                                    .GetMethod(nameof(Vector256.WithElement), new Type[] { typeof(int), typeof(SByte) })
-                                    .Invoke(value, new object[] { imm, insertedValue });
+                object result2 = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.WithElement))
+                                    .MakeGenericMethod(typeof(SByte))
+                                    .Invoke(null, new object[] { value, imm, insertedValue });
                 ValidateWithResult((Vector256<SByte>)(result2), values, insertedValue);
             }
             catch (TargetInvocationException e)
index 202d8fb..503fcca 100644 (file)
@@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result = typeof(Vector256<SByte>)
-                                    .GetMethod(nameof(Vector256.GetElement), new Type[] { typeof(int) })
-                                    .Invoke(value, new object[] { imm });
+                object result = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.GetElement))
+                                    .MakeGenericMethod(typeof(SByte))
+                                    .Invoke(null, new object[] { value, imm });
                 ValidateGetResult((SByte)(result), values);
             }
             catch (TargetInvocationException e)
@@ -145,9 +146,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result2 = typeof(Vector256<SByte>)
-                                    .GetMethod(nameof(Vector256.WithElement), new Type[] { typeof(int), typeof(SByte) })
-                                    .Invoke(value, new object[] { imm, insertedValue });
+                object result2 = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.WithElement))
+                                    .MakeGenericMethod(typeof(SByte))
+                                    .Invoke(null, new object[] { value, imm, insertedValue });
                 ValidateWithResult((Vector256<SByte>)(result2), values, insertedValue);
             }
             catch (TargetInvocationException e)
index bfc0c30..8bc154e 100644 (file)
@@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result = typeof(Vector256<SByte>)
-                                    .GetMethod(nameof(Vector256.GetElement), new Type[] { typeof(int) })
-                                    .Invoke(value, new object[] { imm });
+                object result = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.GetElement))
+                                    .MakeGenericMethod(typeof(SByte))
+                                    .Invoke(null, new object[] { value, imm });
                 ValidateGetResult((SByte)(result), values);
             }
             catch (TargetInvocationException e)
@@ -145,9 +146,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result2 = typeof(Vector256<SByte>)
-                                    .GetMethod(nameof(Vector256.WithElement), new Type[] { typeof(int), typeof(SByte) })
-                                    .Invoke(value, new object[] { imm, insertedValue });
+                object result2 = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.WithElement))
+                                    .MakeGenericMethod(typeof(SByte))
+                                    .Invoke(null, new object[] { value, imm, insertedValue });
                 ValidateWithResult((Vector256<SByte>)(result2), values, insertedValue);
             }
             catch (TargetInvocationException e)
index 7012967..9c05e58 100644 (file)
@@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result = typeof(Vector256<SByte>)
-                                    .GetMethod(nameof(Vector256.GetElement), new Type[] { typeof(int) })
-                                    .Invoke(value, new object[] { imm });
+                object result = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.GetElement))
+                                    .MakeGenericMethod(typeof(SByte))
+                                    .Invoke(null, new object[] { value, imm });
                 ValidateGetResult((SByte)(result), values);
             }
             catch (TargetInvocationException e)
@@ -145,9 +146,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result2 = typeof(Vector256<SByte>)
-                                    .GetMethod(nameof(Vector256.WithElement), new Type[] { typeof(int), typeof(SByte) })
-                                    .Invoke(value, new object[] { imm, insertedValue });
+                object result2 = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.WithElement))
+                                    .MakeGenericMethod(typeof(SByte))
+                                    .Invoke(null, new object[] { value, imm, insertedValue });
                 ValidateWithResult((Vector256<SByte>)(result2), values, insertedValue);
             }
             catch (TargetInvocationException e)
index 24fbde3..28411f9 100644 (file)
@@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result = typeof(Vector256<Single>)
-                                    .GetMethod(nameof(Vector256.GetElement), new Type[] { typeof(int) })
-                                    .Invoke(value, new object[] { imm });
+                object result = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.GetElement))
+                                    .MakeGenericMethod(typeof(Single))
+                                    .Invoke(null, new object[] { value, imm });
                 ValidateGetResult((Single)(result), values);
             }
             catch (TargetInvocationException e)
@@ -145,9 +146,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result2 = typeof(Vector256<Single>)
-                                    .GetMethod(nameof(Vector256.WithElement), new Type[] { typeof(int), typeof(Single) })
-                                    .Invoke(value, new object[] { imm, insertedValue });
+                object result2 = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.WithElement))
+                                    .MakeGenericMethod(typeof(Single))
+                                    .Invoke(null, new object[] { value, imm, insertedValue });
                 ValidateWithResult((Vector256<Single>)(result2), values, insertedValue);
             }
             catch (TargetInvocationException e)
index 242a769..1b453a1 100644 (file)
@@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result = typeof(Vector256<Single>)
-                                    .GetMethod(nameof(Vector256.GetElement), new Type[] { typeof(int) })
-                                    .Invoke(value, new object[] { imm });
+                object result = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.GetElement))
+                                    .MakeGenericMethod(typeof(Single))
+                                    .Invoke(null, new object[] { value, imm });
                 ValidateGetResult((Single)(result), values);
             }
             catch (TargetInvocationException e)
@@ -145,9 +146,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result2 = typeof(Vector256<Single>)
-                                    .GetMethod(nameof(Vector256.WithElement), new Type[] { typeof(int), typeof(Single) })
-                                    .Invoke(value, new object[] { imm, insertedValue });
+                object result2 = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.WithElement))
+                                    .MakeGenericMethod(typeof(Single))
+                                    .Invoke(null, new object[] { value, imm, insertedValue });
                 ValidateWithResult((Vector256<Single>)(result2), values, insertedValue);
             }
             catch (TargetInvocationException e)
index a14ac61..373f120 100644 (file)
@@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result = typeof(Vector256<Single>)
-                                    .GetMethod(nameof(Vector256.GetElement), new Type[] { typeof(int) })
-                                    .Invoke(value, new object[] { imm });
+                object result = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.GetElement))
+                                    .MakeGenericMethod(typeof(Single))
+                                    .Invoke(null, new object[] { value, imm });
                 ValidateGetResult((Single)(result), values);
             }
             catch (TargetInvocationException e)
@@ -145,9 +146,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result2 = typeof(Vector256<Single>)
-                                    .GetMethod(nameof(Vector256.WithElement), new Type[] { typeof(int), typeof(Single) })
-                                    .Invoke(value, new object[] { imm, insertedValue });
+                object result2 = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.WithElement))
+                                    .MakeGenericMethod(typeof(Single))
+                                    .Invoke(null, new object[] { value, imm, insertedValue });
                 ValidateWithResult((Vector256<Single>)(result2), values, insertedValue);
             }
             catch (TargetInvocationException e)
index ba82202..79bf27a 100644 (file)
@@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result = typeof(Vector256<Single>)
-                                    .GetMethod(nameof(Vector256.GetElement), new Type[] { typeof(int) })
-                                    .Invoke(value, new object[] { imm });
+                object result = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.GetElement))
+                                    .MakeGenericMethod(typeof(Single))
+                                    .Invoke(null, new object[] { value, imm });
                 ValidateGetResult((Single)(result), values);
             }
             catch (TargetInvocationException e)
@@ -145,9 +146,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result2 = typeof(Vector256<Single>)
-                                    .GetMethod(nameof(Vector256.WithElement), new Type[] { typeof(int), typeof(Single) })
-                                    .Invoke(value, new object[] { imm, insertedValue });
+                object result2 = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.WithElement))
+                                    .MakeGenericMethod(typeof(Single))
+                                    .Invoke(null, new object[] { value, imm, insertedValue });
                 ValidateWithResult((Vector256<Single>)(result2), values, insertedValue);
             }
             catch (TargetInvocationException e)
index dd5b72e..c7f0713 100644 (file)
@@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result = typeof(Vector256<UInt16>)
-                                    .GetMethod(nameof(Vector256.GetElement), new Type[] { typeof(int) })
-                                    .Invoke(value, new object[] { imm });
+                object result = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.GetElement))
+                                    .MakeGenericMethod(typeof(UInt16))
+                                    .Invoke(null, new object[] { value, imm });
                 ValidateGetResult((UInt16)(result), values);
             }
             catch (TargetInvocationException e)
@@ -145,9 +146,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result2 = typeof(Vector256<UInt16>)
-                                    .GetMethod(nameof(Vector256.WithElement), new Type[] { typeof(int), typeof(UInt16) })
-                                    .Invoke(value, new object[] { imm, insertedValue });
+                object result2 = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.WithElement))
+                                    .MakeGenericMethod(typeof(UInt16))
+                                    .Invoke(null, new object[] { value, imm, insertedValue });
                 ValidateWithResult((Vector256<UInt16>)(result2), values, insertedValue);
             }
             catch (TargetInvocationException e)
index d5d8e77..1c84972 100644 (file)
@@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result = typeof(Vector256<UInt16>)
-                                    .GetMethod(nameof(Vector256.GetElement), new Type[] { typeof(int) })
-                                    .Invoke(value, new object[] { imm });
+                object result = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.GetElement))
+                                    .MakeGenericMethod(typeof(UInt16))
+                                    .Invoke(null, new object[] { value, imm });
                 ValidateGetResult((UInt16)(result), values);
             }
             catch (TargetInvocationException e)
@@ -145,9 +146,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result2 = typeof(Vector256<UInt16>)
-                                    .GetMethod(nameof(Vector256.WithElement), new Type[] { typeof(int), typeof(UInt16) })
-                                    .Invoke(value, new object[] { imm, insertedValue });
+                object result2 = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.WithElement))
+                                    .MakeGenericMethod(typeof(UInt16))
+                                    .Invoke(null, new object[] { value, imm, insertedValue });
                 ValidateWithResult((Vector256<UInt16>)(result2), values, insertedValue);
             }
             catch (TargetInvocationException e)
index cef4374..6b6c790 100644 (file)
@@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result = typeof(Vector256<UInt16>)
-                                    .GetMethod(nameof(Vector256.GetElement), new Type[] { typeof(int) })
-                                    .Invoke(value, new object[] { imm });
+                object result = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.GetElement))
+                                    .MakeGenericMethod(typeof(UInt16))
+                                    .Invoke(null, new object[] { value, imm });
                 ValidateGetResult((UInt16)(result), values);
             }
             catch (TargetInvocationException e)
@@ -145,9 +146,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result2 = typeof(Vector256<UInt16>)
-                                    .GetMethod(nameof(Vector256.WithElement), new Type[] { typeof(int), typeof(UInt16) })
-                                    .Invoke(value, new object[] { imm, insertedValue });
+                object result2 = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.WithElement))
+                                    .MakeGenericMethod(typeof(UInt16))
+                                    .Invoke(null, new object[] { value, imm, insertedValue });
                 ValidateWithResult((Vector256<UInt16>)(result2), values, insertedValue);
             }
             catch (TargetInvocationException e)
index 288d286..0fb957a 100644 (file)
@@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result = typeof(Vector256<UInt16>)
-                                    .GetMethod(nameof(Vector256.GetElement), new Type[] { typeof(int) })
-                                    .Invoke(value, new object[] { imm });
+                object result = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.GetElement))
+                                    .MakeGenericMethod(typeof(UInt16))
+                                    .Invoke(null, new object[] { value, imm });
                 ValidateGetResult((UInt16)(result), values);
             }
             catch (TargetInvocationException e)
@@ -145,9 +146,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result2 = typeof(Vector256<UInt16>)
-                                    .GetMethod(nameof(Vector256.WithElement), new Type[] { typeof(int), typeof(UInt16) })
-                                    .Invoke(value, new object[] { imm, insertedValue });
+                object result2 = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.WithElement))
+                                    .MakeGenericMethod(typeof(UInt16))
+                                    .Invoke(null, new object[] { value, imm, insertedValue });
                 ValidateWithResult((Vector256<UInt16>)(result2), values, insertedValue);
             }
             catch (TargetInvocationException e)
index 2cecdcc..2e54e47 100644 (file)
@@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result = typeof(Vector256<UInt32>)
-                                    .GetMethod(nameof(Vector256.GetElement), new Type[] { typeof(int) })
-                                    .Invoke(value, new object[] { imm });
+                object result = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.GetElement))
+                                    .MakeGenericMethod(typeof(UInt32))
+                                    .Invoke(null, new object[] { value, imm });
                 ValidateGetResult((UInt32)(result), values);
             }
             catch (TargetInvocationException e)
@@ -145,9 +146,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result2 = typeof(Vector256<UInt32>)
-                                    .GetMethod(nameof(Vector256.WithElement), new Type[] { typeof(int), typeof(UInt32) })
-                                    .Invoke(value, new object[] { imm, insertedValue });
+                object result2 = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.WithElement))
+                                    .MakeGenericMethod(typeof(UInt32))
+                                    .Invoke(null, new object[] { value, imm, insertedValue });
                 ValidateWithResult((Vector256<UInt32>)(result2), values, insertedValue);
             }
             catch (TargetInvocationException e)
index 42d083d..43e461c 100644 (file)
@@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result = typeof(Vector256<UInt32>)
-                                    .GetMethod(nameof(Vector256.GetElement), new Type[] { typeof(int) })
-                                    .Invoke(value, new object[] { imm });
+                object result = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.GetElement))
+                                    .MakeGenericMethod(typeof(UInt32))
+                                    .Invoke(null, new object[] { value, imm });
                 ValidateGetResult((UInt32)(result), values);
             }
             catch (TargetInvocationException e)
@@ -145,9 +146,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result2 = typeof(Vector256<UInt32>)
-                                    .GetMethod(nameof(Vector256.WithElement), new Type[] { typeof(int), typeof(UInt32) })
-                                    .Invoke(value, new object[] { imm, insertedValue });
+                object result2 = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.WithElement))
+                                    .MakeGenericMethod(typeof(UInt32))
+                                    .Invoke(null, new object[] { value, imm, insertedValue });
                 ValidateWithResult((Vector256<UInt32>)(result2), values, insertedValue);
             }
             catch (TargetInvocationException e)
index 2d74e59..d9ad66c 100644 (file)
@@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result = typeof(Vector256<UInt32>)
-                                    .GetMethod(nameof(Vector256.GetElement), new Type[] { typeof(int) })
-                                    .Invoke(value, new object[] { imm });
+                object result = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.GetElement))
+                                    .MakeGenericMethod(typeof(UInt32))
+                                    .Invoke(null, new object[] { value, imm });
                 ValidateGetResult((UInt32)(result), values);
             }
             catch (TargetInvocationException e)
@@ -145,9 +146,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result2 = typeof(Vector256<UInt32>)
-                                    .GetMethod(nameof(Vector256.WithElement), new Type[] { typeof(int), typeof(UInt32) })
-                                    .Invoke(value, new object[] { imm, insertedValue });
+                object result2 = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.WithElement))
+                                    .MakeGenericMethod(typeof(UInt32))
+                                    .Invoke(null, new object[] { value, imm, insertedValue });
                 ValidateWithResult((Vector256<UInt32>)(result2), values, insertedValue);
             }
             catch (TargetInvocationException e)
index ed7c67b..4d53eba 100644 (file)
@@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result = typeof(Vector256<UInt32>)
-                                    .GetMethod(nameof(Vector256.GetElement), new Type[] { typeof(int) })
-                                    .Invoke(value, new object[] { imm });
+                object result = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.GetElement))
+                                    .MakeGenericMethod(typeof(UInt32))
+                                    .Invoke(null, new object[] { value, imm });
                 ValidateGetResult((UInt32)(result), values);
             }
             catch (TargetInvocationException e)
@@ -145,9 +146,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result2 = typeof(Vector256<UInt32>)
-                                    .GetMethod(nameof(Vector256.WithElement), new Type[] { typeof(int), typeof(UInt32) })
-                                    .Invoke(value, new object[] { imm, insertedValue });
+                object result2 = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.WithElement))
+                                    .MakeGenericMethod(typeof(UInt32))
+                                    .Invoke(null, new object[] { value, imm, insertedValue });
                 ValidateWithResult((Vector256<UInt32>)(result2), values, insertedValue);
             }
             catch (TargetInvocationException e)
index 0f54ce1..61909e9 100644 (file)
@@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result = typeof(Vector256<UInt64>)
-                                    .GetMethod(nameof(Vector256.GetElement), new Type[] { typeof(int) })
-                                    .Invoke(value, new object[] { imm });
+                object result = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.GetElement))
+                                    .MakeGenericMethod(typeof(UInt64))
+                                    .Invoke(null, new object[] { value, imm });
                 ValidateGetResult((UInt64)(result), values);
             }
             catch (TargetInvocationException e)
@@ -145,9 +146,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result2 = typeof(Vector256<UInt64>)
-                                    .GetMethod(nameof(Vector256.WithElement), new Type[] { typeof(int), typeof(UInt64) })
-                                    .Invoke(value, new object[] { imm, insertedValue });
+                object result2 = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.WithElement))
+                                    .MakeGenericMethod(typeof(UInt64))
+                                    .Invoke(null, new object[] { value, imm, insertedValue });
                 ValidateWithResult((Vector256<UInt64>)(result2), values, insertedValue);
             }
             catch (TargetInvocationException e)
index 536d99f..16a3a66 100644 (file)
@@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result = typeof(Vector256<UInt64>)
-                                    .GetMethod(nameof(Vector256.GetElement), new Type[] { typeof(int) })
-                                    .Invoke(value, new object[] { imm });
+                object result = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.GetElement))
+                                    .MakeGenericMethod(typeof(UInt64))
+                                    .Invoke(null, new object[] { value, imm });
                 ValidateGetResult((UInt64)(result), values);
             }
             catch (TargetInvocationException e)
@@ -145,9 +146,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result2 = typeof(Vector256<UInt64>)
-                                    .GetMethod(nameof(Vector256.WithElement), new Type[] { typeof(int), typeof(UInt64) })
-                                    .Invoke(value, new object[] { imm, insertedValue });
+                object result2 = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.WithElement))
+                                    .MakeGenericMethod(typeof(UInt64))
+                                    .Invoke(null, new object[] { value, imm, insertedValue });
                 ValidateWithResult((Vector256<UInt64>)(result2), values, insertedValue);
             }
             catch (TargetInvocationException e)
index 6e5670c..5430c00 100644 (file)
@@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result = typeof(Vector256<UInt64>)
-                                    .GetMethod(nameof(Vector256.GetElement), new Type[] { typeof(int) })
-                                    .Invoke(value, new object[] { imm });
+                object result = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.GetElement))
+                                    .MakeGenericMethod(typeof(UInt64))
+                                    .Invoke(null, new object[] { value, imm });
                 ValidateGetResult((UInt64)(result), values);
             }
             catch (TargetInvocationException e)
@@ -145,9 +146,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result2 = typeof(Vector256<UInt64>)
-                                    .GetMethod(nameof(Vector256.WithElement), new Type[] { typeof(int), typeof(UInt64) })
-                                    .Invoke(value, new object[] { imm, insertedValue });
+                object result2 = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.WithElement))
+                                    .MakeGenericMethod(typeof(UInt64))
+                                    .Invoke(null, new object[] { value, imm, insertedValue });
                 ValidateWithResult((Vector256<UInt64>)(result2), values, insertedValue);
             }
             catch (TargetInvocationException e)
index c800fbd..9426504 100644 (file)
@@ -78,20 +78,24 @@ namespace JIT.HardwareIntrinsics.General
 
             Vector256<Byte> value = Vector256.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15], values[16], values[17], values[18], values[19], values[20], values[21], values[22], values[23], values[24], values[25], values[26], values[27], values[28], values[29], values[30], values[31]);
 
-            object lowerResult = typeof(Vector256<Byte>)
-                                    .GetMethod(nameof(Vector256.GetLower), new Type[] { })
-                                    .Invoke(value, new object[] { });
-            object upperResult = typeof(Vector256<Byte>)
-                                    .GetMethod(nameof(Vector256.GetUpper), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object lowerResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.GetLower))
+                                    .MakeGenericMethod(typeof(Byte))
+                                    .Invoke(null, new object[] { value });
+            object upperResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.GetUpper))
+                                    .MakeGenericMethod(typeof(Byte))
+                                    .Invoke(null, new object[] { value });
             ValidateGetResult((Vector128<Byte>)(lowerResult), (Vector128<Byte>)(upperResult), values);
 
-            object result = typeof(Vector256<Byte>)
-                                .GetMethod(nameof(Vector256.WithLower), new Type[] { typeof(Vector128<Byte>) })
-                                .Invoke(value, new object[] { upperResult });
-            result = typeof(Vector256<Byte>)
-                        .GetMethod(nameof(Vector256.WithUpper), new Type[] { typeof(Vector128<Byte>) })
-                        .Invoke(result, new object[] { lowerResult });
+            object result = typeof(Vector256)
+                                .GetMethod(nameof(Vector256.WithLower))
+                                .MakeGenericMethod(typeof(Byte))
+                                .Invoke(null, new object[] { value, upperResult });
+            result = typeof(Vector256)
+                        .GetMethod(nameof(Vector256.WithUpper))
+                        .MakeGenericMethod(typeof(Byte))
+                        .Invoke(null, new object[] { result, lowerResult });
             ValidateWithResult((Vector256<Byte>)(result), values);
         }
 
index eced2d1..df74244 100644 (file)
@@ -78,20 +78,24 @@ namespace JIT.HardwareIntrinsics.General
 
             Vector256<Double> value = Vector256.Create(values[0], values[1], values[2], values[3]);
 
-            object lowerResult = typeof(Vector256<Double>)
-                                    .GetMethod(nameof(Vector256.GetLower), new Type[] { })
-                                    .Invoke(value, new object[] { });
-            object upperResult = typeof(Vector256<Double>)
-                                    .GetMethod(nameof(Vector256.GetUpper), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object lowerResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.GetLower))
+                                    .MakeGenericMethod(typeof(Double))
+                                    .Invoke(null, new object[] { value });
+            object upperResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.GetUpper))
+                                    .MakeGenericMethod(typeof(Double))
+                                    .Invoke(null, new object[] { value });
             ValidateGetResult((Vector128<Double>)(lowerResult), (Vector128<Double>)(upperResult), values);
 
-            object result = typeof(Vector256<Double>)
-                                .GetMethod(nameof(Vector256.WithLower), new Type[] { typeof(Vector128<Double>) })
-                                .Invoke(value, new object[] { upperResult });
-            result = typeof(Vector256<Double>)
-                        .GetMethod(nameof(Vector256.WithUpper), new Type[] { typeof(Vector128<Double>) })
-                        .Invoke(result, new object[] { lowerResult });
+            object result = typeof(Vector256)
+                                .GetMethod(nameof(Vector256.WithLower))
+                                .MakeGenericMethod(typeof(Double))
+                                .Invoke(null, new object[] { value, upperResult });
+            result = typeof(Vector256)
+                        .GetMethod(nameof(Vector256.WithUpper))
+                        .MakeGenericMethod(typeof(Double))
+                        .Invoke(null, new object[] { result, lowerResult });
             ValidateWithResult((Vector256<Double>)(result), values);
         }
 
index 2111866..c0d74a0 100644 (file)
@@ -78,20 +78,24 @@ namespace JIT.HardwareIntrinsics.General
 
             Vector256<Int16> value = Vector256.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15]);
 
-            object lowerResult = typeof(Vector256<Int16>)
-                                    .GetMethod(nameof(Vector256.GetLower), new Type[] { })
-                                    .Invoke(value, new object[] { });
-            object upperResult = typeof(Vector256<Int16>)
-                                    .GetMethod(nameof(Vector256.GetUpper), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object lowerResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.GetLower))
+                                    .MakeGenericMethod(typeof(Int16))
+                                    .Invoke(null, new object[] { value });
+            object upperResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.GetUpper))
+                                    .MakeGenericMethod(typeof(Int16))
+                                    .Invoke(null, new object[] { value });
             ValidateGetResult((Vector128<Int16>)(lowerResult), (Vector128<Int16>)(upperResult), values);
 
-            object result = typeof(Vector256<Int16>)
-                                .GetMethod(nameof(Vector256.WithLower), new Type[] { typeof(Vector128<Int16>) })
-                                .Invoke(value, new object[] { upperResult });
-            result = typeof(Vector256<Int16>)
-                        .GetMethod(nameof(Vector256.WithUpper), new Type[] { typeof(Vector128<Int16>) })
-                        .Invoke(result, new object[] { lowerResult });
+            object result = typeof(Vector256)
+                                .GetMethod(nameof(Vector256.WithLower))
+                                .MakeGenericMethod(typeof(Int16))
+                                .Invoke(null, new object[] { value, upperResult });
+            result = typeof(Vector256)
+                        .GetMethod(nameof(Vector256.WithUpper))
+                        .MakeGenericMethod(typeof(Int16))
+                        .Invoke(null, new object[] { result, lowerResult });
             ValidateWithResult((Vector256<Int16>)(result), values);
         }
 
index 50f9440..80e8ef8 100644 (file)
@@ -78,20 +78,24 @@ namespace JIT.HardwareIntrinsics.General
 
             Vector256<Int32> value = Vector256.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]);
 
-            object lowerResult = typeof(Vector256<Int32>)
-                                    .GetMethod(nameof(Vector256.GetLower), new Type[] { })
-                                    .Invoke(value, new object[] { });
-            object upperResult = typeof(Vector256<Int32>)
-                                    .GetMethod(nameof(Vector256.GetUpper), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object lowerResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.GetLower))
+                                    .MakeGenericMethod(typeof(Int32))
+                                    .Invoke(null, new object[] { value });
+            object upperResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.GetUpper))
+                                    .MakeGenericMethod(typeof(Int32))
+                                    .Invoke(null, new object[] { value });
             ValidateGetResult((Vector128<Int32>)(lowerResult), (Vector128<Int32>)(upperResult), values);
 
-            object result = typeof(Vector256<Int32>)
-                                .GetMethod(nameof(Vector256.WithLower), new Type[] { typeof(Vector128<Int32>) })
-                                .Invoke(value, new object[] { upperResult });
-            result = typeof(Vector256<Int32>)
-                        .GetMethod(nameof(Vector256.WithUpper), new Type[] { typeof(Vector128<Int32>) })
-                        .Invoke(result, new object[] { lowerResult });
+            object result = typeof(Vector256)
+                                .GetMethod(nameof(Vector256.WithLower))
+                                .MakeGenericMethod(typeof(Int32))
+                                .Invoke(null, new object[] { value, upperResult });
+            result = typeof(Vector256)
+                        .GetMethod(nameof(Vector256.WithUpper))
+                        .MakeGenericMethod(typeof(Int32))
+                        .Invoke(null, new object[] { result, lowerResult });
             ValidateWithResult((Vector256<Int32>)(result), values);
         }
 
index 28ed533..7b76b1b 100644 (file)
@@ -78,20 +78,24 @@ namespace JIT.HardwareIntrinsics.General
 
             Vector256<Int64> value = Vector256.Create(values[0], values[1], values[2], values[3]);
 
-            object lowerResult = typeof(Vector256<Int64>)
-                                    .GetMethod(nameof(Vector256.GetLower), new Type[] { })
-                                    .Invoke(value, new object[] { });
-            object upperResult = typeof(Vector256<Int64>)
-                                    .GetMethod(nameof(Vector256.GetUpper), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object lowerResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.GetLower))
+                                    .MakeGenericMethod(typeof(Int64))
+                                    .Invoke(null, new object[] { value });
+            object upperResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.GetUpper))
+                                    .MakeGenericMethod(typeof(Int64))
+                                    .Invoke(null, new object[] { value });
             ValidateGetResult((Vector128<Int64>)(lowerResult), (Vector128<Int64>)(upperResult), values);
 
-            object result = typeof(Vector256<Int64>)
-                                .GetMethod(nameof(Vector256.WithLower), new Type[] { typeof(Vector128<Int64>) })
-                                .Invoke(value, new object[] { upperResult });
-            result = typeof(Vector256<Int64>)
-                        .GetMethod(nameof(Vector256.WithUpper), new Type[] { typeof(Vector128<Int64>) })
-                        .Invoke(result, new object[] { lowerResult });
+            object result = typeof(Vector256)
+                                .GetMethod(nameof(Vector256.WithLower))
+                                .MakeGenericMethod(typeof(Int64))
+                                .Invoke(null, new object[] { value, upperResult });
+            result = typeof(Vector256)
+                        .GetMethod(nameof(Vector256.WithUpper))
+                        .MakeGenericMethod(typeof(Int64))
+                        .Invoke(null, new object[] { result, lowerResult });
             ValidateWithResult((Vector256<Int64>)(result), values);
         }
 
index cbdbb14..f52d1e0 100644 (file)
@@ -78,20 +78,24 @@ namespace JIT.HardwareIntrinsics.General
 
             Vector256<SByte> value = Vector256.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15], values[16], values[17], values[18], values[19], values[20], values[21], values[22], values[23], values[24], values[25], values[26], values[27], values[28], values[29], values[30], values[31]);
 
-            object lowerResult = typeof(Vector256<SByte>)
-                                    .GetMethod(nameof(Vector256.GetLower), new Type[] { })
-                                    .Invoke(value, new object[] { });
-            object upperResult = typeof(Vector256<SByte>)
-                                    .GetMethod(nameof(Vector256.GetUpper), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object lowerResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.GetLower))
+                                    .MakeGenericMethod(typeof(SByte))
+                                    .Invoke(null, new object[] { value });
+            object upperResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.GetUpper))
+                                    .MakeGenericMethod(typeof(SByte))
+                                    .Invoke(null, new object[] { value });
             ValidateGetResult((Vector128<SByte>)(lowerResult), (Vector128<SByte>)(upperResult), values);
 
-            object result = typeof(Vector256<SByte>)
-                                .GetMethod(nameof(Vector256.WithLower), new Type[] { typeof(Vector128<SByte>) })
-                                .Invoke(value, new object[] { upperResult });
-            result = typeof(Vector256<SByte>)
-                        .GetMethod(nameof(Vector256.WithUpper), new Type[] { typeof(Vector128<SByte>) })
-                        .Invoke(result, new object[] { lowerResult });
+            object result = typeof(Vector256)
+                                .GetMethod(nameof(Vector256.WithLower))
+                                .MakeGenericMethod(typeof(SByte))
+                                .Invoke(null, new object[] { value, upperResult });
+            result = typeof(Vector256)
+                        .GetMethod(nameof(Vector256.WithUpper))
+                        .MakeGenericMethod(typeof(SByte))
+                        .Invoke(null, new object[] { result, lowerResult });
             ValidateWithResult((Vector256<SByte>)(result), values);
         }
 
index 15e7387..8c5cdf2 100644 (file)
@@ -78,20 +78,24 @@ namespace JIT.HardwareIntrinsics.General
 
             Vector256<Single> value = Vector256.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]);
 
-            object lowerResult = typeof(Vector256<Single>)
-                                    .GetMethod(nameof(Vector256.GetLower), new Type[] { })
-                                    .Invoke(value, new object[] { });
-            object upperResult = typeof(Vector256<Single>)
-                                    .GetMethod(nameof(Vector256.GetUpper), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object lowerResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.GetLower))
+                                    .MakeGenericMethod(typeof(Single))
+                                    .Invoke(null, new object[] { value });
+            object upperResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.GetUpper))
+                                    .MakeGenericMethod(typeof(Single))
+                                    .Invoke(null, new object[] { value });
             ValidateGetResult((Vector128<Single>)(lowerResult), (Vector128<Single>)(upperResult), values);
 
-            object result = typeof(Vector256<Single>)
-                                .GetMethod(nameof(Vector256.WithLower), new Type[] { typeof(Vector128<Single>) })
-                                .Invoke(value, new object[] { upperResult });
-            result = typeof(Vector256<Single>)
-                        .GetMethod(nameof(Vector256.WithUpper), new Type[] { typeof(Vector128<Single>) })
-                        .Invoke(result, new object[] { lowerResult });
+            object result = typeof(Vector256)
+                                .GetMethod(nameof(Vector256.WithLower))
+                                .MakeGenericMethod(typeof(Single))
+                                .Invoke(null, new object[] { value, upperResult });
+            result = typeof(Vector256)
+                        .GetMethod(nameof(Vector256.WithUpper))
+                        .MakeGenericMethod(typeof(Single))
+                        .Invoke(null, new object[] { result, lowerResult });
             ValidateWithResult((Vector256<Single>)(result), values);
         }
 
index da7f08d..21367ee 100644 (file)
@@ -78,20 +78,24 @@ namespace JIT.HardwareIntrinsics.General
 
             Vector256<UInt16> value = Vector256.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15]);
 
-            object lowerResult = typeof(Vector256<UInt16>)
-                                    .GetMethod(nameof(Vector256.GetLower), new Type[] { })
-                                    .Invoke(value, new object[] { });
-            object upperResult = typeof(Vector256<UInt16>)
-                                    .GetMethod(nameof(Vector256.GetUpper), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object lowerResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.GetLower))
+                                    .MakeGenericMethod(typeof(UInt16))
+                                    .Invoke(null, new object[] { value });
+            object upperResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.GetUpper))
+                                    .MakeGenericMethod(typeof(UInt16))
+                                    .Invoke(null, new object[] { value });
             ValidateGetResult((Vector128<UInt16>)(lowerResult), (Vector128<UInt16>)(upperResult), values);
 
-            object result = typeof(Vector256<UInt16>)
-                                .GetMethod(nameof(Vector256.WithLower), new Type[] { typeof(Vector128<UInt16>) })
-                                .Invoke(value, new object[] { upperResult });
-            result = typeof(Vector256<UInt16>)
-                        .GetMethod(nameof(Vector256.WithUpper), new Type[] { typeof(Vector128<UInt16>) })
-                        .Invoke(result, new object[] { lowerResult });
+            object result = typeof(Vector256)
+                                .GetMethod(nameof(Vector256.WithLower))
+                                .MakeGenericMethod(typeof(UInt16))
+                                .Invoke(null, new object[] { value, upperResult });
+            result = typeof(Vector256)
+                        .GetMethod(nameof(Vector256.WithUpper))
+                        .MakeGenericMethod(typeof(UInt16))
+                        .Invoke(null, new object[] { result, lowerResult });
             ValidateWithResult((Vector256<UInt16>)(result), values);
         }
 
index fb8d6d5..dbe2ab9 100644 (file)
@@ -78,20 +78,24 @@ namespace JIT.HardwareIntrinsics.General
 
             Vector256<UInt32> value = Vector256.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]);
 
-            object lowerResult = typeof(Vector256<UInt32>)
-                                    .GetMethod(nameof(Vector256.GetLower), new Type[] { })
-                                    .Invoke(value, new object[] { });
-            object upperResult = typeof(Vector256<UInt32>)
-                                    .GetMethod(nameof(Vector256.GetUpper), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object lowerResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.GetLower))
+                                    .MakeGenericMethod(typeof(UInt32))
+                                    .Invoke(null, new object[] { value });
+            object upperResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.GetUpper))
+                                    .MakeGenericMethod(typeof(UInt32))
+                                    .Invoke(null, new object[] { value });
             ValidateGetResult((Vector128<UInt32>)(lowerResult), (Vector128<UInt32>)(upperResult), values);
 
-            object result = typeof(Vector256<UInt32>)
-                                .GetMethod(nameof(Vector256.WithLower), new Type[] { typeof(Vector128<UInt32>) })
-                                .Invoke(value, new object[] { upperResult });
-            result = typeof(Vector256<UInt32>)
-                        .GetMethod(nameof(Vector256.WithUpper), new Type[] { typeof(Vector128<UInt32>) })
-                        .Invoke(result, new object[] { lowerResult });
+            object result = typeof(Vector256)
+                                .GetMethod(nameof(Vector256.WithLower))
+                                .MakeGenericMethod(typeof(UInt32))
+                                .Invoke(null, new object[] { value, upperResult });
+            result = typeof(Vector256)
+                        .GetMethod(nameof(Vector256.WithUpper))
+                        .MakeGenericMethod(typeof(UInt32))
+                        .Invoke(null, new object[] { result, lowerResult });
             ValidateWithResult((Vector256<UInt32>)(result), values);
         }
 
index 34ae7fc..03fa7ee 100644 (file)
@@ -78,20 +78,24 @@ namespace JIT.HardwareIntrinsics.General
 
             Vector256<UInt64> value = Vector256.Create(values[0], values[1], values[2], values[3]);
 
-            object lowerResult = typeof(Vector256<UInt64>)
-                                    .GetMethod(nameof(Vector256.GetLower), new Type[] { })
-                                    .Invoke(value, new object[] { });
-            object upperResult = typeof(Vector256<UInt64>)
-                                    .GetMethod(nameof(Vector256.GetUpper), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object lowerResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.GetLower))
+                                    .MakeGenericMethod(typeof(UInt64))
+                                    .Invoke(null, new object[] { value });
+            object upperResult = typeof(Vector256)
+                                    .GetMethod(nameof(Vector256.GetUpper))
+                                    .MakeGenericMethod(typeof(UInt64))
+                                    .Invoke(null, new object[] { value });
             ValidateGetResult((Vector128<UInt64>)(lowerResult), (Vector128<UInt64>)(upperResult), values);
 
-            object result = typeof(Vector256<UInt64>)
-                                .GetMethod(nameof(Vector256.WithLower), new Type[] { typeof(Vector128<UInt64>) })
-                                .Invoke(value, new object[] { upperResult });
-            result = typeof(Vector256<UInt64>)
-                        .GetMethod(nameof(Vector256.WithUpper), new Type[] { typeof(Vector128<UInt64>) })
-                        .Invoke(result, new object[] { lowerResult });
+            object result = typeof(Vector256)
+                                .GetMethod(nameof(Vector256.WithLower))
+                                .MakeGenericMethod(typeof(UInt64))
+                                .Invoke(null, new object[] { value, upperResult });
+            result = typeof(Vector256)
+                        .GetMethod(nameof(Vector256.WithUpper))
+                        .MakeGenericMethod(typeof(UInt64))
+                        .Invoke(null, new object[] { result, lowerResult });
             ValidateWithResult((Vector256<UInt64>)(result), values);
         }
 
index 1b6f5c4..0681e34 100644 (file)
@@ -73,9 +73,10 @@ namespace JIT.HardwareIntrinsics.General
 
             Vector256<Byte> value = Vector256.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15], values[16], values[17], values[18], values[19], values[20], values[21], values[22], values[23], values[24], values[25], values[26], values[27], values[28], values[29], values[30], values[31]);
 
-            object result = typeof(Vector256<Byte>)
-                                .GetMethod(nameof(Vector256.ToScalar), new Type[] { })
-                                .Invoke(value, new object[] { });
+            object result = typeof(Vector256)
+                                .GetMethod(nameof(Vector256.ToScalar))
+                                .MakeGenericMethod(typeof(Byte))
+                                .Invoke(null, new object[] { value });
 
             ValidateResult((Byte)(result), values);
         }
index 5e56107..956ecad 100644 (file)
@@ -73,9 +73,10 @@ namespace JIT.HardwareIntrinsics.General
 
             Vector256<Double> value = Vector256.Create(values[0], values[1], values[2], values[3]);
 
-            object result = typeof(Vector256<Double>)
-                                .GetMethod(nameof(Vector256.ToScalar), new Type[] { })
-                                .Invoke(value, new object[] { });
+            object result = typeof(Vector256)
+                                .GetMethod(nameof(Vector256.ToScalar))
+                                .MakeGenericMethod(typeof(Double))
+                                .Invoke(null, new object[] { value });
 
             ValidateResult((Double)(result), values);
         }
index 0406639..f457b67 100644 (file)
@@ -73,9 +73,10 @@ namespace JIT.HardwareIntrinsics.General
 
             Vector256<Int16> value = Vector256.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15]);
 
-            object result = typeof(Vector256<Int16>)
-                                .GetMethod(nameof(Vector256.ToScalar), new Type[] { })
-                                .Invoke(value, new object[] { });
+            object result = typeof(Vector256)
+                                .GetMethod(nameof(Vector256.ToScalar))
+                                .MakeGenericMethod(typeof(Int16))
+                                .Invoke(null, new object[] { value });
 
             ValidateResult((Int16)(result), values);
         }
index f04e5ab..db347bf 100644 (file)
@@ -73,9 +73,10 @@ namespace JIT.HardwareIntrinsics.General
 
             Vector256<Int32> value = Vector256.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]);
 
-            object result = typeof(Vector256<Int32>)
-                                .GetMethod(nameof(Vector256.ToScalar), new Type[] { })
-                                .Invoke(value, new object[] { });
+            object result = typeof(Vector256)
+                                .GetMethod(nameof(Vector256.ToScalar))
+                                .MakeGenericMethod(typeof(Int32))
+                                .Invoke(null, new object[] { value });
 
             ValidateResult((Int32)(result), values);
         }
index bfdf247..4478d38 100644 (file)
@@ -73,9 +73,10 @@ namespace JIT.HardwareIntrinsics.General
 
             Vector256<Int64> value = Vector256.Create(values[0], values[1], values[2], values[3]);
 
-            object result = typeof(Vector256<Int64>)
-                                .GetMethod(nameof(Vector256.ToScalar), new Type[] { })
-                                .Invoke(value, new object[] { });
+            object result = typeof(Vector256)
+                                .GetMethod(nameof(Vector256.ToScalar))
+                                .MakeGenericMethod(typeof(Int64))
+                                .Invoke(null, new object[] { value });
 
             ValidateResult((Int64)(result), values);
         }
index 0104085..2f7372e 100644 (file)
@@ -73,9 +73,10 @@ namespace JIT.HardwareIntrinsics.General
 
             Vector256<SByte> value = Vector256.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15], values[16], values[17], values[18], values[19], values[20], values[21], values[22], values[23], values[24], values[25], values[26], values[27], values[28], values[29], values[30], values[31]);
 
-            object result = typeof(Vector256<SByte>)
-                                .GetMethod(nameof(Vector256.ToScalar), new Type[] { })
-                                .Invoke(value, new object[] { });
+            object result = typeof(Vector256)
+                                .GetMethod(nameof(Vector256.ToScalar))
+                                .MakeGenericMethod(typeof(SByte))
+                                .Invoke(null, new object[] { value });
 
             ValidateResult((SByte)(result), values);
         }
index 46937bf..76b1372 100644 (file)
@@ -73,9 +73,10 @@ namespace JIT.HardwareIntrinsics.General
 
             Vector256<Single> value = Vector256.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]);
 
-            object result = typeof(Vector256<Single>)
-                                .GetMethod(nameof(Vector256.ToScalar), new Type[] { })
-                                .Invoke(value, new object[] { });
+            object result = typeof(Vector256)
+                                .GetMethod(nameof(Vector256.ToScalar))
+                                .MakeGenericMethod(typeof(Single))
+                                .Invoke(null, new object[] { value });
 
             ValidateResult((Single)(result), values);
         }
index 8aa7d48..eea7f36 100644 (file)
@@ -73,9 +73,10 @@ namespace JIT.HardwareIntrinsics.General
 
             Vector256<UInt16> value = Vector256.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15]);
 
-            object result = typeof(Vector256<UInt16>)
-                                .GetMethod(nameof(Vector256.ToScalar), new Type[] { })
-                                .Invoke(value, new object[] { });
+            object result = typeof(Vector256)
+                                .GetMethod(nameof(Vector256.ToScalar))
+                                .MakeGenericMethod(typeof(UInt16))
+                                .Invoke(null, new object[] { value });
 
             ValidateResult((UInt16)(result), values);
         }
index b3f3096..76297af 100644 (file)
@@ -73,9 +73,10 @@ namespace JIT.HardwareIntrinsics.General
 
             Vector256<UInt32> value = Vector256.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]);
 
-            object result = typeof(Vector256<UInt32>)
-                                .GetMethod(nameof(Vector256.ToScalar), new Type[] { })
-                                .Invoke(value, new object[] { });
+            object result = typeof(Vector256)
+                                .GetMethod(nameof(Vector256.ToScalar))
+                                .MakeGenericMethod(typeof(UInt32))
+                                .Invoke(null, new object[] { value });
 
             ValidateResult((UInt32)(result), values);
         }
index 817eaab..83b48aa 100644 (file)
@@ -73,9 +73,10 @@ namespace JIT.HardwareIntrinsics.General
 
             Vector256<UInt64> value = Vector256.Create(values[0], values[1], values[2], values[3]);
 
-            object result = typeof(Vector256<UInt64>)
-                                .GetMethod(nameof(Vector256.ToScalar), new Type[] { })
-                                .Invoke(value, new object[] { });
+            object result = typeof(Vector256)
+                                .GetMethod(nameof(Vector256.ToScalar))
+                                .MakeGenericMethod(typeof(UInt64))
+                                .Invoke(null, new object[] { value });
 
             ValidateResult((UInt64)(result), values);
         }
index c3b875b..91fcb48 100644 (file)
@@ -144,63 +144,73 @@ namespace JIT.HardwareIntrinsics.General
             Vector64<Byte> value;
 
             value = Vector64.Create(TestLibrary.Generator.GetByte());
-            object byteResult = typeof(Vector64<Byte>)
-                                    .GetMethod(nameof(Vector64.AsByte), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object byteResult = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.AsByte))
+                                    .MakeGenericMethod(typeof(Byte))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector64<byte>)(byteResult), value);
 
             value = Vector64.Create(TestLibrary.Generator.GetByte());
-            object doubleResult = typeof(Vector64<Byte>)
-                                    .GetMethod(nameof(Vector64.AsDouble), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object doubleResult = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.AsDouble))
+                                    .MakeGenericMethod(typeof(Byte))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector64<double>)(doubleResult), value);
 
             value = Vector64.Create(TestLibrary.Generator.GetByte());
-            object shortResult = typeof(Vector64<Byte>)
-                                    .GetMethod(nameof(Vector64.AsInt16), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object shortResult = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.AsInt16))
+                                    .MakeGenericMethod(typeof(Byte))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector64<short>)(shortResult), value);
 
             value = Vector64.Create(TestLibrary.Generator.GetByte());
-            object intResult = typeof(Vector64<Byte>)
-                                    .GetMethod(nameof(Vector64.AsInt32), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object intResult = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.AsInt32))
+                                    .MakeGenericMethod(typeof(Byte))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector64<int>)(intResult), value);
 
             value = Vector64.Create(TestLibrary.Generator.GetByte());
-            object longResult = typeof(Vector64<Byte>)
-                                    .GetMethod(nameof(Vector64.AsInt64), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object longResult = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.AsInt64))
+                                    .MakeGenericMethod(typeof(Byte))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector64<long>)(longResult), value);
 
             value = Vector64.Create(TestLibrary.Generator.GetByte());
-            object sbyteResult = typeof(Vector64<Byte>)
-                                    .GetMethod(nameof(Vector64.AsSByte), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object sbyteResult = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.AsSByte))
+                                    .MakeGenericMethod(typeof(Byte))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector64<sbyte>)(sbyteResult), value);
 
             value = Vector64.Create(TestLibrary.Generator.GetByte());
-            object floatResult = typeof(Vector64<Byte>)
-                                    .GetMethod(nameof(Vector64.AsSingle), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object floatResult = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.AsSingle))
+                                    .MakeGenericMethod(typeof(Byte))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector64<float>)(floatResult), value);
 
             value = Vector64.Create(TestLibrary.Generator.GetByte());
-            object ushortResult = typeof(Vector64<Byte>)
-                                    .GetMethod(nameof(Vector64.AsUInt16), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object ushortResult = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.AsUInt16))
+                                    .MakeGenericMethod(typeof(Byte))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector64<ushort>)(ushortResult), value);
 
             value = Vector64.Create(TestLibrary.Generator.GetByte());
-            object uintResult = typeof(Vector64<Byte>)
-                                    .GetMethod(nameof(Vector64.AsUInt32), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object uintResult = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.AsUInt32))
+                                    .MakeGenericMethod(typeof(Byte))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector64<uint>)(uintResult), value);
 
             value = Vector64.Create(TestLibrary.Generator.GetByte());
-            object ulongResult = typeof(Vector64<Byte>)
-                                    .GetMethod(nameof(Vector64.AsUInt64), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object ulongResult = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.AsUInt64))
+                                    .MakeGenericMethod(typeof(Byte))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector64<ulong>)(ulongResult), value);
         }
 
index 8d23d3f..8da9c99 100644 (file)
@@ -144,63 +144,73 @@ namespace JIT.HardwareIntrinsics.General
             Vector64<Double> value;
 
             value = Vector64.Create(TestLibrary.Generator.GetDouble());
-            object byteResult = typeof(Vector64<Double>)
-                                    .GetMethod(nameof(Vector64.AsByte), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object byteResult = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.AsByte))
+                                    .MakeGenericMethod(typeof(Double))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector64<byte>)(byteResult), value);
 
             value = Vector64.Create(TestLibrary.Generator.GetDouble());
-            object doubleResult = typeof(Vector64<Double>)
-                                    .GetMethod(nameof(Vector64.AsDouble), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object doubleResult = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.AsDouble))
+                                    .MakeGenericMethod(typeof(Double))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector64<double>)(doubleResult), value);
 
             value = Vector64.Create(TestLibrary.Generator.GetDouble());
-            object shortResult = typeof(Vector64<Double>)
-                                    .GetMethod(nameof(Vector64.AsInt16), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object shortResult = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.AsInt16))
+                                    .MakeGenericMethod(typeof(Double))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector64<short>)(shortResult), value);
 
             value = Vector64.Create(TestLibrary.Generator.GetDouble());
-            object intResult = typeof(Vector64<Double>)
-                                    .GetMethod(nameof(Vector64.AsInt32), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object intResult = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.AsInt32))
+                                    .MakeGenericMethod(typeof(Double))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector64<int>)(intResult), value);
 
             value = Vector64.Create(TestLibrary.Generator.GetDouble());
-            object longResult = typeof(Vector64<Double>)
-                                    .GetMethod(nameof(Vector64.AsInt64), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object longResult = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.AsInt64))
+                                    .MakeGenericMethod(typeof(Double))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector64<long>)(longResult), value);
 
             value = Vector64.Create(TestLibrary.Generator.GetDouble());
-            object sbyteResult = typeof(Vector64<Double>)
-                                    .GetMethod(nameof(Vector64.AsSByte), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object sbyteResult = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.AsSByte))
+                                    .MakeGenericMethod(typeof(Double))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector64<sbyte>)(sbyteResult), value);
 
             value = Vector64.Create(TestLibrary.Generator.GetDouble());
-            object floatResult = typeof(Vector64<Double>)
-                                    .GetMethod(nameof(Vector64.AsSingle), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object floatResult = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.AsSingle))
+                                    .MakeGenericMethod(typeof(Double))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector64<float>)(floatResult), value);
 
             value = Vector64.Create(TestLibrary.Generator.GetDouble());
-            object ushortResult = typeof(Vector64<Double>)
-                                    .GetMethod(nameof(Vector64.AsUInt16), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object ushortResult = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.AsUInt16))
+                                    .MakeGenericMethod(typeof(Double))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector64<ushort>)(ushortResult), value);
 
             value = Vector64.Create(TestLibrary.Generator.GetDouble());
-            object uintResult = typeof(Vector64<Double>)
-                                    .GetMethod(nameof(Vector64.AsUInt32), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object uintResult = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.AsUInt32))
+                                    .MakeGenericMethod(typeof(Double))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector64<uint>)(uintResult), value);
 
             value = Vector64.Create(TestLibrary.Generator.GetDouble());
-            object ulongResult = typeof(Vector64<Double>)
-                                    .GetMethod(nameof(Vector64.AsUInt64), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object ulongResult = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.AsUInt64))
+                                    .MakeGenericMethod(typeof(Double))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector64<ulong>)(ulongResult), value);
         }
 
index 953bccb..9751ccf 100644 (file)
@@ -144,63 +144,73 @@ namespace JIT.HardwareIntrinsics.General
             Vector64<Int16> value;
 
             value = Vector64.Create(TestLibrary.Generator.GetInt16());
-            object byteResult = typeof(Vector64<Int16>)
-                                    .GetMethod(nameof(Vector64.AsByte), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object byteResult = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.AsByte))
+                                    .MakeGenericMethod(typeof(Int16))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector64<byte>)(byteResult), value);
 
             value = Vector64.Create(TestLibrary.Generator.GetInt16());
-            object doubleResult = typeof(Vector64<Int16>)
-                                    .GetMethod(nameof(Vector64.AsDouble), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object doubleResult = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.AsDouble))
+                                    .MakeGenericMethod(typeof(Int16))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector64<double>)(doubleResult), value);
 
             value = Vector64.Create(TestLibrary.Generator.GetInt16());
-            object shortResult = typeof(Vector64<Int16>)
-                                    .GetMethod(nameof(Vector64.AsInt16), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object shortResult = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.AsInt16))
+                                    .MakeGenericMethod(typeof(Int16))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector64<short>)(shortResult), value);
 
             value = Vector64.Create(TestLibrary.Generator.GetInt16());
-            object intResult = typeof(Vector64<Int16>)
-                                    .GetMethod(nameof(Vector64.AsInt32), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object intResult = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.AsInt32))
+                                    .MakeGenericMethod(typeof(Int16))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector64<int>)(intResult), value);
 
             value = Vector64.Create(TestLibrary.Generator.GetInt16());
-            object longResult = typeof(Vector64<Int16>)
-                                    .GetMethod(nameof(Vector64.AsInt64), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object longResult = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.AsInt64))
+                                    .MakeGenericMethod(typeof(Int16))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector64<long>)(longResult), value);
 
             value = Vector64.Create(TestLibrary.Generator.GetInt16());
-            object sbyteResult = typeof(Vector64<Int16>)
-                                    .GetMethod(nameof(Vector64.AsSByte), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object sbyteResult = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.AsSByte))
+                                    .MakeGenericMethod(typeof(Int16))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector64<sbyte>)(sbyteResult), value);
 
             value = Vector64.Create(TestLibrary.Generator.GetInt16());
-            object floatResult = typeof(Vector64<Int16>)
-                                    .GetMethod(nameof(Vector64.AsSingle), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object floatResult = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.AsSingle))
+                                    .MakeGenericMethod(typeof(Int16))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector64<float>)(floatResult), value);
 
             value = Vector64.Create(TestLibrary.Generator.GetInt16());
-            object ushortResult = typeof(Vector64<Int16>)
-                                    .GetMethod(nameof(Vector64.AsUInt16), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object ushortResult = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.AsUInt16))
+                                    .MakeGenericMethod(typeof(Int16))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector64<ushort>)(ushortResult), value);
 
             value = Vector64.Create(TestLibrary.Generator.GetInt16());
-            object uintResult = typeof(Vector64<Int16>)
-                                    .GetMethod(nameof(Vector64.AsUInt32), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object uintResult = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.AsUInt32))
+                                    .MakeGenericMethod(typeof(Int16))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector64<uint>)(uintResult), value);
 
             value = Vector64.Create(TestLibrary.Generator.GetInt16());
-            object ulongResult = typeof(Vector64<Int16>)
-                                    .GetMethod(nameof(Vector64.AsUInt64), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object ulongResult = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.AsUInt64))
+                                    .MakeGenericMethod(typeof(Int16))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector64<ulong>)(ulongResult), value);
         }
 
index d823056..e85e21f 100644 (file)
@@ -144,63 +144,73 @@ namespace JIT.HardwareIntrinsics.General
             Vector64<Int32> value;
 
             value = Vector64.Create(TestLibrary.Generator.GetInt32());
-            object byteResult = typeof(Vector64<Int32>)
-                                    .GetMethod(nameof(Vector64.AsByte), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object byteResult = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.AsByte))
+                                    .MakeGenericMethod(typeof(Int32))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector64<byte>)(byteResult), value);
 
             value = Vector64.Create(TestLibrary.Generator.GetInt32());
-            object doubleResult = typeof(Vector64<Int32>)
-                                    .GetMethod(nameof(Vector64.AsDouble), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object doubleResult = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.AsDouble))
+                                    .MakeGenericMethod(typeof(Int32))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector64<double>)(doubleResult), value);
 
             value = Vector64.Create(TestLibrary.Generator.GetInt32());
-            object shortResult = typeof(Vector64<Int32>)
-                                    .GetMethod(nameof(Vector64.AsInt16), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object shortResult = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.AsInt16))
+                                    .MakeGenericMethod(typeof(Int32))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector64<short>)(shortResult), value);
 
             value = Vector64.Create(TestLibrary.Generator.GetInt32());
-            object intResult = typeof(Vector64<Int32>)
-                                    .GetMethod(nameof(Vector64.AsInt32), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object intResult = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.AsInt32))
+                                    .MakeGenericMethod(typeof(Int32))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector64<int>)(intResult), value);
 
             value = Vector64.Create(TestLibrary.Generator.GetInt32());
-            object longResult = typeof(Vector64<Int32>)
-                                    .GetMethod(nameof(Vector64.AsInt64), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object longResult = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.AsInt64))
+                                    .MakeGenericMethod(typeof(Int32))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector64<long>)(longResult), value);
 
             value = Vector64.Create(TestLibrary.Generator.GetInt32());
-            object sbyteResult = typeof(Vector64<Int32>)
-                                    .GetMethod(nameof(Vector64.AsSByte), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object sbyteResult = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.AsSByte))
+                                    .MakeGenericMethod(typeof(Int32))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector64<sbyte>)(sbyteResult), value);
 
             value = Vector64.Create(TestLibrary.Generator.GetInt32());
-            object floatResult = typeof(Vector64<Int32>)
-                                    .GetMethod(nameof(Vector64.AsSingle), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object floatResult = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.AsSingle))
+                                    .MakeGenericMethod(typeof(Int32))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector64<float>)(floatResult), value);
 
             value = Vector64.Create(TestLibrary.Generator.GetInt32());
-            object ushortResult = typeof(Vector64<Int32>)
-                                    .GetMethod(nameof(Vector64.AsUInt16), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object ushortResult = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.AsUInt16))
+                                    .MakeGenericMethod(typeof(Int32))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector64<ushort>)(ushortResult), value);
 
             value = Vector64.Create(TestLibrary.Generator.GetInt32());
-            object uintResult = typeof(Vector64<Int32>)
-                                    .GetMethod(nameof(Vector64.AsUInt32), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object uintResult = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.AsUInt32))
+                                    .MakeGenericMethod(typeof(Int32))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector64<uint>)(uintResult), value);
 
             value = Vector64.Create(TestLibrary.Generator.GetInt32());
-            object ulongResult = typeof(Vector64<Int32>)
-                                    .GetMethod(nameof(Vector64.AsUInt64), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object ulongResult = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.AsUInt64))
+                                    .MakeGenericMethod(typeof(Int32))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector64<ulong>)(ulongResult), value);
         }
 
index c5f1126..17d7ca0 100644 (file)
@@ -144,63 +144,73 @@ namespace JIT.HardwareIntrinsics.General
             Vector64<Int64> value;
 
             value = Vector64.Create(TestLibrary.Generator.GetInt64());
-            object byteResult = typeof(Vector64<Int64>)
-                                    .GetMethod(nameof(Vector64.AsByte), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object byteResult = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.AsByte))
+                                    .MakeGenericMethod(typeof(Int64))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector64<byte>)(byteResult), value);
 
             value = Vector64.Create(TestLibrary.Generator.GetInt64());
-            object doubleResult = typeof(Vector64<Int64>)
-                                    .GetMethod(nameof(Vector64.AsDouble), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object doubleResult = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.AsDouble))
+                                    .MakeGenericMethod(typeof(Int64))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector64<double>)(doubleResult), value);
 
             value = Vector64.Create(TestLibrary.Generator.GetInt64());
-            object shortResult = typeof(Vector64<Int64>)
-                                    .GetMethod(nameof(Vector64.AsInt16), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object shortResult = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.AsInt16))
+                                    .MakeGenericMethod(typeof(Int64))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector64<short>)(shortResult), value);
 
             value = Vector64.Create(TestLibrary.Generator.GetInt64());
-            object intResult = typeof(Vector64<Int64>)
-                                    .GetMethod(nameof(Vector64.AsInt32), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object intResult = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.AsInt32))
+                                    .MakeGenericMethod(typeof(Int64))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector64<int>)(intResult), value);
 
             value = Vector64.Create(TestLibrary.Generator.GetInt64());
-            object longResult = typeof(Vector64<Int64>)
-                                    .GetMethod(nameof(Vector64.AsInt64), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object longResult = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.AsInt64))
+                                    .MakeGenericMethod(typeof(Int64))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector64<long>)(longResult), value);
 
             value = Vector64.Create(TestLibrary.Generator.GetInt64());
-            object sbyteResult = typeof(Vector64<Int64>)
-                                    .GetMethod(nameof(Vector64.AsSByte), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object sbyteResult = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.AsSByte))
+                                    .MakeGenericMethod(typeof(Int64))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector64<sbyte>)(sbyteResult), value);
 
             value = Vector64.Create(TestLibrary.Generator.GetInt64());
-            object floatResult = typeof(Vector64<Int64>)
-                                    .GetMethod(nameof(Vector64.AsSingle), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object floatResult = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.AsSingle))
+                                    .MakeGenericMethod(typeof(Int64))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector64<float>)(floatResult), value);
 
             value = Vector64.Create(TestLibrary.Generator.GetInt64());
-            object ushortResult = typeof(Vector64<Int64>)
-                                    .GetMethod(nameof(Vector64.AsUInt16), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object ushortResult = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.AsUInt16))
+                                    .MakeGenericMethod(typeof(Int64))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector64<ushort>)(ushortResult), value);
 
             value = Vector64.Create(TestLibrary.Generator.GetInt64());
-            object uintResult = typeof(Vector64<Int64>)
-                                    .GetMethod(nameof(Vector64.AsUInt32), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object uintResult = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.AsUInt32))
+                                    .MakeGenericMethod(typeof(Int64))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector64<uint>)(uintResult), value);
 
             value = Vector64.Create(TestLibrary.Generator.GetInt64());
-            object ulongResult = typeof(Vector64<Int64>)
-                                    .GetMethod(nameof(Vector64.AsUInt64), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object ulongResult = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.AsUInt64))
+                                    .MakeGenericMethod(typeof(Int64))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector64<ulong>)(ulongResult), value);
         }
 
index c7838de..d029bd4 100644 (file)
@@ -144,63 +144,73 @@ namespace JIT.HardwareIntrinsics.General
             Vector64<SByte> value;
 
             value = Vector64.Create(TestLibrary.Generator.GetSByte());
-            object byteResult = typeof(Vector64<SByte>)
-                                    .GetMethod(nameof(Vector64.AsByte), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object byteResult = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.AsByte))
+                                    .MakeGenericMethod(typeof(SByte))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector64<byte>)(byteResult), value);
 
             value = Vector64.Create(TestLibrary.Generator.GetSByte());
-            object doubleResult = typeof(Vector64<SByte>)
-                                    .GetMethod(nameof(Vector64.AsDouble), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object doubleResult = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.AsDouble))
+                                    .MakeGenericMethod(typeof(SByte))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector64<double>)(doubleResult), value);
 
             value = Vector64.Create(TestLibrary.Generator.GetSByte());
-            object shortResult = typeof(Vector64<SByte>)
-                                    .GetMethod(nameof(Vector64.AsInt16), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object shortResult = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.AsInt16))
+                                    .MakeGenericMethod(typeof(SByte))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector64<short>)(shortResult), value);
 
             value = Vector64.Create(TestLibrary.Generator.GetSByte());
-            object intResult = typeof(Vector64<SByte>)
-                                    .GetMethod(nameof(Vector64.AsInt32), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object intResult = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.AsInt32))
+                                    .MakeGenericMethod(typeof(SByte))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector64<int>)(intResult), value);
 
             value = Vector64.Create(TestLibrary.Generator.GetSByte());
-            object longResult = typeof(Vector64<SByte>)
-                                    .GetMethod(nameof(Vector64.AsInt64), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object longResult = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.AsInt64))
+                                    .MakeGenericMethod(typeof(SByte))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector64<long>)(longResult), value);
 
             value = Vector64.Create(TestLibrary.Generator.GetSByte());
-            object sbyteResult = typeof(Vector64<SByte>)
-                                    .GetMethod(nameof(Vector64.AsSByte), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object sbyteResult = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.AsSByte))
+                                    .MakeGenericMethod(typeof(SByte))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector64<sbyte>)(sbyteResult), value);
 
             value = Vector64.Create(TestLibrary.Generator.GetSByte());
-            object floatResult = typeof(Vector64<SByte>)
-                                    .GetMethod(nameof(Vector64.AsSingle), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object floatResult = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.AsSingle))
+                                    .MakeGenericMethod(typeof(SByte))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector64<float>)(floatResult), value);
 
             value = Vector64.Create(TestLibrary.Generator.GetSByte());
-            object ushortResult = typeof(Vector64<SByte>)
-                                    .GetMethod(nameof(Vector64.AsUInt16), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object ushortResult = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.AsUInt16))
+                                    .MakeGenericMethod(typeof(SByte))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector64<ushort>)(ushortResult), value);
 
             value = Vector64.Create(TestLibrary.Generator.GetSByte());
-            object uintResult = typeof(Vector64<SByte>)
-                                    .GetMethod(nameof(Vector64.AsUInt32), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object uintResult = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.AsUInt32))
+                                    .MakeGenericMethod(typeof(SByte))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector64<uint>)(uintResult), value);
 
             value = Vector64.Create(TestLibrary.Generator.GetSByte());
-            object ulongResult = typeof(Vector64<SByte>)
-                                    .GetMethod(nameof(Vector64.AsUInt64), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object ulongResult = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.AsUInt64))
+                                    .MakeGenericMethod(typeof(SByte))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector64<ulong>)(ulongResult), value);
         }
 
index 5a149fd..87fcacc 100644 (file)
@@ -144,63 +144,73 @@ namespace JIT.HardwareIntrinsics.General
             Vector64<Single> value;
 
             value = Vector64.Create(TestLibrary.Generator.GetSingle());
-            object byteResult = typeof(Vector64<Single>)
-                                    .GetMethod(nameof(Vector64.AsByte), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object byteResult = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.AsByte))
+                                    .MakeGenericMethod(typeof(Single))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector64<byte>)(byteResult), value);
 
             value = Vector64.Create(TestLibrary.Generator.GetSingle());
-            object doubleResult = typeof(Vector64<Single>)
-                                    .GetMethod(nameof(Vector64.AsDouble), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object doubleResult = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.AsDouble))
+                                    .MakeGenericMethod(typeof(Single))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector64<double>)(doubleResult), value);
 
             value = Vector64.Create(TestLibrary.Generator.GetSingle());
-            object shortResult = typeof(Vector64<Single>)
-                                    .GetMethod(nameof(Vector64.AsInt16), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object shortResult = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.AsInt16))
+                                    .MakeGenericMethod(typeof(Single))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector64<short>)(shortResult), value);
 
             value = Vector64.Create(TestLibrary.Generator.GetSingle());
-            object intResult = typeof(Vector64<Single>)
-                                    .GetMethod(nameof(Vector64.AsInt32), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object intResult = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.AsInt32))
+                                    .MakeGenericMethod(typeof(Single))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector64<int>)(intResult), value);
 
             value = Vector64.Create(TestLibrary.Generator.GetSingle());
-            object longResult = typeof(Vector64<Single>)
-                                    .GetMethod(nameof(Vector64.AsInt64), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object longResult = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.AsInt64))
+                                    .MakeGenericMethod(typeof(Single))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector64<long>)(longResult), value);
 
             value = Vector64.Create(TestLibrary.Generator.GetSingle());
-            object sbyteResult = typeof(Vector64<Single>)
-                                    .GetMethod(nameof(Vector64.AsSByte), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object sbyteResult = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.AsSByte))
+                                    .MakeGenericMethod(typeof(Single))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector64<sbyte>)(sbyteResult), value);
 
             value = Vector64.Create(TestLibrary.Generator.GetSingle());
-            object floatResult = typeof(Vector64<Single>)
-                                    .GetMethod(nameof(Vector64.AsSingle), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object floatResult = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.AsSingle))
+                                    .MakeGenericMethod(typeof(Single))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector64<float>)(floatResult), value);
 
             value = Vector64.Create(TestLibrary.Generator.GetSingle());
-            object ushortResult = typeof(Vector64<Single>)
-                                    .GetMethod(nameof(Vector64.AsUInt16), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object ushortResult = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.AsUInt16))
+                                    .MakeGenericMethod(typeof(Single))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector64<ushort>)(ushortResult), value);
 
             value = Vector64.Create(TestLibrary.Generator.GetSingle());
-            object uintResult = typeof(Vector64<Single>)
-                                    .GetMethod(nameof(Vector64.AsUInt32), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object uintResult = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.AsUInt32))
+                                    .MakeGenericMethod(typeof(Single))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector64<uint>)(uintResult), value);
 
             value = Vector64.Create(TestLibrary.Generator.GetSingle());
-            object ulongResult = typeof(Vector64<Single>)
-                                    .GetMethod(nameof(Vector64.AsUInt64), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object ulongResult = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.AsUInt64))
+                                    .MakeGenericMethod(typeof(Single))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector64<ulong>)(ulongResult), value);
         }
 
index 55e20c1..2692b04 100644 (file)
@@ -144,63 +144,73 @@ namespace JIT.HardwareIntrinsics.General
             Vector64<UInt16> value;
 
             value = Vector64.Create(TestLibrary.Generator.GetUInt16());
-            object byteResult = typeof(Vector64<UInt16>)
-                                    .GetMethod(nameof(Vector64.AsByte), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object byteResult = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.AsByte))
+                                    .MakeGenericMethod(typeof(UInt16))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector64<byte>)(byteResult), value);
 
             value = Vector64.Create(TestLibrary.Generator.GetUInt16());
-            object doubleResult = typeof(Vector64<UInt16>)
-                                    .GetMethod(nameof(Vector64.AsDouble), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object doubleResult = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.AsDouble))
+                                    .MakeGenericMethod(typeof(UInt16))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector64<double>)(doubleResult), value);
 
             value = Vector64.Create(TestLibrary.Generator.GetUInt16());
-            object shortResult = typeof(Vector64<UInt16>)
-                                    .GetMethod(nameof(Vector64.AsInt16), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object shortResult = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.AsInt16))
+                                    .MakeGenericMethod(typeof(UInt16))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector64<short>)(shortResult), value);
 
             value = Vector64.Create(TestLibrary.Generator.GetUInt16());
-            object intResult = typeof(Vector64<UInt16>)
-                                    .GetMethod(nameof(Vector64.AsInt32), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object intResult = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.AsInt32))
+                                    .MakeGenericMethod(typeof(UInt16))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector64<int>)(intResult), value);
 
             value = Vector64.Create(TestLibrary.Generator.GetUInt16());
-            object longResult = typeof(Vector64<UInt16>)
-                                    .GetMethod(nameof(Vector64.AsInt64), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object longResult = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.AsInt64))
+                                    .MakeGenericMethod(typeof(UInt16))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector64<long>)(longResult), value);
 
             value = Vector64.Create(TestLibrary.Generator.GetUInt16());
-            object sbyteResult = typeof(Vector64<UInt16>)
-                                    .GetMethod(nameof(Vector64.AsSByte), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object sbyteResult = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.AsSByte))
+                                    .MakeGenericMethod(typeof(UInt16))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector64<sbyte>)(sbyteResult), value);
 
             value = Vector64.Create(TestLibrary.Generator.GetUInt16());
-            object floatResult = typeof(Vector64<UInt16>)
-                                    .GetMethod(nameof(Vector64.AsSingle), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object floatResult = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.AsSingle))
+                                    .MakeGenericMethod(typeof(UInt16))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector64<float>)(floatResult), value);
 
             value = Vector64.Create(TestLibrary.Generator.GetUInt16());
-            object ushortResult = typeof(Vector64<UInt16>)
-                                    .GetMethod(nameof(Vector64.AsUInt16), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object ushortResult = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.AsUInt16))
+                                    .MakeGenericMethod(typeof(UInt16))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector64<ushort>)(ushortResult), value);
 
             value = Vector64.Create(TestLibrary.Generator.GetUInt16());
-            object uintResult = typeof(Vector64<UInt16>)
-                                    .GetMethod(nameof(Vector64.AsUInt32), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object uintResult = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.AsUInt32))
+                                    .MakeGenericMethod(typeof(UInt16))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector64<uint>)(uintResult), value);
 
             value = Vector64.Create(TestLibrary.Generator.GetUInt16());
-            object ulongResult = typeof(Vector64<UInt16>)
-                                    .GetMethod(nameof(Vector64.AsUInt64), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object ulongResult = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.AsUInt64))
+                                    .MakeGenericMethod(typeof(UInt16))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector64<ulong>)(ulongResult), value);
         }
 
index b136784..6f6ba1e 100644 (file)
@@ -144,63 +144,73 @@ namespace JIT.HardwareIntrinsics.General
             Vector64<UInt32> value;
 
             value = Vector64.Create(TestLibrary.Generator.GetUInt32());
-            object byteResult = typeof(Vector64<UInt32>)
-                                    .GetMethod(nameof(Vector64.AsByte), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object byteResult = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.AsByte))
+                                    .MakeGenericMethod(typeof(UInt32))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector64<byte>)(byteResult), value);
 
             value = Vector64.Create(TestLibrary.Generator.GetUInt32());
-            object doubleResult = typeof(Vector64<UInt32>)
-                                    .GetMethod(nameof(Vector64.AsDouble), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object doubleResult = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.AsDouble))
+                                    .MakeGenericMethod(typeof(UInt32))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector64<double>)(doubleResult), value);
 
             value = Vector64.Create(TestLibrary.Generator.GetUInt32());
-            object shortResult = typeof(Vector64<UInt32>)
-                                    .GetMethod(nameof(Vector64.AsInt16), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object shortResult = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.AsInt16))
+                                    .MakeGenericMethod(typeof(UInt32))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector64<short>)(shortResult), value);
 
             value = Vector64.Create(TestLibrary.Generator.GetUInt32());
-            object intResult = typeof(Vector64<UInt32>)
-                                    .GetMethod(nameof(Vector64.AsInt32), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object intResult = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.AsInt32))
+                                    .MakeGenericMethod(typeof(UInt32))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector64<int>)(intResult), value);
 
             value = Vector64.Create(TestLibrary.Generator.GetUInt32());
-            object longResult = typeof(Vector64<UInt32>)
-                                    .GetMethod(nameof(Vector64.AsInt64), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object longResult = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.AsInt64))
+                                    .MakeGenericMethod(typeof(UInt32))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector64<long>)(longResult), value);
 
             value = Vector64.Create(TestLibrary.Generator.GetUInt32());
-            object sbyteResult = typeof(Vector64<UInt32>)
-                                    .GetMethod(nameof(Vector64.AsSByte), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object sbyteResult = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.AsSByte))
+                                    .MakeGenericMethod(typeof(UInt32))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector64<sbyte>)(sbyteResult), value);
 
             value = Vector64.Create(TestLibrary.Generator.GetUInt32());
-            object floatResult = typeof(Vector64<UInt32>)
-                                    .GetMethod(nameof(Vector64.AsSingle), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object floatResult = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.AsSingle))
+                                    .MakeGenericMethod(typeof(UInt32))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector64<float>)(floatResult), value);
 
             value = Vector64.Create(TestLibrary.Generator.GetUInt32());
-            object ushortResult = typeof(Vector64<UInt32>)
-                                    .GetMethod(nameof(Vector64.AsUInt16), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object ushortResult = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.AsUInt16))
+                                    .MakeGenericMethod(typeof(UInt32))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector64<ushort>)(ushortResult), value);
 
             value = Vector64.Create(TestLibrary.Generator.GetUInt32());
-            object uintResult = typeof(Vector64<UInt32>)
-                                    .GetMethod(nameof(Vector64.AsUInt32), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object uintResult = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.AsUInt32))
+                                    .MakeGenericMethod(typeof(UInt32))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector64<uint>)(uintResult), value);
 
             value = Vector64.Create(TestLibrary.Generator.GetUInt32());
-            object ulongResult = typeof(Vector64<UInt32>)
-                                    .GetMethod(nameof(Vector64.AsUInt64), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object ulongResult = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.AsUInt64))
+                                    .MakeGenericMethod(typeof(UInt32))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector64<ulong>)(ulongResult), value);
         }
 
index cf3a00b..9989bd9 100644 (file)
@@ -144,63 +144,73 @@ namespace JIT.HardwareIntrinsics.General
             Vector64<UInt64> value;
 
             value = Vector64.Create(TestLibrary.Generator.GetUInt64());
-            object byteResult = typeof(Vector64<UInt64>)
-                                    .GetMethod(nameof(Vector64.AsByte), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object byteResult = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.AsByte))
+                                    .MakeGenericMethod(typeof(UInt64))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector64<byte>)(byteResult), value);
 
             value = Vector64.Create(TestLibrary.Generator.GetUInt64());
-            object doubleResult = typeof(Vector64<UInt64>)
-                                    .GetMethod(nameof(Vector64.AsDouble), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object doubleResult = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.AsDouble))
+                                    .MakeGenericMethod(typeof(UInt64))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector64<double>)(doubleResult), value);
 
             value = Vector64.Create(TestLibrary.Generator.GetUInt64());
-            object shortResult = typeof(Vector64<UInt64>)
-                                    .GetMethod(nameof(Vector64.AsInt16), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object shortResult = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.AsInt16))
+                                    .MakeGenericMethod(typeof(UInt64))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector64<short>)(shortResult), value);
 
             value = Vector64.Create(TestLibrary.Generator.GetUInt64());
-            object intResult = typeof(Vector64<UInt64>)
-                                    .GetMethod(nameof(Vector64.AsInt32), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object intResult = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.AsInt32))
+                                    .MakeGenericMethod(typeof(UInt64))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector64<int>)(intResult), value);
 
             value = Vector64.Create(TestLibrary.Generator.GetUInt64());
-            object longResult = typeof(Vector64<UInt64>)
-                                    .GetMethod(nameof(Vector64.AsInt64), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object longResult = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.AsInt64))
+                                    .MakeGenericMethod(typeof(UInt64))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector64<long>)(longResult), value);
 
             value = Vector64.Create(TestLibrary.Generator.GetUInt64());
-            object sbyteResult = typeof(Vector64<UInt64>)
-                                    .GetMethod(nameof(Vector64.AsSByte), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object sbyteResult = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.AsSByte))
+                                    .MakeGenericMethod(typeof(UInt64))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector64<sbyte>)(sbyteResult), value);
 
             value = Vector64.Create(TestLibrary.Generator.GetUInt64());
-            object floatResult = typeof(Vector64<UInt64>)
-                                    .GetMethod(nameof(Vector64.AsSingle), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object floatResult = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.AsSingle))
+                                    .MakeGenericMethod(typeof(UInt64))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector64<float>)(floatResult), value);
 
             value = Vector64.Create(TestLibrary.Generator.GetUInt64());
-            object ushortResult = typeof(Vector64<UInt64>)
-                                    .GetMethod(nameof(Vector64.AsUInt16), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object ushortResult = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.AsUInt16))
+                                    .MakeGenericMethod(typeof(UInt64))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector64<ushort>)(ushortResult), value);
 
             value = Vector64.Create(TestLibrary.Generator.GetUInt64());
-            object uintResult = typeof(Vector64<UInt64>)
-                                    .GetMethod(nameof(Vector64.AsUInt32), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object uintResult = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.AsUInt32))
+                                    .MakeGenericMethod(typeof(UInt64))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector64<uint>)(uintResult), value);
 
             value = Vector64.Create(TestLibrary.Generator.GetUInt64());
-            object ulongResult = typeof(Vector64<UInt64>)
-                                    .GetMethod(nameof(Vector64.AsUInt64), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object ulongResult = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.AsUInt64))
+                                    .MakeGenericMethod(typeof(UInt64))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector64<ulong>)(ulongResult), value);
         }
 
index a12dd0c..280a0f2 100644 (file)
@@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result = typeof(Vector64<Byte>)
-                                    .GetMethod(nameof(Vector64.GetElement), new Type[] { typeof(int) })
-                                    .Invoke(value, new object[] { imm });
+                object result = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.GetElement))
+                                    .MakeGenericMethod(typeof(Byte))
+                                    .Invoke(null, new object[] { value, imm });
                 ValidateGetResult((Byte)(result), values);
             }
             catch (TargetInvocationException e)
@@ -145,9 +146,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result2 = typeof(Vector64<Byte>)
-                                    .GetMethod(nameof(Vector64.WithElement), new Type[] { typeof(int), typeof(Byte) })
-                                    .Invoke(value, new object[] { imm, insertedValue });
+                object result2 = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.WithElement))
+                                    .MakeGenericMethod(typeof(Byte))
+                                    .Invoke(null, new object[] { value, imm, insertedValue });
                 ValidateWithResult((Vector64<Byte>)(result2), values, insertedValue);
             }
             catch (TargetInvocationException e)
index 52fdd5b..2434a94 100644 (file)
@@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result = typeof(Vector64<Byte>)
-                                    .GetMethod(nameof(Vector64.GetElement), new Type[] { typeof(int) })
-                                    .Invoke(value, new object[] { imm });
+                object result = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.GetElement))
+                                    .MakeGenericMethod(typeof(Byte))
+                                    .Invoke(null, new object[] { value, imm });
                 ValidateGetResult((Byte)(result), values);
             }
             catch (TargetInvocationException e)
@@ -145,9 +146,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result2 = typeof(Vector64<Byte>)
-                                    .GetMethod(nameof(Vector64.WithElement), new Type[] { typeof(int), typeof(Byte) })
-                                    .Invoke(value, new object[] { imm, insertedValue });
+                object result2 = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.WithElement))
+                                    .MakeGenericMethod(typeof(Byte))
+                                    .Invoke(null, new object[] { value, imm, insertedValue });
                 ValidateWithResult((Vector64<Byte>)(result2), values, insertedValue);
             }
             catch (TargetInvocationException e)
index 0b232d4..02c65d6 100644 (file)
@@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result = typeof(Vector64<Double>)
-                                    .GetMethod(nameof(Vector64.GetElement), new Type[] { typeof(int) })
-                                    .Invoke(value, new object[] { imm });
+                object result = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.GetElement))
+                                    .MakeGenericMethod(typeof(Double))
+                                    .Invoke(null, new object[] { value, imm });
                 ValidateGetResult((Double)(result), values);
             }
             catch (TargetInvocationException e)
@@ -145,9 +146,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result2 = typeof(Vector64<Double>)
-                                    .GetMethod(nameof(Vector64.WithElement), new Type[] { typeof(int), typeof(Double) })
-                                    .Invoke(value, new object[] { imm, insertedValue });
+                object result2 = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.WithElement))
+                                    .MakeGenericMethod(typeof(Double))
+                                    .Invoke(null, new object[] { value, imm, insertedValue });
                 ValidateWithResult((Vector64<Double>)(result2), values, insertedValue);
             }
             catch (TargetInvocationException e)
index ea23b75..69d9c8b 100644 (file)
@@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result = typeof(Vector64<Int16>)
-                                    .GetMethod(nameof(Vector64.GetElement), new Type[] { typeof(int) })
-                                    .Invoke(value, new object[] { imm });
+                object result = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.GetElement))
+                                    .MakeGenericMethod(typeof(Int16))
+                                    .Invoke(null, new object[] { value, imm });
                 ValidateGetResult((Int16)(result), values);
             }
             catch (TargetInvocationException e)
@@ -145,9 +146,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result2 = typeof(Vector64<Int16>)
-                                    .GetMethod(nameof(Vector64.WithElement), new Type[] { typeof(int), typeof(Int16) })
-                                    .Invoke(value, new object[] { imm, insertedValue });
+                object result2 = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.WithElement))
+                                    .MakeGenericMethod(typeof(Int16))
+                                    .Invoke(null, new object[] { value, imm, insertedValue });
                 ValidateWithResult((Vector64<Int16>)(result2), values, insertedValue);
             }
             catch (TargetInvocationException e)
index de8e05f..dea261e 100644 (file)
@@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result = typeof(Vector64<Int16>)
-                                    .GetMethod(nameof(Vector64.GetElement), new Type[] { typeof(int) })
-                                    .Invoke(value, new object[] { imm });
+                object result = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.GetElement))
+                                    .MakeGenericMethod(typeof(Int16))
+                                    .Invoke(null, new object[] { value, imm });
                 ValidateGetResult((Int16)(result), values);
             }
             catch (TargetInvocationException e)
@@ -145,9 +146,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result2 = typeof(Vector64<Int16>)
-                                    .GetMethod(nameof(Vector64.WithElement), new Type[] { typeof(int), typeof(Int16) })
-                                    .Invoke(value, new object[] { imm, insertedValue });
+                object result2 = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.WithElement))
+                                    .MakeGenericMethod(typeof(Int16))
+                                    .Invoke(null, new object[] { value, imm, insertedValue });
                 ValidateWithResult((Vector64<Int16>)(result2), values, insertedValue);
             }
             catch (TargetInvocationException e)
index 605f5b8..5b49551 100644 (file)
@@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result = typeof(Vector64<Int32>)
-                                    .GetMethod(nameof(Vector64.GetElement), new Type[] { typeof(int) })
-                                    .Invoke(value, new object[] { imm });
+                object result = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.GetElement))
+                                    .MakeGenericMethod(typeof(Int32))
+                                    .Invoke(null, new object[] { value, imm });
                 ValidateGetResult((Int32)(result), values);
             }
             catch (TargetInvocationException e)
@@ -145,9 +146,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result2 = typeof(Vector64<Int32>)
-                                    .GetMethod(nameof(Vector64.WithElement), new Type[] { typeof(int), typeof(Int32) })
-                                    .Invoke(value, new object[] { imm, insertedValue });
+                object result2 = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.WithElement))
+                                    .MakeGenericMethod(typeof(Int32))
+                                    .Invoke(null, new object[] { value, imm, insertedValue });
                 ValidateWithResult((Vector64<Int32>)(result2), values, insertedValue);
             }
             catch (TargetInvocationException e)
index c7e0573..4c29585 100644 (file)
@@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result = typeof(Vector64<Int32>)
-                                    .GetMethod(nameof(Vector64.GetElement), new Type[] { typeof(int) })
-                                    .Invoke(value, new object[] { imm });
+                object result = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.GetElement))
+                                    .MakeGenericMethod(typeof(Int32))
+                                    .Invoke(null, new object[] { value, imm });
                 ValidateGetResult((Int32)(result), values);
             }
             catch (TargetInvocationException e)
@@ -145,9 +146,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result2 = typeof(Vector64<Int32>)
-                                    .GetMethod(nameof(Vector64.WithElement), new Type[] { typeof(int), typeof(Int32) })
-                                    .Invoke(value, new object[] { imm, insertedValue });
+                object result2 = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.WithElement))
+                                    .MakeGenericMethod(typeof(Int32))
+                                    .Invoke(null, new object[] { value, imm, insertedValue });
                 ValidateWithResult((Vector64<Int32>)(result2), values, insertedValue);
             }
             catch (TargetInvocationException e)
index 71c3d16..f1538d3 100644 (file)
@@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result = typeof(Vector64<Int64>)
-                                    .GetMethod(nameof(Vector64.GetElement), new Type[] { typeof(int) })
-                                    .Invoke(value, new object[] { imm });
+                object result = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.GetElement))
+                                    .MakeGenericMethod(typeof(Int64))
+                                    .Invoke(null, new object[] { value, imm });
                 ValidateGetResult((Int64)(result), values);
             }
             catch (TargetInvocationException e)
@@ -145,9 +146,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result2 = typeof(Vector64<Int64>)
-                                    .GetMethod(nameof(Vector64.WithElement), new Type[] { typeof(int), typeof(Int64) })
-                                    .Invoke(value, new object[] { imm, insertedValue });
+                object result2 = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.WithElement))
+                                    .MakeGenericMethod(typeof(Int64))
+                                    .Invoke(null, new object[] { value, imm, insertedValue });
                 ValidateWithResult((Vector64<Int64>)(result2), values, insertedValue);
             }
             catch (TargetInvocationException e)
index 386ef92..4b00686 100644 (file)
@@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result = typeof(Vector64<SByte>)
-                                    .GetMethod(nameof(Vector64.GetElement), new Type[] { typeof(int) })
-                                    .Invoke(value, new object[] { imm });
+                object result = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.GetElement))
+                                    .MakeGenericMethod(typeof(SByte))
+                                    .Invoke(null, new object[] { value, imm });
                 ValidateGetResult((SByte)(result), values);
             }
             catch (TargetInvocationException e)
@@ -145,9 +146,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result2 = typeof(Vector64<SByte>)
-                                    .GetMethod(nameof(Vector64.WithElement), new Type[] { typeof(int), typeof(SByte) })
-                                    .Invoke(value, new object[] { imm, insertedValue });
+                object result2 = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.WithElement))
+                                    .MakeGenericMethod(typeof(SByte))
+                                    .Invoke(null, new object[] { value, imm, insertedValue });
                 ValidateWithResult((Vector64<SByte>)(result2), values, insertedValue);
             }
             catch (TargetInvocationException e)
index d4c2e73..3b26000 100644 (file)
@@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result = typeof(Vector64<SByte>)
-                                    .GetMethod(nameof(Vector64.GetElement), new Type[] { typeof(int) })
-                                    .Invoke(value, new object[] { imm });
+                object result = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.GetElement))
+                                    .MakeGenericMethod(typeof(SByte))
+                                    .Invoke(null, new object[] { value, imm });
                 ValidateGetResult((SByte)(result), values);
             }
             catch (TargetInvocationException e)
@@ -145,9 +146,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result2 = typeof(Vector64<SByte>)
-                                    .GetMethod(nameof(Vector64.WithElement), new Type[] { typeof(int), typeof(SByte) })
-                                    .Invoke(value, new object[] { imm, insertedValue });
+                object result2 = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.WithElement))
+                                    .MakeGenericMethod(typeof(SByte))
+                                    .Invoke(null, new object[] { value, imm, insertedValue });
                 ValidateWithResult((Vector64<SByte>)(result2), values, insertedValue);
             }
             catch (TargetInvocationException e)
index 43c2820..f3d626c 100644 (file)
@@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result = typeof(Vector64<Single>)
-                                    .GetMethod(nameof(Vector64.GetElement), new Type[] { typeof(int) })
-                                    .Invoke(value, new object[] { imm });
+                object result = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.GetElement))
+                                    .MakeGenericMethod(typeof(Single))
+                                    .Invoke(null, new object[] { value, imm });
                 ValidateGetResult((Single)(result), values);
             }
             catch (TargetInvocationException e)
@@ -145,9 +146,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result2 = typeof(Vector64<Single>)
-                                    .GetMethod(nameof(Vector64.WithElement), new Type[] { typeof(int), typeof(Single) })
-                                    .Invoke(value, new object[] { imm, insertedValue });
+                object result2 = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.WithElement))
+                                    .MakeGenericMethod(typeof(Single))
+                                    .Invoke(null, new object[] { value, imm, insertedValue });
                 ValidateWithResult((Vector64<Single>)(result2), values, insertedValue);
             }
             catch (TargetInvocationException e)
index 50aff8a..ce111bd 100644 (file)
@@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result = typeof(Vector64<Single>)
-                                    .GetMethod(nameof(Vector64.GetElement), new Type[] { typeof(int) })
-                                    .Invoke(value, new object[] { imm });
+                object result = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.GetElement))
+                                    .MakeGenericMethod(typeof(Single))
+                                    .Invoke(null, new object[] { value, imm });
                 ValidateGetResult((Single)(result), values);
             }
             catch (TargetInvocationException e)
@@ -145,9 +146,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result2 = typeof(Vector64<Single>)
-                                    .GetMethod(nameof(Vector64.WithElement), new Type[] { typeof(int), typeof(Single) })
-                                    .Invoke(value, new object[] { imm, insertedValue });
+                object result2 = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.WithElement))
+                                    .MakeGenericMethod(typeof(Single))
+                                    .Invoke(null, new object[] { value, imm, insertedValue });
                 ValidateWithResult((Vector64<Single>)(result2), values, insertedValue);
             }
             catch (TargetInvocationException e)
index 5bcbcd3..00eb96a 100644 (file)
@@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result = typeof(Vector64<UInt16>)
-                                    .GetMethod(nameof(Vector64.GetElement), new Type[] { typeof(int) })
-                                    .Invoke(value, new object[] { imm });
+                object result = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.GetElement))
+                                    .MakeGenericMethod(typeof(UInt16))
+                                    .Invoke(null, new object[] { value, imm });
                 ValidateGetResult((UInt16)(result), values);
             }
             catch (TargetInvocationException e)
@@ -145,9 +146,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result2 = typeof(Vector64<UInt16>)
-                                    .GetMethod(nameof(Vector64.WithElement), new Type[] { typeof(int), typeof(UInt16) })
-                                    .Invoke(value, new object[] { imm, insertedValue });
+                object result2 = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.WithElement))
+                                    .MakeGenericMethod(typeof(UInt16))
+                                    .Invoke(null, new object[] { value, imm, insertedValue });
                 ValidateWithResult((Vector64<UInt16>)(result2), values, insertedValue);
             }
             catch (TargetInvocationException e)
index 8b2b654..c5b5176 100644 (file)
@@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result = typeof(Vector64<UInt16>)
-                                    .GetMethod(nameof(Vector64.GetElement), new Type[] { typeof(int) })
-                                    .Invoke(value, new object[] { imm });
+                object result = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.GetElement))
+                                    .MakeGenericMethod(typeof(UInt16))
+                                    .Invoke(null, new object[] { value, imm });
                 ValidateGetResult((UInt16)(result), values);
             }
             catch (TargetInvocationException e)
@@ -145,9 +146,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result2 = typeof(Vector64<UInt16>)
-                                    .GetMethod(nameof(Vector64.WithElement), new Type[] { typeof(int), typeof(UInt16) })
-                                    .Invoke(value, new object[] { imm, insertedValue });
+                object result2 = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.WithElement))
+                                    .MakeGenericMethod(typeof(UInt16))
+                                    .Invoke(null, new object[] { value, imm, insertedValue });
                 ValidateWithResult((Vector64<UInt16>)(result2), values, insertedValue);
             }
             catch (TargetInvocationException e)
index 813d1fd..97412c3 100644 (file)
@@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result = typeof(Vector64<UInt32>)
-                                    .GetMethod(nameof(Vector64.GetElement), new Type[] { typeof(int) })
-                                    .Invoke(value, new object[] { imm });
+                object result = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.GetElement))
+                                    .MakeGenericMethod(typeof(UInt32))
+                                    .Invoke(null, new object[] { value, imm });
                 ValidateGetResult((UInt32)(result), values);
             }
             catch (TargetInvocationException e)
@@ -145,9 +146,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result2 = typeof(Vector64<UInt32>)
-                                    .GetMethod(nameof(Vector64.WithElement), new Type[] { typeof(int), typeof(UInt32) })
-                                    .Invoke(value, new object[] { imm, insertedValue });
+                object result2 = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.WithElement))
+                                    .MakeGenericMethod(typeof(UInt32))
+                                    .Invoke(null, new object[] { value, imm, insertedValue });
                 ValidateWithResult((Vector64<UInt32>)(result2), values, insertedValue);
             }
             catch (TargetInvocationException e)
index 88a5a0f..c7aeca8 100644 (file)
@@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result = typeof(Vector64<UInt32>)
-                                    .GetMethod(nameof(Vector64.GetElement), new Type[] { typeof(int) })
-                                    .Invoke(value, new object[] { imm });
+                object result = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.GetElement))
+                                    .MakeGenericMethod(typeof(UInt32))
+                                    .Invoke(null, new object[] { value, imm });
                 ValidateGetResult((UInt32)(result), values);
             }
             catch (TargetInvocationException e)
@@ -145,9 +146,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result2 = typeof(Vector64<UInt32>)
-                                    .GetMethod(nameof(Vector64.WithElement), new Type[] { typeof(int), typeof(UInt32) })
-                                    .Invoke(value, new object[] { imm, insertedValue });
+                object result2 = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.WithElement))
+                                    .MakeGenericMethod(typeof(UInt32))
+                                    .Invoke(null, new object[] { value, imm, insertedValue });
                 ValidateWithResult((Vector64<UInt32>)(result2), values, insertedValue);
             }
             catch (TargetInvocationException e)
index 7229aa3..83a643b 100644 (file)
@@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result = typeof(Vector64<UInt64>)
-                                    .GetMethod(nameof(Vector64.GetElement), new Type[] { typeof(int) })
-                                    .Invoke(value, new object[] { imm });
+                object result = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.GetElement))
+                                    .MakeGenericMethod(typeof(UInt64))
+                                    .Invoke(null, new object[] { value, imm });
                 ValidateGetResult((UInt64)(result), values);
             }
             catch (TargetInvocationException e)
@@ -145,9 +146,10 @@ namespace JIT.HardwareIntrinsics.General
 
             try
             {
-                object result2 = typeof(Vector64<UInt64>)
-                                    .GetMethod(nameof(Vector64.WithElement), new Type[] { typeof(int), typeof(UInt64) })
-                                    .Invoke(value, new object[] { imm, insertedValue });
+                object result2 = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.WithElement))
+                                    .MakeGenericMethod(typeof(UInt64))
+                                    .Invoke(null, new object[] { value, imm, insertedValue });
                 ValidateWithResult((Vector64<UInt64>)(result2), values, insertedValue);
             }
             catch (TargetInvocationException e)
index 3d779b5..b3cf016 100644 (file)
@@ -73,9 +73,10 @@ namespace JIT.HardwareIntrinsics.General
 
             Vector64<Byte> value = Vector64.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]);
 
-            object result = typeof(Vector64<Byte>)
-                                .GetMethod(nameof(Vector64.ToScalar), new Type[] { })
-                                .Invoke(value, new object[] { });
+            object result = typeof(Vector64)
+                                .GetMethod(nameof(Vector64.ToScalar))
+                                .MakeGenericMethod(typeof(Byte))
+                                .Invoke(null, new object[] { value });
 
             ValidateResult((Byte)(result), values);
         }
index 1e54c5b..8740694 100644 (file)
@@ -73,9 +73,10 @@ namespace JIT.HardwareIntrinsics.General
 
             Vector64<Double> value = Vector64.Create(values[0]);
 
-            object result = typeof(Vector64<Double>)
-                                .GetMethod(nameof(Vector64.ToScalar), new Type[] { })
-                                .Invoke(value, new object[] { });
+            object result = typeof(Vector64)
+                                .GetMethod(nameof(Vector64.ToScalar))
+                                .MakeGenericMethod(typeof(Double))
+                                .Invoke(null, new object[] { value });
 
             ValidateResult((Double)(result), values);
         }
index df62b1e..2c00451 100644 (file)
@@ -73,9 +73,10 @@ namespace JIT.HardwareIntrinsics.General
 
             Vector64<Int16> value = Vector64.Create(values[0], values[1], values[2], values[3]);
 
-            object result = typeof(Vector64<Int16>)
-                                .GetMethod(nameof(Vector64.ToScalar), new Type[] { })
-                                .Invoke(value, new object[] { });
+            object result = typeof(Vector64)
+                                .GetMethod(nameof(Vector64.ToScalar))
+                                .MakeGenericMethod(typeof(Int16))
+                                .Invoke(null, new object[] { value });
 
             ValidateResult((Int16)(result), values);
         }
index 214089b..d66e986 100644 (file)
@@ -73,9 +73,10 @@ namespace JIT.HardwareIntrinsics.General
 
             Vector64<Int32> value = Vector64.Create(values[0], values[1]);
 
-            object result = typeof(Vector64<Int32>)
-                                .GetMethod(nameof(Vector64.ToScalar), new Type[] { })
-                                .Invoke(value, new object[] { });
+            object result = typeof(Vector64)
+                                .GetMethod(nameof(Vector64.ToScalar))
+                                .MakeGenericMethod(typeof(Int32))
+                                .Invoke(null, new object[] { value });
 
             ValidateResult((Int32)(result), values);
         }
index dda2658..4b937e2 100644 (file)
@@ -73,9 +73,10 @@ namespace JIT.HardwareIntrinsics.General
 
             Vector64<Int64> value = Vector64.Create(values[0]);
 
-            object result = typeof(Vector64<Int64>)
-                                .GetMethod(nameof(Vector64.ToScalar), new Type[] { })
-                                .Invoke(value, new object[] { });
+            object result = typeof(Vector64)
+                                .GetMethod(nameof(Vector64.ToScalar))
+                                .MakeGenericMethod(typeof(Int64))
+                                .Invoke(null, new object[] { value });
 
             ValidateResult((Int64)(result), values);
         }
index 428c1e1..6b4682c 100644 (file)
@@ -73,9 +73,10 @@ namespace JIT.HardwareIntrinsics.General
 
             Vector64<SByte> value = Vector64.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]);
 
-            object result = typeof(Vector64<SByte>)
-                                .GetMethod(nameof(Vector64.ToScalar), new Type[] { })
-                                .Invoke(value, new object[] { });
+            object result = typeof(Vector64)
+                                .GetMethod(nameof(Vector64.ToScalar))
+                                .MakeGenericMethod(typeof(SByte))
+                                .Invoke(null, new object[] { value });
 
             ValidateResult((SByte)(result), values);
         }
index 70c5647..fde07e6 100644 (file)
@@ -73,9 +73,10 @@ namespace JIT.HardwareIntrinsics.General
 
             Vector64<Single> value = Vector64.Create(values[0], values[1]);
 
-            object result = typeof(Vector64<Single>)
-                                .GetMethod(nameof(Vector64.ToScalar), new Type[] { })
-                                .Invoke(value, new object[] { });
+            object result = typeof(Vector64)
+                                .GetMethod(nameof(Vector64.ToScalar))
+                                .MakeGenericMethod(typeof(Single))
+                                .Invoke(null, new object[] { value });
 
             ValidateResult((Single)(result), values);
         }
index 44026fe..aac41b8 100644 (file)
@@ -73,9 +73,10 @@ namespace JIT.HardwareIntrinsics.General
 
             Vector64<UInt16> value = Vector64.Create(values[0], values[1], values[2], values[3]);
 
-            object result = typeof(Vector64<UInt16>)
-                                .GetMethod(nameof(Vector64.ToScalar), new Type[] { })
-                                .Invoke(value, new object[] { });
+            object result = typeof(Vector64)
+                                .GetMethod(nameof(Vector64.ToScalar))
+                                .MakeGenericMethod(typeof(UInt16))
+                                .Invoke(null, new object[] { value });
 
             ValidateResult((UInt16)(result), values);
         }
index 32a903c..7f86623 100644 (file)
@@ -73,9 +73,10 @@ namespace JIT.HardwareIntrinsics.General
 
             Vector64<UInt32> value = Vector64.Create(values[0], values[1]);
 
-            object result = typeof(Vector64<UInt32>)
-                                .GetMethod(nameof(Vector64.ToScalar), new Type[] { })
-                                .Invoke(value, new object[] { });
+            object result = typeof(Vector64)
+                                .GetMethod(nameof(Vector64.ToScalar))
+                                .MakeGenericMethod(typeof(UInt32))
+                                .Invoke(null, new object[] { value });
 
             ValidateResult((UInt32)(result), values);
         }
index ac680ab..0a80b85 100644 (file)
@@ -73,9 +73,10 @@ namespace JIT.HardwareIntrinsics.General
 
             Vector64<UInt64> value = Vector64.Create(values[0]);
 
-            object result = typeof(Vector64<UInt64>)
-                                .GetMethod(nameof(Vector64.ToScalar), new Type[] { })
-                                .Invoke(value, new object[] { });
+            object result = typeof(Vector64)
+                                .GetMethod(nameof(Vector64.ToScalar))
+                                .MakeGenericMethod(typeof(UInt64))
+                                .Invoke(null, new object[] { value });
 
             ValidateResult((UInt64)(result), values);
         }
index 4fe87d4..fda0872 100644 (file)
@@ -76,14 +76,16 @@ namespace JIT.HardwareIntrinsics.General
 
             Vector64<Byte> value = Vector64.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]);
 
-            object result = typeof(Vector64<Byte>)
-                                .GetMethod(nameof(Vector64.ToVector128), new Type[] { })
-                                .Invoke(value, new object[] { });
+            object result = typeof(Vector64)
+                                .GetMethod(nameof(Vector64.ToVector128))
+                                .MakeGenericMethod(typeof(Byte))
+                                .Invoke(null, new object[] { value });
             ValidateResult((Vector128<Byte>)(result), values, isUnsafe: false);
 
-            object unsafeResult = typeof(Vector64<Byte>)
-                                    .GetMethod(nameof(Vector64.ToVector128), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object unsafeResult = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.ToVector128))
+                                    .MakeGenericMethod(typeof(Byte))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector128<Byte>)(unsafeResult), values, isUnsafe: true);
         }
 
index 1afe299..175efd4 100644 (file)
@@ -76,14 +76,16 @@ namespace JIT.HardwareIntrinsics.General
 
             Vector64<Double> value = Vector64.Create(values[0]);
 
-            object result = typeof(Vector64<Double>)
-                                .GetMethod(nameof(Vector64.ToVector128), new Type[] { })
-                                .Invoke(value, new object[] { });
+            object result = typeof(Vector64)
+                                .GetMethod(nameof(Vector64.ToVector128))
+                                .MakeGenericMethod(typeof(Double))
+                                .Invoke(null, new object[] { value });
             ValidateResult((Vector128<Double>)(result), values, isUnsafe: false);
 
-            object unsafeResult = typeof(Vector64<Double>)
-                                    .GetMethod(nameof(Vector64.ToVector128), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object unsafeResult = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.ToVector128))
+                                    .MakeGenericMethod(typeof(Double))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector128<Double>)(unsafeResult), values, isUnsafe: true);
         }
 
index 2dea575..d63cfc1 100644 (file)
@@ -76,14 +76,16 @@ namespace JIT.HardwareIntrinsics.General
 
             Vector64<Int16> value = Vector64.Create(values[0], values[1], values[2], values[3]);
 
-            object result = typeof(Vector64<Int16>)
-                                .GetMethod(nameof(Vector64.ToVector128), new Type[] { })
-                                .Invoke(value, new object[] { });
+            object result = typeof(Vector64)
+                                .GetMethod(nameof(Vector64.ToVector128))
+                                .MakeGenericMethod(typeof(Int16))
+                                .Invoke(null, new object[] { value });
             ValidateResult((Vector128<Int16>)(result), values, isUnsafe: false);
 
-            object unsafeResult = typeof(Vector64<Int16>)
-                                    .GetMethod(nameof(Vector64.ToVector128), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object unsafeResult = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.ToVector128))
+                                    .MakeGenericMethod(typeof(Int16))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector128<Int16>)(unsafeResult), values, isUnsafe: true);
         }
 
index 739b9c1..0ef7d51 100644 (file)
@@ -76,14 +76,16 @@ namespace JIT.HardwareIntrinsics.General
 
             Vector64<Int32> value = Vector64.Create(values[0], values[1]);
 
-            object result = typeof(Vector64<Int32>)
-                                .GetMethod(nameof(Vector64.ToVector128), new Type[] { })
-                                .Invoke(value, new object[] { });
+            object result = typeof(Vector64)
+                                .GetMethod(nameof(Vector64.ToVector128))
+                                .MakeGenericMethod(typeof(Int32))
+                                .Invoke(null, new object[] { value });
             ValidateResult((Vector128<Int32>)(result), values, isUnsafe: false);
 
-            object unsafeResult = typeof(Vector64<Int32>)
-                                    .GetMethod(nameof(Vector64.ToVector128), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object unsafeResult = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.ToVector128))
+                                    .MakeGenericMethod(typeof(Int32))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector128<Int32>)(unsafeResult), values, isUnsafe: true);
         }
 
index 7c6d118..ab584c8 100644 (file)
@@ -76,14 +76,16 @@ namespace JIT.HardwareIntrinsics.General
 
             Vector64<Int64> value = Vector64.Create(values[0]);
 
-            object result = typeof(Vector64<Int64>)
-                                .GetMethod(nameof(Vector64.ToVector128), new Type[] { })
-                                .Invoke(value, new object[] { });
+            object result = typeof(Vector64)
+                                .GetMethod(nameof(Vector64.ToVector128))
+                                .MakeGenericMethod(typeof(Int64))
+                                .Invoke(null, new object[] { value });
             ValidateResult((Vector128<Int64>)(result), values, isUnsafe: false);
 
-            object unsafeResult = typeof(Vector64<Int64>)
-                                    .GetMethod(nameof(Vector64.ToVector128), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object unsafeResult = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.ToVector128))
+                                    .MakeGenericMethod(typeof(Int64))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector128<Int64>)(unsafeResult), values, isUnsafe: true);
         }
 
index a1dc82f..b89d7b6 100644 (file)
@@ -76,14 +76,16 @@ namespace JIT.HardwareIntrinsics.General
 
             Vector64<SByte> value = Vector64.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]);
 
-            object result = typeof(Vector64<SByte>)
-                                .GetMethod(nameof(Vector64.ToVector128), new Type[] { })
-                                .Invoke(value, new object[] { });
+            object result = typeof(Vector64)
+                                .GetMethod(nameof(Vector64.ToVector128))
+                                .MakeGenericMethod(typeof(SByte))
+                                .Invoke(null, new object[] { value });
             ValidateResult((Vector128<SByte>)(result), values, isUnsafe: false);
 
-            object unsafeResult = typeof(Vector64<SByte>)
-                                    .GetMethod(nameof(Vector64.ToVector128), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object unsafeResult = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.ToVector128))
+                                    .MakeGenericMethod(typeof(SByte))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector128<SByte>)(unsafeResult), values, isUnsafe: true);
         }
 
index c533787..8ae339d 100644 (file)
@@ -76,14 +76,16 @@ namespace JIT.HardwareIntrinsics.General
 
             Vector64<Single> value = Vector64.Create(values[0], values[1]);
 
-            object result = typeof(Vector64<Single>)
-                                .GetMethod(nameof(Vector64.ToVector128), new Type[] { })
-                                .Invoke(value, new object[] { });
+            object result = typeof(Vector64)
+                                .GetMethod(nameof(Vector64.ToVector128))
+                                .MakeGenericMethod(typeof(Single))
+                                .Invoke(null, new object[] { value });
             ValidateResult((Vector128<Single>)(result), values, isUnsafe: false);
 
-            object unsafeResult = typeof(Vector64<Single>)
-                                    .GetMethod(nameof(Vector64.ToVector128), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object unsafeResult = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.ToVector128))
+                                    .MakeGenericMethod(typeof(Single))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector128<Single>)(unsafeResult), values, isUnsafe: true);
         }
 
index 2f48350..e778051 100644 (file)
@@ -76,14 +76,16 @@ namespace JIT.HardwareIntrinsics.General
 
             Vector64<UInt16> value = Vector64.Create(values[0], values[1], values[2], values[3]);
 
-            object result = typeof(Vector64<UInt16>)
-                                .GetMethod(nameof(Vector64.ToVector128), new Type[] { })
-                                .Invoke(value, new object[] { });
+            object result = typeof(Vector64)
+                                .GetMethod(nameof(Vector64.ToVector128))
+                                .MakeGenericMethod(typeof(UInt16))
+                                .Invoke(null, new object[] { value });
             ValidateResult((Vector128<UInt16>)(result), values, isUnsafe: false);
 
-            object unsafeResult = typeof(Vector64<UInt16>)
-                                    .GetMethod(nameof(Vector64.ToVector128), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object unsafeResult = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.ToVector128))
+                                    .MakeGenericMethod(typeof(UInt16))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector128<UInt16>)(unsafeResult), values, isUnsafe: true);
         }
 
index 0bfdb95..e6cf8d0 100644 (file)
@@ -76,14 +76,16 @@ namespace JIT.HardwareIntrinsics.General
 
             Vector64<UInt32> value = Vector64.Create(values[0], values[1]);
 
-            object result = typeof(Vector64<UInt32>)
-                                .GetMethod(nameof(Vector64.ToVector128), new Type[] { })
-                                .Invoke(value, new object[] { });
+            object result = typeof(Vector64)
+                                .GetMethod(nameof(Vector64.ToVector128))
+                                .MakeGenericMethod(typeof(UInt32))
+                                .Invoke(null, new object[] { value });
             ValidateResult((Vector128<UInt32>)(result), values, isUnsafe: false);
 
-            object unsafeResult = typeof(Vector64<UInt32>)
-                                    .GetMethod(nameof(Vector64.ToVector128), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object unsafeResult = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.ToVector128))
+                                    .MakeGenericMethod(typeof(UInt32))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector128<UInt32>)(unsafeResult), values, isUnsafe: true);
         }
 
index 5b25266..1aa1fc5 100644 (file)
@@ -76,14 +76,16 @@ namespace JIT.HardwareIntrinsics.General
 
             Vector64<UInt64> value = Vector64.Create(values[0]);
 
-            object result = typeof(Vector64<UInt64>)
-                                .GetMethod(nameof(Vector64.ToVector128), new Type[] { })
-                                .Invoke(value, new object[] { });
+            object result = typeof(Vector64)
+                                .GetMethod(nameof(Vector64.ToVector128))
+                                .MakeGenericMethod(typeof(UInt64))
+                                .Invoke(null, new object[] { value });
             ValidateResult((Vector128<UInt64>)(result), values, isUnsafe: false);
 
-            object unsafeResult = typeof(Vector64<UInt64>)
-                                    .GetMethod(nameof(Vector64.ToVector128), new Type[] { })
-                                    .Invoke(value, new object[] { });
+            object unsafeResult = typeof(Vector64)
+                                    .GetMethod(nameof(Vector64.ToVector128))
+                                    .MakeGenericMethod(typeof(UInt64))
+                                    .Invoke(null, new object[] { value });
             ValidateResult((Vector128<UInt64>)(unsafeResult), values, isUnsafe: true);
         }