Add Fast Paths for Crypto instructions (A32/A64) (#1026)

* Add Fast Paths for Crypto instructions (A32/A64)

* Replace additional XOR with passing in const zero.
This commit is contained in:
riperiperi 2020-03-25 06:20:29 +00:00 committed by GitHub
parent a40d8d4a17
commit f695a215ad
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 122 additions and 8 deletions

View file

@ -16,6 +16,7 @@ namespace ARMeilleure
public static bool UseSse42IfAvailable { get; set; } = true;
public static bool UsePopCntIfAvailable { get; set; } = true;
public static bool UseAvxIfAvailable { get; set; } = true;
public static bool UseAesniIfAvailable { get; set; } = true;
public static bool ForceLegacySse
{
@ -31,5 +32,6 @@ namespace ARMeilleure
internal static bool UseSse42 => UseSse42IfAvailable && HardwareCapabilities.SupportsSse42;
internal static bool UsePopCnt => UsePopCntIfAvailable && HardwareCapabilities.SupportsPopcnt;
internal static bool UseAvx => UseAvxIfAvailable && HardwareCapabilities.SupportsAvx && !ForceLegacySse;
internal static bool UseAesni => UseAesniIfAvailable && HardwareCapabilities.SupportsAesni;
}
}