Skip to content

Commit

Permalink
Updating the x86 HWIntrinsics program to print out the list of suppor…
Browse files Browse the repository at this point in the history
…ted ISAs
  • Loading branch information
tannergooding committed Aug 3, 2018
1 parent b3db104 commit a29c8df
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions tests/src/JIT/HardwareIntrinsics/X86/Shared/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Intrinsics.X86;

namespace JIT.HardwareIntrinsics.X86
{
Expand All @@ -19,6 +20,8 @@ public static int Main(string[] args)
{
var isPassing = true;

PrintSupportedIsa();

foreach (string testToRun in GetTestsToRun(args))
{
TestLibrary.TestFramework.BeginTestCase(testToRun);
Expand Down Expand Up @@ -64,6 +67,27 @@ private static ICollection<string> GetTestsToRun(string[] args)
return (testsToRun.Count == 0) ? TestList.Keys : testsToRun;
}

private static void PrintSupportedIsa()
{
TestLibrary.TestFramework.LogInformation("Supported ISAs:");
TestLibrary.TestFramework.LogInformation($" AES: {Aes.IsSupported}");
TestLibrary.TestFramework.LogInformation($" AVX: {Avx.IsSupported}");
TestLibrary.TestFramework.LogInformation($" AVX2: {Avx2.IsSupported}");
TestLibrary.TestFramework.LogInformation($" BMI1: {Bmi1.IsSupported}");
TestLibrary.TestFramework.LogInformation($" BMI2: {Bmi2.IsSupported}");
TestLibrary.TestFramework.LogInformation($" FMA: {Fma.IsSupported}");
TestLibrary.TestFramework.LogInformation($" LZCNT: {Lzcnt.IsSupported}");
TestLibrary.TestFramework.LogInformation($" PCLMULQDQ: {Pclmulqdq.IsSupported}");
TestLibrary.TestFramework.LogInformation($" POPCNT: {Popcnt.IsSupported}");
TestLibrary.TestFramework.LogInformation($" SSE: {Sse.IsSupported}");
TestLibrary.TestFramework.LogInformation($" SSE2: {Sse2.IsSupported}");
TestLibrary.TestFramework.LogInformation($" SSE3: {Sse3.IsSupported}");
TestLibrary.TestFramework.LogInformation($" SSE4.1: {Sse41.IsSupported}");
TestLibrary.TestFramework.LogInformation($" SSE4.2: {Sse42.IsSupported}");
TestLibrary.TestFramework.LogInformation($" SSSE3: {Ssse3.IsSupported}");
TestLibrary.TestFramework.LogInformation(string.Empty);
}

private static void PrintUsage()
{
TestLibrary.TestFramework.LogInformation($@"Usage:
Expand Down

0 comments on commit a29c8df

Please sign in to comment.