Merge pull request #3727 from Sonicadvance1/vaes

VAES support
This commit is contained in:
Ryan Houdek authored and GitHub committed 2024-06-19 19:22:56 -07:00
commit d2baef2b36
12 files changed
+255 -37

No files matched your search

@@ -108,11 +108,13 @@ static void OverrideFeatures(HostFeatures* Features) {
Features->SupportsCRC = true;
Features->SupportsSHA = true;
Features->SupportsPMULL_128Bit = true;
Features->SupportsAES256 = true;
} else if (DisableCrypto) {
Features->SupportsAES = false;
Features->SupportsCRC = false;
Features->SupportsSHA = false;
Features->SupportsPMULL_128Bit = false;
Features->SupportsAES256 = false;
}
///< Only force enable SVE256 if SVE is already enabled and ForceSVEWidth is set to >= 256.
@@ -165,6 +167,8 @@ HostFeatures::HostFeatures() {
#endif
SupportsAVX = SupportsSVE256;
SupportsAES256 = SupportsAVX && SupportsAES;
// TODO: AVX2 is currently unsupported. Disable until the remaining features are implemented.
SupportsAVX2 = false;
SupportsBMI1 = true;
@@ -259,6 +263,7 @@ HostFeatures::HostFeatures() {
SupportsBMI2 = X86Features.has(Xbyak::util::Cpu::tBMI2);
SupportsCLWB = X86Features.has(Xbyak::util::Cpu::tCLWB);
SupportsPMULL_128Bit = X86Features.has(Xbyak::util::Cpu::tPCLMULQDQ);
SupportsAES256 = SupportsAES && X86Features.has(Xbyak::util::Cpu::tVAES);
// xbyak doesn't know how to check for CLZero
// First ensure we support a new enough extended CPUID function range