diff --git a/src/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Avx.cs b/src/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Avx.cs index 63e0e29efd0c..2115e9609b34 100644 --- a/src/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Avx.cs +++ b/src/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Avx.cs @@ -241,6 +241,10 @@ public static class Avx /// public static byte Extract(Vector256 value, byte index) { + if (!IsSupported) + { + throw new PlatformNotSupportedException(); + } return Unsafe.Add(ref Unsafe.As, byte>(ref value), index & 0x1F); } @@ -251,6 +255,10 @@ public static byte Extract(Vector256 value, byte index) /// public static ushort Extract(Vector256 value, byte index) { + if (!IsSupported) + { + throw new PlatformNotSupportedException(); + } return Unsafe.Add(ref Unsafe.As, ushort>(ref value), index & 0xF); } @@ -260,6 +268,10 @@ public static ushort Extract(Vector256 value, byte index) /// public static int Extract(Vector256 value, byte index) { + if (!IsSupported) + { + throw new PlatformNotSupportedException(); + } return Unsafe.Add(ref Unsafe.As, int>(ref value), index & 0x7); } @@ -269,6 +281,10 @@ public static int Extract(Vector256 value, byte index) /// public static uint Extract(Vector256 value, byte index) { + if (!IsSupported) + { + throw new PlatformNotSupportedException(); + } return Unsafe.Add(ref Unsafe.As, uint>(ref value), index & 0x7); } @@ -278,7 +294,7 @@ public static uint Extract(Vector256 value, byte index) /// public static long Extract(Vector256 value, byte index) { - if (IntPtr.Size != 8) + if (!IsSupported || (IntPtr.Size != 8)) { throw new PlatformNotSupportedException(); } @@ -291,7 +307,7 @@ public static long Extract(Vector256 value, byte index) /// public static ulong Extract(Vector256 value, byte index) { - if (IntPtr.Size != 8) + if (!IsSupported || (IntPtr.Size != 8)) { throw new PlatformNotSupportedException(); } @@ -523,6 +539,11 @@ public static Vector256 Insert(Vector256 value, uint data, byte inde /// public static Vector256 Insert(Vector256 value, long data, byte index) { + if (IntPtr.Size != 8) + { + throw new PlatformNotSupportedException(); + } + unsafe { index &= 0x3; @@ -539,6 +560,11 @@ public static Vector256 Insert(Vector256 value, long data, byte inde /// public static Vector256 Insert(Vector256 value, ulong data, byte index) { + if (IntPtr.Size != 8) + { + throw new PlatformNotSupportedException(); + } + unsafe { index &= 0x3; diff --git a/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.Byte.1.cs b/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.Byte.1.cs index 2c59dfdf730a..ecaae0d0da39 100644 --- a/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.Byte.1.cs +++ b/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.Byte.1.cs @@ -22,9 +22,7 @@ public static partial class Program private static void ExtractByte1() { var test = new SimpleUnaryOpTest__ExtractByte1(); - - try - { + if (test.IsSupported) { // Validates basic functionality works, using Unsafe.Read @@ -77,11 +75,6 @@ private static void ExtractByte1() // Validates we throw on unsupported hardware test.RunUnsupportedScenario(); } - } - catch (PlatformNotSupportedException) - { - test.Succeeded = true; - } if (!test.Succeeded) { @@ -126,7 +119,7 @@ public SimpleUnaryOpTest__ExtractByte1() _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Byte[RetElementCount], LargestVectorSize); } - public bool IsSupported => Avx.IsSupported; + public bool IsSupported => Avx.IsSupported && (Environment.Is64BitProcess || ((typeof(Byte) != typeof(long)) && (typeof(Byte) != typeof(ulong)))); public bool Succeeded { get; set; } diff --git a/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.Byte.20.cs b/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.Byte.20.cs index 068e812b00ec..cd8805e19011 100644 --- a/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.Byte.20.cs +++ b/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.Byte.20.cs @@ -22,9 +22,7 @@ public static partial class Program private static void ExtractByte20() { var test = new SimpleUnaryOpTest__ExtractByte20(); - - try - { + if (test.IsSupported) { // Validates basic functionality works, using Unsafe.Read @@ -77,11 +75,6 @@ private static void ExtractByte20() // Validates we throw on unsupported hardware test.RunUnsupportedScenario(); } - } - catch (PlatformNotSupportedException) - { - test.Succeeded = true; - } if (!test.Succeeded) { @@ -126,7 +119,7 @@ public SimpleUnaryOpTest__ExtractByte20() _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Byte[RetElementCount], LargestVectorSize); } - public bool IsSupported => Avx.IsSupported; + public bool IsSupported => Avx.IsSupported && (Environment.Is64BitProcess || ((typeof(Byte) != typeof(long)) && (typeof(Byte) != typeof(ulong)))); public bool Succeeded { get; set; } diff --git a/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.Byte.52.cs b/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.Byte.52.cs index 4f39a52795a0..203f5fdf3d56 100644 --- a/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.Byte.52.cs +++ b/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.Byte.52.cs @@ -22,9 +22,7 @@ public static partial class Program private static void ExtractByte52() { var test = new SimpleUnaryOpTest__ExtractByte52(); - - try - { + if (test.IsSupported) { // Validates basic functionality works, using Unsafe.Read @@ -77,11 +75,6 @@ private static void ExtractByte52() // Validates we throw on unsupported hardware test.RunUnsupportedScenario(); } - } - catch (PlatformNotSupportedException) - { - test.Succeeded = true; - } if (!test.Succeeded) { @@ -126,7 +119,7 @@ public SimpleUnaryOpTest__ExtractByte52() _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Byte[RetElementCount], LargestVectorSize); } - public bool IsSupported => Avx.IsSupported; + public bool IsSupported => Avx.IsSupported && (Environment.Is64BitProcess || ((typeof(Byte) != typeof(long)) && (typeof(Byte) != typeof(ulong)))); public bool Succeeded { get; set; } diff --git a/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.Int32.1.cs b/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.Int32.1.cs index 133d65a06e37..ea140daf799f 100644 --- a/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.Int32.1.cs +++ b/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.Int32.1.cs @@ -22,9 +22,7 @@ public static partial class Program private static void ExtractInt321() { var test = new SimpleUnaryOpTest__ExtractInt321(); - - try - { + if (test.IsSupported) { // Validates basic functionality works, using Unsafe.Read @@ -77,11 +75,6 @@ private static void ExtractInt321() // Validates we throw on unsupported hardware test.RunUnsupportedScenario(); } - } - catch (PlatformNotSupportedException) - { - test.Succeeded = true; - } if (!test.Succeeded) { @@ -126,7 +119,7 @@ public SimpleUnaryOpTest__ExtractInt321() _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int32[RetElementCount], LargestVectorSize); } - public bool IsSupported => Avx.IsSupported; + public bool IsSupported => Avx.IsSupported && (Environment.Is64BitProcess || ((typeof(Int32) != typeof(long)) && (typeof(Int32) != typeof(ulong)))); public bool Succeeded { get; set; } diff --git a/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.Int32.22.cs b/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.Int32.22.cs index bd79d925cf05..07062064b1ef 100644 --- a/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.Int32.22.cs +++ b/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.Int32.22.cs @@ -22,9 +22,7 @@ public static partial class Program private static void ExtractInt3222() { var test = new SimpleUnaryOpTest__ExtractInt3222(); - - try - { + if (test.IsSupported) { // Validates basic functionality works, using Unsafe.Read @@ -77,11 +75,6 @@ private static void ExtractInt3222() // Validates we throw on unsupported hardware test.RunUnsupportedScenario(); } - } - catch (PlatformNotSupportedException) - { - test.Succeeded = true; - } if (!test.Succeeded) { @@ -126,7 +119,7 @@ public SimpleUnaryOpTest__ExtractInt3222() _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int32[RetElementCount], LargestVectorSize); } - public bool IsSupported => Avx.IsSupported; + public bool IsSupported => Avx.IsSupported && (Environment.Is64BitProcess || ((typeof(Int32) != typeof(long)) && (typeof(Int32) != typeof(ulong)))); public bool Succeeded { get; set; } diff --git a/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.Int32.6.cs b/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.Int32.6.cs index 0e42ec785d47..be6f8a84a0b1 100644 --- a/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.Int32.6.cs +++ b/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.Int32.6.cs @@ -22,9 +22,7 @@ public static partial class Program private static void ExtractInt326() { var test = new SimpleUnaryOpTest__ExtractInt326(); - - try - { + if (test.IsSupported) { // Validates basic functionality works, using Unsafe.Read @@ -77,11 +75,6 @@ private static void ExtractInt326() // Validates we throw on unsupported hardware test.RunUnsupportedScenario(); } - } - catch (PlatformNotSupportedException) - { - test.Succeeded = true; - } if (!test.Succeeded) { @@ -126,7 +119,7 @@ public SimpleUnaryOpTest__ExtractInt326() _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int32[RetElementCount], LargestVectorSize); } - public bool IsSupported => Avx.IsSupported; + public bool IsSupported => Avx.IsSupported && (Environment.Is64BitProcess || ((typeof(Int32) != typeof(long)) && (typeof(Int32) != typeof(ulong)))); public bool Succeeded { get; set; } diff --git a/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.Int64.1.cs b/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.Int64.1.cs index 2213721e5225..8f7518a5710d 100644 --- a/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.Int64.1.cs +++ b/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.Int64.1.cs @@ -22,9 +22,7 @@ public static partial class Program private static void ExtractInt641() { var test = new SimpleUnaryOpTest__ExtractInt641(); - - try - { + if (test.IsSupported) { // Validates basic functionality works, using Unsafe.Read @@ -77,11 +75,6 @@ private static void ExtractInt641() // Validates we throw on unsupported hardware test.RunUnsupportedScenario(); } - } - catch (PlatformNotSupportedException) - { - test.Succeeded = true; - } if (!test.Succeeded) { @@ -126,7 +119,7 @@ public SimpleUnaryOpTest__ExtractInt641() _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int64[RetElementCount], LargestVectorSize); } - public bool IsSupported => Avx.IsSupported; + public bool IsSupported => Avx.IsSupported && (Environment.Is64BitProcess || ((typeof(Int64) != typeof(long)) && (typeof(Int64) != typeof(ulong)))); public bool Succeeded { get; set; } diff --git a/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.Int64.19.cs b/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.Int64.19.cs index 24e72078037f..5566becfad0d 100644 --- a/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.Int64.19.cs +++ b/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.Int64.19.cs @@ -22,9 +22,7 @@ public static partial class Program private static void ExtractInt6419() { var test = new SimpleUnaryOpTest__ExtractInt6419(); - - try - { + if (test.IsSupported) { // Validates basic functionality works, using Unsafe.Read @@ -77,11 +75,6 @@ private static void ExtractInt6419() // Validates we throw on unsupported hardware test.RunUnsupportedScenario(); } - } - catch (PlatformNotSupportedException) - { - test.Succeeded = true; - } if (!test.Succeeded) { @@ -126,7 +119,7 @@ public SimpleUnaryOpTest__ExtractInt6419() _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int64[RetElementCount], LargestVectorSize); } - public bool IsSupported => Avx.IsSupported; + public bool IsSupported => Avx.IsSupported && (Environment.Is64BitProcess || ((typeof(Int64) != typeof(long)) && (typeof(Int64) != typeof(ulong)))); public bool Succeeded { get; set; } diff --git a/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.Int64.3.cs b/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.Int64.3.cs index fb89cd06a804..e0cdecebcf7a 100644 --- a/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.Int64.3.cs +++ b/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.Int64.3.cs @@ -22,9 +22,7 @@ public static partial class Program private static void ExtractInt643() { var test = new SimpleUnaryOpTest__ExtractInt643(); - - try - { + if (test.IsSupported) { // Validates basic functionality works, using Unsafe.Read @@ -77,11 +75,6 @@ private static void ExtractInt643() // Validates we throw on unsupported hardware test.RunUnsupportedScenario(); } - } - catch (PlatformNotSupportedException) - { - test.Succeeded = true; - } if (!test.Succeeded) { @@ -126,7 +119,7 @@ public SimpleUnaryOpTest__ExtractInt643() _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int64[RetElementCount], LargestVectorSize); } - public bool IsSupported => Avx.IsSupported; + public bool IsSupported => Avx.IsSupported && (Environment.Is64BitProcess || ((typeof(Int64) != typeof(long)) && (typeof(Int64) != typeof(ulong)))); public bool Succeeded { get; set; } diff --git a/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.UInt16.1.cs b/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.UInt16.1.cs index 717749c9bafb..aa2b92f03f27 100644 --- a/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.UInt16.1.cs +++ b/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.UInt16.1.cs @@ -22,9 +22,7 @@ public static partial class Program private static void ExtractUInt161() { var test = new SimpleUnaryOpTest__ExtractUInt161(); - - try - { + if (test.IsSupported) { // Validates basic functionality works, using Unsafe.Read @@ -77,11 +75,6 @@ private static void ExtractUInt161() // Validates we throw on unsupported hardware test.RunUnsupportedScenario(); } - } - catch (PlatformNotSupportedException) - { - test.Succeeded = true; - } if (!test.Succeeded) { @@ -126,7 +119,7 @@ public SimpleUnaryOpTest__ExtractUInt161() _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt16[RetElementCount], LargestVectorSize); } - public bool IsSupported => Avx.IsSupported; + public bool IsSupported => Avx.IsSupported && (Environment.Is64BitProcess || ((typeof(UInt16) != typeof(long)) && (typeof(UInt16) != typeof(ulong)))); public bool Succeeded { get; set; } diff --git a/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.UInt16.11.cs b/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.UInt16.11.cs index b68ab35dedf1..8b09d37dba40 100644 --- a/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.UInt16.11.cs +++ b/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.UInt16.11.cs @@ -22,9 +22,7 @@ public static partial class Program private static void ExtractUInt1611() { var test = new SimpleUnaryOpTest__ExtractUInt1611(); - - try - { + if (test.IsSupported) { // Validates basic functionality works, using Unsafe.Read @@ -77,11 +75,6 @@ private static void ExtractUInt1611() // Validates we throw on unsupported hardware test.RunUnsupportedScenario(); } - } - catch (PlatformNotSupportedException) - { - test.Succeeded = true; - } if (!test.Succeeded) { @@ -126,7 +119,7 @@ public SimpleUnaryOpTest__ExtractUInt1611() _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt16[RetElementCount], LargestVectorSize); } - public bool IsSupported => Avx.IsSupported; + public bool IsSupported => Avx.IsSupported && (Environment.Is64BitProcess || ((typeof(UInt16) != typeof(long)) && (typeof(UInt16) != typeof(ulong)))); public bool Succeeded { get; set; } diff --git a/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.UInt16.27.cs b/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.UInt16.27.cs index 9ece246b5488..af88227df8b7 100644 --- a/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.UInt16.27.cs +++ b/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.UInt16.27.cs @@ -22,9 +22,7 @@ public static partial class Program private static void ExtractUInt1627() { var test = new SimpleUnaryOpTest__ExtractUInt1627(); - - try - { + if (test.IsSupported) { // Validates basic functionality works, using Unsafe.Read @@ -77,11 +75,6 @@ private static void ExtractUInt1627() // Validates we throw on unsupported hardware test.RunUnsupportedScenario(); } - } - catch (PlatformNotSupportedException) - { - test.Succeeded = true; - } if (!test.Succeeded) { @@ -126,7 +119,7 @@ public SimpleUnaryOpTest__ExtractUInt1627() _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt16[RetElementCount], LargestVectorSize); } - public bool IsSupported => Avx.IsSupported; + public bool IsSupported => Avx.IsSupported && (Environment.Is64BitProcess || ((typeof(UInt16) != typeof(long)) && (typeof(UInt16) != typeof(ulong)))); public bool Succeeded { get; set; } diff --git a/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.UInt32.1.cs b/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.UInt32.1.cs index 846efb1b2cfd..5d7a36066d9f 100644 --- a/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.UInt32.1.cs +++ b/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.UInt32.1.cs @@ -22,9 +22,7 @@ public static partial class Program private static void ExtractUInt321() { var test = new SimpleUnaryOpTest__ExtractUInt321(); - - try - { + if (test.IsSupported) { // Validates basic functionality works, using Unsafe.Read @@ -77,11 +75,6 @@ private static void ExtractUInt321() // Validates we throw on unsupported hardware test.RunUnsupportedScenario(); } - } - catch (PlatformNotSupportedException) - { - test.Succeeded = true; - } if (!test.Succeeded) { @@ -126,7 +119,7 @@ public SimpleUnaryOpTest__ExtractUInt321() _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt32[RetElementCount], LargestVectorSize); } - public bool IsSupported => Avx.IsSupported; + public bool IsSupported => Avx.IsSupported && (Environment.Is64BitProcess || ((typeof(UInt32) != typeof(long)) && (typeof(UInt32) != typeof(ulong)))); public bool Succeeded { get; set; } diff --git a/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.UInt32.22.cs b/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.UInt32.22.cs index 7251ef78035c..5199c957a23a 100644 --- a/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.UInt32.22.cs +++ b/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.UInt32.22.cs @@ -22,9 +22,7 @@ public static partial class Program private static void ExtractUInt3222() { var test = new SimpleUnaryOpTest__ExtractUInt3222(); - - try - { + if (test.IsSupported) { // Validates basic functionality works, using Unsafe.Read @@ -77,11 +75,6 @@ private static void ExtractUInt3222() // Validates we throw on unsupported hardware test.RunUnsupportedScenario(); } - } - catch (PlatformNotSupportedException) - { - test.Succeeded = true; - } if (!test.Succeeded) { @@ -126,7 +119,7 @@ public SimpleUnaryOpTest__ExtractUInt3222() _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt32[RetElementCount], LargestVectorSize); } - public bool IsSupported => Avx.IsSupported; + public bool IsSupported => Avx.IsSupported && (Environment.Is64BitProcess || ((typeof(UInt32) != typeof(long)) && (typeof(UInt32) != typeof(ulong)))); public bool Succeeded { get; set; } diff --git a/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.UInt32.6.cs b/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.UInt32.6.cs index 6546a7e0979c..0a9cf397edd1 100644 --- a/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.UInt32.6.cs +++ b/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.UInt32.6.cs @@ -22,9 +22,7 @@ public static partial class Program private static void ExtractUInt326() { var test = new SimpleUnaryOpTest__ExtractUInt326(); - - try - { + if (test.IsSupported) { // Validates basic functionality works, using Unsafe.Read @@ -77,11 +75,6 @@ private static void ExtractUInt326() // Validates we throw on unsupported hardware test.RunUnsupportedScenario(); } - } - catch (PlatformNotSupportedException) - { - test.Succeeded = true; - } if (!test.Succeeded) { @@ -126,7 +119,7 @@ public SimpleUnaryOpTest__ExtractUInt326() _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt32[RetElementCount], LargestVectorSize); } - public bool IsSupported => Avx.IsSupported; + public bool IsSupported => Avx.IsSupported && (Environment.Is64BitProcess || ((typeof(UInt32) != typeof(long)) && (typeof(UInt32) != typeof(ulong)))); public bool Succeeded { get; set; } diff --git a/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.UInt64.1.cs b/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.UInt64.1.cs index 9f6315a58ea7..8f360153d06d 100644 --- a/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.UInt64.1.cs +++ b/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.UInt64.1.cs @@ -22,9 +22,7 @@ public static partial class Program private static void ExtractUInt641() { var test = new SimpleUnaryOpTest__ExtractUInt641(); - - try - { + if (test.IsSupported) { // Validates basic functionality works, using Unsafe.Read @@ -77,11 +75,6 @@ private static void ExtractUInt641() // Validates we throw on unsupported hardware test.RunUnsupportedScenario(); } - } - catch (PlatformNotSupportedException) - { - test.Succeeded = true; - } if (!test.Succeeded) { @@ -126,7 +119,7 @@ public SimpleUnaryOpTest__ExtractUInt641() _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt64[RetElementCount], LargestVectorSize); } - public bool IsSupported => Avx.IsSupported; + public bool IsSupported => Avx.IsSupported && (Environment.Is64BitProcess || ((typeof(UInt64) != typeof(long)) && (typeof(UInt64) != typeof(ulong)))); public bool Succeeded { get; set; } diff --git a/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.UInt64.19.cs b/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.UInt64.19.cs index d3d90d8bd66f..817b73fe2d24 100644 --- a/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.UInt64.19.cs +++ b/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.UInt64.19.cs @@ -22,9 +22,7 @@ public static partial class Program private static void ExtractUInt6419() { var test = new SimpleUnaryOpTest__ExtractUInt6419(); - - try - { + if (test.IsSupported) { // Validates basic functionality works, using Unsafe.Read @@ -77,11 +75,6 @@ private static void ExtractUInt6419() // Validates we throw on unsupported hardware test.RunUnsupportedScenario(); } - } - catch (PlatformNotSupportedException) - { - test.Succeeded = true; - } if (!test.Succeeded) { @@ -126,7 +119,7 @@ public SimpleUnaryOpTest__ExtractUInt6419() _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt64[RetElementCount], LargestVectorSize); } - public bool IsSupported => Avx.IsSupported; + public bool IsSupported => Avx.IsSupported && (Environment.Is64BitProcess || ((typeof(UInt64) != typeof(long)) && (typeof(UInt64) != typeof(ulong)))); public bool Succeeded { get; set; } diff --git a/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.UInt64.3.cs b/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.UInt64.3.cs index 8b3f3cfba6a2..21480f046c4e 100644 --- a/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.UInt64.3.cs +++ b/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.UInt64.3.cs @@ -22,9 +22,7 @@ public static partial class Program private static void ExtractUInt643() { var test = new SimpleUnaryOpTest__ExtractUInt643(); - - try - { + if (test.IsSupported) { // Validates basic functionality works, using Unsafe.Read @@ -77,11 +75,6 @@ private static void ExtractUInt643() // Validates we throw on unsupported hardware test.RunUnsupportedScenario(); } - } - catch (PlatformNotSupportedException) - { - test.Succeeded = true; - } if (!test.Succeeded) { @@ -126,7 +119,7 @@ public SimpleUnaryOpTest__ExtractUInt643() _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt64[RetElementCount], LargestVectorSize); } - public bool IsSupported => Avx.IsSupported; + public bool IsSupported => Avx.IsSupported && (Environment.Is64BitProcess || ((typeof(UInt64) != typeof(long)) && (typeof(UInt64) != typeof(ulong)))); public bool Succeeded { get; set; } diff --git a/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.Byte.1.cs b/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.Byte.1.cs index d596cfc7f11e..dc24dd48eda0 100644 --- a/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.Byte.1.cs +++ b/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.Byte.1.cs @@ -22,9 +22,7 @@ public static partial class Program private static void InsertByte1() { var test = new SimpleUnaryOpTest__InsertByte1(); - - try - { + if (test.IsSupported) { // Validates basic functionality works, using Unsafe.Read @@ -77,11 +75,6 @@ private static void InsertByte1() // Validates we throw on unsupported hardware test.RunUnsupportedScenario(); } - } - catch (PlatformNotSupportedException) - { - test.Succeeded = true; - } if (!test.Succeeded) { @@ -126,7 +119,7 @@ public SimpleUnaryOpTest__InsertByte1() _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Byte[RetElementCount], LargestVectorSize); } - public bool IsSupported => Avx.IsSupported; + public bool IsSupported => Avx.IsSupported && (Environment.Is64BitProcess || ((typeof(Byte) != typeof(long)) && (typeof(Byte) != typeof(ulong)))); public bool Succeeded { get; set; } diff --git a/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.Byte.20.cs b/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.Byte.20.cs index 73ccb9dfd8d2..9676713593fe 100644 --- a/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.Byte.20.cs +++ b/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.Byte.20.cs @@ -22,9 +22,7 @@ public static partial class Program private static void InsertByte20() { var test = new SimpleUnaryOpTest__InsertByte20(); - - try - { + if (test.IsSupported) { // Validates basic functionality works, using Unsafe.Read @@ -77,11 +75,6 @@ private static void InsertByte20() // Validates we throw on unsupported hardware test.RunUnsupportedScenario(); } - } - catch (PlatformNotSupportedException) - { - test.Succeeded = true; - } if (!test.Succeeded) { @@ -126,7 +119,7 @@ public SimpleUnaryOpTest__InsertByte20() _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Byte[RetElementCount], LargestVectorSize); } - public bool IsSupported => Avx.IsSupported; + public bool IsSupported => Avx.IsSupported && (Environment.Is64BitProcess || ((typeof(Byte) != typeof(long)) && (typeof(Byte) != typeof(ulong)))); public bool Succeeded { get; set; } diff --git a/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.Byte.52.cs b/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.Byte.52.cs index 218f984165cf..16b7cb39a7cf 100644 --- a/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.Byte.52.cs +++ b/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.Byte.52.cs @@ -22,9 +22,7 @@ public static partial class Program private static void InsertByte52() { var test = new SimpleUnaryOpTest__InsertByte52(); - - try - { + if (test.IsSupported) { // Validates basic functionality works, using Unsafe.Read @@ -77,11 +75,6 @@ private static void InsertByte52() // Validates we throw on unsupported hardware test.RunUnsupportedScenario(); } - } - catch (PlatformNotSupportedException) - { - test.Succeeded = true; - } if (!test.Succeeded) { @@ -126,7 +119,7 @@ public SimpleUnaryOpTest__InsertByte52() _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Byte[RetElementCount], LargestVectorSize); } - public bool IsSupported => Avx.IsSupported; + public bool IsSupported => Avx.IsSupported && (Environment.Is64BitProcess || ((typeof(Byte) != typeof(long)) && (typeof(Byte) != typeof(ulong)))); public bool Succeeded { get; set; } diff --git a/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.Int16.1.cs b/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.Int16.1.cs index 1899ec728c87..6db867f87a6d 100644 --- a/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.Int16.1.cs +++ b/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.Int16.1.cs @@ -22,9 +22,7 @@ public static partial class Program private static void InsertInt161() { var test = new SimpleUnaryOpTest__InsertInt161(); - - try - { + if (test.IsSupported) { // Validates basic functionality works, using Unsafe.Read @@ -77,11 +75,6 @@ private static void InsertInt161() // Validates we throw on unsupported hardware test.RunUnsupportedScenario(); } - } - catch (PlatformNotSupportedException) - { - test.Succeeded = true; - } if (!test.Succeeded) { @@ -126,7 +119,7 @@ public SimpleUnaryOpTest__InsertInt161() _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int16[RetElementCount], LargestVectorSize); } - public bool IsSupported => Avx.IsSupported; + public bool IsSupported => Avx.IsSupported && (Environment.Is64BitProcess || ((typeof(Int16) != typeof(long)) && (typeof(Int16) != typeof(ulong)))); public bool Succeeded { get; set; } diff --git a/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.Int16.11.cs b/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.Int16.11.cs index 7e3049b42893..e64b977740e5 100644 --- a/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.Int16.11.cs +++ b/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.Int16.11.cs @@ -22,9 +22,7 @@ public static partial class Program private static void InsertInt1611() { var test = new SimpleUnaryOpTest__InsertInt1611(); - - try - { + if (test.IsSupported) { // Validates basic functionality works, using Unsafe.Read @@ -77,11 +75,6 @@ private static void InsertInt1611() // Validates we throw on unsupported hardware test.RunUnsupportedScenario(); } - } - catch (PlatformNotSupportedException) - { - test.Succeeded = true; - } if (!test.Succeeded) { @@ -126,7 +119,7 @@ public SimpleUnaryOpTest__InsertInt1611() _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int16[RetElementCount], LargestVectorSize); } - public bool IsSupported => Avx.IsSupported; + public bool IsSupported => Avx.IsSupported && (Environment.Is64BitProcess || ((typeof(Int16) != typeof(long)) && (typeof(Int16) != typeof(ulong)))); public bool Succeeded { get; set; } diff --git a/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.Int16.27.cs b/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.Int16.27.cs index 373db0f0238b..30f76ac477d7 100644 --- a/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.Int16.27.cs +++ b/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.Int16.27.cs @@ -22,9 +22,7 @@ public static partial class Program private static void InsertInt1627() { var test = new SimpleUnaryOpTest__InsertInt1627(); - - try - { + if (test.IsSupported) { // Validates basic functionality works, using Unsafe.Read @@ -77,11 +75,6 @@ private static void InsertInt1627() // Validates we throw on unsupported hardware test.RunUnsupportedScenario(); } - } - catch (PlatformNotSupportedException) - { - test.Succeeded = true; - } if (!test.Succeeded) { @@ -126,7 +119,7 @@ public SimpleUnaryOpTest__InsertInt1627() _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int16[RetElementCount], LargestVectorSize); } - public bool IsSupported => Avx.IsSupported; + public bool IsSupported => Avx.IsSupported && (Environment.Is64BitProcess || ((typeof(Int16) != typeof(long)) && (typeof(Int16) != typeof(ulong)))); public bool Succeeded { get; set; } diff --git a/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.Int32.1.cs b/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.Int32.1.cs index 0e2d1eb8bb44..fd4c1491349f 100644 --- a/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.Int32.1.cs +++ b/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.Int32.1.cs @@ -22,9 +22,7 @@ public static partial class Program private static void InsertInt321() { var test = new SimpleUnaryOpTest__InsertInt321(); - - try - { + if (test.IsSupported) { // Validates basic functionality works, using Unsafe.Read @@ -77,11 +75,6 @@ private static void InsertInt321() // Validates we throw on unsupported hardware test.RunUnsupportedScenario(); } - } - catch (PlatformNotSupportedException) - { - test.Succeeded = true; - } if (!test.Succeeded) { @@ -126,7 +119,7 @@ public SimpleUnaryOpTest__InsertInt321() _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int32[RetElementCount], LargestVectorSize); } - public bool IsSupported => Avx.IsSupported; + public bool IsSupported => Avx.IsSupported && (Environment.Is64BitProcess || ((typeof(Int32) != typeof(long)) && (typeof(Int32) != typeof(ulong)))); public bool Succeeded { get; set; } diff --git a/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.Int32.22.cs b/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.Int32.22.cs index 9740754b8007..a988031003cb 100644 --- a/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.Int32.22.cs +++ b/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.Int32.22.cs @@ -22,9 +22,7 @@ public static partial class Program private static void InsertInt3222() { var test = new SimpleUnaryOpTest__InsertInt3222(); - - try - { + if (test.IsSupported) { // Validates basic functionality works, using Unsafe.Read @@ -77,11 +75,6 @@ private static void InsertInt3222() // Validates we throw on unsupported hardware test.RunUnsupportedScenario(); } - } - catch (PlatformNotSupportedException) - { - test.Succeeded = true; - } if (!test.Succeeded) { @@ -126,7 +119,7 @@ public SimpleUnaryOpTest__InsertInt3222() _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int32[RetElementCount], LargestVectorSize); } - public bool IsSupported => Avx.IsSupported; + public bool IsSupported => Avx.IsSupported && (Environment.Is64BitProcess || ((typeof(Int32) != typeof(long)) && (typeof(Int32) != typeof(ulong)))); public bool Succeeded { get; set; } diff --git a/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.Int32.6.cs b/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.Int32.6.cs index 2b1da8784020..d37cf368b597 100644 --- a/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.Int32.6.cs +++ b/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.Int32.6.cs @@ -22,9 +22,7 @@ public static partial class Program private static void InsertInt326() { var test = new SimpleUnaryOpTest__InsertInt326(); - - try - { + if (test.IsSupported) { // Validates basic functionality works, using Unsafe.Read @@ -77,11 +75,6 @@ private static void InsertInt326() // Validates we throw on unsupported hardware test.RunUnsupportedScenario(); } - } - catch (PlatformNotSupportedException) - { - test.Succeeded = true; - } if (!test.Succeeded) { @@ -126,7 +119,7 @@ public SimpleUnaryOpTest__InsertInt326() _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int32[RetElementCount], LargestVectorSize); } - public bool IsSupported => Avx.IsSupported; + public bool IsSupported => Avx.IsSupported && (Environment.Is64BitProcess || ((typeof(Int32) != typeof(long)) && (typeof(Int32) != typeof(ulong)))); public bool Succeeded { get; set; } diff --git a/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.Int64.1.cs b/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.Int64.1.cs index f17ff1ff20c2..a94f30b656cc 100644 --- a/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.Int64.1.cs +++ b/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.Int64.1.cs @@ -22,9 +22,7 @@ public static partial class Program private static void InsertInt641() { var test = new SimpleUnaryOpTest__InsertInt641(); - - try - { + if (test.IsSupported) { // Validates basic functionality works, using Unsafe.Read @@ -77,11 +75,6 @@ private static void InsertInt641() // Validates we throw on unsupported hardware test.RunUnsupportedScenario(); } - } - catch (PlatformNotSupportedException) - { - test.Succeeded = true; - } if (!test.Succeeded) { @@ -126,7 +119,7 @@ public SimpleUnaryOpTest__InsertInt641() _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int64[RetElementCount], LargestVectorSize); } - public bool IsSupported => Avx.IsSupported; + public bool IsSupported => Avx.IsSupported && (Environment.Is64BitProcess || ((typeof(Int64) != typeof(long)) && (typeof(Int64) != typeof(ulong)))); public bool Succeeded { get; set; } diff --git a/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.Int64.19.cs b/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.Int64.19.cs index 012f96493d1c..501ebd5952b1 100644 --- a/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.Int64.19.cs +++ b/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.Int64.19.cs @@ -22,9 +22,7 @@ public static partial class Program private static void InsertInt6419() { var test = new SimpleUnaryOpTest__InsertInt6419(); - - try - { + if (test.IsSupported) { // Validates basic functionality works, using Unsafe.Read @@ -77,11 +75,6 @@ private static void InsertInt6419() // Validates we throw on unsupported hardware test.RunUnsupportedScenario(); } - } - catch (PlatformNotSupportedException) - { - test.Succeeded = true; - } if (!test.Succeeded) { @@ -126,7 +119,7 @@ public SimpleUnaryOpTest__InsertInt6419() _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int64[RetElementCount], LargestVectorSize); } - public bool IsSupported => Avx.IsSupported; + public bool IsSupported => Avx.IsSupported && (Environment.Is64BitProcess || ((typeof(Int64) != typeof(long)) && (typeof(Int64) != typeof(ulong)))); public bool Succeeded { get; set; } diff --git a/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.Int64.3.cs b/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.Int64.3.cs index 24471323d265..3b842c4bc702 100644 --- a/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.Int64.3.cs +++ b/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.Int64.3.cs @@ -22,9 +22,7 @@ public static partial class Program private static void InsertInt643() { var test = new SimpleUnaryOpTest__InsertInt643(); - - try - { + if (test.IsSupported) { // Validates basic functionality works, using Unsafe.Read @@ -77,11 +75,6 @@ private static void InsertInt643() // Validates we throw on unsupported hardware test.RunUnsupportedScenario(); } - } - catch (PlatformNotSupportedException) - { - test.Succeeded = true; - } if (!test.Succeeded) { @@ -126,7 +119,7 @@ public SimpleUnaryOpTest__InsertInt643() _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int64[RetElementCount], LargestVectorSize); } - public bool IsSupported => Avx.IsSupported; + public bool IsSupported => Avx.IsSupported && (Environment.Is64BitProcess || ((typeof(Int64) != typeof(long)) && (typeof(Int64) != typeof(ulong)))); public bool Succeeded { get; set; } diff --git a/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.SByte.1.cs b/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.SByte.1.cs index ca6d9f5e3904..e9f9f4baa050 100644 --- a/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.SByte.1.cs +++ b/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.SByte.1.cs @@ -22,9 +22,7 @@ public static partial class Program private static void InsertSByte1() { var test = new SimpleUnaryOpTest__InsertSByte1(); - - try - { + if (test.IsSupported) { // Validates basic functionality works, using Unsafe.Read @@ -77,11 +75,6 @@ private static void InsertSByte1() // Validates we throw on unsupported hardware test.RunUnsupportedScenario(); } - } - catch (PlatformNotSupportedException) - { - test.Succeeded = true; - } if (!test.Succeeded) { @@ -126,7 +119,7 @@ public SimpleUnaryOpTest__InsertSByte1() _dataTable = new SimpleUnaryOpTest__DataTable(_data, new SByte[RetElementCount], LargestVectorSize); } - public bool IsSupported => Avx.IsSupported; + public bool IsSupported => Avx.IsSupported && (Environment.Is64BitProcess || ((typeof(SByte) != typeof(long)) && (typeof(SByte) != typeof(ulong)))); public bool Succeeded { get; set; } diff --git a/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.SByte.20.cs b/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.SByte.20.cs index 917aba5300bb..d95d63fb7746 100644 --- a/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.SByte.20.cs +++ b/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.SByte.20.cs @@ -22,9 +22,7 @@ public static partial class Program private static void InsertSByte20() { var test = new SimpleUnaryOpTest__InsertSByte20(); - - try - { + if (test.IsSupported) { // Validates basic functionality works, using Unsafe.Read @@ -77,11 +75,6 @@ private static void InsertSByte20() // Validates we throw on unsupported hardware test.RunUnsupportedScenario(); } - } - catch (PlatformNotSupportedException) - { - test.Succeeded = true; - } if (!test.Succeeded) { @@ -126,7 +119,7 @@ public SimpleUnaryOpTest__InsertSByte20() _dataTable = new SimpleUnaryOpTest__DataTable(_data, new SByte[RetElementCount], LargestVectorSize); } - public bool IsSupported => Avx.IsSupported; + public bool IsSupported => Avx.IsSupported && (Environment.Is64BitProcess || ((typeof(SByte) != typeof(long)) && (typeof(SByte) != typeof(ulong)))); public bool Succeeded { get; set; } diff --git a/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.SByte.52.cs b/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.SByte.52.cs index cbbaa73d1c20..bdbea54b3410 100644 --- a/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.SByte.52.cs +++ b/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.SByte.52.cs @@ -22,9 +22,7 @@ public static partial class Program private static void InsertSByte52() { var test = new SimpleUnaryOpTest__InsertSByte52(); - - try - { + if (test.IsSupported) { // Validates basic functionality works, using Unsafe.Read @@ -77,11 +75,6 @@ private static void InsertSByte52() // Validates we throw on unsupported hardware test.RunUnsupportedScenario(); } - } - catch (PlatformNotSupportedException) - { - test.Succeeded = true; - } if (!test.Succeeded) { @@ -126,7 +119,7 @@ public SimpleUnaryOpTest__InsertSByte52() _dataTable = new SimpleUnaryOpTest__DataTable(_data, new SByte[RetElementCount], LargestVectorSize); } - public bool IsSupported => Avx.IsSupported; + public bool IsSupported => Avx.IsSupported && (Environment.Is64BitProcess || ((typeof(SByte) != typeof(long)) && (typeof(SByte) != typeof(ulong)))); public bool Succeeded { get; set; } diff --git a/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.UInt16.1.cs b/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.UInt16.1.cs index b17dbdcc34ef..bd2cfe25dcbc 100644 --- a/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.UInt16.1.cs +++ b/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.UInt16.1.cs @@ -22,9 +22,7 @@ public static partial class Program private static void InsertUInt161() { var test = new SimpleUnaryOpTest__InsertUInt161(); - - try - { + if (test.IsSupported) { // Validates basic functionality works, using Unsafe.Read @@ -77,11 +75,6 @@ private static void InsertUInt161() // Validates we throw on unsupported hardware test.RunUnsupportedScenario(); } - } - catch (PlatformNotSupportedException) - { - test.Succeeded = true; - } if (!test.Succeeded) { @@ -126,7 +119,7 @@ public SimpleUnaryOpTest__InsertUInt161() _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt16[RetElementCount], LargestVectorSize); } - public bool IsSupported => Avx.IsSupported; + public bool IsSupported => Avx.IsSupported && (Environment.Is64BitProcess || ((typeof(UInt16) != typeof(long)) && (typeof(UInt16) != typeof(ulong)))); public bool Succeeded { get; set; } diff --git a/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.UInt16.11.cs b/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.UInt16.11.cs index 43f4a5a2e9bc..8bbea9b0b1aa 100644 --- a/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.UInt16.11.cs +++ b/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.UInt16.11.cs @@ -22,9 +22,7 @@ public static partial class Program private static void InsertUInt1611() { var test = new SimpleUnaryOpTest__InsertUInt1611(); - - try - { + if (test.IsSupported) { // Validates basic functionality works, using Unsafe.Read @@ -77,11 +75,6 @@ private static void InsertUInt1611() // Validates we throw on unsupported hardware test.RunUnsupportedScenario(); } - } - catch (PlatformNotSupportedException) - { - test.Succeeded = true; - } if (!test.Succeeded) { @@ -126,7 +119,7 @@ public SimpleUnaryOpTest__InsertUInt1611() _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt16[RetElementCount], LargestVectorSize); } - public bool IsSupported => Avx.IsSupported; + public bool IsSupported => Avx.IsSupported && (Environment.Is64BitProcess || ((typeof(UInt16) != typeof(long)) && (typeof(UInt16) != typeof(ulong)))); public bool Succeeded { get; set; } diff --git a/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.UInt16.27.cs b/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.UInt16.27.cs index cff1f45bc4b9..50a583e16dd6 100644 --- a/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.UInt16.27.cs +++ b/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.UInt16.27.cs @@ -22,9 +22,7 @@ public static partial class Program private static void InsertUInt1627() { var test = new SimpleUnaryOpTest__InsertUInt1627(); - - try - { + if (test.IsSupported) { // Validates basic functionality works, using Unsafe.Read @@ -77,11 +75,6 @@ private static void InsertUInt1627() // Validates we throw on unsupported hardware test.RunUnsupportedScenario(); } - } - catch (PlatformNotSupportedException) - { - test.Succeeded = true; - } if (!test.Succeeded) { @@ -126,7 +119,7 @@ public SimpleUnaryOpTest__InsertUInt1627() _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt16[RetElementCount], LargestVectorSize); } - public bool IsSupported => Avx.IsSupported; + public bool IsSupported => Avx.IsSupported && (Environment.Is64BitProcess || ((typeof(UInt16) != typeof(long)) && (typeof(UInt16) != typeof(ulong)))); public bool Succeeded { get; set; } diff --git a/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.UInt32.1.cs b/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.UInt32.1.cs index 608bedef57bf..391a2fb34eb6 100644 --- a/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.UInt32.1.cs +++ b/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.UInt32.1.cs @@ -22,9 +22,7 @@ public static partial class Program private static void InsertUInt321() { var test = new SimpleUnaryOpTest__InsertUInt321(); - - try - { + if (test.IsSupported) { // Validates basic functionality works, using Unsafe.Read @@ -77,11 +75,6 @@ private static void InsertUInt321() // Validates we throw on unsupported hardware test.RunUnsupportedScenario(); } - } - catch (PlatformNotSupportedException) - { - test.Succeeded = true; - } if (!test.Succeeded) { @@ -126,7 +119,7 @@ public SimpleUnaryOpTest__InsertUInt321() _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt32[RetElementCount], LargestVectorSize); } - public bool IsSupported => Avx.IsSupported; + public bool IsSupported => Avx.IsSupported && (Environment.Is64BitProcess || ((typeof(UInt32) != typeof(long)) && (typeof(UInt32) != typeof(ulong)))); public bool Succeeded { get; set; } diff --git a/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.UInt32.22.cs b/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.UInt32.22.cs index e3609e8962fa..878c4624dd42 100644 --- a/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.UInt32.22.cs +++ b/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.UInt32.22.cs @@ -22,9 +22,7 @@ public static partial class Program private static void InsertUInt3222() { var test = new SimpleUnaryOpTest__InsertUInt3222(); - - try - { + if (test.IsSupported) { // Validates basic functionality works, using Unsafe.Read @@ -77,11 +75,6 @@ private static void InsertUInt3222() // Validates we throw on unsupported hardware test.RunUnsupportedScenario(); } - } - catch (PlatformNotSupportedException) - { - test.Succeeded = true; - } if (!test.Succeeded) { @@ -126,7 +119,7 @@ public SimpleUnaryOpTest__InsertUInt3222() _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt32[RetElementCount], LargestVectorSize); } - public bool IsSupported => Avx.IsSupported; + public bool IsSupported => Avx.IsSupported && (Environment.Is64BitProcess || ((typeof(UInt32) != typeof(long)) && (typeof(UInt32) != typeof(ulong)))); public bool Succeeded { get; set; } diff --git a/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.UInt32.6.cs b/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.UInt32.6.cs index ffd003572abb..2c3947bca906 100644 --- a/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.UInt32.6.cs +++ b/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.UInt32.6.cs @@ -22,9 +22,7 @@ public static partial class Program private static void InsertUInt326() { var test = new SimpleUnaryOpTest__InsertUInt326(); - - try - { + if (test.IsSupported) { // Validates basic functionality works, using Unsafe.Read @@ -77,11 +75,6 @@ private static void InsertUInt326() // Validates we throw on unsupported hardware test.RunUnsupportedScenario(); } - } - catch (PlatformNotSupportedException) - { - test.Succeeded = true; - } if (!test.Succeeded) { @@ -126,7 +119,7 @@ public SimpleUnaryOpTest__InsertUInt326() _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt32[RetElementCount], LargestVectorSize); } - public bool IsSupported => Avx.IsSupported; + public bool IsSupported => Avx.IsSupported && (Environment.Is64BitProcess || ((typeof(UInt32) != typeof(long)) && (typeof(UInt32) != typeof(ulong)))); public bool Succeeded { get; set; } diff --git a/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.UInt64.1.cs b/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.UInt64.1.cs index 8ec1dd80f445..efc92655431a 100644 --- a/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.UInt64.1.cs +++ b/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.UInt64.1.cs @@ -22,9 +22,7 @@ public static partial class Program private static void InsertUInt641() { var test = new SimpleUnaryOpTest__InsertUInt641(); - - try - { + if (test.IsSupported) { // Validates basic functionality works, using Unsafe.Read @@ -77,11 +75,6 @@ private static void InsertUInt641() // Validates we throw on unsupported hardware test.RunUnsupportedScenario(); } - } - catch (PlatformNotSupportedException) - { - test.Succeeded = true; - } if (!test.Succeeded) { @@ -126,7 +119,7 @@ public SimpleUnaryOpTest__InsertUInt641() _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt64[RetElementCount], LargestVectorSize); } - public bool IsSupported => Avx.IsSupported; + public bool IsSupported => Avx.IsSupported && (Environment.Is64BitProcess || ((typeof(UInt64) != typeof(long)) && (typeof(UInt64) != typeof(ulong)))); public bool Succeeded { get; set; } diff --git a/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.UInt64.19.cs b/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.UInt64.19.cs index f60e347cadbe..2601ae0ae135 100644 --- a/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.UInt64.19.cs +++ b/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.UInt64.19.cs @@ -22,9 +22,7 @@ public static partial class Program private static void InsertUInt6419() { var test = new SimpleUnaryOpTest__InsertUInt6419(); - - try - { + if (test.IsSupported) { // Validates basic functionality works, using Unsafe.Read @@ -77,11 +75,6 @@ private static void InsertUInt6419() // Validates we throw on unsupported hardware test.RunUnsupportedScenario(); } - } - catch (PlatformNotSupportedException) - { - test.Succeeded = true; - } if (!test.Succeeded) { @@ -126,7 +119,7 @@ public SimpleUnaryOpTest__InsertUInt6419() _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt64[RetElementCount], LargestVectorSize); } - public bool IsSupported => Avx.IsSupported; + public bool IsSupported => Avx.IsSupported && (Environment.Is64BitProcess || ((typeof(UInt64) != typeof(long)) && (typeof(UInt64) != typeof(ulong)))); public bool Succeeded { get; set; } diff --git a/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.UInt64.3.cs b/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.UInt64.3.cs index fd815ca985f8..122c6878ccae 100644 --- a/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.UInt64.3.cs +++ b/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.UInt64.3.cs @@ -22,9 +22,7 @@ public static partial class Program private static void InsertUInt643() { var test = new SimpleUnaryOpTest__InsertUInt643(); - - try - { + if (test.IsSupported) { // Validates basic functionality works, using Unsafe.Read @@ -77,11 +75,6 @@ private static void InsertUInt643() // Validates we throw on unsupported hardware test.RunUnsupportedScenario(); } - } - catch (PlatformNotSupportedException) - { - test.Succeeded = true; - } if (!test.Succeeded) { @@ -126,7 +119,7 @@ public SimpleUnaryOpTest__InsertUInt643() _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt64[RetElementCount], LargestVectorSize); } - public bool IsSupported => Avx.IsSupported; + public bool IsSupported => Avx.IsSupported && (Environment.Is64BitProcess || ((typeof(UInt64) != typeof(long)) && (typeof(UInt64) != typeof(ulong)))); public bool Succeeded { get; set; } diff --git a/tests/src/JIT/HardwareIntrinsics/X86/Avx/MaskLoad.cs b/tests/src/JIT/HardwareIntrinsics/X86/Avx/MaskLoad.cs index 2a493e095ee4..cb1ca4188fe3 100644 --- a/tests/src/JIT/HardwareIntrinsics/X86/Avx/MaskLoad.cs +++ b/tests/src/JIT/HardwareIntrinsics/X86/Avx/MaskLoad.cs @@ -24,7 +24,7 @@ static unsafe int Main(string[] args) { using (TestTable floatTable = new TestTable(new float[8] { 1, -5, 100, 0, 1, 2, 3, 4 }, new uint[8] { uint.MaxValue, uint.MaxValue, 0, 0, uint.MaxValue, uint.MaxValue, 0, 0 }, new float[8])) { - Vector256 vf = Avx.MaskLoad((float*)(floatTable.inArrayPtr), Avx.LoadVector256((uint*)(floatTable.maskArrayPtr))); + Vector256 vf = Avx.MaskLoad((float*)(floatTable.inArrayPtr), Avx.LoadVector256((float*)(floatTable.maskArrayPtr))); Unsafe.Write(floatTable.outArrayPtr, vf); if (!floatTable.CheckResult((x, m, y) => m == uint.MaxValue ? BitConverter.SingleToInt32Bits(x) == BitConverter.SingleToInt32Bits(y) : BitConverter.SingleToInt32Bits(y) == 0)) @@ -41,7 +41,7 @@ static unsafe int Main(string[] args) using (TestTable doubleTable = new TestTable(new double[4] { 1, -5, 100, 0}, new ulong[4] { 0, ulong.MaxValue, ulong.MaxValue, 0}, new double[4])) { - Vector256 vf = Avx.MaskLoad((double*)(doubleTable.inArrayPtr), Avx.LoadVector256((ulong*)(doubleTable.maskArrayPtr))); + Vector256 vf = Avx.MaskLoad((double*)(doubleTable.inArrayPtr), Avx.LoadVector256((double*)(doubleTable.maskArrayPtr))); Unsafe.Write(doubleTable.outArrayPtr, vf); if (!doubleTable.CheckResult((x, m, y) => m == ulong.MaxValue ? BitConverter.DoubleToInt64Bits(x) == BitConverter.DoubleToInt64Bits(y) : BitConverter.DoubleToInt64Bits(y) == 0)) @@ -58,7 +58,7 @@ static unsafe int Main(string[] args) using (TestTable floatTable = new TestTable(new float[4] { 1, -5, 100, 0 }, new uint[4] { uint.MaxValue, 0, 0, uint.MaxValue }, new float[4])) { - Vector128 vf = Avx.MaskLoad((float*)(floatTable.inArrayPtr), Sse2.LoadVector128((uint*)(floatTable.maskArrayPtr))); + Vector128 vf = Avx.MaskLoad((float*)(floatTable.inArrayPtr), Sse.LoadVector128((float*)(floatTable.maskArrayPtr))); Unsafe.Write(floatTable.outArrayPtr, vf); if (!floatTable.CheckResult((x, m, y) => m == uint.MaxValue ? BitConverter.SingleToInt32Bits(x) == BitConverter.SingleToInt32Bits(y) : BitConverter.SingleToInt32Bits(y) == 0)) @@ -75,7 +75,7 @@ static unsafe int Main(string[] args) using (TestTable doubleTable = new TestTable(new double[2] { 1, -5}, new ulong[2] { 0, ulong.MaxValue}, new double[2])) { - Vector128 vf = Avx.MaskLoad((double*)(doubleTable.inArrayPtr), Sse2.LoadVector128((ulong*)(doubleTable.maskArrayPtr))); + Vector128 vf = Avx.MaskLoad((double*)(doubleTable.inArrayPtr), Sse2.LoadVector128((double*)(doubleTable.maskArrayPtr))); Unsafe.Write(doubleTable.outArrayPtr, vf); if (!doubleTable.CheckResult((x, m, y) => m == ulong.MaxValue ? BitConverter.DoubleToInt64Bits(x) == BitConverter.DoubleToInt64Bits(y) : BitConverter.DoubleToInt64Bits(y) == 0)) diff --git a/tests/src/JIT/HardwareIntrinsics/X86/Avx/MaskLoad_r.csproj b/tests/src/JIT/HardwareIntrinsics/X86/Avx/MaskLoad_r.csproj new file mode 100644 index 000000000000..1150e2ce7999 --- /dev/null +++ b/tests/src/JIT/HardwareIntrinsics/X86/Avx/MaskLoad_r.csproj @@ -0,0 +1,34 @@ + + + + + Debug + AnyCPU + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + ..\..\ + true + + + + + + + False + + + + None + + + + + + + + + + + diff --git a/tests/src/JIT/HardwareIntrinsics/X86/Avx/MaskLoad_ro.csproj b/tests/src/JIT/HardwareIntrinsics/X86/Avx/MaskLoad_ro.csproj new file mode 100644 index 000000000000..ec56cdee40d6 --- /dev/null +++ b/tests/src/JIT/HardwareIntrinsics/X86/Avx/MaskLoad_ro.csproj @@ -0,0 +1,34 @@ + + + + + Debug + AnyCPU + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + ..\..\ + true + + + + + + + False + + + + None + True + + + + + + + + + + diff --git a/tests/src/JIT/HardwareIntrinsics/X86/Shared/ExtractScalarTest.template b/tests/src/JIT/HardwareIntrinsics/X86/Shared/ExtractScalarTest.template index 0ac2b50e1e36..e1876a16b2e8 100644 --- a/tests/src/JIT/HardwareIntrinsics/X86/Shared/ExtractScalarTest.template +++ b/tests/src/JIT/HardwareIntrinsics/X86/Shared/ExtractScalarTest.template @@ -22,9 +22,7 @@ namespace JIT.HardwareIntrinsics.X86 private static void {Method}{RetBaseType}{Imm}() { var test = new SimpleUnaryOpTest__{Method}{RetBaseType}{Imm}(); - - try - { + if (test.IsSupported) { // Validates basic functionality works, using Unsafe.Read @@ -77,11 +75,6 @@ namespace JIT.HardwareIntrinsics.X86 // Validates we throw on unsupported hardware test.RunUnsupportedScenario(); } - } - catch (PlatformNotSupportedException) - { - test.Succeeded = true; - } if (!test.Succeeded) { @@ -126,7 +119,7 @@ namespace JIT.HardwareIntrinsics.X86 _dataTable = new SimpleUnaryOpTest__DataTable<{RetBaseType}, {Op1BaseType}>(_data, new {RetBaseType}[RetElementCount], LargestVectorSize); } - public bool IsSupported => {Isa}.IsSupported; + public bool IsSupported => {Isa}.IsSupported && (Environment.Is64BitProcess || ((typeof({RetBaseType}) != typeof(long)) && (typeof({RetBaseType}) != typeof(ulong)))); public bool Succeeded { get; set; } diff --git a/tests/src/JIT/HardwareIntrinsics/X86/Shared/InsertScalarTest.template b/tests/src/JIT/HardwareIntrinsics/X86/Shared/InsertScalarTest.template index cc330e715b11..c08700fbe86e 100644 --- a/tests/src/JIT/HardwareIntrinsics/X86/Shared/InsertScalarTest.template +++ b/tests/src/JIT/HardwareIntrinsics/X86/Shared/InsertScalarTest.template @@ -22,9 +22,7 @@ namespace JIT.HardwareIntrinsics.X86 private static void {Method}{RetBaseType}{Imm}() { var test = new SimpleUnaryOpTest__{Method}{RetBaseType}{Imm}(); - - try - { + if (test.IsSupported) { // Validates basic functionality works, using Unsafe.Read @@ -77,11 +75,6 @@ namespace JIT.HardwareIntrinsics.X86 // Validates we throw on unsupported hardware test.RunUnsupportedScenario(); } - } - catch (PlatformNotSupportedException) - { - test.Succeeded = true; - } if (!test.Succeeded) { @@ -126,7 +119,7 @@ namespace JIT.HardwareIntrinsics.X86 _dataTable = new SimpleUnaryOpTest__DataTable<{RetBaseType}, {Op1BaseType}>(_data, new {RetBaseType}[RetElementCount], LargestVectorSize); } - public bool IsSupported => {Isa}.IsSupported; + public bool IsSupported => {Isa}.IsSupported && (Environment.Is64BitProcess || ((typeof({RetBaseType}) != typeof(long)) && (typeof({RetBaseType}) != typeof(ulong)))); public bool Succeeded { get; set; } diff --git a/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Extract.UInt16.1.cs b/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Extract.UInt16.1.cs index 4683cb85838b..f3bea8f12d95 100644 --- a/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Extract.UInt16.1.cs +++ b/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Extract.UInt16.1.cs @@ -22,9 +22,7 @@ public static partial class Program private static void ExtractUInt161() { var test = new SimpleUnaryOpTest__ExtractUInt161(); - - try - { + if (test.IsSupported) { // Validates basic functionality works, using Unsafe.Read @@ -77,11 +75,6 @@ private static void ExtractUInt161() // Validates we throw on unsupported hardware test.RunUnsupportedScenario(); } - } - catch (PlatformNotSupportedException) - { - test.Succeeded = true; - } if (!test.Succeeded) { @@ -126,7 +119,7 @@ public SimpleUnaryOpTest__ExtractUInt161() _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt16[RetElementCount], LargestVectorSize); } - public bool IsSupported => Sse2.IsSupported; + public bool IsSupported => Sse2.IsSupported && (Environment.Is64BitProcess || ((typeof(UInt16) != typeof(long)) && (typeof(UInt16) != typeof(ulong)))); public bool Succeeded { get; set; } diff --git a/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Extract.UInt16.129.cs b/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Extract.UInt16.129.cs index ce9513aa820c..fe45a56a3300 100644 --- a/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Extract.UInt16.129.cs +++ b/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Extract.UInt16.129.cs @@ -22,9 +22,7 @@ public static partial class Program private static void ExtractUInt16129() { var test = new SimpleUnaryOpTest__ExtractUInt16129(); - - try - { + if (test.IsSupported) { // Validates basic functionality works, using Unsafe.Read @@ -77,11 +75,6 @@ private static void ExtractUInt16129() // Validates we throw on unsupported hardware test.RunUnsupportedScenario(); } - } - catch (PlatformNotSupportedException) - { - test.Succeeded = true; - } if (!test.Succeeded) { @@ -126,7 +119,7 @@ public SimpleUnaryOpTest__ExtractUInt16129() _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt16[RetElementCount], LargestVectorSize); } - public bool IsSupported => Sse2.IsSupported; + public bool IsSupported => Sse2.IsSupported && (Environment.Is64BitProcess || ((typeof(UInt16) != typeof(long)) && (typeof(UInt16) != typeof(ulong)))); public bool Succeeded { get; set; } diff --git a/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Insert.Int16.1.cs b/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Insert.Int16.1.cs index 0f2f4e682322..75238121600e 100644 --- a/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Insert.Int16.1.cs +++ b/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Insert.Int16.1.cs @@ -22,9 +22,7 @@ public static partial class Program private static void InsertInt161() { var test = new SimpleUnaryOpTest__InsertInt161(); - - try - { + if (test.IsSupported) { // Validates basic functionality works, using Unsafe.Read @@ -77,11 +75,6 @@ private static void InsertInt161() // Validates we throw on unsupported hardware test.RunUnsupportedScenario(); } - } - catch (PlatformNotSupportedException) - { - test.Succeeded = true; - } if (!test.Succeeded) { @@ -126,7 +119,7 @@ public SimpleUnaryOpTest__InsertInt161() _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int16[RetElementCount], LargestVectorSize); } - public bool IsSupported => Sse2.IsSupported; + public bool IsSupported => Sse2.IsSupported && (Environment.Is64BitProcess || ((typeof(Int16) != typeof(long)) && (typeof(Int16) != typeof(ulong)))); public bool Succeeded { get; set; } diff --git a/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Insert.Int16.129.cs b/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Insert.Int16.129.cs index 619d91856e0b..2c9d92c83fd2 100644 --- a/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Insert.Int16.129.cs +++ b/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Insert.Int16.129.cs @@ -22,9 +22,7 @@ public static partial class Program private static void InsertInt16129() { var test = new SimpleUnaryOpTest__InsertInt16129(); - - try - { + if (test.IsSupported) { // Validates basic functionality works, using Unsafe.Read @@ -77,11 +75,6 @@ private static void InsertInt16129() // Validates we throw on unsupported hardware test.RunUnsupportedScenario(); } - } - catch (PlatformNotSupportedException) - { - test.Succeeded = true; - } if (!test.Succeeded) { @@ -126,7 +119,7 @@ public SimpleUnaryOpTest__InsertInt16129() _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int16[RetElementCount], LargestVectorSize); } - public bool IsSupported => Sse2.IsSupported; + public bool IsSupported => Sse2.IsSupported && (Environment.Is64BitProcess || ((typeof(Int16) != typeof(long)) && (typeof(Int16) != typeof(ulong)))); public bool Succeeded { get; set; } diff --git a/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Insert.UInt16.1.cs b/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Insert.UInt16.1.cs index 70b29d1e3b4f..b46b3ab1ae9c 100644 --- a/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Insert.UInt16.1.cs +++ b/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Insert.UInt16.1.cs @@ -22,9 +22,7 @@ public static partial class Program private static void InsertUInt161() { var test = new SimpleUnaryOpTest__InsertUInt161(); - - try - { + if (test.IsSupported) { // Validates basic functionality works, using Unsafe.Read @@ -77,11 +75,6 @@ private static void InsertUInt161() // Validates we throw on unsupported hardware test.RunUnsupportedScenario(); } - } - catch (PlatformNotSupportedException) - { - test.Succeeded = true; - } if (!test.Succeeded) { @@ -126,7 +119,7 @@ public SimpleUnaryOpTest__InsertUInt161() _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt16[RetElementCount], LargestVectorSize); } - public bool IsSupported => Sse2.IsSupported; + public bool IsSupported => Sse2.IsSupported && (Environment.Is64BitProcess || ((typeof(UInt16) != typeof(long)) && (typeof(UInt16) != typeof(ulong)))); public bool Succeeded { get; set; } diff --git a/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Insert.UInt16.129.cs b/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Insert.UInt16.129.cs index 2c16bc861f50..719ef7cc3fc7 100644 --- a/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Insert.UInt16.129.cs +++ b/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Insert.UInt16.129.cs @@ -22,9 +22,7 @@ public static partial class Program private static void InsertUInt16129() { var test = new SimpleUnaryOpTest__InsertUInt16129(); - - try - { + if (test.IsSupported) { // Validates basic functionality works, using Unsafe.Read @@ -77,11 +75,6 @@ private static void InsertUInt16129() // Validates we throw on unsupported hardware test.RunUnsupportedScenario(); } - } - catch (PlatformNotSupportedException) - { - test.Succeeded = true; - } if (!test.Succeeded) { @@ -126,7 +119,7 @@ public SimpleUnaryOpTest__InsertUInt16129() _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt16[RetElementCount], LargestVectorSize); } - public bool IsSupported => Sse2.IsSupported; + public bool IsSupported => Sse2.IsSupported && (Environment.Is64BitProcess || ((typeof(UInt16) != typeof(long)) && (typeof(UInt16) != typeof(ulong)))); public bool Succeeded { get; set; } diff --git a/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Extract.Byte.1.cs b/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Extract.Byte.1.cs index da59ecd7edb0..d7e984753821 100644 --- a/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Extract.Byte.1.cs +++ b/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Extract.Byte.1.cs @@ -22,9 +22,7 @@ public static partial class Program private static void ExtractByte1() { var test = new SimpleUnaryOpTest__ExtractByte1(); - - try - { + if (test.IsSupported) { // Validates basic functionality works, using Unsafe.Read @@ -77,11 +75,6 @@ private static void ExtractByte1() // Validates we throw on unsupported hardware test.RunUnsupportedScenario(); } - } - catch (PlatformNotSupportedException) - { - test.Succeeded = true; - } if (!test.Succeeded) { @@ -126,7 +119,7 @@ public SimpleUnaryOpTest__ExtractByte1() _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Byte[RetElementCount], LargestVectorSize); } - public bool IsSupported => Sse41.IsSupported; + public bool IsSupported => Sse41.IsSupported && (Environment.Is64BitProcess || ((typeof(Byte) != typeof(long)) && (typeof(Byte) != typeof(ulong)))); public bool Succeeded { get; set; } diff --git a/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Extract.Byte.129.cs b/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Extract.Byte.129.cs index 8cc0b1c3c954..4f6a93be02d6 100644 --- a/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Extract.Byte.129.cs +++ b/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Extract.Byte.129.cs @@ -22,9 +22,7 @@ public static partial class Program private static void ExtractByte129() { var test = new SimpleUnaryOpTest__ExtractByte129(); - - try - { + if (test.IsSupported) { // Validates basic functionality works, using Unsafe.Read @@ -77,11 +75,6 @@ private static void ExtractByte129() // Validates we throw on unsupported hardware test.RunUnsupportedScenario(); } - } - catch (PlatformNotSupportedException) - { - test.Succeeded = true; - } if (!test.Succeeded) { @@ -126,7 +119,7 @@ public SimpleUnaryOpTest__ExtractByte129() _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Byte[RetElementCount], LargestVectorSize); } - public bool IsSupported => Sse41.IsSupported; + public bool IsSupported => Sse41.IsSupported && (Environment.Is64BitProcess || ((typeof(Byte) != typeof(long)) && (typeof(Byte) != typeof(ulong)))); public bool Succeeded { get; set; } diff --git a/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Extract.Int32.1.cs b/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Extract.Int32.1.cs index 3e78afdbc04d..05bb4f03bba2 100644 --- a/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Extract.Int32.1.cs +++ b/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Extract.Int32.1.cs @@ -22,9 +22,7 @@ public static partial class Program private static void ExtractInt321() { var test = new SimpleUnaryOpTest__ExtractInt321(); - - try - { + if (test.IsSupported) { // Validates basic functionality works, using Unsafe.Read @@ -77,11 +75,6 @@ private static void ExtractInt321() // Validates we throw on unsupported hardware test.RunUnsupportedScenario(); } - } - catch (PlatformNotSupportedException) - { - test.Succeeded = true; - } if (!test.Succeeded) { @@ -126,7 +119,7 @@ public SimpleUnaryOpTest__ExtractInt321() _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int32[RetElementCount], LargestVectorSize); } - public bool IsSupported => Sse41.IsSupported; + public bool IsSupported => Sse41.IsSupported && (Environment.Is64BitProcess || ((typeof(Int32) != typeof(long)) && (typeof(Int32) != typeof(ulong)))); public bool Succeeded { get; set; } diff --git a/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Extract.Int32.129.cs b/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Extract.Int32.129.cs index d8c9565bdf31..1b63c5d02ed6 100644 --- a/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Extract.Int32.129.cs +++ b/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Extract.Int32.129.cs @@ -22,9 +22,7 @@ public static partial class Program private static void ExtractInt32129() { var test = new SimpleUnaryOpTest__ExtractInt32129(); - - try - { + if (test.IsSupported) { // Validates basic functionality works, using Unsafe.Read @@ -77,11 +75,6 @@ private static void ExtractInt32129() // Validates we throw on unsupported hardware test.RunUnsupportedScenario(); } - } - catch (PlatformNotSupportedException) - { - test.Succeeded = true; - } if (!test.Succeeded) { @@ -126,7 +119,7 @@ public SimpleUnaryOpTest__ExtractInt32129() _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int32[RetElementCount], LargestVectorSize); } - public bool IsSupported => Sse41.IsSupported; + public bool IsSupported => Sse41.IsSupported && (Environment.Is64BitProcess || ((typeof(Int32) != typeof(long)) && (typeof(Int32) != typeof(ulong)))); public bool Succeeded { get; set; } diff --git a/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Extract.Int64.1.cs b/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Extract.Int64.1.cs index 1e6f97bcf18b..48276ba1b2a3 100644 --- a/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Extract.Int64.1.cs +++ b/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Extract.Int64.1.cs @@ -22,9 +22,7 @@ public static partial class Program private static void ExtractInt641() { var test = new SimpleUnaryOpTest__ExtractInt641(); - - try - { + if (test.IsSupported) { // Validates basic functionality works, using Unsafe.Read @@ -77,11 +75,6 @@ private static void ExtractInt641() // Validates we throw on unsupported hardware test.RunUnsupportedScenario(); } - } - catch (PlatformNotSupportedException) - { - test.Succeeded = true; - } if (!test.Succeeded) { @@ -126,7 +119,7 @@ public SimpleUnaryOpTest__ExtractInt641() _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int64[RetElementCount], LargestVectorSize); } - public bool IsSupported => Sse41.IsSupported; + public bool IsSupported => Sse41.IsSupported && (Environment.Is64BitProcess || ((typeof(Int64) != typeof(long)) && (typeof(Int64) != typeof(ulong)))); public bool Succeeded { get; set; } diff --git a/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Extract.Int64.129.cs b/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Extract.Int64.129.cs index 948c09a72c64..ad06c85aa64f 100644 --- a/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Extract.Int64.129.cs +++ b/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Extract.Int64.129.cs @@ -22,9 +22,7 @@ public static partial class Program private static void ExtractInt64129() { var test = new SimpleUnaryOpTest__ExtractInt64129(); - - try - { + if (test.IsSupported) { // Validates basic functionality works, using Unsafe.Read @@ -77,11 +75,6 @@ private static void ExtractInt64129() // Validates we throw on unsupported hardware test.RunUnsupportedScenario(); } - } - catch (PlatformNotSupportedException) - { - test.Succeeded = true; - } if (!test.Succeeded) { @@ -126,7 +119,7 @@ public SimpleUnaryOpTest__ExtractInt64129() _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int64[RetElementCount], LargestVectorSize); } - public bool IsSupported => Sse41.IsSupported; + public bool IsSupported => Sse41.IsSupported && (Environment.Is64BitProcess || ((typeof(Int64) != typeof(long)) && (typeof(Int64) != typeof(ulong)))); public bool Succeeded { get; set; } diff --git a/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Extract.Single.1.cs b/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Extract.Single.1.cs index d82cd423b6bc..49a44cbb53d8 100644 --- a/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Extract.Single.1.cs +++ b/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Extract.Single.1.cs @@ -22,9 +22,7 @@ public static partial class Program private static void ExtractSingle1() { var test = new SimpleUnaryOpTest__ExtractSingle1(); - - try - { + if (test.IsSupported) { // Validates basic functionality works, using Unsafe.Read @@ -77,11 +75,6 @@ private static void ExtractSingle1() // Validates we throw on unsupported hardware test.RunUnsupportedScenario(); } - } - catch (PlatformNotSupportedException) - { - test.Succeeded = true; - } if (!test.Succeeded) { @@ -126,7 +119,7 @@ public SimpleUnaryOpTest__ExtractSingle1() _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Single[RetElementCount], LargestVectorSize); } - public bool IsSupported => Sse41.IsSupported; + public bool IsSupported => Sse41.IsSupported && (Environment.Is64BitProcess || ((typeof(Single) != typeof(long)) && (typeof(Single) != typeof(ulong)))); public bool Succeeded { get; set; } diff --git a/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Extract.Single.129.cs b/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Extract.Single.129.cs index f9d6e7bef77e..a325e9eefa4a 100644 --- a/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Extract.Single.129.cs +++ b/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Extract.Single.129.cs @@ -22,9 +22,7 @@ public static partial class Program private static void ExtractSingle129() { var test = new SimpleUnaryOpTest__ExtractSingle129(); - - try - { + if (test.IsSupported) { // Validates basic functionality works, using Unsafe.Read @@ -77,11 +75,6 @@ private static void ExtractSingle129() // Validates we throw on unsupported hardware test.RunUnsupportedScenario(); } - } - catch (PlatformNotSupportedException) - { - test.Succeeded = true; - } if (!test.Succeeded) { @@ -126,7 +119,7 @@ public SimpleUnaryOpTest__ExtractSingle129() _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Single[RetElementCount], LargestVectorSize); } - public bool IsSupported => Sse41.IsSupported; + public bool IsSupported => Sse41.IsSupported && (Environment.Is64BitProcess || ((typeof(Single) != typeof(long)) && (typeof(Single) != typeof(ulong)))); public bool Succeeded { get; set; } diff --git a/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Extract.UInt32.1.cs b/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Extract.UInt32.1.cs index 0e9cf6807be7..69f423c34f95 100644 --- a/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Extract.UInt32.1.cs +++ b/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Extract.UInt32.1.cs @@ -22,9 +22,7 @@ public static partial class Program private static void ExtractUInt321() { var test = new SimpleUnaryOpTest__ExtractUInt321(); - - try - { + if (test.IsSupported) { // Validates basic functionality works, using Unsafe.Read @@ -77,11 +75,6 @@ private static void ExtractUInt321() // Validates we throw on unsupported hardware test.RunUnsupportedScenario(); } - } - catch (PlatformNotSupportedException) - { - test.Succeeded = true; - } if (!test.Succeeded) { @@ -126,7 +119,7 @@ public SimpleUnaryOpTest__ExtractUInt321() _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt32[RetElementCount], LargestVectorSize); } - public bool IsSupported => Sse41.IsSupported; + public bool IsSupported => Sse41.IsSupported && (Environment.Is64BitProcess || ((typeof(UInt32) != typeof(long)) && (typeof(UInt32) != typeof(ulong)))); public bool Succeeded { get; set; } diff --git a/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Extract.UInt32.129.cs b/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Extract.UInt32.129.cs index 95182b0ca3f8..ca6fadd2d5a8 100644 --- a/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Extract.UInt32.129.cs +++ b/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Extract.UInt32.129.cs @@ -22,9 +22,7 @@ public static partial class Program private static void ExtractUInt32129() { var test = new SimpleUnaryOpTest__ExtractUInt32129(); - - try - { + if (test.IsSupported) { // Validates basic functionality works, using Unsafe.Read @@ -77,11 +75,6 @@ private static void ExtractUInt32129() // Validates we throw on unsupported hardware test.RunUnsupportedScenario(); } - } - catch (PlatformNotSupportedException) - { - test.Succeeded = true; - } if (!test.Succeeded) { @@ -126,7 +119,7 @@ public SimpleUnaryOpTest__ExtractUInt32129() _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt32[RetElementCount], LargestVectorSize); } - public bool IsSupported => Sse41.IsSupported; + public bool IsSupported => Sse41.IsSupported && (Environment.Is64BitProcess || ((typeof(UInt32) != typeof(long)) && (typeof(UInt32) != typeof(ulong)))); public bool Succeeded { get; set; } diff --git a/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Extract.UInt64.1.cs b/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Extract.UInt64.1.cs index c67da3dece52..399ba9612489 100644 --- a/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Extract.UInt64.1.cs +++ b/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Extract.UInt64.1.cs @@ -22,9 +22,7 @@ public static partial class Program private static void ExtractUInt641() { var test = new SimpleUnaryOpTest__ExtractUInt641(); - - try - { + if (test.IsSupported) { // Validates basic functionality works, using Unsafe.Read @@ -77,11 +75,6 @@ private static void ExtractUInt641() // Validates we throw on unsupported hardware test.RunUnsupportedScenario(); } - } - catch (PlatformNotSupportedException) - { - test.Succeeded = true; - } if (!test.Succeeded) { @@ -126,7 +119,7 @@ public SimpleUnaryOpTest__ExtractUInt641() _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt64[RetElementCount], LargestVectorSize); } - public bool IsSupported => Sse41.IsSupported; + public bool IsSupported => Sse41.IsSupported && (Environment.Is64BitProcess || ((typeof(UInt64) != typeof(long)) && (typeof(UInt64) != typeof(ulong)))); public bool Succeeded { get; set; } diff --git a/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Extract.UInt64.129.cs b/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Extract.UInt64.129.cs index 0a8598ab78cb..c3c896d49bf4 100644 --- a/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Extract.UInt64.129.cs +++ b/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Extract.UInt64.129.cs @@ -22,9 +22,7 @@ public static partial class Program private static void ExtractUInt64129() { var test = new SimpleUnaryOpTest__ExtractUInt64129(); - - try - { + if (test.IsSupported) { // Validates basic functionality works, using Unsafe.Read @@ -77,11 +75,6 @@ private static void ExtractUInt64129() // Validates we throw on unsupported hardware test.RunUnsupportedScenario(); } - } - catch (PlatformNotSupportedException) - { - test.Succeeded = true; - } if (!test.Succeeded) { @@ -126,7 +119,7 @@ public SimpleUnaryOpTest__ExtractUInt64129() _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt64[RetElementCount], LargestVectorSize); } - public bool IsSupported => Sse41.IsSupported; + public bool IsSupported => Sse41.IsSupported && (Environment.Is64BitProcess || ((typeof(UInt64) != typeof(long)) && (typeof(UInt64) != typeof(ulong)))); public bool Succeeded { get; set; } diff --git a/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.Byte.1.cs b/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.Byte.1.cs index de94118fcb9e..f12125b03cfb 100644 --- a/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.Byte.1.cs +++ b/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.Byte.1.cs @@ -22,9 +22,7 @@ public static partial class Program private static void InsertByte1() { var test = new SimpleUnaryOpTest__InsertByte1(); - - try - { + if (test.IsSupported) { // Validates basic functionality works, using Unsafe.Read @@ -77,11 +75,6 @@ private static void InsertByte1() // Validates we throw on unsupported hardware test.RunUnsupportedScenario(); } - } - catch (PlatformNotSupportedException) - { - test.Succeeded = true; - } if (!test.Succeeded) { @@ -126,7 +119,7 @@ public SimpleUnaryOpTest__InsertByte1() _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Byte[RetElementCount], LargestVectorSize); } - public bool IsSupported => Sse41.IsSupported; + public bool IsSupported => Sse41.IsSupported && (Environment.Is64BitProcess || ((typeof(Byte) != typeof(long)) && (typeof(Byte) != typeof(ulong)))); public bool Succeeded { get; set; } diff --git a/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.Byte.129.cs b/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.Byte.129.cs index 6c4f2d59089b..a6a020da9ddf 100644 --- a/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.Byte.129.cs +++ b/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.Byte.129.cs @@ -22,9 +22,7 @@ public static partial class Program private static void InsertByte129() { var test = new SimpleUnaryOpTest__InsertByte129(); - - try - { + if (test.IsSupported) { // Validates basic functionality works, using Unsafe.Read @@ -77,11 +75,6 @@ private static void InsertByte129() // Validates we throw on unsupported hardware test.RunUnsupportedScenario(); } - } - catch (PlatformNotSupportedException) - { - test.Succeeded = true; - } if (!test.Succeeded) { @@ -126,7 +119,7 @@ public SimpleUnaryOpTest__InsertByte129() _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Byte[RetElementCount], LargestVectorSize); } - public bool IsSupported => Sse41.IsSupported; + public bool IsSupported => Sse41.IsSupported && (Environment.Is64BitProcess || ((typeof(Byte) != typeof(long)) && (typeof(Byte) != typeof(ulong)))); public bool Succeeded { get; set; } diff --git a/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.Int32.1.cs b/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.Int32.1.cs index a89626622c8c..02ba67c0b820 100644 --- a/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.Int32.1.cs +++ b/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.Int32.1.cs @@ -22,9 +22,7 @@ public static partial class Program private static void InsertInt321() { var test = new SimpleUnaryOpTest__InsertInt321(); - - try - { + if (test.IsSupported) { // Validates basic functionality works, using Unsafe.Read @@ -77,11 +75,6 @@ private static void InsertInt321() // Validates we throw on unsupported hardware test.RunUnsupportedScenario(); } - } - catch (PlatformNotSupportedException) - { - test.Succeeded = true; - } if (!test.Succeeded) { @@ -126,7 +119,7 @@ public SimpleUnaryOpTest__InsertInt321() _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int32[RetElementCount], LargestVectorSize); } - public bool IsSupported => Sse41.IsSupported; + public bool IsSupported => Sse41.IsSupported && (Environment.Is64BitProcess || ((typeof(Int32) != typeof(long)) && (typeof(Int32) != typeof(ulong)))); public bool Succeeded { get; set; } diff --git a/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.Int32.129.cs b/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.Int32.129.cs index c257663651c0..5e0b41e49117 100644 --- a/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.Int32.129.cs +++ b/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.Int32.129.cs @@ -22,9 +22,7 @@ public static partial class Program private static void InsertInt32129() { var test = new SimpleUnaryOpTest__InsertInt32129(); - - try - { + if (test.IsSupported) { // Validates basic functionality works, using Unsafe.Read @@ -77,11 +75,6 @@ private static void InsertInt32129() // Validates we throw on unsupported hardware test.RunUnsupportedScenario(); } - } - catch (PlatformNotSupportedException) - { - test.Succeeded = true; - } if (!test.Succeeded) { @@ -126,7 +119,7 @@ public SimpleUnaryOpTest__InsertInt32129() _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int32[RetElementCount], LargestVectorSize); } - public bool IsSupported => Sse41.IsSupported; + public bool IsSupported => Sse41.IsSupported && (Environment.Is64BitProcess || ((typeof(Int32) != typeof(long)) && (typeof(Int32) != typeof(ulong)))); public bool Succeeded { get; set; } diff --git a/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.Int64.1.cs b/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.Int64.1.cs index c673ce63220c..03110fa74db4 100644 --- a/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.Int64.1.cs +++ b/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.Int64.1.cs @@ -22,9 +22,7 @@ public static partial class Program private static void InsertInt641() { var test = new SimpleUnaryOpTest__InsertInt641(); - - try - { + if (test.IsSupported) { // Validates basic functionality works, using Unsafe.Read @@ -77,11 +75,6 @@ private static void InsertInt641() // Validates we throw on unsupported hardware test.RunUnsupportedScenario(); } - } - catch (PlatformNotSupportedException) - { - test.Succeeded = true; - } if (!test.Succeeded) { @@ -126,7 +119,7 @@ public SimpleUnaryOpTest__InsertInt641() _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int64[RetElementCount], LargestVectorSize); } - public bool IsSupported => Sse41.IsSupported; + public bool IsSupported => Sse41.IsSupported && (Environment.Is64BitProcess || ((typeof(Int64) != typeof(long)) && (typeof(Int64) != typeof(ulong)))); public bool Succeeded { get; set; } diff --git a/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.Int64.129.cs b/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.Int64.129.cs index 6cd83adc408b..e344759a3092 100644 --- a/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.Int64.129.cs +++ b/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.Int64.129.cs @@ -22,9 +22,7 @@ public static partial class Program private static void InsertInt64129() { var test = new SimpleUnaryOpTest__InsertInt64129(); - - try - { + if (test.IsSupported) { // Validates basic functionality works, using Unsafe.Read @@ -77,11 +75,6 @@ private static void InsertInt64129() // Validates we throw on unsupported hardware test.RunUnsupportedScenario(); } - } - catch (PlatformNotSupportedException) - { - test.Succeeded = true; - } if (!test.Succeeded) { @@ -126,7 +119,7 @@ public SimpleUnaryOpTest__InsertInt64129() _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int64[RetElementCount], LargestVectorSize); } - public bool IsSupported => Sse41.IsSupported; + public bool IsSupported => Sse41.IsSupported && (Environment.Is64BitProcess || ((typeof(Int64) != typeof(long)) && (typeof(Int64) != typeof(ulong)))); public bool Succeeded { get; set; } diff --git a/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.SByte.1.cs b/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.SByte.1.cs index f0a4dcf47c67..2b7af448eceb 100644 --- a/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.SByte.1.cs +++ b/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.SByte.1.cs @@ -22,9 +22,7 @@ public static partial class Program private static void InsertSByte1() { var test = new SimpleUnaryOpTest__InsertSByte1(); - - try - { + if (test.IsSupported) { // Validates basic functionality works, using Unsafe.Read @@ -77,11 +75,6 @@ private static void InsertSByte1() // Validates we throw on unsupported hardware test.RunUnsupportedScenario(); } - } - catch (PlatformNotSupportedException) - { - test.Succeeded = true; - } if (!test.Succeeded) { @@ -126,7 +119,7 @@ public SimpleUnaryOpTest__InsertSByte1() _dataTable = new SimpleUnaryOpTest__DataTable(_data, new SByte[RetElementCount], LargestVectorSize); } - public bool IsSupported => Sse41.IsSupported; + public bool IsSupported => Sse41.IsSupported && (Environment.Is64BitProcess || ((typeof(SByte) != typeof(long)) && (typeof(SByte) != typeof(ulong)))); public bool Succeeded { get; set; } diff --git a/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.SByte.129.cs b/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.SByte.129.cs index 7bad860ba41b..4c164ab166f2 100644 --- a/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.SByte.129.cs +++ b/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.SByte.129.cs @@ -22,9 +22,7 @@ public static partial class Program private static void InsertSByte129() { var test = new SimpleUnaryOpTest__InsertSByte129(); - - try - { + if (test.IsSupported) { // Validates basic functionality works, using Unsafe.Read @@ -77,11 +75,6 @@ private static void InsertSByte129() // Validates we throw on unsupported hardware test.RunUnsupportedScenario(); } - } - catch (PlatformNotSupportedException) - { - test.Succeeded = true; - } if (!test.Succeeded) { @@ -126,7 +119,7 @@ public SimpleUnaryOpTest__InsertSByte129() _dataTable = new SimpleUnaryOpTest__DataTable(_data, new SByte[RetElementCount], LargestVectorSize); } - public bool IsSupported => Sse41.IsSupported; + public bool IsSupported => Sse41.IsSupported && (Environment.Is64BitProcess || ((typeof(SByte) != typeof(long)) && (typeof(SByte) != typeof(ulong)))); public bool Succeeded { get; set; } diff --git a/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.UInt32.1.cs b/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.UInt32.1.cs index ab82f5f1bf08..efe68f652bf1 100644 --- a/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.UInt32.1.cs +++ b/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.UInt32.1.cs @@ -22,9 +22,7 @@ public static partial class Program private static void InsertUInt321() { var test = new SimpleUnaryOpTest__InsertUInt321(); - - try - { + if (test.IsSupported) { // Validates basic functionality works, using Unsafe.Read @@ -77,11 +75,6 @@ private static void InsertUInt321() // Validates we throw on unsupported hardware test.RunUnsupportedScenario(); } - } - catch (PlatformNotSupportedException) - { - test.Succeeded = true; - } if (!test.Succeeded) { @@ -126,7 +119,7 @@ public SimpleUnaryOpTest__InsertUInt321() _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt32[RetElementCount], LargestVectorSize); } - public bool IsSupported => Sse41.IsSupported; + public bool IsSupported => Sse41.IsSupported && (Environment.Is64BitProcess || ((typeof(UInt32) != typeof(long)) && (typeof(UInt32) != typeof(ulong)))); public bool Succeeded { get; set; } diff --git a/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.UInt32.129.cs b/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.UInt32.129.cs index 27177f67f28e..32ef922ed20a 100644 --- a/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.UInt32.129.cs +++ b/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.UInt32.129.cs @@ -22,9 +22,7 @@ public static partial class Program private static void InsertUInt32129() { var test = new SimpleUnaryOpTest__InsertUInt32129(); - - try - { + if (test.IsSupported) { // Validates basic functionality works, using Unsafe.Read @@ -77,11 +75,6 @@ private static void InsertUInt32129() // Validates we throw on unsupported hardware test.RunUnsupportedScenario(); } - } - catch (PlatformNotSupportedException) - { - test.Succeeded = true; - } if (!test.Succeeded) { @@ -126,7 +119,7 @@ public SimpleUnaryOpTest__InsertUInt32129() _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt32[RetElementCount], LargestVectorSize); } - public bool IsSupported => Sse41.IsSupported; + public bool IsSupported => Sse41.IsSupported && (Environment.Is64BitProcess || ((typeof(UInt32) != typeof(long)) && (typeof(UInt32) != typeof(ulong)))); public bool Succeeded { get; set; } diff --git a/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.UInt64.1.cs b/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.UInt64.1.cs index d4d9f9981923..a735dd53217d 100644 --- a/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.UInt64.1.cs +++ b/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.UInt64.1.cs @@ -22,9 +22,7 @@ public static partial class Program private static void InsertUInt641() { var test = new SimpleUnaryOpTest__InsertUInt641(); - - try - { + if (test.IsSupported) { // Validates basic functionality works, using Unsafe.Read @@ -77,11 +75,6 @@ private static void InsertUInt641() // Validates we throw on unsupported hardware test.RunUnsupportedScenario(); } - } - catch (PlatformNotSupportedException) - { - test.Succeeded = true; - } if (!test.Succeeded) { @@ -126,7 +119,7 @@ public SimpleUnaryOpTest__InsertUInt641() _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt64[RetElementCount], LargestVectorSize); } - public bool IsSupported => Sse41.IsSupported; + public bool IsSupported => Sse41.IsSupported && (Environment.Is64BitProcess || ((typeof(UInt64) != typeof(long)) && (typeof(UInt64) != typeof(ulong)))); public bool Succeeded { get; set; } diff --git a/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.UInt64.129.cs b/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.UInt64.129.cs index 62ce511405c8..d8b339db1d0f 100644 --- a/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.UInt64.129.cs +++ b/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.UInt64.129.cs @@ -22,9 +22,7 @@ public static partial class Program private static void InsertUInt64129() { var test = new SimpleUnaryOpTest__InsertUInt64129(); - - try - { + if (test.IsSupported) { // Validates basic functionality works, using Unsafe.Read @@ -77,11 +75,6 @@ private static void InsertUInt64129() // Validates we throw on unsupported hardware test.RunUnsupportedScenario(); } - } - catch (PlatformNotSupportedException) - { - test.Succeeded = true; - } if (!test.Succeeded) { @@ -126,7 +119,7 @@ public SimpleUnaryOpTest__InsertUInt64129() _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt64[RetElementCount], LargestVectorSize); } - public bool IsSupported => Sse41.IsSupported; + public bool IsSupported => Sse41.IsSupported && (Environment.Is64BitProcess || ((typeof(UInt64) != typeof(long)) && (typeof(UInt64) != typeof(ulong)))); public bool Succeeded { get; set; }