This commit is contained in:
LDj3SNuD 2020-10-28 02:28:23 +01:00
parent c9841dab38
commit c248bf9fb4
28 changed files with 48 additions and 51 deletions

View file

@ -4,6 +4,13 @@ namespace ARMeilleure.CodeGen.X86
{
static class HardwareCapabilities
{
static HardwareCapabilities()
{
(_, _, int ecx, _) = X86Base.CpuId(0x00000001, 0x00000000);
SupportsF16c = ((ecx >> 29) & 1) != 0;
}
public static bool SupportsSse => Sse.IsSupported;
public static bool SupportsSse2 => Sse2.IsSupported;
public static bool SupportsSse3 => Sse3.IsSupported;
@ -15,6 +22,7 @@ namespace ARMeilleure.CodeGen.X86
public static bool SupportsPopcnt => Popcnt.IsSupported;
public static bool SupportsAesni => Aes.IsSupported;
public static bool SupportsAvx => Avx.IsSupported;
public static bool SupportsF16c;
public static bool ForceLegacySse { get; set; }