From 4ba958c9fd412b217e21a1dd508ec466a21aa462 Mon Sep 17 00:00:00 2001 From: Tanner Gooding Date: Thu, 21 Feb 2019 03:09:40 -0800 Subject: [PATCH] Enable the HWIntrinsic extension methods and remove the instance implementations (#22705) * 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 --- .../shared/System/Runtime/Intrinsics/Vector128.cs | 3 +- .../System/Runtime/Intrinsics/Vector128_1.cs | 217 +----- .../shared/System/Runtime/Intrinsics/Vector256.cs | 79 ++- .../System/Runtime/Intrinsics/Vector256_1.cs | 245 +------ .../shared/System/Runtime/Intrinsics/Vector64_1.cs | 160 +---- src/jit/compiler.h | 8 +- src/jit/hwintrinsicArm64.cpp | 50 ++ src/jit/hwintrinsiclistxarch.h | 70 +- src/jit/hwintrinsicxarch.cpp | 638 +++++++++++++++++ src/jit/importer.cpp | 758 +-------------------- .../General/Shared/VectorAsTest.template | 70 +- .../General/Shared/VectorExtendTest.template | 14 +- .../Shared/VectorGetAndWithElementTest.template | 14 +- .../VectorGetAndWithLowerAndUpperTest.template | 28 +- .../General/Shared/VectorToScalarTest.template | 7 +- .../General/Vector128_1/As.Byte.cs | 70 +- .../General/Vector128_1/As.Double.cs | 70 +- .../General/Vector128_1/As.Int16.cs | 70 +- .../General/Vector128_1/As.Int32.cs | 70 +- .../General/Vector128_1/As.Int64.cs | 70 +- .../General/Vector128_1/As.SByte.cs | 70 +- .../General/Vector128_1/As.Single.cs | 70 +- .../General/Vector128_1/As.UInt16.cs | 70 +- .../General/Vector128_1/As.UInt32.cs | 70 +- .../General/Vector128_1/As.UInt64.cs | 70 +- .../Vector128_1/GetAndWithElement.Byte.0.cs | 14 +- .../Vector128_1/GetAndWithElement.Byte.15.cs | 14 +- .../Vector128_1/GetAndWithElement.Byte.7.cs | 14 +- .../Vector128_1/GetAndWithElement.Double.0.cs | 14 +- .../Vector128_1/GetAndWithElement.Double.1.cs | 14 +- .../Vector128_1/GetAndWithElement.Int16.0.cs | 14 +- .../Vector128_1/GetAndWithElement.Int16.3.cs | 14 +- .../Vector128_1/GetAndWithElement.Int16.7.cs | 14 +- .../Vector128_1/GetAndWithElement.Int32.0.cs | 14 +- .../Vector128_1/GetAndWithElement.Int32.1.cs | 14 +- .../Vector128_1/GetAndWithElement.Int32.3.cs | 14 +- .../Vector128_1/GetAndWithElement.Int64.0.cs | 14 +- .../Vector128_1/GetAndWithElement.Int64.1.cs | 14 +- .../Vector128_1/GetAndWithElement.SByte.0.cs | 14 +- .../Vector128_1/GetAndWithElement.SByte.15.cs | 14 +- .../Vector128_1/GetAndWithElement.SByte.7.cs | 14 +- .../Vector128_1/GetAndWithElement.Single.0.cs | 14 +- .../Vector128_1/GetAndWithElement.Single.1.cs | 14 +- .../Vector128_1/GetAndWithElement.Single.3.cs | 14 +- .../Vector128_1/GetAndWithElement.UInt16.0.cs | 14 +- .../Vector128_1/GetAndWithElement.UInt16.3.cs | 14 +- .../Vector128_1/GetAndWithElement.UInt16.7.cs | 14 +- .../Vector128_1/GetAndWithElement.UInt32.0.cs | 14 +- .../Vector128_1/GetAndWithElement.UInt32.1.cs | 14 +- .../Vector128_1/GetAndWithElement.UInt32.3.cs | 14 +- .../Vector128_1/GetAndWithElement.UInt64.0.cs | 14 +- .../Vector128_1/GetAndWithElement.UInt64.1.cs | 14 +- .../Vector128_1/GetAndWithLowerAndUpper.Byte.cs | 28 +- .../Vector128_1/GetAndWithLowerAndUpper.Double.cs | 28 +- .../Vector128_1/GetAndWithLowerAndUpper.Int16.cs | 28 +- .../Vector128_1/GetAndWithLowerAndUpper.Int32.cs | 28 +- .../Vector128_1/GetAndWithLowerAndUpper.Int64.cs | 28 +- .../Vector128_1/GetAndWithLowerAndUpper.SByte.cs | 28 +- .../Vector128_1/GetAndWithLowerAndUpper.Single.cs | 28 +- .../Vector128_1/GetAndWithLowerAndUpper.UInt16.cs | 28 +- .../Vector128_1/GetAndWithLowerAndUpper.UInt32.cs | 28 +- .../Vector128_1/GetAndWithLowerAndUpper.UInt64.cs | 28 +- .../General/Vector128_1/ToScalar.Byte.cs | 7 +- .../General/Vector128_1/ToScalar.Double.cs | 7 +- .../General/Vector128_1/ToScalar.Int16.cs | 7 +- .../General/Vector128_1/ToScalar.Int32.cs | 7 +- .../General/Vector128_1/ToScalar.Int64.cs | 7 +- .../General/Vector128_1/ToScalar.SByte.cs | 7 +- .../General/Vector128_1/ToScalar.Single.cs | 7 +- .../General/Vector128_1/ToScalar.UInt16.cs | 7 +- .../General/Vector128_1/ToScalar.UInt32.cs | 7 +- .../General/Vector128_1/ToScalar.UInt64.cs | 7 +- .../General/Vector128_1/ToVector256.Byte.cs | 14 +- .../General/Vector128_1/ToVector256.Double.cs | 14 +- .../General/Vector128_1/ToVector256.Int16.cs | 14 +- .../General/Vector128_1/ToVector256.Int32.cs | 14 +- .../General/Vector128_1/ToVector256.Int64.cs | 14 +- .../General/Vector128_1/ToVector256.SByte.cs | 14 +- .../General/Vector128_1/ToVector256.Single.cs | 14 +- .../General/Vector128_1/ToVector256.UInt16.cs | 14 +- .../General/Vector128_1/ToVector256.UInt32.cs | 14 +- .../General/Vector128_1/ToVector256.UInt64.cs | 14 +- .../General/Vector256_1/As.Byte.cs | 70 +- .../General/Vector256_1/As.Double.cs | 70 +- .../General/Vector256_1/As.Int16.cs | 70 +- .../General/Vector256_1/As.Int32.cs | 70 +- .../General/Vector256_1/As.Int64.cs | 70 +- .../General/Vector256_1/As.SByte.cs | 70 +- .../General/Vector256_1/As.Single.cs | 70 +- .../General/Vector256_1/As.UInt16.cs | 70 +- .../General/Vector256_1/As.UInt32.cs | 70 +- .../General/Vector256_1/As.UInt64.cs | 70 +- .../Vector256_1/GetAndWithElement.Byte.0.cs | 14 +- .../Vector256_1/GetAndWithElement.Byte.15.cs | 14 +- .../Vector256_1/GetAndWithElement.Byte.31.cs | 14 +- .../Vector256_1/GetAndWithElement.Byte.7.cs | 14 +- .../Vector256_1/GetAndWithElement.Double.0.cs | 14 +- .../Vector256_1/GetAndWithElement.Double.1.cs | 14 +- .../Vector256_1/GetAndWithElement.Double.3.cs | 14 +- .../Vector256_1/GetAndWithElement.Int16.0.cs | 14 +- .../Vector256_1/GetAndWithElement.Int16.15.cs | 14 +- .../Vector256_1/GetAndWithElement.Int16.3.cs | 14 +- .../Vector256_1/GetAndWithElement.Int16.7.cs | 14 +- .../Vector256_1/GetAndWithElement.Int32.0.cs | 14 +- .../Vector256_1/GetAndWithElement.Int32.1.cs | 14 +- .../Vector256_1/GetAndWithElement.Int32.3.cs | 14 +- .../Vector256_1/GetAndWithElement.Int32.7.cs | 14 +- .../Vector256_1/GetAndWithElement.Int64.0.cs | 14 +- .../Vector256_1/GetAndWithElement.Int64.1.cs | 14 +- .../Vector256_1/GetAndWithElement.Int64.3.cs | 14 +- .../Vector256_1/GetAndWithElement.SByte.0.cs | 14 +- .../Vector256_1/GetAndWithElement.SByte.15.cs | 14 +- .../Vector256_1/GetAndWithElement.SByte.31.cs | 14 +- .../Vector256_1/GetAndWithElement.SByte.7.cs | 14 +- .../Vector256_1/GetAndWithElement.Single.0.cs | 14 +- .../Vector256_1/GetAndWithElement.Single.1.cs | 14 +- .../Vector256_1/GetAndWithElement.Single.3.cs | 14 +- .../Vector256_1/GetAndWithElement.Single.7.cs | 14 +- .../Vector256_1/GetAndWithElement.UInt16.0.cs | 14 +- .../Vector256_1/GetAndWithElement.UInt16.15.cs | 14 +- .../Vector256_1/GetAndWithElement.UInt16.3.cs | 14 +- .../Vector256_1/GetAndWithElement.UInt16.7.cs | 14 +- .../Vector256_1/GetAndWithElement.UInt32.0.cs | 14 +- .../Vector256_1/GetAndWithElement.UInt32.1.cs | 14 +- .../Vector256_1/GetAndWithElement.UInt32.3.cs | 14 +- .../Vector256_1/GetAndWithElement.UInt32.7.cs | 14 +- .../Vector256_1/GetAndWithElement.UInt64.0.cs | 14 +- .../Vector256_1/GetAndWithElement.UInt64.1.cs | 14 +- .../Vector256_1/GetAndWithElement.UInt64.3.cs | 14 +- .../Vector256_1/GetAndWithLowerAndUpper.Byte.cs | 28 +- .../Vector256_1/GetAndWithLowerAndUpper.Double.cs | 28 +- .../Vector256_1/GetAndWithLowerAndUpper.Int16.cs | 28 +- .../Vector256_1/GetAndWithLowerAndUpper.Int32.cs | 28 +- .../Vector256_1/GetAndWithLowerAndUpper.Int64.cs | 28 +- .../Vector256_1/GetAndWithLowerAndUpper.SByte.cs | 28 +- .../Vector256_1/GetAndWithLowerAndUpper.Single.cs | 28 +- .../Vector256_1/GetAndWithLowerAndUpper.UInt16.cs | 28 +- .../Vector256_1/GetAndWithLowerAndUpper.UInt32.cs | 28 +- .../Vector256_1/GetAndWithLowerAndUpper.UInt64.cs | 28 +- .../General/Vector256_1/ToScalar.Byte.cs | 7 +- .../General/Vector256_1/ToScalar.Double.cs | 7 +- .../General/Vector256_1/ToScalar.Int16.cs | 7 +- .../General/Vector256_1/ToScalar.Int32.cs | 7 +- .../General/Vector256_1/ToScalar.Int64.cs | 7 +- .../General/Vector256_1/ToScalar.SByte.cs | 7 +- .../General/Vector256_1/ToScalar.Single.cs | 7 +- .../General/Vector256_1/ToScalar.UInt16.cs | 7 +- .../General/Vector256_1/ToScalar.UInt32.cs | 7 +- .../General/Vector256_1/ToScalar.UInt64.cs | 7 +- .../General/Vector64_1/As.Byte.cs | 70 +- .../General/Vector64_1/As.Double.cs | 70 +- .../General/Vector64_1/As.Int16.cs | 70 +- .../General/Vector64_1/As.Int32.cs | 70 +- .../General/Vector64_1/As.Int64.cs | 70 +- .../General/Vector64_1/As.SByte.cs | 70 +- .../General/Vector64_1/As.Single.cs | 70 +- .../General/Vector64_1/As.UInt16.cs | 70 +- .../General/Vector64_1/As.UInt32.cs | 70 +- .../General/Vector64_1/As.UInt64.cs | 70 +- .../General/Vector64_1/GetAndWithElement.Byte.0.cs | 14 +- .../General/Vector64_1/GetAndWithElement.Byte.7.cs | 14 +- .../Vector64_1/GetAndWithElement.Double.0.cs | 14 +- .../Vector64_1/GetAndWithElement.Int16.0.cs | 14 +- .../Vector64_1/GetAndWithElement.Int16.3.cs | 14 +- .../Vector64_1/GetAndWithElement.Int32.0.cs | 14 +- .../Vector64_1/GetAndWithElement.Int32.1.cs | 14 +- .../Vector64_1/GetAndWithElement.Int64.0.cs | 14 +- .../Vector64_1/GetAndWithElement.SByte.0.cs | 14 +- .../Vector64_1/GetAndWithElement.SByte.7.cs | 14 +- .../Vector64_1/GetAndWithElement.Single.0.cs | 14 +- .../Vector64_1/GetAndWithElement.Single.1.cs | 14 +- .../Vector64_1/GetAndWithElement.UInt16.0.cs | 14 +- .../Vector64_1/GetAndWithElement.UInt16.3.cs | 14 +- .../Vector64_1/GetAndWithElement.UInt32.0.cs | 14 +- .../Vector64_1/GetAndWithElement.UInt32.1.cs | 14 +- .../Vector64_1/GetAndWithElement.UInt64.0.cs | 14 +- .../General/Vector64_1/ToScalar.Byte.cs | 7 +- .../General/Vector64_1/ToScalar.Double.cs | 7 +- .../General/Vector64_1/ToScalar.Int16.cs | 7 +- .../General/Vector64_1/ToScalar.Int32.cs | 7 +- .../General/Vector64_1/ToScalar.Int64.cs | 7 +- .../General/Vector64_1/ToScalar.SByte.cs | 7 +- .../General/Vector64_1/ToScalar.Single.cs | 7 +- .../General/Vector64_1/ToScalar.UInt16.cs | 7 +- .../General/Vector64_1/ToScalar.UInt32.cs | 7 +- .../General/Vector64_1/ToScalar.UInt64.cs | 7 +- .../General/Vector64_1/ToVector128.Byte.cs | 14 +- .../General/Vector64_1/ToVector128.Double.cs | 14 +- .../General/Vector64_1/ToVector128.Int16.cs | 14 +- .../General/Vector64_1/ToVector128.Int32.cs | 14 +- .../General/Vector64_1/ToVector128.Int64.cs | 14 +- .../General/Vector64_1/ToVector128.SByte.cs | 14 +- .../General/Vector64_1/ToVector128.Single.cs | 14 +- .../General/Vector64_1/ToVector128.UInt16.cs | 14 +- .../General/Vector64_1/ToVector128.UInt32.cs | 14 +- .../General/Vector64_1/ToVector128.UInt64.cs | 14 +- 196 files changed, 3369 insertions(+), 3276 deletions(-) diff --git a/src/System.Private.CoreLib/shared/System/Runtime/Intrinsics/Vector128.cs b/src/System.Private.CoreLib/shared/System/Runtime/Intrinsics/Vector128.cs index c2e530b..4c32326 100644 --- a/src/System.Private.CoreLib/shared/System/Runtime/Intrinsics/Vector128.cs +++ b/src/System.Private.CoreLib/shared/System/Runtime/Intrinsics/Vector128.cs @@ -1630,6 +1630,7 @@ namespace System.Runtime.Intrinsics /// The value of the element at . /// The type of () is not supported. /// was less than zero or greater than the number of elements. + [Intrinsic] public static T GetElement(this Vector128 vector, int index) where T : struct { @@ -1652,6 +1653,7 @@ namespace System.Runtime.Intrinsics /// A with the value of the element at set to and the remaining elements set to the same value as that in . /// The type of () is not supported. /// was less than zero or greater than the number of elements. + [Intrinsic] public static Vector128 WithElement(this Vector128 vector, int index, T value) where T : struct { @@ -1677,7 +1679,6 @@ namespace System.Runtime.Intrinsics where T : struct { ThrowHelper.ThrowForUnsupportedVectorBaseType(); - return Unsafe.As, Vector64>(ref vector); } diff --git a/src/System.Private.CoreLib/shared/System/Runtime/Intrinsics/Vector128_1.cs b/src/System.Private.CoreLib/shared/System/Runtime/Intrinsics/Vector128_1.cs index 80da2c4..6598a57 100644 --- a/src/System.Private.CoreLib/shared/System/Runtime/Intrinsics/Vector128_1.cs +++ b/src/System.Private.CoreLib/shared/System/Runtime/Intrinsics/Vector128_1.cs @@ -91,83 +91,6 @@ namespace System.Runtime.Intrinsics } } - /// Reinterprets the current instance as a new . - /// The type of the vector the current instance should be reinterpreted as. - /// The current instance reinterpreted as a new . - /// The type of the current instance () or the type of the target () is not supported. - [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public Vector128 As() where U : struct - { - ThrowHelper.ThrowForUnsupportedVectorBaseType(); - ThrowHelper.ThrowForUnsupportedVectorBaseType(); - return Unsafe.As, Vector128>(ref Unsafe.AsRef(in this)); - } - - /// Reinterprets the current instance as a new . - /// The current instance reinterpreted as a new . - /// The type of the current instance () is not supported. - [Intrinsic] - public Vector128 AsByte() => As(); - - /// Reinterprets the current instance as a new . - /// The current instance reinterpreted as a new . - /// The type of the current instance () is not supported. - [Intrinsic] - public Vector128 AsDouble() => As(); - - /// Reinterprets the current instance as a new . - /// The current instance reinterpreted as a new . - /// The type of the current instance () is not supported. - [Intrinsic] - public Vector128 AsInt16() => As(); - - /// Reinterprets the current instance as a new . - /// The current instance reinterpreted as a new . - /// The type of the current instance () is not supported. - [Intrinsic] - public Vector128 AsInt32() => As(); - - /// Reinterprets the current instance as a new . - /// The current instance reinterpreted as a new . - /// The type of the current instance () is not supported. - [Intrinsic] - public Vector128 AsInt64() => As(); - - /// Reinterprets the current instance as a new . - /// The current instance reinterpreted as a new . - /// The type of the current instance () is not supported. - [Intrinsic] - [CLSCompliant(false)] - public Vector128 AsSByte() => As(); - - /// Reinterprets the current instance as a new . - /// The current instance reinterpreted as a new . - /// The type of the current instance () is not supported. - [Intrinsic] - public Vector128 AsSingle() => As(); - - /// Reinterprets the current instance as a new . - /// The current instance reinterpreted as a new . - /// The type of the current instance () is not supported. - [Intrinsic] - [CLSCompliant(false)] - public Vector128 AsUInt16() => As(); - - /// Reinterprets the current instance as a new . - /// The current instance reinterpreted as a new . - /// The type of the current instance () is not supported. - [Intrinsic] - [CLSCompliant(false)] - public Vector128 AsUInt32() => As(); - - /// Reinterprets the current instance as a new . - /// The current instance reinterpreted as a new . - /// The type of the current instance () is not supported. - [Intrinsic] - [CLSCompliant(false)] - public Vector128 AsUInt64() => As(); - /// Determines whether the specified is equal to the current instance. /// The to compare with the current instance. /// true if is equal to the current instance; otherwise, false. @@ -179,7 +102,7 @@ namespace System.Runtime.Intrinsics if (Sse.IsSupported && (typeof(T) == typeof(float))) { - Vector128 result = Sse.CompareEqual(AsSingle(), other.AsSingle()); + Vector128 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 result = Sse2.CompareEqual(AsDouble(), other.AsDouble()); + Vector128 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 result = Sse2.CompareEqual(AsByte(), other.AsByte()); + Vector128 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) && Equals((Vector128)(obj)); } - /// Gets the element at the specified index. - /// The index of the element to get. - /// The value of the element at . - /// The type of the current instance () is not supported. - /// was less than zero or greater than the number of elements. - [Intrinsic] - public T GetElement(int index) - { - ThrowHelper.ThrowForUnsupportedVectorBaseType(); - - if ((uint)(index) >= (uint)(Count)) - { - ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.index); - } - - ref T e0 = ref Unsafe.As, T>(ref Unsafe.AsRef(in this)); - return Unsafe.Add(ref e0, index); - } - - /// Creates a new 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. - /// The index of the element to set. - /// The value to set the value to. - /// A with the value of the element at set to and the remaining elements set to the same value as that in the current instance. - /// The type of the current instance () is not supported. - /// was less than zero or greater than the number of elements. - [Intrinsic] - public Vector128 WithElement(int index, T value) - { - ThrowHelper.ThrowForUnsupportedVectorBaseType(); - - if ((uint)(index) >= (uint)(Count)) - { - ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.index); - } - - Vector128 result = this; - ref T e0 = ref Unsafe.As, T>(ref result); - Unsafe.Add(ref e0, index) = value; - return result; - } - /// Gets the hash code for the instance. /// The hash code for the instance. /// The type of the current instance () is not supported. @@ -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; } - /// Gets the value of the lower 64-bits as a new . - /// The value of the lower 64-bits as a new . - /// The type of the current instance () is not supported. - public Vector64 GetLower() - { - ThrowHelper.ThrowForUnsupportedVectorBaseType(); - - return Unsafe.As, Vector64>(ref Unsafe.AsRef(in this)); - } - - /// Creates a new 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. - /// The value of the lower 64-bits as a . - /// A new 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. - /// The type of the current instance () is not supported. - public Vector128 WithLower(Vector64 value) - { - ThrowHelper.ThrowForUnsupportedVectorBaseType(); - - Vector128 result = this; - Unsafe.As, Vector64>(ref result) = value; - return result; - } - - /// Gets the value of the upper 64-bits as a new . - /// The value of the upper 64-bits as a new . - /// The type of the current instance () is not supported. - public Vector64 GetUpper() - { - ThrowHelper.ThrowForUnsupportedVectorBaseType(); - - ref Vector64 lower = ref Unsafe.As, Vector64>(ref Unsafe.AsRef(in this)); - return Unsafe.Add(ref lower, 1); - } - - /// Creates a new 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. - /// The value of the upper 64-bits as a . - /// A new 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. - /// The type of the current instance () is not supported. - public Vector128 WithUpper(Vector64 value) - { - ThrowHelper.ThrowForUnsupportedVectorBaseType(); - - Vector128 result = this; - ref Vector64 lower = ref Unsafe.As, Vector64>(ref result); - Unsafe.Add(ref lower, 1) = value; - return result; - } - - /// Converts the current instance to a scalar containing the value of the first element. - /// A scalar containing the value of the first element. - /// The type of the current instance () is not supported. - [Intrinsic] - public T ToScalar() - { - ThrowHelper.ThrowForUnsupportedVectorBaseType(); - return Unsafe.As, T>(ref Unsafe.AsRef(in this)); - } - /// Converts the current instance to an equivalent string representation. /// An equivalent string representation of the current instance. /// The type of the current instance () is not supported. @@ -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); } - - /// Converts the current instance to a new with the lower 128-bits set to the value of the current instance and the upper 128-bits initialized to zero. - /// A new with the lower 128-bits set to the value of the current instance and the upper 128-bits initialized to zero. - /// The type of the current instance () is not supported. - [Intrinsic] - public Vector256 ToVector256() - { - ThrowHelper.ThrowForUnsupportedVectorBaseType(); - - Vector256 result = Vector256.Zero; - Unsafe.As, Vector128>(ref result) = this; - return result; - } - - /// Converts the current instance to a new with the lower 128-bits set to the value of the current instance and the upper 128-bits left uninitialized. - /// A new with the lower 128-bits set to the value of the current instance and the upper 128-bits left uninitialized. - /// The type of the current instance () is not supported. - [Intrinsic] - public unsafe Vector256 ToVector256Unsafe() - { - ThrowHelper.ThrowForUnsupportedVectorBaseType(); - - // 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>(pResult) = this; - return Unsafe.AsRef>(pResult); - } } } diff --git a/src/System.Private.CoreLib/shared/System/Runtime/Intrinsics/Vector256.cs b/src/System.Private.CoreLib/shared/System/Runtime/Intrinsics/Vector256.cs index 1af31dc..adf8207 100644 --- a/src/System.Private.CoreLib/shared/System/Runtime/Intrinsics/Vector256.cs +++ b/src/System.Private.CoreLib/shared/System/Runtime/Intrinsics/Vector256.cs @@ -1758,6 +1758,7 @@ namespace System.Runtime.Intrinsics /// The value of the element at . /// The type of () is not supported. /// was less than zero or greater than the number of elements. + [Intrinsic] public static T GetElement(this Vector256 vector, int index) where T : struct { @@ -1780,6 +1781,7 @@ namespace System.Runtime.Intrinsics /// A with the value of the element at set to and the remaining elements set to the same value as that in . /// The type of () is not supported. /// was less than zero or greater than the number of elements. + [Intrinsic] public static Vector256 WithElement(this Vector256 vector, int index, T value) where T : struct { @@ -1801,11 +1803,11 @@ namespace System.Runtime.Intrinsics /// The vector to get the lower 128-bits from. /// The value of the lower 128-bits as a new . /// The type of () is not supported. + [Intrinsic] public static Vector128 GetLower(this Vector256 vector) where T : struct { ThrowHelper.ThrowForUnsupportedVectorBaseType(); - return Unsafe.As, Vector128>(ref vector); } @@ -1815,14 +1817,33 @@ namespace System.Runtime.Intrinsics /// The value of the lower 128-bits as a . /// A new with the lower 128-bits set to the specified value and the upper 128-bits set to the same value as that in . /// The type of () is not supported. + [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector256 WithLower(this Vector256 vector, Vector128 value) where T : struct { ThrowHelper.ThrowForUnsupportedVectorBaseType(); - Vector256 result = vector; - Unsafe.As, Vector128>(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(); + } + + 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(); + } + + return SoftwareFallback(vector, value); + + static Vector256 SoftwareFallback(Vector256 vector, Vector128 value) + { + Vector256 result = vector; + Unsafe.As, Vector128>(ref result) = value; + return result; + } } /// Gets the value of the upper 128-bits as a new . @@ -1830,13 +1851,32 @@ namespace System.Runtime.Intrinsics /// The vector to get the upper 128-bits from. /// The value of the upper 128-bits as a new . /// The type of () is not supported. + [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector128 GetUpper(this Vector256 vector) where T : struct { ThrowHelper.ThrowForUnsupportedVectorBaseType(); - ref Vector128 lower = ref Unsafe.As, Vector128>(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(); + } + + 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(); + } + + return SoftwareFallback(vector); + + static Vector128 SoftwareFallback(Vector256 vector) + { + ref Vector128 lower = ref Unsafe.As, Vector128>(ref vector); + return Unsafe.Add(ref lower, 1); + } } /// Creates a new 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. @@ -1845,15 +1885,34 @@ namespace System.Runtime.Intrinsics /// The value of the upper 128-bits as a . /// A new with the upper 128-bits set to the specified value and the upper 128-bits set to the same value as that in . /// The type of () is not supported. + [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector256 WithUpper(this Vector256 vector, Vector128 value) where T : struct { ThrowHelper.ThrowForUnsupportedVectorBaseType(); - Vector256 result = vector; - ref Vector128 lower = ref Unsafe.As, Vector128>(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(); + } + + 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(); + } + + return SoftwareFallback(vector, value); + + static Vector256 SoftwareFallback(Vector256 vector, Vector128 value) + { + Vector256 result = vector; + ref Vector128 lower = ref Unsafe.As, Vector128>(ref result); + Unsafe.Add(ref lower, 1) = value; + return result; + } } /// Converts the given vector to a scalar containing the value of the first element. diff --git a/src/System.Private.CoreLib/shared/System/Runtime/Intrinsics/Vector256_1.cs b/src/System.Private.CoreLib/shared/System/Runtime/Intrinsics/Vector256_1.cs index 968faf1..07ba971 100644 --- a/src/System.Private.CoreLib/shared/System/Runtime/Intrinsics/Vector256_1.cs +++ b/src/System.Private.CoreLib/shared/System/Runtime/Intrinsics/Vector256_1.cs @@ -93,83 +93,6 @@ namespace System.Runtime.Intrinsics } } - /// Reinterprets the current instance as a new . - /// The type of the vector the current instance should be reinterpreted as. - /// The current instance reinterpreted as a new . - /// The type of the current instance () or the type of the target () is not supported. - [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public Vector256 As() where U : struct - { - ThrowHelper.ThrowForUnsupportedVectorBaseType(); - ThrowHelper.ThrowForUnsupportedVectorBaseType(); - return Unsafe.As, Vector256>(ref Unsafe.AsRef(in this)); - } - - /// Reinterprets the current instance as a new . - /// The current instance reinterpreted as a new . - /// The type of the current instance () is not supported. - [Intrinsic] - public Vector256 AsByte() => As(); - - /// Reinterprets the current instance as a new . - /// The current instance reinterpreted as a new . - /// The type of the current instance () is not supported. - [Intrinsic] - public Vector256 AsDouble() => As(); - - /// Reinterprets the current instance as a new . - /// The current instance reinterpreted as a new . - /// The type of the current instance () is not supported. - [Intrinsic] - public Vector256 AsInt16() => As(); - - /// Reinterprets the current instance as a new . - /// The current instance reinterpreted as a new . - /// The type of the current instance () is not supported. - [Intrinsic] - public Vector256 AsInt32() => As(); - - /// Reinterprets the current instance as a new . - /// The current instance reinterpreted as a new . - /// The type of the current instance () is not supported. - [Intrinsic] - public Vector256 AsInt64() => As(); - - /// Reinterprets the current instance as a new . - /// The current instance reinterpreted as a new . - /// The type of the current instance () is not supported. - [Intrinsic] - [CLSCompliant(false)] - public Vector256 AsSByte() => As(); - - /// Reinterprets the current instance as a new . - /// The current instance reinterpreted as a new . - /// The type of the current instance () is not supported. - [Intrinsic] - public Vector256 AsSingle() => As(); - - /// Reinterprets the current instance as a new . - /// The current instance reinterpreted as a new . - /// The type of the current instance () is not supported. - [Intrinsic] - [CLSCompliant(false)] - public Vector256 AsUInt16() => As(); - - /// Reinterprets the current instance as a new . - /// The current instance reinterpreted as a new . - /// The type of the current instance () is not supported. - [Intrinsic] - [CLSCompliant(false)] - public Vector256 AsUInt32() => As(); - - /// Reinterprets the current instance as a new . - /// The current instance reinterpreted as a new . - /// The type of the current instance () is not supported. - [Intrinsic] - [CLSCompliant(false)] - public Vector256 AsUInt64() => As(); - /// Determines whether the specified is equal to the current instance. /// The to compare with the current instance. /// true if is equal to the current instance; otherwise, false. @@ -181,13 +104,13 @@ namespace System.Runtime.Intrinsics { if (typeof(T) == typeof(float)) { - Vector256 result = Avx.Compare(AsSingle(), other.AsSingle(), FloatComparisonMode.EqualOrderedNonSignaling); + Vector256 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 result = Avx.Compare(AsDouble(), other.AsDouble(), FloatComparisonMode.EqualOrderedNonSignaling); + Vector256 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 result = Avx2.CompareEqual(AsByte(), other.AsByte()); + Vector256 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) && Equals((Vector256)(obj)); } - /// Gets the element at the specified index. - /// The index of the element to get. - /// The value of the element at . - /// The type of the current instance () is not supported. - /// was less than zero or greater than the number of elements. - [Intrinsic] - public T GetElement(int index) - { - ThrowHelper.ThrowForUnsupportedVectorBaseType(); - - if ((uint)(index) >= (uint)(Count)) - { - ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.index); - } - - ref T e0 = ref Unsafe.As, T>(ref Unsafe.AsRef(in this)); - return Unsafe.Add(ref e0, index); - } - - /// Creates a new 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. - /// The index of the element to set. - /// The value to set the value to. - /// A with the value of the element at set to and the remaining elements set to the same value as that in the current instance. - /// The type of the current instance () is not supported. - /// was less than zero or greater than the number of elements. - [Intrinsic] - public Vector256 WithElement(int index, T value) - { - ThrowHelper.ThrowForUnsupportedVectorBaseType(); - - if ((uint)(index) >= (uint)(Count)) - { - ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.index); - } - - Vector256 result = this; - ref T e0 = ref Unsafe.As, T>(ref result); - Unsafe.Add(ref e0, index) = value; - return result; - } - /// Gets the hash code for the instance. /// The hash code for the instance. /// The type of the current instance () is not supported. @@ -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; } - /// Gets the value of the lower 128-bits as a new . - /// The value of the lower 128-bits as a new . - /// The type of the current instance () is not supported. - [Intrinsic] - public Vector128 GetLower() - { - ThrowHelper.ThrowForUnsupportedVectorBaseType(); - return Unsafe.As, Vector128>(ref Unsafe.AsRef(in this)); - } - - /// Creates a new 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. - /// The value of the lower 128-bits as a . - /// A new 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. - /// The type of the current instance () is not supported. - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public Vector256 WithLower(Vector128 value) - { - ThrowHelper.ThrowForUnsupportedVectorBaseType(); - - 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(); - } - - 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(); - } - - return SoftwareFallback(in this, value); - - static Vector256 SoftwareFallback(in Vector256 vector, Vector128 value) - { - Vector256 result = vector; - Unsafe.As, Vector128>(ref result) = value; - return result; - } - } - - /// Gets the value of the upper 128-bits as a new . - /// The value of the upper 128-bits as a new . - /// The type of the current instance () is not supported. - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public Vector128 GetUpper() - { - ThrowHelper.ThrowForUnsupportedVectorBaseType(); - - 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(); - } - - 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(); - } - - return SoftwareFallback(in this); - - static Vector128 SoftwareFallback(in Vector256 vector) - { - ref Vector128 lower = ref Unsafe.As, Vector128>(ref Unsafe.AsRef(in vector)); - return Unsafe.Add(ref lower, 1); - } - } - - /// Creates a new 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. - /// The value of the upper 128-bits as a . - /// A new 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. - /// The type of the current instance () is not supported. - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public Vector256 WithUpper(Vector128 value) - { - ThrowHelper.ThrowForUnsupportedVectorBaseType(); - - 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(); - } - - 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(); - } - - return SoftwareFallback(in this, value); - - static Vector256 SoftwareFallback(in Vector256 vector, Vector128 value) - { - Vector256 result = vector; - ref Vector128 lower = ref Unsafe.As, Vector128>(ref result); - Unsafe.Add(ref lower, 1) = value; - return result; - } - } - - /// Converts the current instance to a scalar containing the value of the first element. - /// A scalar containing the value of the first element. - /// The type of the current instance () is not supported. - [Intrinsic] - public T ToScalar() - { - ThrowHelper.ThrowForUnsupportedVectorBaseType(); - return Unsafe.As, T>(ref Unsafe.AsRef(in this)); - } - /// Converts the current instance to an equivalent string representation. /// An equivalent string representation of the current instance. /// The type of the current instance () is not supported. @@ -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); diff --git a/src/System.Private.CoreLib/shared/System/Runtime/Intrinsics/Vector64_1.cs b/src/System.Private.CoreLib/shared/System/Runtime/Intrinsics/Vector64_1.cs index d6b1883..99db8c0 100644 --- a/src/System.Private.CoreLib/shared/System/Runtime/Intrinsics/Vector64_1.cs +++ b/src/System.Private.CoreLib/shared/System/Runtime/Intrinsics/Vector64_1.cs @@ -77,83 +77,6 @@ namespace System.Runtime.Intrinsics } } - /// Reinterprets the current instance as a new . - /// The type of the vector the current instance should be reinterpreted as. - /// The current instance reinterpreted as a new . - /// The type of the current instance () or the type of the target () is not supported. - [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public Vector64 As() where U : struct - { - ThrowHelper.ThrowForUnsupportedVectorBaseType(); - ThrowHelper.ThrowForUnsupportedVectorBaseType(); - return Unsafe.As, Vector64>(ref Unsafe.AsRef(in this)); - } - - /// Reinterprets the current instance as a new . - /// The current instance reinterpreted as a new . - /// The type of the current instance () is not supported. - [Intrinsic] - public Vector64 AsByte() => As(); - - /// Reinterprets the current instance as a new . - /// The current instance reinterpreted as a new . - /// The type of the current instance () is not supported. - [Intrinsic] - public Vector64 AsDouble() => As(); - - /// Reinterprets the current instance as a new . - /// The current instance reinterpreted as a new . - /// The type of the current instance () is not supported. - [Intrinsic] - public Vector64 AsInt16() => As(); - - /// Reinterprets the current instance as a new . - /// The current instance reinterpreted as a new . - /// The type of the current instance () is not supported. - [Intrinsic] - public Vector64 AsInt32() => As(); - - /// Reinterprets the current instance as a new . - /// The current instance reinterpreted as a new . - /// The type of the current instance () is not supported. - [Intrinsic] - public Vector64 AsInt64() => As(); - - /// Reinterprets the current instance as a new . - /// The current instance reinterpreted as a new . - /// The type of the current instance () is not supported. - [Intrinsic] - [CLSCompliant(false)] - public Vector64 AsSByte() => As(); - - /// Reinterprets the current instance as a new . - /// The current instance reinterpreted as a new . - /// The type of the current instance () is not supported. - [Intrinsic] - public Vector64 AsSingle() => As(); - - /// Reinterprets the current instance as a new . - /// The current instance reinterpreted as a new . - /// The type of the current instance () is not supported. - [Intrinsic] - [CLSCompliant(false)] - public Vector64 AsUInt16() => As(); - - /// Reinterprets the current instance as a new . - /// The current instance reinterpreted as a new . - /// The type of the current instance () is not supported. - [Intrinsic] - [CLSCompliant(false)] - public Vector64 AsUInt32() => As(); - - /// Reinterprets the current instance as a new . - /// The current instance reinterpreted as a new . - /// The type of the current instance () is not supported. - [Intrinsic] - [CLSCompliant(false)] - public Vector64 AsUInt64() => As(); - /// Determines whether the specified is equal to the current instance. /// The to compare with the current instance. /// true if is equal to the current instance; otherwise, false. @@ -164,7 +87,7 @@ namespace System.Runtime.Intrinsics for (int i = 0; i < Count; i++) { - if (!((IEquatable)(GetElement(i))).Equals(other.GetElement(i))) + if (!((IEquatable)(this.GetElement(i))).Equals(other.GetElement(i))) { return false; } @@ -182,45 +105,6 @@ namespace System.Runtime.Intrinsics return (obj is Vector64) && Equals((Vector64)(obj)); } - /// Gets the element at the specified index. - /// The index of the element to get. - /// The value of the element at . - /// The type of the current instance () is not supported. - /// was less than zero or greater than the number of elements. - public T GetElement(int index) - { - ThrowHelper.ThrowForUnsupportedVectorBaseType(); - - if ((uint)(index) >= (uint)(Count)) - { - ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.index); - } - - ref T e0 = ref Unsafe.As, T>(ref Unsafe.AsRef(in this)); - return Unsafe.Add(ref e0, index); - } - - /// Creates a new 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. - /// The index of the element to set. - /// The value to set the value to. - /// A with the value of the element at set to and the remaining elements set to the same value as that in the current instance. - /// The type of the current instance () is not supported. - /// was less than zero or greater than the number of elements. - public Vector64 WithElement(int index, T value) - { - ThrowHelper.ThrowForUnsupportedVectorBaseType(); - - if ((uint)(index) >= (uint)(Count)) - { - throw new ArgumentOutOfRangeException(nameof(index)); - } - - Vector64 result = this; - ref T e0 = ref Unsafe.As, T>(ref result); - Unsafe.Add(ref e0, index) = value; - return result; - } - /// Gets the hash code for the instance. /// The hash code for the instance. /// The type of the current instance () is not supported. @@ -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; } - /// Converts the current instance to a scalar containing the value of the first element. - /// A scalar containing the value of the first element. - /// The type of the current instance () is not supported. - public T ToScalar() - { - ThrowHelper.ThrowForUnsupportedVectorBaseType(); - return Unsafe.As, T>(ref Unsafe.AsRef(in this)); - } - /// Converts the current instance to an equivalent string representation. /// An equivalent string representation of the current instance. /// The type of the current instance () is not supported. @@ -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); } - - /// Converts the current instance to a new with the lower 64-bits set to the value of the current instance and the upper 64-bits initialized to zero. - /// A new with the lower 64-bits set to the value of the current instance and the upper 64-bits initialized to zero. - /// The type of the current instance () is not supported. - public Vector128 ToVector128() - { - ThrowHelper.ThrowForUnsupportedVectorBaseType(); - - Vector128 result = Vector128.Zero; - Unsafe.As, Vector64>(ref result) = this; - return result; - } - - /// Converts the current instance to a new with the lower 64-bits set to the value of the current instance and the upper 64-bits left uninitialized. - /// A new with the lower 64-bits set to the value of the current instance and the upper 64-bits initialized to zero. - /// The type of the current instance () is not supported. - public unsafe Vector128 ToVector128Unsafe() - { - ThrowHelper.ThrowForUnsupportedVectorBaseType(); - - // 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>(pResult) = this; - return Unsafe.AsRef>(pResult); - } } } diff --git a/src/jit/compiler.h b/src/jit/compiler.h index ca47df7..ab98059 100644 --- a/src/jit/compiler.h +++ b/src/jit/compiler.h @@ -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, diff --git a/src/jit/hwintrinsicArm64.cpp b/src/jit/hwintrinsicArm64.cpp index d82eef5..2309f75 100644 --- a/src/jit/hwintrinsicArm64.cpp +++ b/src/jit/hwintrinsicArm64.cpp @@ -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: diff --git a/src/jit/hwintrinsiclistxarch.h b/src/jit/hwintrinsiclistxarch.h index 8e02aab..69fb795 100644 --- a/src/jit/hwintrinsiclistxarch.h +++ b/src/jit/hwintrinsiclistxarch.h @@ -27,41 +27,41 @@ // {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 diff --git a/src/jit/hwintrinsicxarch.cpp b/src/jit/hwintrinsicxarch.cpp index c2602bd..14a76de 100644 --- a/src/jit/hwintrinsicxarch.cpp +++ b/src/jit/hwintrinsicxarch.cpp @@ -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.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.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.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.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.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.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, diff --git a/src/jit/importer.cpp b/src/jit/importer.cpp index e677d37..5d3a82e 100644 --- a/src/jit/importer.cpp +++ b/src/jit/importer.cpp @@ -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.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.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.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.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.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.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; } } } diff --git a/tests/src/JIT/HardwareIntrinsics/General/Shared/VectorAsTest.template b/tests/src/JIT/HardwareIntrinsics/General/Shared/VectorAsTest.template index 1d190fd..0006581 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Shared/VectorAsTest.template +++ b/tests/src/JIT/HardwareIntrinsics/General/Shared/VectorAsTest.template @@ -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})(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})(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})(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})(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})(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})(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})(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})(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})(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})(ulongResult), value); } diff --git a/tests/src/JIT/HardwareIntrinsics/General/Shared/VectorExtendTest.template b/tests/src/JIT/HardwareIntrinsics/General/Shared/VectorExtendTest.template index 6e5b7c2..fb1a113 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Shared/VectorExtendTest.template +++ b/tests/src/JIT/HardwareIntrinsics/General/Shared/VectorExtendTest.template @@ -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); } diff --git a/tests/src/JIT/HardwareIntrinsics/General/Shared/VectorGetAndWithElementTest.template b/tests/src/JIT/HardwareIntrinsics/General/Shared/VectorGetAndWithElementTest.template index d6b9811..d19e56f 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Shared/VectorGetAndWithElementTest.template +++ b/tests/src/JIT/HardwareIntrinsics/General/Shared/VectorGetAndWithElementTest.template @@ -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) diff --git a/tests/src/JIT/HardwareIntrinsics/General/Shared/VectorGetAndWithLowerAndUpperTest.template b/tests/src/JIT/HardwareIntrinsics/General/Shared/VectorGetAndWithLowerAndUpperTest.template index ae0bde2..0cec735 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Shared/VectorGetAndWithLowerAndUpperTest.template +++ b/tests/src/JIT/HardwareIntrinsics/General/Shared/VectorGetAndWithLowerAndUpperTest.template @@ -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); } diff --git a/tests/src/JIT/HardwareIntrinsics/General/Shared/VectorToScalarTest.template b/tests/src/JIT/HardwareIntrinsics/General/Shared/VectorToScalarTest.template index 04432b3..3b87de0 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Shared/VectorToScalarTest.template +++ b/tests/src/JIT/HardwareIntrinsics/General/Shared/VectorToScalarTest.template @@ -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); } diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/As.Byte.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/As.Byte.cs index 8e1d687..e08c250 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/As.Byte.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/As.Byte.cs @@ -144,63 +144,73 @@ namespace JIT.HardwareIntrinsics.General Vector128 value; value = Vector128.Create(TestLibrary.Generator.GetByte()); - object byteResult = typeof(Vector128) - .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)(byteResult), value); value = Vector128.Create(TestLibrary.Generator.GetByte()); - object doubleResult = typeof(Vector128) - .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)(doubleResult), value); value = Vector128.Create(TestLibrary.Generator.GetByte()); - object shortResult = typeof(Vector128) - .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)(shortResult), value); value = Vector128.Create(TestLibrary.Generator.GetByte()); - object intResult = typeof(Vector128) - .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)(intResult), value); value = Vector128.Create(TestLibrary.Generator.GetByte()); - object longResult = typeof(Vector128) - .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)(longResult), value); value = Vector128.Create(TestLibrary.Generator.GetByte()); - object sbyteResult = typeof(Vector128) - .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)(sbyteResult), value); value = Vector128.Create(TestLibrary.Generator.GetByte()); - object floatResult = typeof(Vector128) - .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)(floatResult), value); value = Vector128.Create(TestLibrary.Generator.GetByte()); - object ushortResult = typeof(Vector128) - .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)(ushortResult), value); value = Vector128.Create(TestLibrary.Generator.GetByte()); - object uintResult = typeof(Vector128) - .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)(uintResult), value); value = Vector128.Create(TestLibrary.Generator.GetByte()); - object ulongResult = typeof(Vector128) - .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)(ulongResult), value); } diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/As.Double.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/As.Double.cs index 475cfac..9124824 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/As.Double.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/As.Double.cs @@ -144,63 +144,73 @@ namespace JIT.HardwareIntrinsics.General Vector128 value; value = Vector128.Create(TestLibrary.Generator.GetDouble()); - object byteResult = typeof(Vector128) - .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)(byteResult), value); value = Vector128.Create(TestLibrary.Generator.GetDouble()); - object doubleResult = typeof(Vector128) - .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)(doubleResult), value); value = Vector128.Create(TestLibrary.Generator.GetDouble()); - object shortResult = typeof(Vector128) - .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)(shortResult), value); value = Vector128.Create(TestLibrary.Generator.GetDouble()); - object intResult = typeof(Vector128) - .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)(intResult), value); value = Vector128.Create(TestLibrary.Generator.GetDouble()); - object longResult = typeof(Vector128) - .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)(longResult), value); value = Vector128.Create(TestLibrary.Generator.GetDouble()); - object sbyteResult = typeof(Vector128) - .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)(sbyteResult), value); value = Vector128.Create(TestLibrary.Generator.GetDouble()); - object floatResult = typeof(Vector128) - .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)(floatResult), value); value = Vector128.Create(TestLibrary.Generator.GetDouble()); - object ushortResult = typeof(Vector128) - .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)(ushortResult), value); value = Vector128.Create(TestLibrary.Generator.GetDouble()); - object uintResult = typeof(Vector128) - .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)(uintResult), value); value = Vector128.Create(TestLibrary.Generator.GetDouble()); - object ulongResult = typeof(Vector128) - .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)(ulongResult), value); } diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/As.Int16.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/As.Int16.cs index 75aeeb1..98ba477 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/As.Int16.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/As.Int16.cs @@ -144,63 +144,73 @@ namespace JIT.HardwareIntrinsics.General Vector128 value; value = Vector128.Create(TestLibrary.Generator.GetInt16()); - object byteResult = typeof(Vector128) - .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)(byteResult), value); value = Vector128.Create(TestLibrary.Generator.GetInt16()); - object doubleResult = typeof(Vector128) - .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)(doubleResult), value); value = Vector128.Create(TestLibrary.Generator.GetInt16()); - object shortResult = typeof(Vector128) - .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)(shortResult), value); value = Vector128.Create(TestLibrary.Generator.GetInt16()); - object intResult = typeof(Vector128) - .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)(intResult), value); value = Vector128.Create(TestLibrary.Generator.GetInt16()); - object longResult = typeof(Vector128) - .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)(longResult), value); value = Vector128.Create(TestLibrary.Generator.GetInt16()); - object sbyteResult = typeof(Vector128) - .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)(sbyteResult), value); value = Vector128.Create(TestLibrary.Generator.GetInt16()); - object floatResult = typeof(Vector128) - .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)(floatResult), value); value = Vector128.Create(TestLibrary.Generator.GetInt16()); - object ushortResult = typeof(Vector128) - .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)(ushortResult), value); value = Vector128.Create(TestLibrary.Generator.GetInt16()); - object uintResult = typeof(Vector128) - .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)(uintResult), value); value = Vector128.Create(TestLibrary.Generator.GetInt16()); - object ulongResult = typeof(Vector128) - .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)(ulongResult), value); } diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/As.Int32.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/As.Int32.cs index c6faa0b..bf35ffd 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/As.Int32.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/As.Int32.cs @@ -144,63 +144,73 @@ namespace JIT.HardwareIntrinsics.General Vector128 value; value = Vector128.Create(TestLibrary.Generator.GetInt32()); - object byteResult = typeof(Vector128) - .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)(byteResult), value); value = Vector128.Create(TestLibrary.Generator.GetInt32()); - object doubleResult = typeof(Vector128) - .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)(doubleResult), value); value = Vector128.Create(TestLibrary.Generator.GetInt32()); - object shortResult = typeof(Vector128) - .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)(shortResult), value); value = Vector128.Create(TestLibrary.Generator.GetInt32()); - object intResult = typeof(Vector128) - .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)(intResult), value); value = Vector128.Create(TestLibrary.Generator.GetInt32()); - object longResult = typeof(Vector128) - .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)(longResult), value); value = Vector128.Create(TestLibrary.Generator.GetInt32()); - object sbyteResult = typeof(Vector128) - .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)(sbyteResult), value); value = Vector128.Create(TestLibrary.Generator.GetInt32()); - object floatResult = typeof(Vector128) - .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)(floatResult), value); value = Vector128.Create(TestLibrary.Generator.GetInt32()); - object ushortResult = typeof(Vector128) - .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)(ushortResult), value); value = Vector128.Create(TestLibrary.Generator.GetInt32()); - object uintResult = typeof(Vector128) - .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)(uintResult), value); value = Vector128.Create(TestLibrary.Generator.GetInt32()); - object ulongResult = typeof(Vector128) - .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)(ulongResult), value); } diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/As.Int64.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/As.Int64.cs index 4fccff8..1ec98ac 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/As.Int64.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/As.Int64.cs @@ -144,63 +144,73 @@ namespace JIT.HardwareIntrinsics.General Vector128 value; value = Vector128.Create(TestLibrary.Generator.GetInt64()); - object byteResult = typeof(Vector128) - .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)(byteResult), value); value = Vector128.Create(TestLibrary.Generator.GetInt64()); - object doubleResult = typeof(Vector128) - .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)(doubleResult), value); value = Vector128.Create(TestLibrary.Generator.GetInt64()); - object shortResult = typeof(Vector128) - .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)(shortResult), value); value = Vector128.Create(TestLibrary.Generator.GetInt64()); - object intResult = typeof(Vector128) - .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)(intResult), value); value = Vector128.Create(TestLibrary.Generator.GetInt64()); - object longResult = typeof(Vector128) - .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)(longResult), value); value = Vector128.Create(TestLibrary.Generator.GetInt64()); - object sbyteResult = typeof(Vector128) - .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)(sbyteResult), value); value = Vector128.Create(TestLibrary.Generator.GetInt64()); - object floatResult = typeof(Vector128) - .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)(floatResult), value); value = Vector128.Create(TestLibrary.Generator.GetInt64()); - object ushortResult = typeof(Vector128) - .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)(ushortResult), value); value = Vector128.Create(TestLibrary.Generator.GetInt64()); - object uintResult = typeof(Vector128) - .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)(uintResult), value); value = Vector128.Create(TestLibrary.Generator.GetInt64()); - object ulongResult = typeof(Vector128) - .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)(ulongResult), value); } diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/As.SByte.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/As.SByte.cs index b4b62cd..a7ca785 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/As.SByte.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/As.SByte.cs @@ -144,63 +144,73 @@ namespace JIT.HardwareIntrinsics.General Vector128 value; value = Vector128.Create(TestLibrary.Generator.GetSByte()); - object byteResult = typeof(Vector128) - .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)(byteResult), value); value = Vector128.Create(TestLibrary.Generator.GetSByte()); - object doubleResult = typeof(Vector128) - .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)(doubleResult), value); value = Vector128.Create(TestLibrary.Generator.GetSByte()); - object shortResult = typeof(Vector128) - .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)(shortResult), value); value = Vector128.Create(TestLibrary.Generator.GetSByte()); - object intResult = typeof(Vector128) - .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)(intResult), value); value = Vector128.Create(TestLibrary.Generator.GetSByte()); - object longResult = typeof(Vector128) - .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)(longResult), value); value = Vector128.Create(TestLibrary.Generator.GetSByte()); - object sbyteResult = typeof(Vector128) - .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)(sbyteResult), value); value = Vector128.Create(TestLibrary.Generator.GetSByte()); - object floatResult = typeof(Vector128) - .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)(floatResult), value); value = Vector128.Create(TestLibrary.Generator.GetSByte()); - object ushortResult = typeof(Vector128) - .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)(ushortResult), value); value = Vector128.Create(TestLibrary.Generator.GetSByte()); - object uintResult = typeof(Vector128) - .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)(uintResult), value); value = Vector128.Create(TestLibrary.Generator.GetSByte()); - object ulongResult = typeof(Vector128) - .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)(ulongResult), value); } diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/As.Single.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/As.Single.cs index 6b1a4a3..990e4ec 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/As.Single.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/As.Single.cs @@ -144,63 +144,73 @@ namespace JIT.HardwareIntrinsics.General Vector128 value; value = Vector128.Create(TestLibrary.Generator.GetSingle()); - object byteResult = typeof(Vector128) - .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)(byteResult), value); value = Vector128.Create(TestLibrary.Generator.GetSingle()); - object doubleResult = typeof(Vector128) - .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)(doubleResult), value); value = Vector128.Create(TestLibrary.Generator.GetSingle()); - object shortResult = typeof(Vector128) - .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)(shortResult), value); value = Vector128.Create(TestLibrary.Generator.GetSingle()); - object intResult = typeof(Vector128) - .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)(intResult), value); value = Vector128.Create(TestLibrary.Generator.GetSingle()); - object longResult = typeof(Vector128) - .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)(longResult), value); value = Vector128.Create(TestLibrary.Generator.GetSingle()); - object sbyteResult = typeof(Vector128) - .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)(sbyteResult), value); value = Vector128.Create(TestLibrary.Generator.GetSingle()); - object floatResult = typeof(Vector128) - .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)(floatResult), value); value = Vector128.Create(TestLibrary.Generator.GetSingle()); - object ushortResult = typeof(Vector128) - .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)(ushortResult), value); value = Vector128.Create(TestLibrary.Generator.GetSingle()); - object uintResult = typeof(Vector128) - .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)(uintResult), value); value = Vector128.Create(TestLibrary.Generator.GetSingle()); - object ulongResult = typeof(Vector128) - .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)(ulongResult), value); } diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/As.UInt16.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/As.UInt16.cs index a1b6411..21f892e 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/As.UInt16.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/As.UInt16.cs @@ -144,63 +144,73 @@ namespace JIT.HardwareIntrinsics.General Vector128 value; value = Vector128.Create(TestLibrary.Generator.GetUInt16()); - object byteResult = typeof(Vector128) - .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)(byteResult), value); value = Vector128.Create(TestLibrary.Generator.GetUInt16()); - object doubleResult = typeof(Vector128) - .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)(doubleResult), value); value = Vector128.Create(TestLibrary.Generator.GetUInt16()); - object shortResult = typeof(Vector128) - .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)(shortResult), value); value = Vector128.Create(TestLibrary.Generator.GetUInt16()); - object intResult = typeof(Vector128) - .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)(intResult), value); value = Vector128.Create(TestLibrary.Generator.GetUInt16()); - object longResult = typeof(Vector128) - .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)(longResult), value); value = Vector128.Create(TestLibrary.Generator.GetUInt16()); - object sbyteResult = typeof(Vector128) - .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)(sbyteResult), value); value = Vector128.Create(TestLibrary.Generator.GetUInt16()); - object floatResult = typeof(Vector128) - .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)(floatResult), value); value = Vector128.Create(TestLibrary.Generator.GetUInt16()); - object ushortResult = typeof(Vector128) - .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)(ushortResult), value); value = Vector128.Create(TestLibrary.Generator.GetUInt16()); - object uintResult = typeof(Vector128) - .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)(uintResult), value); value = Vector128.Create(TestLibrary.Generator.GetUInt16()); - object ulongResult = typeof(Vector128) - .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)(ulongResult), value); } diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/As.UInt32.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/As.UInt32.cs index 06af6b0..4a1c2f5 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/As.UInt32.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/As.UInt32.cs @@ -144,63 +144,73 @@ namespace JIT.HardwareIntrinsics.General Vector128 value; value = Vector128.Create(TestLibrary.Generator.GetUInt32()); - object byteResult = typeof(Vector128) - .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)(byteResult), value); value = Vector128.Create(TestLibrary.Generator.GetUInt32()); - object doubleResult = typeof(Vector128) - .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)(doubleResult), value); value = Vector128.Create(TestLibrary.Generator.GetUInt32()); - object shortResult = typeof(Vector128) - .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)(shortResult), value); value = Vector128.Create(TestLibrary.Generator.GetUInt32()); - object intResult = typeof(Vector128) - .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)(intResult), value); value = Vector128.Create(TestLibrary.Generator.GetUInt32()); - object longResult = typeof(Vector128) - .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)(longResult), value); value = Vector128.Create(TestLibrary.Generator.GetUInt32()); - object sbyteResult = typeof(Vector128) - .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)(sbyteResult), value); value = Vector128.Create(TestLibrary.Generator.GetUInt32()); - object floatResult = typeof(Vector128) - .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)(floatResult), value); value = Vector128.Create(TestLibrary.Generator.GetUInt32()); - object ushortResult = typeof(Vector128) - .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)(ushortResult), value); value = Vector128.Create(TestLibrary.Generator.GetUInt32()); - object uintResult = typeof(Vector128) - .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)(uintResult), value); value = Vector128.Create(TestLibrary.Generator.GetUInt32()); - object ulongResult = typeof(Vector128) - .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)(ulongResult), value); } diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/As.UInt64.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/As.UInt64.cs index c036ef4..27321f9 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/As.UInt64.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/As.UInt64.cs @@ -144,63 +144,73 @@ namespace JIT.HardwareIntrinsics.General Vector128 value; value = Vector128.Create(TestLibrary.Generator.GetUInt64()); - object byteResult = typeof(Vector128) - .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)(byteResult), value); value = Vector128.Create(TestLibrary.Generator.GetUInt64()); - object doubleResult = typeof(Vector128) - .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)(doubleResult), value); value = Vector128.Create(TestLibrary.Generator.GetUInt64()); - object shortResult = typeof(Vector128) - .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)(shortResult), value); value = Vector128.Create(TestLibrary.Generator.GetUInt64()); - object intResult = typeof(Vector128) - .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)(intResult), value); value = Vector128.Create(TestLibrary.Generator.GetUInt64()); - object longResult = typeof(Vector128) - .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)(longResult), value); value = Vector128.Create(TestLibrary.Generator.GetUInt64()); - object sbyteResult = typeof(Vector128) - .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)(sbyteResult), value); value = Vector128.Create(TestLibrary.Generator.GetUInt64()); - object floatResult = typeof(Vector128) - .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)(floatResult), value); value = Vector128.Create(TestLibrary.Generator.GetUInt64()); - object ushortResult = typeof(Vector128) - .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)(ushortResult), value); value = Vector128.Create(TestLibrary.Generator.GetUInt64()); - object uintResult = typeof(Vector128) - .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)(uintResult), value); value = Vector128.Create(TestLibrary.Generator.GetUInt64()); - object ulongResult = typeof(Vector128) - .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)(ulongResult), value); } diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.Byte.0.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.Byte.0.cs index 2227e24..27256f9 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.Byte.0.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.Byte.0.cs @@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General try { - object result = typeof(Vector128) - .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) - .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)(result2), values, insertedValue); } catch (TargetInvocationException e) diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.Byte.15.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.Byte.15.cs index cc96ebd..8092e5a 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.Byte.15.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.Byte.15.cs @@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General try { - object result = typeof(Vector128) - .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) - .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)(result2), values, insertedValue); } catch (TargetInvocationException e) diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.Byte.7.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.Byte.7.cs index 43fd60a..ce7b163 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.Byte.7.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.Byte.7.cs @@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General try { - object result = typeof(Vector128) - .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) - .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)(result2), values, insertedValue); } catch (TargetInvocationException e) diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.Double.0.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.Double.0.cs index 93a8444..da711cc 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.Double.0.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.Double.0.cs @@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General try { - object result = typeof(Vector128) - .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) - .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)(result2), values, insertedValue); } catch (TargetInvocationException e) diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.Double.1.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.Double.1.cs index 707f3e4..32a0c0c 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.Double.1.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.Double.1.cs @@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General try { - object result = typeof(Vector128) - .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) - .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)(result2), values, insertedValue); } catch (TargetInvocationException e) diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.Int16.0.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.Int16.0.cs index de33fd3..861b0b3 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.Int16.0.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.Int16.0.cs @@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General try { - object result = typeof(Vector128) - .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) - .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)(result2), values, insertedValue); } catch (TargetInvocationException e) diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.Int16.3.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.Int16.3.cs index 90c960b..0480db9 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.Int16.3.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.Int16.3.cs @@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General try { - object result = typeof(Vector128) - .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) - .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)(result2), values, insertedValue); } catch (TargetInvocationException e) diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.Int16.7.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.Int16.7.cs index ce470bb..5bf886d 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.Int16.7.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.Int16.7.cs @@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General try { - object result = typeof(Vector128) - .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) - .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)(result2), values, insertedValue); } catch (TargetInvocationException e) diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.Int32.0.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.Int32.0.cs index f4fd637..0032d4d 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.Int32.0.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.Int32.0.cs @@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General try { - object result = typeof(Vector128) - .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) - .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)(result2), values, insertedValue); } catch (TargetInvocationException e) diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.Int32.1.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.Int32.1.cs index 2bec545..c3fc82b 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.Int32.1.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.Int32.1.cs @@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General try { - object result = typeof(Vector128) - .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) - .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)(result2), values, insertedValue); } catch (TargetInvocationException e) diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.Int32.3.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.Int32.3.cs index 64c0cad..5a943d4 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.Int32.3.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.Int32.3.cs @@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General try { - object result = typeof(Vector128) - .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) - .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)(result2), values, insertedValue); } catch (TargetInvocationException e) diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.Int64.0.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.Int64.0.cs index 71442bf..ea3bb54 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.Int64.0.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.Int64.0.cs @@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General try { - object result = typeof(Vector128) - .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) - .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)(result2), values, insertedValue); } catch (TargetInvocationException e) diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.Int64.1.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.Int64.1.cs index d9ac4a1..065a467 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.Int64.1.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.Int64.1.cs @@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General try { - object result = typeof(Vector128) - .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) - .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)(result2), values, insertedValue); } catch (TargetInvocationException e) diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.SByte.0.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.SByte.0.cs index ed20f9d..80812a9 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.SByte.0.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.SByte.0.cs @@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General try { - object result = typeof(Vector128) - .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) - .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)(result2), values, insertedValue); } catch (TargetInvocationException e) diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.SByte.15.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.SByte.15.cs index 010241a..0b5c6d8 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.SByte.15.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.SByte.15.cs @@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General try { - object result = typeof(Vector128) - .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) - .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)(result2), values, insertedValue); } catch (TargetInvocationException e) diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.SByte.7.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.SByte.7.cs index 02750db..b134c2e 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.SByte.7.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.SByte.7.cs @@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General try { - object result = typeof(Vector128) - .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) - .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)(result2), values, insertedValue); } catch (TargetInvocationException e) diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.Single.0.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.Single.0.cs index 9dad036..803d8d7 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.Single.0.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.Single.0.cs @@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General try { - object result = typeof(Vector128) - .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) - .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)(result2), values, insertedValue); } catch (TargetInvocationException e) diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.Single.1.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.Single.1.cs index 4e0d461..3565ac4 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.Single.1.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.Single.1.cs @@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General try { - object result = typeof(Vector128) - .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) - .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)(result2), values, insertedValue); } catch (TargetInvocationException e) diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.Single.3.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.Single.3.cs index 6e3164f..d919124 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.Single.3.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.Single.3.cs @@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General try { - object result = typeof(Vector128) - .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) - .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)(result2), values, insertedValue); } catch (TargetInvocationException e) diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.UInt16.0.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.UInt16.0.cs index f16ed2b..b2038ea 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.UInt16.0.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.UInt16.0.cs @@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General try { - object result = typeof(Vector128) - .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) - .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)(result2), values, insertedValue); } catch (TargetInvocationException e) diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.UInt16.3.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.UInt16.3.cs index 9844ef0..de5b5ed 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.UInt16.3.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.UInt16.3.cs @@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General try { - object result = typeof(Vector128) - .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) - .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)(result2), values, insertedValue); } catch (TargetInvocationException e) diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.UInt16.7.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.UInt16.7.cs index 1c8ee4d..1bd6f5d 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.UInt16.7.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.UInt16.7.cs @@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General try { - object result = typeof(Vector128) - .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) - .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)(result2), values, insertedValue); } catch (TargetInvocationException e) diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.UInt32.0.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.UInt32.0.cs index ce2ebe6..9aa6da2 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.UInt32.0.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.UInt32.0.cs @@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General try { - object result = typeof(Vector128) - .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) - .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)(result2), values, insertedValue); } catch (TargetInvocationException e) diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.UInt32.1.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.UInt32.1.cs index fc19ec5..8f94ec7 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.UInt32.1.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.UInt32.1.cs @@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General try { - object result = typeof(Vector128) - .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) - .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)(result2), values, insertedValue); } catch (TargetInvocationException e) diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.UInt32.3.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.UInt32.3.cs index 7b7c371..64e0fa3 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.UInt32.3.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.UInt32.3.cs @@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General try { - object result = typeof(Vector128) - .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) - .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)(result2), values, insertedValue); } catch (TargetInvocationException e) diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.UInt64.0.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.UInt64.0.cs index 240f5b6..d46786c 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.UInt64.0.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.UInt64.0.cs @@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General try { - object result = typeof(Vector128) - .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) - .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)(result2), values, insertedValue); } catch (TargetInvocationException e) diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.UInt64.1.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.UInt64.1.cs index 6d15598..ba593ec 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.UInt64.1.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.UInt64.1.cs @@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General try { - object result = typeof(Vector128) - .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) - .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)(result2), values, insertedValue); } catch (TargetInvocationException e) diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithLowerAndUpper.Byte.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithLowerAndUpper.Byte.cs index fdf64b0..638499d 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithLowerAndUpper.Byte.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithLowerAndUpper.Byte.cs @@ -78,20 +78,24 @@ namespace JIT.HardwareIntrinsics.General Vector128 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) - .GetMethod(nameof(Vector128.GetLower), new Type[] { }) - .Invoke(value, new object[] { }); - object upperResult = typeof(Vector128) - .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)(lowerResult), (Vector64)(upperResult), values); - object result = typeof(Vector128) - .GetMethod(nameof(Vector128.WithLower), new Type[] { typeof(Vector64) }) - .Invoke(value, new object[] { upperResult }); - result = typeof(Vector128) - .GetMethod(nameof(Vector128.WithUpper), new Type[] { typeof(Vector64) }) - .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)(result), values); } diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithLowerAndUpper.Double.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithLowerAndUpper.Double.cs index 0436a5c..0aea72f 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithLowerAndUpper.Double.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithLowerAndUpper.Double.cs @@ -78,20 +78,24 @@ namespace JIT.HardwareIntrinsics.General Vector128 value = Vector128.Create(values[0], values[1]); - object lowerResult = typeof(Vector128) - .GetMethod(nameof(Vector128.GetLower), new Type[] { }) - .Invoke(value, new object[] { }); - object upperResult = typeof(Vector128) - .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)(lowerResult), (Vector64)(upperResult), values); - object result = typeof(Vector128) - .GetMethod(nameof(Vector128.WithLower), new Type[] { typeof(Vector64) }) - .Invoke(value, new object[] { upperResult }); - result = typeof(Vector128) - .GetMethod(nameof(Vector128.WithUpper), new Type[] { typeof(Vector64) }) - .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)(result), values); } diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithLowerAndUpper.Int16.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithLowerAndUpper.Int16.cs index 17afe1c..a34d5eb4 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithLowerAndUpper.Int16.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithLowerAndUpper.Int16.cs @@ -78,20 +78,24 @@ namespace JIT.HardwareIntrinsics.General Vector128 value = Vector128.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]); - object lowerResult = typeof(Vector128) - .GetMethod(nameof(Vector128.GetLower), new Type[] { }) - .Invoke(value, new object[] { }); - object upperResult = typeof(Vector128) - .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)(lowerResult), (Vector64)(upperResult), values); - object result = typeof(Vector128) - .GetMethod(nameof(Vector128.WithLower), new Type[] { typeof(Vector64) }) - .Invoke(value, new object[] { upperResult }); - result = typeof(Vector128) - .GetMethod(nameof(Vector128.WithUpper), new Type[] { typeof(Vector64) }) - .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)(result), values); } diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithLowerAndUpper.Int32.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithLowerAndUpper.Int32.cs index cf470eb..df2aee4 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithLowerAndUpper.Int32.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithLowerAndUpper.Int32.cs @@ -78,20 +78,24 @@ namespace JIT.HardwareIntrinsics.General Vector128 value = Vector128.Create(values[0], values[1], values[2], values[3]); - object lowerResult = typeof(Vector128) - .GetMethod(nameof(Vector128.GetLower), new Type[] { }) - .Invoke(value, new object[] { }); - object upperResult = typeof(Vector128) - .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)(lowerResult), (Vector64)(upperResult), values); - object result = typeof(Vector128) - .GetMethod(nameof(Vector128.WithLower), new Type[] { typeof(Vector64) }) - .Invoke(value, new object[] { upperResult }); - result = typeof(Vector128) - .GetMethod(nameof(Vector128.WithUpper), new Type[] { typeof(Vector64) }) - .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)(result), values); } diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithLowerAndUpper.Int64.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithLowerAndUpper.Int64.cs index 0c200fd..6408966 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithLowerAndUpper.Int64.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithLowerAndUpper.Int64.cs @@ -78,20 +78,24 @@ namespace JIT.HardwareIntrinsics.General Vector128 value = Vector128.Create(values[0], values[1]); - object lowerResult = typeof(Vector128) - .GetMethod(nameof(Vector128.GetLower), new Type[] { }) - .Invoke(value, new object[] { }); - object upperResult = typeof(Vector128) - .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)(lowerResult), (Vector64)(upperResult), values); - object result = typeof(Vector128) - .GetMethod(nameof(Vector128.WithLower), new Type[] { typeof(Vector64) }) - .Invoke(value, new object[] { upperResult }); - result = typeof(Vector128) - .GetMethod(nameof(Vector128.WithUpper), new Type[] { typeof(Vector64) }) - .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)(result), values); } diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithLowerAndUpper.SByte.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithLowerAndUpper.SByte.cs index 18ff329..6c0fea2 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithLowerAndUpper.SByte.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithLowerAndUpper.SByte.cs @@ -78,20 +78,24 @@ namespace JIT.HardwareIntrinsics.General Vector128 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) - .GetMethod(nameof(Vector128.GetLower), new Type[] { }) - .Invoke(value, new object[] { }); - object upperResult = typeof(Vector128) - .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)(lowerResult), (Vector64)(upperResult), values); - object result = typeof(Vector128) - .GetMethod(nameof(Vector128.WithLower), new Type[] { typeof(Vector64) }) - .Invoke(value, new object[] { upperResult }); - result = typeof(Vector128) - .GetMethod(nameof(Vector128.WithUpper), new Type[] { typeof(Vector64) }) - .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)(result), values); } diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithLowerAndUpper.Single.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithLowerAndUpper.Single.cs index 8ca3f9a..5914b30 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithLowerAndUpper.Single.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithLowerAndUpper.Single.cs @@ -78,20 +78,24 @@ namespace JIT.HardwareIntrinsics.General Vector128 value = Vector128.Create(values[0], values[1], values[2], values[3]); - object lowerResult = typeof(Vector128) - .GetMethod(nameof(Vector128.GetLower), new Type[] { }) - .Invoke(value, new object[] { }); - object upperResult = typeof(Vector128) - .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)(lowerResult), (Vector64)(upperResult), values); - object result = typeof(Vector128) - .GetMethod(nameof(Vector128.WithLower), new Type[] { typeof(Vector64) }) - .Invoke(value, new object[] { upperResult }); - result = typeof(Vector128) - .GetMethod(nameof(Vector128.WithUpper), new Type[] { typeof(Vector64) }) - .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)(result), values); } diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithLowerAndUpper.UInt16.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithLowerAndUpper.UInt16.cs index b904c76..b25d023 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithLowerAndUpper.UInt16.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithLowerAndUpper.UInt16.cs @@ -78,20 +78,24 @@ namespace JIT.HardwareIntrinsics.General Vector128 value = Vector128.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]); - object lowerResult = typeof(Vector128) - .GetMethod(nameof(Vector128.GetLower), new Type[] { }) - .Invoke(value, new object[] { }); - object upperResult = typeof(Vector128) - .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)(lowerResult), (Vector64)(upperResult), values); - object result = typeof(Vector128) - .GetMethod(nameof(Vector128.WithLower), new Type[] { typeof(Vector64) }) - .Invoke(value, new object[] { upperResult }); - result = typeof(Vector128) - .GetMethod(nameof(Vector128.WithUpper), new Type[] { typeof(Vector64) }) - .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)(result), values); } diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithLowerAndUpper.UInt32.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithLowerAndUpper.UInt32.cs index fec5894..7a6ae4d 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithLowerAndUpper.UInt32.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithLowerAndUpper.UInt32.cs @@ -78,20 +78,24 @@ namespace JIT.HardwareIntrinsics.General Vector128 value = Vector128.Create(values[0], values[1], values[2], values[3]); - object lowerResult = typeof(Vector128) - .GetMethod(nameof(Vector128.GetLower), new Type[] { }) - .Invoke(value, new object[] { }); - object upperResult = typeof(Vector128) - .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)(lowerResult), (Vector64)(upperResult), values); - object result = typeof(Vector128) - .GetMethod(nameof(Vector128.WithLower), new Type[] { typeof(Vector64) }) - .Invoke(value, new object[] { upperResult }); - result = typeof(Vector128) - .GetMethod(nameof(Vector128.WithUpper), new Type[] { typeof(Vector64) }) - .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)(result), values); } diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithLowerAndUpper.UInt64.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithLowerAndUpper.UInt64.cs index 052ab00..deb8448 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithLowerAndUpper.UInt64.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithLowerAndUpper.UInt64.cs @@ -78,20 +78,24 @@ namespace JIT.HardwareIntrinsics.General Vector128 value = Vector128.Create(values[0], values[1]); - object lowerResult = typeof(Vector128) - .GetMethod(nameof(Vector128.GetLower), new Type[] { }) - .Invoke(value, new object[] { }); - object upperResult = typeof(Vector128) - .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)(lowerResult), (Vector64)(upperResult), values); - object result = typeof(Vector128) - .GetMethod(nameof(Vector128.WithLower), new Type[] { typeof(Vector64) }) - .Invoke(value, new object[] { upperResult }); - result = typeof(Vector128) - .GetMethod(nameof(Vector128.WithUpper), new Type[] { typeof(Vector64) }) - .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)(result), values); } diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToScalar.Byte.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToScalar.Byte.cs index 480dbcb..c7b8ff4 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToScalar.Byte.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToScalar.Byte.cs @@ -73,9 +73,10 @@ namespace JIT.HardwareIntrinsics.General Vector128 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) - .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); } diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToScalar.Double.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToScalar.Double.cs index 902fb48..16beafa 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToScalar.Double.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToScalar.Double.cs @@ -73,9 +73,10 @@ namespace JIT.HardwareIntrinsics.General Vector128 value = Vector128.Create(values[0], values[1]); - object result = typeof(Vector128) - .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); } diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToScalar.Int16.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToScalar.Int16.cs index 3e2809e..814508a 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToScalar.Int16.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToScalar.Int16.cs @@ -73,9 +73,10 @@ namespace JIT.HardwareIntrinsics.General Vector128 value = Vector128.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]); - object result = typeof(Vector128) - .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); } diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToScalar.Int32.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToScalar.Int32.cs index 6e960f8..be6037e 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToScalar.Int32.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToScalar.Int32.cs @@ -73,9 +73,10 @@ namespace JIT.HardwareIntrinsics.General Vector128 value = Vector128.Create(values[0], values[1], values[2], values[3]); - object result = typeof(Vector128) - .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); } diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToScalar.Int64.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToScalar.Int64.cs index 50f2df5..75f18dc 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToScalar.Int64.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToScalar.Int64.cs @@ -73,9 +73,10 @@ namespace JIT.HardwareIntrinsics.General Vector128 value = Vector128.Create(values[0], values[1]); - object result = typeof(Vector128) - .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); } diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToScalar.SByte.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToScalar.SByte.cs index 50c6da0..393db30 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToScalar.SByte.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToScalar.SByte.cs @@ -73,9 +73,10 @@ namespace JIT.HardwareIntrinsics.General Vector128 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) - .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); } diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToScalar.Single.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToScalar.Single.cs index 51dca05..8052fc9 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToScalar.Single.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToScalar.Single.cs @@ -73,9 +73,10 @@ namespace JIT.HardwareIntrinsics.General Vector128 value = Vector128.Create(values[0], values[1], values[2], values[3]); - object result = typeof(Vector128) - .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); } diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToScalar.UInt16.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToScalar.UInt16.cs index 98833d5..b06ec8c 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToScalar.UInt16.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToScalar.UInt16.cs @@ -73,9 +73,10 @@ namespace JIT.HardwareIntrinsics.General Vector128 value = Vector128.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]); - object result = typeof(Vector128) - .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); } diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToScalar.UInt32.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToScalar.UInt32.cs index b012dec..e542d0c 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToScalar.UInt32.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToScalar.UInt32.cs @@ -73,9 +73,10 @@ namespace JIT.HardwareIntrinsics.General Vector128 value = Vector128.Create(values[0], values[1], values[2], values[3]); - object result = typeof(Vector128) - .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); } diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToScalar.UInt64.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToScalar.UInt64.cs index 228d96d..5255407 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToScalar.UInt64.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToScalar.UInt64.cs @@ -73,9 +73,10 @@ namespace JIT.HardwareIntrinsics.General Vector128 value = Vector128.Create(values[0], values[1]); - object result = typeof(Vector128) - .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); } diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToVector256.Byte.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToVector256.Byte.cs index 9e99f0d..1dbfe70 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToVector256.Byte.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToVector256.Byte.cs @@ -76,14 +76,16 @@ namespace JIT.HardwareIntrinsics.General Vector128 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) - .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)(result), values, isUnsafe: false); - object unsafeResult = typeof(Vector128) - .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)(unsafeResult), values, isUnsafe: true); } diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToVector256.Double.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToVector256.Double.cs index 4af41ac..4d1917b 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToVector256.Double.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToVector256.Double.cs @@ -76,14 +76,16 @@ namespace JIT.HardwareIntrinsics.General Vector128 value = Vector128.Create(values[0], values[1]); - object result = typeof(Vector128) - .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)(result), values, isUnsafe: false); - object unsafeResult = typeof(Vector128) - .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)(unsafeResult), values, isUnsafe: true); } diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToVector256.Int16.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToVector256.Int16.cs index 585953e..cdf5482 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToVector256.Int16.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToVector256.Int16.cs @@ -76,14 +76,16 @@ namespace JIT.HardwareIntrinsics.General Vector128 value = Vector128.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]); - object result = typeof(Vector128) - .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)(result), values, isUnsafe: false); - object unsafeResult = typeof(Vector128) - .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)(unsafeResult), values, isUnsafe: true); } diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToVector256.Int32.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToVector256.Int32.cs index bf6d554..5871923 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToVector256.Int32.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToVector256.Int32.cs @@ -76,14 +76,16 @@ namespace JIT.HardwareIntrinsics.General Vector128 value = Vector128.Create(values[0], values[1], values[2], values[3]); - object result = typeof(Vector128) - .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)(result), values, isUnsafe: false); - object unsafeResult = typeof(Vector128) - .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)(unsafeResult), values, isUnsafe: true); } diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToVector256.Int64.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToVector256.Int64.cs index 5b634c8..64d1653 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToVector256.Int64.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToVector256.Int64.cs @@ -76,14 +76,16 @@ namespace JIT.HardwareIntrinsics.General Vector128 value = Vector128.Create(values[0], values[1]); - object result = typeof(Vector128) - .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)(result), values, isUnsafe: false); - object unsafeResult = typeof(Vector128) - .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)(unsafeResult), values, isUnsafe: true); } diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToVector256.SByte.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToVector256.SByte.cs index 3e45e57..3bb6fb4 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToVector256.SByte.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToVector256.SByte.cs @@ -76,14 +76,16 @@ namespace JIT.HardwareIntrinsics.General Vector128 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) - .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)(result), values, isUnsafe: false); - object unsafeResult = typeof(Vector128) - .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)(unsafeResult), values, isUnsafe: true); } diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToVector256.Single.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToVector256.Single.cs index 5943dd4..0a01c79 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToVector256.Single.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToVector256.Single.cs @@ -76,14 +76,16 @@ namespace JIT.HardwareIntrinsics.General Vector128 value = Vector128.Create(values[0], values[1], values[2], values[3]); - object result = typeof(Vector128) - .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)(result), values, isUnsafe: false); - object unsafeResult = typeof(Vector128) - .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)(unsafeResult), values, isUnsafe: true); } diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToVector256.UInt16.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToVector256.UInt16.cs index 72be04b..a5d3bf6 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToVector256.UInt16.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToVector256.UInt16.cs @@ -76,14 +76,16 @@ namespace JIT.HardwareIntrinsics.General Vector128 value = Vector128.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]); - object result = typeof(Vector128) - .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)(result), values, isUnsafe: false); - object unsafeResult = typeof(Vector128) - .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)(unsafeResult), values, isUnsafe: true); } diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToVector256.UInt32.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToVector256.UInt32.cs index d287820..9e85eee 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToVector256.UInt32.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToVector256.UInt32.cs @@ -76,14 +76,16 @@ namespace JIT.HardwareIntrinsics.General Vector128 value = Vector128.Create(values[0], values[1], values[2], values[3]); - object result = typeof(Vector128) - .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)(result), values, isUnsafe: false); - object unsafeResult = typeof(Vector128) - .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)(unsafeResult), values, isUnsafe: true); } diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToVector256.UInt64.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToVector256.UInt64.cs index 0ca70fe..2faa35e 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToVector256.UInt64.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToVector256.UInt64.cs @@ -76,14 +76,16 @@ namespace JIT.HardwareIntrinsics.General Vector128 value = Vector128.Create(values[0], values[1]); - object result = typeof(Vector128) - .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)(result), values, isUnsafe: false); - object unsafeResult = typeof(Vector128) - .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)(unsafeResult), values, isUnsafe: true); } diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/As.Byte.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/As.Byte.cs index c9f1d18..2015313 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/As.Byte.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/As.Byte.cs @@ -144,63 +144,73 @@ namespace JIT.HardwareIntrinsics.General Vector256 value; value = Vector256.Create(TestLibrary.Generator.GetByte()); - object byteResult = typeof(Vector256) - .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)(byteResult), value); value = Vector256.Create(TestLibrary.Generator.GetByte()); - object doubleResult = typeof(Vector256) - .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)(doubleResult), value); value = Vector256.Create(TestLibrary.Generator.GetByte()); - object shortResult = typeof(Vector256) - .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)(shortResult), value); value = Vector256.Create(TestLibrary.Generator.GetByte()); - object intResult = typeof(Vector256) - .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)(intResult), value); value = Vector256.Create(TestLibrary.Generator.GetByte()); - object longResult = typeof(Vector256) - .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)(longResult), value); value = Vector256.Create(TestLibrary.Generator.GetByte()); - object sbyteResult = typeof(Vector256) - .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)(sbyteResult), value); value = Vector256.Create(TestLibrary.Generator.GetByte()); - object floatResult = typeof(Vector256) - .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)(floatResult), value); value = Vector256.Create(TestLibrary.Generator.GetByte()); - object ushortResult = typeof(Vector256) - .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)(ushortResult), value); value = Vector256.Create(TestLibrary.Generator.GetByte()); - object uintResult = typeof(Vector256) - .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)(uintResult), value); value = Vector256.Create(TestLibrary.Generator.GetByte()); - object ulongResult = typeof(Vector256) - .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)(ulongResult), value); } diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/As.Double.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/As.Double.cs index d6d427a..69f4e01 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/As.Double.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/As.Double.cs @@ -144,63 +144,73 @@ namespace JIT.HardwareIntrinsics.General Vector256 value; value = Vector256.Create(TestLibrary.Generator.GetDouble()); - object byteResult = typeof(Vector256) - .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)(byteResult), value); value = Vector256.Create(TestLibrary.Generator.GetDouble()); - object doubleResult = typeof(Vector256) - .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)(doubleResult), value); value = Vector256.Create(TestLibrary.Generator.GetDouble()); - object shortResult = typeof(Vector256) - .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)(shortResult), value); value = Vector256.Create(TestLibrary.Generator.GetDouble()); - object intResult = typeof(Vector256) - .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)(intResult), value); value = Vector256.Create(TestLibrary.Generator.GetDouble()); - object longResult = typeof(Vector256) - .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)(longResult), value); value = Vector256.Create(TestLibrary.Generator.GetDouble()); - object sbyteResult = typeof(Vector256) - .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)(sbyteResult), value); value = Vector256.Create(TestLibrary.Generator.GetDouble()); - object floatResult = typeof(Vector256) - .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)(floatResult), value); value = Vector256.Create(TestLibrary.Generator.GetDouble()); - object ushortResult = typeof(Vector256) - .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)(ushortResult), value); value = Vector256.Create(TestLibrary.Generator.GetDouble()); - object uintResult = typeof(Vector256) - .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)(uintResult), value); value = Vector256.Create(TestLibrary.Generator.GetDouble()); - object ulongResult = typeof(Vector256) - .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)(ulongResult), value); } diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/As.Int16.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/As.Int16.cs index d6c35d8..094971d 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/As.Int16.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/As.Int16.cs @@ -144,63 +144,73 @@ namespace JIT.HardwareIntrinsics.General Vector256 value; value = Vector256.Create(TestLibrary.Generator.GetInt16()); - object byteResult = typeof(Vector256) - .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)(byteResult), value); value = Vector256.Create(TestLibrary.Generator.GetInt16()); - object doubleResult = typeof(Vector256) - .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)(doubleResult), value); value = Vector256.Create(TestLibrary.Generator.GetInt16()); - object shortResult = typeof(Vector256) - .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)(shortResult), value); value = Vector256.Create(TestLibrary.Generator.GetInt16()); - object intResult = typeof(Vector256) - .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)(intResult), value); value = Vector256.Create(TestLibrary.Generator.GetInt16()); - object longResult = typeof(Vector256) - .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)(longResult), value); value = Vector256.Create(TestLibrary.Generator.GetInt16()); - object sbyteResult = typeof(Vector256) - .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)(sbyteResult), value); value = Vector256.Create(TestLibrary.Generator.GetInt16()); - object floatResult = typeof(Vector256) - .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)(floatResult), value); value = Vector256.Create(TestLibrary.Generator.GetInt16()); - object ushortResult = typeof(Vector256) - .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)(ushortResult), value); value = Vector256.Create(TestLibrary.Generator.GetInt16()); - object uintResult = typeof(Vector256) - .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)(uintResult), value); value = Vector256.Create(TestLibrary.Generator.GetInt16()); - object ulongResult = typeof(Vector256) - .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)(ulongResult), value); } diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/As.Int32.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/As.Int32.cs index e2b61b4..09c19be 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/As.Int32.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/As.Int32.cs @@ -144,63 +144,73 @@ namespace JIT.HardwareIntrinsics.General Vector256 value; value = Vector256.Create(TestLibrary.Generator.GetInt32()); - object byteResult = typeof(Vector256) - .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)(byteResult), value); value = Vector256.Create(TestLibrary.Generator.GetInt32()); - object doubleResult = typeof(Vector256) - .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)(doubleResult), value); value = Vector256.Create(TestLibrary.Generator.GetInt32()); - object shortResult = typeof(Vector256) - .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)(shortResult), value); value = Vector256.Create(TestLibrary.Generator.GetInt32()); - object intResult = typeof(Vector256) - .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)(intResult), value); value = Vector256.Create(TestLibrary.Generator.GetInt32()); - object longResult = typeof(Vector256) - .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)(longResult), value); value = Vector256.Create(TestLibrary.Generator.GetInt32()); - object sbyteResult = typeof(Vector256) - .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)(sbyteResult), value); value = Vector256.Create(TestLibrary.Generator.GetInt32()); - object floatResult = typeof(Vector256) - .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)(floatResult), value); value = Vector256.Create(TestLibrary.Generator.GetInt32()); - object ushortResult = typeof(Vector256) - .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)(ushortResult), value); value = Vector256.Create(TestLibrary.Generator.GetInt32()); - object uintResult = typeof(Vector256) - .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)(uintResult), value); value = Vector256.Create(TestLibrary.Generator.GetInt32()); - object ulongResult = typeof(Vector256) - .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)(ulongResult), value); } diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/As.Int64.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/As.Int64.cs index f93f73c..0bea200 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/As.Int64.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/As.Int64.cs @@ -144,63 +144,73 @@ namespace JIT.HardwareIntrinsics.General Vector256 value; value = Vector256.Create(TestLibrary.Generator.GetInt64()); - object byteResult = typeof(Vector256) - .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)(byteResult), value); value = Vector256.Create(TestLibrary.Generator.GetInt64()); - object doubleResult = typeof(Vector256) - .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)(doubleResult), value); value = Vector256.Create(TestLibrary.Generator.GetInt64()); - object shortResult = typeof(Vector256) - .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)(shortResult), value); value = Vector256.Create(TestLibrary.Generator.GetInt64()); - object intResult = typeof(Vector256) - .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)(intResult), value); value = Vector256.Create(TestLibrary.Generator.GetInt64()); - object longResult = typeof(Vector256) - .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)(longResult), value); value = Vector256.Create(TestLibrary.Generator.GetInt64()); - object sbyteResult = typeof(Vector256) - .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)(sbyteResult), value); value = Vector256.Create(TestLibrary.Generator.GetInt64()); - object floatResult = typeof(Vector256) - .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)(floatResult), value); value = Vector256.Create(TestLibrary.Generator.GetInt64()); - object ushortResult = typeof(Vector256) - .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)(ushortResult), value); value = Vector256.Create(TestLibrary.Generator.GetInt64()); - object uintResult = typeof(Vector256) - .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)(uintResult), value); value = Vector256.Create(TestLibrary.Generator.GetInt64()); - object ulongResult = typeof(Vector256) - .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)(ulongResult), value); } diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/As.SByte.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/As.SByte.cs index 1e541f5..3bd14a0 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/As.SByte.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/As.SByte.cs @@ -144,63 +144,73 @@ namespace JIT.HardwareIntrinsics.General Vector256 value; value = Vector256.Create(TestLibrary.Generator.GetSByte()); - object byteResult = typeof(Vector256) - .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)(byteResult), value); value = Vector256.Create(TestLibrary.Generator.GetSByte()); - object doubleResult = typeof(Vector256) - .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)(doubleResult), value); value = Vector256.Create(TestLibrary.Generator.GetSByte()); - object shortResult = typeof(Vector256) - .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)(shortResult), value); value = Vector256.Create(TestLibrary.Generator.GetSByte()); - object intResult = typeof(Vector256) - .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)(intResult), value); value = Vector256.Create(TestLibrary.Generator.GetSByte()); - object longResult = typeof(Vector256) - .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)(longResult), value); value = Vector256.Create(TestLibrary.Generator.GetSByte()); - object sbyteResult = typeof(Vector256) - .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)(sbyteResult), value); value = Vector256.Create(TestLibrary.Generator.GetSByte()); - object floatResult = typeof(Vector256) - .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)(floatResult), value); value = Vector256.Create(TestLibrary.Generator.GetSByte()); - object ushortResult = typeof(Vector256) - .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)(ushortResult), value); value = Vector256.Create(TestLibrary.Generator.GetSByte()); - object uintResult = typeof(Vector256) - .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)(uintResult), value); value = Vector256.Create(TestLibrary.Generator.GetSByte()); - object ulongResult = typeof(Vector256) - .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)(ulongResult), value); } diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/As.Single.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/As.Single.cs index 0430abf..d921f57 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/As.Single.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/As.Single.cs @@ -144,63 +144,73 @@ namespace JIT.HardwareIntrinsics.General Vector256 value; value = Vector256.Create(TestLibrary.Generator.GetSingle()); - object byteResult = typeof(Vector256) - .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)(byteResult), value); value = Vector256.Create(TestLibrary.Generator.GetSingle()); - object doubleResult = typeof(Vector256) - .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)(doubleResult), value); value = Vector256.Create(TestLibrary.Generator.GetSingle()); - object shortResult = typeof(Vector256) - .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)(shortResult), value); value = Vector256.Create(TestLibrary.Generator.GetSingle()); - object intResult = typeof(Vector256) - .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)(intResult), value); value = Vector256.Create(TestLibrary.Generator.GetSingle()); - object longResult = typeof(Vector256) - .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)(longResult), value); value = Vector256.Create(TestLibrary.Generator.GetSingle()); - object sbyteResult = typeof(Vector256) - .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)(sbyteResult), value); value = Vector256.Create(TestLibrary.Generator.GetSingle()); - object floatResult = typeof(Vector256) - .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)(floatResult), value); value = Vector256.Create(TestLibrary.Generator.GetSingle()); - object ushortResult = typeof(Vector256) - .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)(ushortResult), value); value = Vector256.Create(TestLibrary.Generator.GetSingle()); - object uintResult = typeof(Vector256) - .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)(uintResult), value); value = Vector256.Create(TestLibrary.Generator.GetSingle()); - object ulongResult = typeof(Vector256) - .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)(ulongResult), value); } diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/As.UInt16.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/As.UInt16.cs index fbb2b73..02af220 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/As.UInt16.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/As.UInt16.cs @@ -144,63 +144,73 @@ namespace JIT.HardwareIntrinsics.General Vector256 value; value = Vector256.Create(TestLibrary.Generator.GetUInt16()); - object byteResult = typeof(Vector256) - .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)(byteResult), value); value = Vector256.Create(TestLibrary.Generator.GetUInt16()); - object doubleResult = typeof(Vector256) - .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)(doubleResult), value); value = Vector256.Create(TestLibrary.Generator.GetUInt16()); - object shortResult = typeof(Vector256) - .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)(shortResult), value); value = Vector256.Create(TestLibrary.Generator.GetUInt16()); - object intResult = typeof(Vector256) - .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)(intResult), value); value = Vector256.Create(TestLibrary.Generator.GetUInt16()); - object longResult = typeof(Vector256) - .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)(longResult), value); value = Vector256.Create(TestLibrary.Generator.GetUInt16()); - object sbyteResult = typeof(Vector256) - .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)(sbyteResult), value); value = Vector256.Create(TestLibrary.Generator.GetUInt16()); - object floatResult = typeof(Vector256) - .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)(floatResult), value); value = Vector256.Create(TestLibrary.Generator.GetUInt16()); - object ushortResult = typeof(Vector256) - .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)(ushortResult), value); value = Vector256.Create(TestLibrary.Generator.GetUInt16()); - object uintResult = typeof(Vector256) - .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)(uintResult), value); value = Vector256.Create(TestLibrary.Generator.GetUInt16()); - object ulongResult = typeof(Vector256) - .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)(ulongResult), value); } diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/As.UInt32.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/As.UInt32.cs index 83e95da..8db55b5 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/As.UInt32.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/As.UInt32.cs @@ -144,63 +144,73 @@ namespace JIT.HardwareIntrinsics.General Vector256 value; value = Vector256.Create(TestLibrary.Generator.GetUInt32()); - object byteResult = typeof(Vector256) - .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)(byteResult), value); value = Vector256.Create(TestLibrary.Generator.GetUInt32()); - object doubleResult = typeof(Vector256) - .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)(doubleResult), value); value = Vector256.Create(TestLibrary.Generator.GetUInt32()); - object shortResult = typeof(Vector256) - .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)(shortResult), value); value = Vector256.Create(TestLibrary.Generator.GetUInt32()); - object intResult = typeof(Vector256) - .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)(intResult), value); value = Vector256.Create(TestLibrary.Generator.GetUInt32()); - object longResult = typeof(Vector256) - .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)(longResult), value); value = Vector256.Create(TestLibrary.Generator.GetUInt32()); - object sbyteResult = typeof(Vector256) - .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)(sbyteResult), value); value = Vector256.Create(TestLibrary.Generator.GetUInt32()); - object floatResult = typeof(Vector256) - .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)(floatResult), value); value = Vector256.Create(TestLibrary.Generator.GetUInt32()); - object ushortResult = typeof(Vector256) - .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)(ushortResult), value); value = Vector256.Create(TestLibrary.Generator.GetUInt32()); - object uintResult = typeof(Vector256) - .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)(uintResult), value); value = Vector256.Create(TestLibrary.Generator.GetUInt32()); - object ulongResult = typeof(Vector256) - .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)(ulongResult), value); } diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/As.UInt64.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/As.UInt64.cs index 5018324..0808d05 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/As.UInt64.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/As.UInt64.cs @@ -144,63 +144,73 @@ namespace JIT.HardwareIntrinsics.General Vector256 value; value = Vector256.Create(TestLibrary.Generator.GetUInt64()); - object byteResult = typeof(Vector256) - .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)(byteResult), value); value = Vector256.Create(TestLibrary.Generator.GetUInt64()); - object doubleResult = typeof(Vector256) - .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)(doubleResult), value); value = Vector256.Create(TestLibrary.Generator.GetUInt64()); - object shortResult = typeof(Vector256) - .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)(shortResult), value); value = Vector256.Create(TestLibrary.Generator.GetUInt64()); - object intResult = typeof(Vector256) - .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)(intResult), value); value = Vector256.Create(TestLibrary.Generator.GetUInt64()); - object longResult = typeof(Vector256) - .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)(longResult), value); value = Vector256.Create(TestLibrary.Generator.GetUInt64()); - object sbyteResult = typeof(Vector256) - .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)(sbyteResult), value); value = Vector256.Create(TestLibrary.Generator.GetUInt64()); - object floatResult = typeof(Vector256) - .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)(floatResult), value); value = Vector256.Create(TestLibrary.Generator.GetUInt64()); - object ushortResult = typeof(Vector256) - .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)(ushortResult), value); value = Vector256.Create(TestLibrary.Generator.GetUInt64()); - object uintResult = typeof(Vector256) - .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)(uintResult), value); value = Vector256.Create(TestLibrary.Generator.GetUInt64()); - object ulongResult = typeof(Vector256) - .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)(ulongResult), value); } diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.Byte.0.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.Byte.0.cs index c37df53..af3b1ac 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.Byte.0.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.Byte.0.cs @@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General try { - object result = typeof(Vector256) - .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) - .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)(result2), values, insertedValue); } catch (TargetInvocationException e) diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.Byte.15.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.Byte.15.cs index 4a8e29d..e920b63 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.Byte.15.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.Byte.15.cs @@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General try { - object result = typeof(Vector256) - .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) - .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)(result2), values, insertedValue); } catch (TargetInvocationException e) diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.Byte.31.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.Byte.31.cs index 25e8f03..3881967 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.Byte.31.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.Byte.31.cs @@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General try { - object result = typeof(Vector256) - .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) - .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)(result2), values, insertedValue); } catch (TargetInvocationException e) diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.Byte.7.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.Byte.7.cs index c5af043..4257b98 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.Byte.7.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.Byte.7.cs @@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General try { - object result = typeof(Vector256) - .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) - .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)(result2), values, insertedValue); } catch (TargetInvocationException e) diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.Double.0.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.Double.0.cs index 3a4de6a..35c7c75 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.Double.0.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.Double.0.cs @@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General try { - object result = typeof(Vector256) - .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) - .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)(result2), values, insertedValue); } catch (TargetInvocationException e) diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.Double.1.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.Double.1.cs index 0e16814..1b4b643 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.Double.1.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.Double.1.cs @@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General try { - object result = typeof(Vector256) - .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) - .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)(result2), values, insertedValue); } catch (TargetInvocationException e) diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.Double.3.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.Double.3.cs index e632c2f..0e0d6b7 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.Double.3.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.Double.3.cs @@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General try { - object result = typeof(Vector256) - .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) - .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)(result2), values, insertedValue); } catch (TargetInvocationException e) diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.Int16.0.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.Int16.0.cs index fddbba9..c18be60 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.Int16.0.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.Int16.0.cs @@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General try { - object result = typeof(Vector256) - .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) - .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)(result2), values, insertedValue); } catch (TargetInvocationException e) diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.Int16.15.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.Int16.15.cs index 94a16bd..b1f0a86 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.Int16.15.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.Int16.15.cs @@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General try { - object result = typeof(Vector256) - .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) - .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)(result2), values, insertedValue); } catch (TargetInvocationException e) diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.Int16.3.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.Int16.3.cs index ad1c6ae..21af023 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.Int16.3.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.Int16.3.cs @@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General try { - object result = typeof(Vector256) - .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) - .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)(result2), values, insertedValue); } catch (TargetInvocationException e) diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.Int16.7.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.Int16.7.cs index f8b8ad3..21c1fdf 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.Int16.7.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.Int16.7.cs @@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General try { - object result = typeof(Vector256) - .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) - .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)(result2), values, insertedValue); } catch (TargetInvocationException e) diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.Int32.0.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.Int32.0.cs index 634f26c..74f1a38 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.Int32.0.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.Int32.0.cs @@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General try { - object result = typeof(Vector256) - .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) - .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)(result2), values, insertedValue); } catch (TargetInvocationException e) diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.Int32.1.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.Int32.1.cs index 4881452..a247d9e 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.Int32.1.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.Int32.1.cs @@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General try { - object result = typeof(Vector256) - .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) - .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)(result2), values, insertedValue); } catch (TargetInvocationException e) diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.Int32.3.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.Int32.3.cs index c580789..abe22dc 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.Int32.3.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.Int32.3.cs @@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General try { - object result = typeof(Vector256) - .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) - .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)(result2), values, insertedValue); } catch (TargetInvocationException e) diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.Int32.7.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.Int32.7.cs index f500a72..12e82ef 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.Int32.7.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.Int32.7.cs @@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General try { - object result = typeof(Vector256) - .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) - .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)(result2), values, insertedValue); } catch (TargetInvocationException e) diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.Int64.0.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.Int64.0.cs index fe5c256..0bea519 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.Int64.0.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.Int64.0.cs @@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General try { - object result = typeof(Vector256) - .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) - .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)(result2), values, insertedValue); } catch (TargetInvocationException e) diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.Int64.1.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.Int64.1.cs index 926f650..54eb058 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.Int64.1.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.Int64.1.cs @@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General try { - object result = typeof(Vector256) - .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) - .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)(result2), values, insertedValue); } catch (TargetInvocationException e) diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.Int64.3.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.Int64.3.cs index 2c30d50..484a603 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.Int64.3.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.Int64.3.cs @@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General try { - object result = typeof(Vector256) - .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) - .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)(result2), values, insertedValue); } catch (TargetInvocationException e) diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.SByte.0.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.SByte.0.cs index 0e9dba8..7a6dd99 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.SByte.0.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.SByte.0.cs @@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General try { - object result = typeof(Vector256) - .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) - .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)(result2), values, insertedValue); } catch (TargetInvocationException e) diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.SByte.15.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.SByte.15.cs index 202d8fb..503fcca 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.SByte.15.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.SByte.15.cs @@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General try { - object result = typeof(Vector256) - .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) - .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)(result2), values, insertedValue); } catch (TargetInvocationException e) diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.SByte.31.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.SByte.31.cs index bfc0c30..8bc154e 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.SByte.31.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.SByte.31.cs @@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General try { - object result = typeof(Vector256) - .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) - .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)(result2), values, insertedValue); } catch (TargetInvocationException e) diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.SByte.7.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.SByte.7.cs index 7012967..9c05e58 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.SByte.7.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.SByte.7.cs @@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General try { - object result = typeof(Vector256) - .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) - .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)(result2), values, insertedValue); } catch (TargetInvocationException e) diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.Single.0.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.Single.0.cs index 24fbde3..28411f9 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.Single.0.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.Single.0.cs @@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General try { - object result = typeof(Vector256) - .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) - .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)(result2), values, insertedValue); } catch (TargetInvocationException e) diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.Single.1.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.Single.1.cs index 242a769..1b453a1 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.Single.1.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.Single.1.cs @@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General try { - object result = typeof(Vector256) - .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) - .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)(result2), values, insertedValue); } catch (TargetInvocationException e) diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.Single.3.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.Single.3.cs index a14ac61..373f120 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.Single.3.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.Single.3.cs @@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General try { - object result = typeof(Vector256) - .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) - .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)(result2), values, insertedValue); } catch (TargetInvocationException e) diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.Single.7.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.Single.7.cs index ba82202..79bf27a 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.Single.7.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.Single.7.cs @@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General try { - object result = typeof(Vector256) - .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) - .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)(result2), values, insertedValue); } catch (TargetInvocationException e) diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.UInt16.0.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.UInt16.0.cs index dd5b72e..c7f0713 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.UInt16.0.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.UInt16.0.cs @@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General try { - object result = typeof(Vector256) - .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) - .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)(result2), values, insertedValue); } catch (TargetInvocationException e) diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.UInt16.15.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.UInt16.15.cs index d5d8e77..1c84972 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.UInt16.15.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.UInt16.15.cs @@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General try { - object result = typeof(Vector256) - .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) - .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)(result2), values, insertedValue); } catch (TargetInvocationException e) diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.UInt16.3.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.UInt16.3.cs index cef4374..6b6c790 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.UInt16.3.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.UInt16.3.cs @@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General try { - object result = typeof(Vector256) - .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) - .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)(result2), values, insertedValue); } catch (TargetInvocationException e) diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.UInt16.7.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.UInt16.7.cs index 288d286..0fb957a 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.UInt16.7.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.UInt16.7.cs @@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General try { - object result = typeof(Vector256) - .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) - .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)(result2), values, insertedValue); } catch (TargetInvocationException e) diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.UInt32.0.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.UInt32.0.cs index 2cecdcc..2e54e47 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.UInt32.0.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.UInt32.0.cs @@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General try { - object result = typeof(Vector256) - .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) - .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)(result2), values, insertedValue); } catch (TargetInvocationException e) diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.UInt32.1.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.UInt32.1.cs index 42d083d..43e461c 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.UInt32.1.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.UInt32.1.cs @@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General try { - object result = typeof(Vector256) - .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) - .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)(result2), values, insertedValue); } catch (TargetInvocationException e) diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.UInt32.3.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.UInt32.3.cs index 2d74e59..d9ad66c 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.UInt32.3.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.UInt32.3.cs @@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General try { - object result = typeof(Vector256) - .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) - .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)(result2), values, insertedValue); } catch (TargetInvocationException e) diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.UInt32.7.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.UInt32.7.cs index ed7c67b..4d53eba 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.UInt32.7.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.UInt32.7.cs @@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General try { - object result = typeof(Vector256) - .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) - .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)(result2), values, insertedValue); } catch (TargetInvocationException e) diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.UInt64.0.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.UInt64.0.cs index 0f54ce1..61909e9 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.UInt64.0.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.UInt64.0.cs @@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General try { - object result = typeof(Vector256) - .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) - .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)(result2), values, insertedValue); } catch (TargetInvocationException e) diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.UInt64.1.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.UInt64.1.cs index 536d99f..16a3a66 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.UInt64.1.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.UInt64.1.cs @@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General try { - object result = typeof(Vector256) - .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) - .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)(result2), values, insertedValue); } catch (TargetInvocationException e) diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.UInt64.3.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.UInt64.3.cs index 6e5670c..5430c00 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.UInt64.3.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.UInt64.3.cs @@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General try { - object result = typeof(Vector256) - .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) - .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)(result2), values, insertedValue); } catch (TargetInvocationException e) diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithLowerAndUpper.Byte.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithLowerAndUpper.Byte.cs index c800fbd..9426504 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithLowerAndUpper.Byte.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithLowerAndUpper.Byte.cs @@ -78,20 +78,24 @@ namespace JIT.HardwareIntrinsics.General Vector256 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) - .GetMethod(nameof(Vector256.GetLower), new Type[] { }) - .Invoke(value, new object[] { }); - object upperResult = typeof(Vector256) - .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)(lowerResult), (Vector128)(upperResult), values); - object result = typeof(Vector256) - .GetMethod(nameof(Vector256.WithLower), new Type[] { typeof(Vector128) }) - .Invoke(value, new object[] { upperResult }); - result = typeof(Vector256) - .GetMethod(nameof(Vector256.WithUpper), new Type[] { typeof(Vector128) }) - .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)(result), values); } diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithLowerAndUpper.Double.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithLowerAndUpper.Double.cs index eced2d1..df74244 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithLowerAndUpper.Double.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithLowerAndUpper.Double.cs @@ -78,20 +78,24 @@ namespace JIT.HardwareIntrinsics.General Vector256 value = Vector256.Create(values[0], values[1], values[2], values[3]); - object lowerResult = typeof(Vector256) - .GetMethod(nameof(Vector256.GetLower), new Type[] { }) - .Invoke(value, new object[] { }); - object upperResult = typeof(Vector256) - .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)(lowerResult), (Vector128)(upperResult), values); - object result = typeof(Vector256) - .GetMethod(nameof(Vector256.WithLower), new Type[] { typeof(Vector128) }) - .Invoke(value, new object[] { upperResult }); - result = typeof(Vector256) - .GetMethod(nameof(Vector256.WithUpper), new Type[] { typeof(Vector128) }) - .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)(result), values); } diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithLowerAndUpper.Int16.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithLowerAndUpper.Int16.cs index 2111866..c0d74a0 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithLowerAndUpper.Int16.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithLowerAndUpper.Int16.cs @@ -78,20 +78,24 @@ namespace JIT.HardwareIntrinsics.General Vector256 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) - .GetMethod(nameof(Vector256.GetLower), new Type[] { }) - .Invoke(value, new object[] { }); - object upperResult = typeof(Vector256) - .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)(lowerResult), (Vector128)(upperResult), values); - object result = typeof(Vector256) - .GetMethod(nameof(Vector256.WithLower), new Type[] { typeof(Vector128) }) - .Invoke(value, new object[] { upperResult }); - result = typeof(Vector256) - .GetMethod(nameof(Vector256.WithUpper), new Type[] { typeof(Vector128) }) - .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)(result), values); } diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithLowerAndUpper.Int32.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithLowerAndUpper.Int32.cs index 50f9440..80e8ef8 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithLowerAndUpper.Int32.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithLowerAndUpper.Int32.cs @@ -78,20 +78,24 @@ namespace JIT.HardwareIntrinsics.General Vector256 value = Vector256.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]); - object lowerResult = typeof(Vector256) - .GetMethod(nameof(Vector256.GetLower), new Type[] { }) - .Invoke(value, new object[] { }); - object upperResult = typeof(Vector256) - .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)(lowerResult), (Vector128)(upperResult), values); - object result = typeof(Vector256) - .GetMethod(nameof(Vector256.WithLower), new Type[] { typeof(Vector128) }) - .Invoke(value, new object[] { upperResult }); - result = typeof(Vector256) - .GetMethod(nameof(Vector256.WithUpper), new Type[] { typeof(Vector128) }) - .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)(result), values); } diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithLowerAndUpper.Int64.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithLowerAndUpper.Int64.cs index 28ed533..7b76b1b 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithLowerAndUpper.Int64.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithLowerAndUpper.Int64.cs @@ -78,20 +78,24 @@ namespace JIT.HardwareIntrinsics.General Vector256 value = Vector256.Create(values[0], values[1], values[2], values[3]); - object lowerResult = typeof(Vector256) - .GetMethod(nameof(Vector256.GetLower), new Type[] { }) - .Invoke(value, new object[] { }); - object upperResult = typeof(Vector256) - .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)(lowerResult), (Vector128)(upperResult), values); - object result = typeof(Vector256) - .GetMethod(nameof(Vector256.WithLower), new Type[] { typeof(Vector128) }) - .Invoke(value, new object[] { upperResult }); - result = typeof(Vector256) - .GetMethod(nameof(Vector256.WithUpper), new Type[] { typeof(Vector128) }) - .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)(result), values); } diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithLowerAndUpper.SByte.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithLowerAndUpper.SByte.cs index cbdbb14..f52d1e0 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithLowerAndUpper.SByte.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithLowerAndUpper.SByte.cs @@ -78,20 +78,24 @@ namespace JIT.HardwareIntrinsics.General Vector256 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) - .GetMethod(nameof(Vector256.GetLower), new Type[] { }) - .Invoke(value, new object[] { }); - object upperResult = typeof(Vector256) - .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)(lowerResult), (Vector128)(upperResult), values); - object result = typeof(Vector256) - .GetMethod(nameof(Vector256.WithLower), new Type[] { typeof(Vector128) }) - .Invoke(value, new object[] { upperResult }); - result = typeof(Vector256) - .GetMethod(nameof(Vector256.WithUpper), new Type[] { typeof(Vector128) }) - .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)(result), values); } diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithLowerAndUpper.Single.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithLowerAndUpper.Single.cs index 15e7387..8c5cdf2 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithLowerAndUpper.Single.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithLowerAndUpper.Single.cs @@ -78,20 +78,24 @@ namespace JIT.HardwareIntrinsics.General Vector256 value = Vector256.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]); - object lowerResult = typeof(Vector256) - .GetMethod(nameof(Vector256.GetLower), new Type[] { }) - .Invoke(value, new object[] { }); - object upperResult = typeof(Vector256) - .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)(lowerResult), (Vector128)(upperResult), values); - object result = typeof(Vector256) - .GetMethod(nameof(Vector256.WithLower), new Type[] { typeof(Vector128) }) - .Invoke(value, new object[] { upperResult }); - result = typeof(Vector256) - .GetMethod(nameof(Vector256.WithUpper), new Type[] { typeof(Vector128) }) - .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)(result), values); } diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithLowerAndUpper.UInt16.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithLowerAndUpper.UInt16.cs index da7f08d..21367ee 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithLowerAndUpper.UInt16.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithLowerAndUpper.UInt16.cs @@ -78,20 +78,24 @@ namespace JIT.HardwareIntrinsics.General Vector256 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) - .GetMethod(nameof(Vector256.GetLower), new Type[] { }) - .Invoke(value, new object[] { }); - object upperResult = typeof(Vector256) - .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)(lowerResult), (Vector128)(upperResult), values); - object result = typeof(Vector256) - .GetMethod(nameof(Vector256.WithLower), new Type[] { typeof(Vector128) }) - .Invoke(value, new object[] { upperResult }); - result = typeof(Vector256) - .GetMethod(nameof(Vector256.WithUpper), new Type[] { typeof(Vector128) }) - .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)(result), values); } diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithLowerAndUpper.UInt32.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithLowerAndUpper.UInt32.cs index fb8d6d5..dbe2ab9 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithLowerAndUpper.UInt32.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithLowerAndUpper.UInt32.cs @@ -78,20 +78,24 @@ namespace JIT.HardwareIntrinsics.General Vector256 value = Vector256.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]); - object lowerResult = typeof(Vector256) - .GetMethod(nameof(Vector256.GetLower), new Type[] { }) - .Invoke(value, new object[] { }); - object upperResult = typeof(Vector256) - .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)(lowerResult), (Vector128)(upperResult), values); - object result = typeof(Vector256) - .GetMethod(nameof(Vector256.WithLower), new Type[] { typeof(Vector128) }) - .Invoke(value, new object[] { upperResult }); - result = typeof(Vector256) - .GetMethod(nameof(Vector256.WithUpper), new Type[] { typeof(Vector128) }) - .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)(result), values); } diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithLowerAndUpper.UInt64.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithLowerAndUpper.UInt64.cs index 34ae7fc..03fa7ee 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithLowerAndUpper.UInt64.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithLowerAndUpper.UInt64.cs @@ -78,20 +78,24 @@ namespace JIT.HardwareIntrinsics.General Vector256 value = Vector256.Create(values[0], values[1], values[2], values[3]); - object lowerResult = typeof(Vector256) - .GetMethod(nameof(Vector256.GetLower), new Type[] { }) - .Invoke(value, new object[] { }); - object upperResult = typeof(Vector256) - .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)(lowerResult), (Vector128)(upperResult), values); - object result = typeof(Vector256) - .GetMethod(nameof(Vector256.WithLower), new Type[] { typeof(Vector128) }) - .Invoke(value, new object[] { upperResult }); - result = typeof(Vector256) - .GetMethod(nameof(Vector256.WithUpper), new Type[] { typeof(Vector128) }) - .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)(result), values); } diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/ToScalar.Byte.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/ToScalar.Byte.cs index 1b6f5c4..0681e34 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/ToScalar.Byte.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/ToScalar.Byte.cs @@ -73,9 +73,10 @@ namespace JIT.HardwareIntrinsics.General Vector256 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) - .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); } diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/ToScalar.Double.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/ToScalar.Double.cs index 5e56107..956ecad 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/ToScalar.Double.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/ToScalar.Double.cs @@ -73,9 +73,10 @@ namespace JIT.HardwareIntrinsics.General Vector256 value = Vector256.Create(values[0], values[1], values[2], values[3]); - object result = typeof(Vector256) - .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); } diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/ToScalar.Int16.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/ToScalar.Int16.cs index 0406639..f457b67 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/ToScalar.Int16.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/ToScalar.Int16.cs @@ -73,9 +73,10 @@ namespace JIT.HardwareIntrinsics.General Vector256 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) - .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); } diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/ToScalar.Int32.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/ToScalar.Int32.cs index f04e5ab..db347bf 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/ToScalar.Int32.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/ToScalar.Int32.cs @@ -73,9 +73,10 @@ namespace JIT.HardwareIntrinsics.General Vector256 value = Vector256.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]); - object result = typeof(Vector256) - .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); } diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/ToScalar.Int64.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/ToScalar.Int64.cs index bfdf247..4478d38 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/ToScalar.Int64.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/ToScalar.Int64.cs @@ -73,9 +73,10 @@ namespace JIT.HardwareIntrinsics.General Vector256 value = Vector256.Create(values[0], values[1], values[2], values[3]); - object result = typeof(Vector256) - .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); } diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/ToScalar.SByte.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/ToScalar.SByte.cs index 0104085..2f7372e 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/ToScalar.SByte.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/ToScalar.SByte.cs @@ -73,9 +73,10 @@ namespace JIT.HardwareIntrinsics.General Vector256 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) - .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); } diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/ToScalar.Single.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/ToScalar.Single.cs index 46937bf..76b1372 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/ToScalar.Single.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/ToScalar.Single.cs @@ -73,9 +73,10 @@ namespace JIT.HardwareIntrinsics.General Vector256 value = Vector256.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]); - object result = typeof(Vector256) - .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); } diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/ToScalar.UInt16.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/ToScalar.UInt16.cs index 8aa7d48..eea7f36 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/ToScalar.UInt16.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/ToScalar.UInt16.cs @@ -73,9 +73,10 @@ namespace JIT.HardwareIntrinsics.General Vector256 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) - .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); } diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/ToScalar.UInt32.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/ToScalar.UInt32.cs index b3f3096..76297af 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/ToScalar.UInt32.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/ToScalar.UInt32.cs @@ -73,9 +73,10 @@ namespace JIT.HardwareIntrinsics.General Vector256 value = Vector256.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]); - object result = typeof(Vector256) - .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); } diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/ToScalar.UInt64.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/ToScalar.UInt64.cs index 817eaab..83b48aa 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/ToScalar.UInt64.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/ToScalar.UInt64.cs @@ -73,9 +73,10 @@ namespace JIT.HardwareIntrinsics.General Vector256 value = Vector256.Create(values[0], values[1], values[2], values[3]); - object result = typeof(Vector256) - .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); } diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/As.Byte.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/As.Byte.cs index c3b875b..91fcb48 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/As.Byte.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/As.Byte.cs @@ -144,63 +144,73 @@ namespace JIT.HardwareIntrinsics.General Vector64 value; value = Vector64.Create(TestLibrary.Generator.GetByte()); - object byteResult = typeof(Vector64) - .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)(byteResult), value); value = Vector64.Create(TestLibrary.Generator.GetByte()); - object doubleResult = typeof(Vector64) - .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)(doubleResult), value); value = Vector64.Create(TestLibrary.Generator.GetByte()); - object shortResult = typeof(Vector64) - .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)(shortResult), value); value = Vector64.Create(TestLibrary.Generator.GetByte()); - object intResult = typeof(Vector64) - .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)(intResult), value); value = Vector64.Create(TestLibrary.Generator.GetByte()); - object longResult = typeof(Vector64) - .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)(longResult), value); value = Vector64.Create(TestLibrary.Generator.GetByte()); - object sbyteResult = typeof(Vector64) - .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)(sbyteResult), value); value = Vector64.Create(TestLibrary.Generator.GetByte()); - object floatResult = typeof(Vector64) - .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)(floatResult), value); value = Vector64.Create(TestLibrary.Generator.GetByte()); - object ushortResult = typeof(Vector64) - .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)(ushortResult), value); value = Vector64.Create(TestLibrary.Generator.GetByte()); - object uintResult = typeof(Vector64) - .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)(uintResult), value); value = Vector64.Create(TestLibrary.Generator.GetByte()); - object ulongResult = typeof(Vector64) - .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)(ulongResult), value); } diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/As.Double.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/As.Double.cs index 8d23d3f..8da9c99 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/As.Double.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/As.Double.cs @@ -144,63 +144,73 @@ namespace JIT.HardwareIntrinsics.General Vector64 value; value = Vector64.Create(TestLibrary.Generator.GetDouble()); - object byteResult = typeof(Vector64) - .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)(byteResult), value); value = Vector64.Create(TestLibrary.Generator.GetDouble()); - object doubleResult = typeof(Vector64) - .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)(doubleResult), value); value = Vector64.Create(TestLibrary.Generator.GetDouble()); - object shortResult = typeof(Vector64) - .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)(shortResult), value); value = Vector64.Create(TestLibrary.Generator.GetDouble()); - object intResult = typeof(Vector64) - .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)(intResult), value); value = Vector64.Create(TestLibrary.Generator.GetDouble()); - object longResult = typeof(Vector64) - .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)(longResult), value); value = Vector64.Create(TestLibrary.Generator.GetDouble()); - object sbyteResult = typeof(Vector64) - .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)(sbyteResult), value); value = Vector64.Create(TestLibrary.Generator.GetDouble()); - object floatResult = typeof(Vector64) - .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)(floatResult), value); value = Vector64.Create(TestLibrary.Generator.GetDouble()); - object ushortResult = typeof(Vector64) - .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)(ushortResult), value); value = Vector64.Create(TestLibrary.Generator.GetDouble()); - object uintResult = typeof(Vector64) - .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)(uintResult), value); value = Vector64.Create(TestLibrary.Generator.GetDouble()); - object ulongResult = typeof(Vector64) - .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)(ulongResult), value); } diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/As.Int16.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/As.Int16.cs index 953bccb..9751ccf 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/As.Int16.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/As.Int16.cs @@ -144,63 +144,73 @@ namespace JIT.HardwareIntrinsics.General Vector64 value; value = Vector64.Create(TestLibrary.Generator.GetInt16()); - object byteResult = typeof(Vector64) - .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)(byteResult), value); value = Vector64.Create(TestLibrary.Generator.GetInt16()); - object doubleResult = typeof(Vector64) - .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)(doubleResult), value); value = Vector64.Create(TestLibrary.Generator.GetInt16()); - object shortResult = typeof(Vector64) - .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)(shortResult), value); value = Vector64.Create(TestLibrary.Generator.GetInt16()); - object intResult = typeof(Vector64) - .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)(intResult), value); value = Vector64.Create(TestLibrary.Generator.GetInt16()); - object longResult = typeof(Vector64) - .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)(longResult), value); value = Vector64.Create(TestLibrary.Generator.GetInt16()); - object sbyteResult = typeof(Vector64) - .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)(sbyteResult), value); value = Vector64.Create(TestLibrary.Generator.GetInt16()); - object floatResult = typeof(Vector64) - .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)(floatResult), value); value = Vector64.Create(TestLibrary.Generator.GetInt16()); - object ushortResult = typeof(Vector64) - .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)(ushortResult), value); value = Vector64.Create(TestLibrary.Generator.GetInt16()); - object uintResult = typeof(Vector64) - .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)(uintResult), value); value = Vector64.Create(TestLibrary.Generator.GetInt16()); - object ulongResult = typeof(Vector64) - .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)(ulongResult), value); } diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/As.Int32.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/As.Int32.cs index d823056..e85e21f 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/As.Int32.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/As.Int32.cs @@ -144,63 +144,73 @@ namespace JIT.HardwareIntrinsics.General Vector64 value; value = Vector64.Create(TestLibrary.Generator.GetInt32()); - object byteResult = typeof(Vector64) - .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)(byteResult), value); value = Vector64.Create(TestLibrary.Generator.GetInt32()); - object doubleResult = typeof(Vector64) - .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)(doubleResult), value); value = Vector64.Create(TestLibrary.Generator.GetInt32()); - object shortResult = typeof(Vector64) - .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)(shortResult), value); value = Vector64.Create(TestLibrary.Generator.GetInt32()); - object intResult = typeof(Vector64) - .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)(intResult), value); value = Vector64.Create(TestLibrary.Generator.GetInt32()); - object longResult = typeof(Vector64) - .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)(longResult), value); value = Vector64.Create(TestLibrary.Generator.GetInt32()); - object sbyteResult = typeof(Vector64) - .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)(sbyteResult), value); value = Vector64.Create(TestLibrary.Generator.GetInt32()); - object floatResult = typeof(Vector64) - .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)(floatResult), value); value = Vector64.Create(TestLibrary.Generator.GetInt32()); - object ushortResult = typeof(Vector64) - .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)(ushortResult), value); value = Vector64.Create(TestLibrary.Generator.GetInt32()); - object uintResult = typeof(Vector64) - .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)(uintResult), value); value = Vector64.Create(TestLibrary.Generator.GetInt32()); - object ulongResult = typeof(Vector64) - .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)(ulongResult), value); } diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/As.Int64.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/As.Int64.cs index c5f1126..17d7ca0 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/As.Int64.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/As.Int64.cs @@ -144,63 +144,73 @@ namespace JIT.HardwareIntrinsics.General Vector64 value; value = Vector64.Create(TestLibrary.Generator.GetInt64()); - object byteResult = typeof(Vector64) - .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)(byteResult), value); value = Vector64.Create(TestLibrary.Generator.GetInt64()); - object doubleResult = typeof(Vector64) - .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)(doubleResult), value); value = Vector64.Create(TestLibrary.Generator.GetInt64()); - object shortResult = typeof(Vector64) - .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)(shortResult), value); value = Vector64.Create(TestLibrary.Generator.GetInt64()); - object intResult = typeof(Vector64) - .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)(intResult), value); value = Vector64.Create(TestLibrary.Generator.GetInt64()); - object longResult = typeof(Vector64) - .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)(longResult), value); value = Vector64.Create(TestLibrary.Generator.GetInt64()); - object sbyteResult = typeof(Vector64) - .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)(sbyteResult), value); value = Vector64.Create(TestLibrary.Generator.GetInt64()); - object floatResult = typeof(Vector64) - .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)(floatResult), value); value = Vector64.Create(TestLibrary.Generator.GetInt64()); - object ushortResult = typeof(Vector64) - .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)(ushortResult), value); value = Vector64.Create(TestLibrary.Generator.GetInt64()); - object uintResult = typeof(Vector64) - .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)(uintResult), value); value = Vector64.Create(TestLibrary.Generator.GetInt64()); - object ulongResult = typeof(Vector64) - .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)(ulongResult), value); } diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/As.SByte.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/As.SByte.cs index c7838de..d029bd4 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/As.SByte.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/As.SByte.cs @@ -144,63 +144,73 @@ namespace JIT.HardwareIntrinsics.General Vector64 value; value = Vector64.Create(TestLibrary.Generator.GetSByte()); - object byteResult = typeof(Vector64) - .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)(byteResult), value); value = Vector64.Create(TestLibrary.Generator.GetSByte()); - object doubleResult = typeof(Vector64) - .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)(doubleResult), value); value = Vector64.Create(TestLibrary.Generator.GetSByte()); - object shortResult = typeof(Vector64) - .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)(shortResult), value); value = Vector64.Create(TestLibrary.Generator.GetSByte()); - object intResult = typeof(Vector64) - .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)(intResult), value); value = Vector64.Create(TestLibrary.Generator.GetSByte()); - object longResult = typeof(Vector64) - .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)(longResult), value); value = Vector64.Create(TestLibrary.Generator.GetSByte()); - object sbyteResult = typeof(Vector64) - .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)(sbyteResult), value); value = Vector64.Create(TestLibrary.Generator.GetSByte()); - object floatResult = typeof(Vector64) - .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)(floatResult), value); value = Vector64.Create(TestLibrary.Generator.GetSByte()); - object ushortResult = typeof(Vector64) - .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)(ushortResult), value); value = Vector64.Create(TestLibrary.Generator.GetSByte()); - object uintResult = typeof(Vector64) - .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)(uintResult), value); value = Vector64.Create(TestLibrary.Generator.GetSByte()); - object ulongResult = typeof(Vector64) - .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)(ulongResult), value); } diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/As.Single.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/As.Single.cs index 5a149fd..87fcacc 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/As.Single.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/As.Single.cs @@ -144,63 +144,73 @@ namespace JIT.HardwareIntrinsics.General Vector64 value; value = Vector64.Create(TestLibrary.Generator.GetSingle()); - object byteResult = typeof(Vector64) - .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)(byteResult), value); value = Vector64.Create(TestLibrary.Generator.GetSingle()); - object doubleResult = typeof(Vector64) - .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)(doubleResult), value); value = Vector64.Create(TestLibrary.Generator.GetSingle()); - object shortResult = typeof(Vector64) - .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)(shortResult), value); value = Vector64.Create(TestLibrary.Generator.GetSingle()); - object intResult = typeof(Vector64) - .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)(intResult), value); value = Vector64.Create(TestLibrary.Generator.GetSingle()); - object longResult = typeof(Vector64) - .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)(longResult), value); value = Vector64.Create(TestLibrary.Generator.GetSingle()); - object sbyteResult = typeof(Vector64) - .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)(sbyteResult), value); value = Vector64.Create(TestLibrary.Generator.GetSingle()); - object floatResult = typeof(Vector64) - .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)(floatResult), value); value = Vector64.Create(TestLibrary.Generator.GetSingle()); - object ushortResult = typeof(Vector64) - .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)(ushortResult), value); value = Vector64.Create(TestLibrary.Generator.GetSingle()); - object uintResult = typeof(Vector64) - .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)(uintResult), value); value = Vector64.Create(TestLibrary.Generator.GetSingle()); - object ulongResult = typeof(Vector64) - .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)(ulongResult), value); } diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/As.UInt16.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/As.UInt16.cs index 55e20c1..2692b04 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/As.UInt16.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/As.UInt16.cs @@ -144,63 +144,73 @@ namespace JIT.HardwareIntrinsics.General Vector64 value; value = Vector64.Create(TestLibrary.Generator.GetUInt16()); - object byteResult = typeof(Vector64) - .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)(byteResult), value); value = Vector64.Create(TestLibrary.Generator.GetUInt16()); - object doubleResult = typeof(Vector64) - .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)(doubleResult), value); value = Vector64.Create(TestLibrary.Generator.GetUInt16()); - object shortResult = typeof(Vector64) - .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)(shortResult), value); value = Vector64.Create(TestLibrary.Generator.GetUInt16()); - object intResult = typeof(Vector64) - .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)(intResult), value); value = Vector64.Create(TestLibrary.Generator.GetUInt16()); - object longResult = typeof(Vector64) - .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)(longResult), value); value = Vector64.Create(TestLibrary.Generator.GetUInt16()); - object sbyteResult = typeof(Vector64) - .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)(sbyteResult), value); value = Vector64.Create(TestLibrary.Generator.GetUInt16()); - object floatResult = typeof(Vector64) - .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)(floatResult), value); value = Vector64.Create(TestLibrary.Generator.GetUInt16()); - object ushortResult = typeof(Vector64) - .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)(ushortResult), value); value = Vector64.Create(TestLibrary.Generator.GetUInt16()); - object uintResult = typeof(Vector64) - .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)(uintResult), value); value = Vector64.Create(TestLibrary.Generator.GetUInt16()); - object ulongResult = typeof(Vector64) - .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)(ulongResult), value); } diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/As.UInt32.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/As.UInt32.cs index b136784..6f6ba1e 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/As.UInt32.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/As.UInt32.cs @@ -144,63 +144,73 @@ namespace JIT.HardwareIntrinsics.General Vector64 value; value = Vector64.Create(TestLibrary.Generator.GetUInt32()); - object byteResult = typeof(Vector64) - .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)(byteResult), value); value = Vector64.Create(TestLibrary.Generator.GetUInt32()); - object doubleResult = typeof(Vector64) - .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)(doubleResult), value); value = Vector64.Create(TestLibrary.Generator.GetUInt32()); - object shortResult = typeof(Vector64) - .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)(shortResult), value); value = Vector64.Create(TestLibrary.Generator.GetUInt32()); - object intResult = typeof(Vector64) - .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)(intResult), value); value = Vector64.Create(TestLibrary.Generator.GetUInt32()); - object longResult = typeof(Vector64) - .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)(longResult), value); value = Vector64.Create(TestLibrary.Generator.GetUInt32()); - object sbyteResult = typeof(Vector64) - .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)(sbyteResult), value); value = Vector64.Create(TestLibrary.Generator.GetUInt32()); - object floatResult = typeof(Vector64) - .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)(floatResult), value); value = Vector64.Create(TestLibrary.Generator.GetUInt32()); - object ushortResult = typeof(Vector64) - .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)(ushortResult), value); value = Vector64.Create(TestLibrary.Generator.GetUInt32()); - object uintResult = typeof(Vector64) - .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)(uintResult), value); value = Vector64.Create(TestLibrary.Generator.GetUInt32()); - object ulongResult = typeof(Vector64) - .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)(ulongResult), value); } diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/As.UInt64.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/As.UInt64.cs index cf3a00b..9989bd9 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/As.UInt64.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/As.UInt64.cs @@ -144,63 +144,73 @@ namespace JIT.HardwareIntrinsics.General Vector64 value; value = Vector64.Create(TestLibrary.Generator.GetUInt64()); - object byteResult = typeof(Vector64) - .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)(byteResult), value); value = Vector64.Create(TestLibrary.Generator.GetUInt64()); - object doubleResult = typeof(Vector64) - .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)(doubleResult), value); value = Vector64.Create(TestLibrary.Generator.GetUInt64()); - object shortResult = typeof(Vector64) - .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)(shortResult), value); value = Vector64.Create(TestLibrary.Generator.GetUInt64()); - object intResult = typeof(Vector64) - .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)(intResult), value); value = Vector64.Create(TestLibrary.Generator.GetUInt64()); - object longResult = typeof(Vector64) - .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)(longResult), value); value = Vector64.Create(TestLibrary.Generator.GetUInt64()); - object sbyteResult = typeof(Vector64) - .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)(sbyteResult), value); value = Vector64.Create(TestLibrary.Generator.GetUInt64()); - object floatResult = typeof(Vector64) - .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)(floatResult), value); value = Vector64.Create(TestLibrary.Generator.GetUInt64()); - object ushortResult = typeof(Vector64) - .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)(ushortResult), value); value = Vector64.Create(TestLibrary.Generator.GetUInt64()); - object uintResult = typeof(Vector64) - .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)(uintResult), value); value = Vector64.Create(TestLibrary.Generator.GetUInt64()); - object ulongResult = typeof(Vector64) - .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)(ulongResult), value); } diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/GetAndWithElement.Byte.0.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/GetAndWithElement.Byte.0.cs index a12dd0c..280a0f2 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/GetAndWithElement.Byte.0.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/GetAndWithElement.Byte.0.cs @@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General try { - object result = typeof(Vector64) - .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) - .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)(result2), values, insertedValue); } catch (TargetInvocationException e) diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/GetAndWithElement.Byte.7.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/GetAndWithElement.Byte.7.cs index 52fdd5b..2434a94 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/GetAndWithElement.Byte.7.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/GetAndWithElement.Byte.7.cs @@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General try { - object result = typeof(Vector64) - .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) - .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)(result2), values, insertedValue); } catch (TargetInvocationException e) diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/GetAndWithElement.Double.0.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/GetAndWithElement.Double.0.cs index 0b232d4..02c65d6 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/GetAndWithElement.Double.0.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/GetAndWithElement.Double.0.cs @@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General try { - object result = typeof(Vector64) - .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) - .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)(result2), values, insertedValue); } catch (TargetInvocationException e) diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/GetAndWithElement.Int16.0.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/GetAndWithElement.Int16.0.cs index ea23b75..69d9c8b 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/GetAndWithElement.Int16.0.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/GetAndWithElement.Int16.0.cs @@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General try { - object result = typeof(Vector64) - .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) - .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)(result2), values, insertedValue); } catch (TargetInvocationException e) diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/GetAndWithElement.Int16.3.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/GetAndWithElement.Int16.3.cs index de8e05f..dea261e 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/GetAndWithElement.Int16.3.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/GetAndWithElement.Int16.3.cs @@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General try { - object result = typeof(Vector64) - .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) - .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)(result2), values, insertedValue); } catch (TargetInvocationException e) diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/GetAndWithElement.Int32.0.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/GetAndWithElement.Int32.0.cs index 605f5b8..5b49551 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/GetAndWithElement.Int32.0.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/GetAndWithElement.Int32.0.cs @@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General try { - object result = typeof(Vector64) - .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) - .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)(result2), values, insertedValue); } catch (TargetInvocationException e) diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/GetAndWithElement.Int32.1.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/GetAndWithElement.Int32.1.cs index c7e0573..4c29585 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/GetAndWithElement.Int32.1.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/GetAndWithElement.Int32.1.cs @@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General try { - object result = typeof(Vector64) - .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) - .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)(result2), values, insertedValue); } catch (TargetInvocationException e) diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/GetAndWithElement.Int64.0.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/GetAndWithElement.Int64.0.cs index 71c3d16..f1538d3 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/GetAndWithElement.Int64.0.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/GetAndWithElement.Int64.0.cs @@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General try { - object result = typeof(Vector64) - .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) - .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)(result2), values, insertedValue); } catch (TargetInvocationException e) diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/GetAndWithElement.SByte.0.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/GetAndWithElement.SByte.0.cs index 386ef92..4b00686 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/GetAndWithElement.SByte.0.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/GetAndWithElement.SByte.0.cs @@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General try { - object result = typeof(Vector64) - .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) - .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)(result2), values, insertedValue); } catch (TargetInvocationException e) diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/GetAndWithElement.SByte.7.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/GetAndWithElement.SByte.7.cs index d4c2e73..3b26000 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/GetAndWithElement.SByte.7.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/GetAndWithElement.SByte.7.cs @@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General try { - object result = typeof(Vector64) - .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) - .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)(result2), values, insertedValue); } catch (TargetInvocationException e) diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/GetAndWithElement.Single.0.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/GetAndWithElement.Single.0.cs index 43c2820..f3d626c 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/GetAndWithElement.Single.0.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/GetAndWithElement.Single.0.cs @@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General try { - object result = typeof(Vector64) - .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) - .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)(result2), values, insertedValue); } catch (TargetInvocationException e) diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/GetAndWithElement.Single.1.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/GetAndWithElement.Single.1.cs index 50aff8a..ce111bd 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/GetAndWithElement.Single.1.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/GetAndWithElement.Single.1.cs @@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General try { - object result = typeof(Vector64) - .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) - .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)(result2), values, insertedValue); } catch (TargetInvocationException e) diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/GetAndWithElement.UInt16.0.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/GetAndWithElement.UInt16.0.cs index 5bcbcd3..00eb96a 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/GetAndWithElement.UInt16.0.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/GetAndWithElement.UInt16.0.cs @@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General try { - object result = typeof(Vector64) - .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) - .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)(result2), values, insertedValue); } catch (TargetInvocationException e) diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/GetAndWithElement.UInt16.3.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/GetAndWithElement.UInt16.3.cs index 8b2b654..c5b5176 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/GetAndWithElement.UInt16.3.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/GetAndWithElement.UInt16.3.cs @@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General try { - object result = typeof(Vector64) - .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) - .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)(result2), values, insertedValue); } catch (TargetInvocationException e) diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/GetAndWithElement.UInt32.0.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/GetAndWithElement.UInt32.0.cs index 813d1fd..97412c3 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/GetAndWithElement.UInt32.0.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/GetAndWithElement.UInt32.0.cs @@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General try { - object result = typeof(Vector64) - .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) - .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)(result2), values, insertedValue); } catch (TargetInvocationException e) diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/GetAndWithElement.UInt32.1.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/GetAndWithElement.UInt32.1.cs index 88a5a0f..c7aeca8 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/GetAndWithElement.UInt32.1.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/GetAndWithElement.UInt32.1.cs @@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General try { - object result = typeof(Vector64) - .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) - .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)(result2), values, insertedValue); } catch (TargetInvocationException e) diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/GetAndWithElement.UInt64.0.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/GetAndWithElement.UInt64.0.cs index 7229aa3..83a643b 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/GetAndWithElement.UInt64.0.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/GetAndWithElement.UInt64.0.cs @@ -120,9 +120,10 @@ namespace JIT.HardwareIntrinsics.General try { - object result = typeof(Vector64) - .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) - .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)(result2), values, insertedValue); } catch (TargetInvocationException e) diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToScalar.Byte.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToScalar.Byte.cs index 3d779b5..b3cf016 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToScalar.Byte.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToScalar.Byte.cs @@ -73,9 +73,10 @@ namespace JIT.HardwareIntrinsics.General Vector64 value = Vector64.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]); - object result = typeof(Vector64) - .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); } diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToScalar.Double.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToScalar.Double.cs index 1e54c5b..8740694 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToScalar.Double.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToScalar.Double.cs @@ -73,9 +73,10 @@ namespace JIT.HardwareIntrinsics.General Vector64 value = Vector64.Create(values[0]); - object result = typeof(Vector64) - .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); } diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToScalar.Int16.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToScalar.Int16.cs index df62b1e..2c00451 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToScalar.Int16.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToScalar.Int16.cs @@ -73,9 +73,10 @@ namespace JIT.HardwareIntrinsics.General Vector64 value = Vector64.Create(values[0], values[1], values[2], values[3]); - object result = typeof(Vector64) - .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); } diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToScalar.Int32.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToScalar.Int32.cs index 214089b..d66e986 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToScalar.Int32.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToScalar.Int32.cs @@ -73,9 +73,10 @@ namespace JIT.HardwareIntrinsics.General Vector64 value = Vector64.Create(values[0], values[1]); - object result = typeof(Vector64) - .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); } diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToScalar.Int64.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToScalar.Int64.cs index dda2658..4b937e2 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToScalar.Int64.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToScalar.Int64.cs @@ -73,9 +73,10 @@ namespace JIT.HardwareIntrinsics.General Vector64 value = Vector64.Create(values[0]); - object result = typeof(Vector64) - .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); } diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToScalar.SByte.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToScalar.SByte.cs index 428c1e1..6b4682c 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToScalar.SByte.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToScalar.SByte.cs @@ -73,9 +73,10 @@ namespace JIT.HardwareIntrinsics.General Vector64 value = Vector64.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]); - object result = typeof(Vector64) - .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); } diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToScalar.Single.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToScalar.Single.cs index 70c5647..fde07e6 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToScalar.Single.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToScalar.Single.cs @@ -73,9 +73,10 @@ namespace JIT.HardwareIntrinsics.General Vector64 value = Vector64.Create(values[0], values[1]); - object result = typeof(Vector64) - .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); } diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToScalar.UInt16.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToScalar.UInt16.cs index 44026fe..aac41b8 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToScalar.UInt16.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToScalar.UInt16.cs @@ -73,9 +73,10 @@ namespace JIT.HardwareIntrinsics.General Vector64 value = Vector64.Create(values[0], values[1], values[2], values[3]); - object result = typeof(Vector64) - .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); } diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToScalar.UInt32.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToScalar.UInt32.cs index 32a903c..7f86623 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToScalar.UInt32.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToScalar.UInt32.cs @@ -73,9 +73,10 @@ namespace JIT.HardwareIntrinsics.General Vector64 value = Vector64.Create(values[0], values[1]); - object result = typeof(Vector64) - .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); } diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToScalar.UInt64.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToScalar.UInt64.cs index ac680ab..0a80b85 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToScalar.UInt64.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToScalar.UInt64.cs @@ -73,9 +73,10 @@ namespace JIT.HardwareIntrinsics.General Vector64 value = Vector64.Create(values[0]); - object result = typeof(Vector64) - .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); } diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToVector128.Byte.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToVector128.Byte.cs index 4fe87d4..fda0872 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToVector128.Byte.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToVector128.Byte.cs @@ -76,14 +76,16 @@ namespace JIT.HardwareIntrinsics.General Vector64 value = Vector64.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]); - object result = typeof(Vector64) - .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)(result), values, isUnsafe: false); - object unsafeResult = typeof(Vector64) - .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)(unsafeResult), values, isUnsafe: true); } diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToVector128.Double.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToVector128.Double.cs index 1afe299..175efd4 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToVector128.Double.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToVector128.Double.cs @@ -76,14 +76,16 @@ namespace JIT.HardwareIntrinsics.General Vector64 value = Vector64.Create(values[0]); - object result = typeof(Vector64) - .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)(result), values, isUnsafe: false); - object unsafeResult = typeof(Vector64) - .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)(unsafeResult), values, isUnsafe: true); } diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToVector128.Int16.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToVector128.Int16.cs index 2dea575..d63cfc1 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToVector128.Int16.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToVector128.Int16.cs @@ -76,14 +76,16 @@ namespace JIT.HardwareIntrinsics.General Vector64 value = Vector64.Create(values[0], values[1], values[2], values[3]); - object result = typeof(Vector64) - .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)(result), values, isUnsafe: false); - object unsafeResult = typeof(Vector64) - .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)(unsafeResult), values, isUnsafe: true); } diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToVector128.Int32.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToVector128.Int32.cs index 739b9c1..0ef7d51 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToVector128.Int32.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToVector128.Int32.cs @@ -76,14 +76,16 @@ namespace JIT.HardwareIntrinsics.General Vector64 value = Vector64.Create(values[0], values[1]); - object result = typeof(Vector64) - .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)(result), values, isUnsafe: false); - object unsafeResult = typeof(Vector64) - .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)(unsafeResult), values, isUnsafe: true); } diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToVector128.Int64.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToVector128.Int64.cs index 7c6d118..ab584c8 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToVector128.Int64.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToVector128.Int64.cs @@ -76,14 +76,16 @@ namespace JIT.HardwareIntrinsics.General Vector64 value = Vector64.Create(values[0]); - object result = typeof(Vector64) - .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)(result), values, isUnsafe: false); - object unsafeResult = typeof(Vector64) - .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)(unsafeResult), values, isUnsafe: true); } diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToVector128.SByte.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToVector128.SByte.cs index a1dc82f..b89d7b6 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToVector128.SByte.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToVector128.SByte.cs @@ -76,14 +76,16 @@ namespace JIT.HardwareIntrinsics.General Vector64 value = Vector64.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]); - object result = typeof(Vector64) - .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)(result), values, isUnsafe: false); - object unsafeResult = typeof(Vector64) - .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)(unsafeResult), values, isUnsafe: true); } diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToVector128.Single.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToVector128.Single.cs index c533787..8ae339d 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToVector128.Single.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToVector128.Single.cs @@ -76,14 +76,16 @@ namespace JIT.HardwareIntrinsics.General Vector64 value = Vector64.Create(values[0], values[1]); - object result = typeof(Vector64) - .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)(result), values, isUnsafe: false); - object unsafeResult = typeof(Vector64) - .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)(unsafeResult), values, isUnsafe: true); } diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToVector128.UInt16.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToVector128.UInt16.cs index 2f48350..e778051 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToVector128.UInt16.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToVector128.UInt16.cs @@ -76,14 +76,16 @@ namespace JIT.HardwareIntrinsics.General Vector64 value = Vector64.Create(values[0], values[1], values[2], values[3]); - object result = typeof(Vector64) - .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)(result), values, isUnsafe: false); - object unsafeResult = typeof(Vector64) - .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)(unsafeResult), values, isUnsafe: true); } diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToVector128.UInt32.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToVector128.UInt32.cs index 0bfdb95..e6cf8d0 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToVector128.UInt32.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToVector128.UInt32.cs @@ -76,14 +76,16 @@ namespace JIT.HardwareIntrinsics.General Vector64 value = Vector64.Create(values[0], values[1]); - object result = typeof(Vector64) - .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)(result), values, isUnsafe: false); - object unsafeResult = typeof(Vector64) - .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)(unsafeResult), values, isUnsafe: true); } diff --git a/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToVector128.UInt64.cs b/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToVector128.UInt64.cs index 5b25266..1aa1fc5 100644 --- a/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToVector128.UInt64.cs +++ b/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToVector128.UInt64.cs @@ -76,14 +76,16 @@ namespace JIT.HardwareIntrinsics.General Vector64 value = Vector64.Create(values[0]); - object result = typeof(Vector64) - .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)(result), values, isUnsafe: false); - object unsafeResult = typeof(Vector64) - .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)(unsafeResult), values, isUnsafe: true); } -- 2.7.4