diff --git a/Scripts/InstructionCountParser.py b/Scripts/InstructionCountParser.py index e4230c88e..850d98485 100755 --- a/Scripts/InstructionCountParser.py +++ b/Scripts/InstructionCountParser.py @@ -52,6 +52,7 @@ class HostFeatures(Flag) : FEATURE_RPRES = (1 << 7) FEATURE_FLAGM = (1 << 8) FEATURE_FLAGM2 = (1 << 9) + FEATURE_CRYPTO = (1 << 10) HostFeaturesLookup = { "SVE128" : HostFeatures.FEATURE_SVE128, @@ -64,6 +65,7 @@ HostFeaturesLookup = { "RPRES" : HostFeatures.FEATURE_RPRES, "FLAGM" : HostFeatures.FEATURE_FLAGM, "FLAGM2" : HostFeatures.FEATURE_FLAGM2, + "CRYPTO" : HostFeatures.FEATURE_CRYPTO, } def GetHostFeatures(data): diff --git a/Source/Tools/CodeSizeValidation/Main.cpp b/Source/Tools/CodeSizeValidation/Main.cpp index 567a6d5b9..a3ff9558b 100644 --- a/Source/Tools/CodeSizeValidation/Main.cpp +++ b/Source/Tools/CodeSizeValidation/Main.cpp @@ -466,6 +466,7 @@ int main(int argc, char **argv, char **const envp) { FEATURE_RPRES = (1U << 7), FEATURE_FLAGM = (1U << 8), FEATURE_FLAGM2 = (1U << 9), + FEATURE_CRYPTO = (1U << 10), }; uint64_t SVEWidth = 0; @@ -502,11 +503,12 @@ int main(int argc, char **argv, char **const envp) { if (TestHeaderData->EnabledHostFeatures & FEATURE_FLAGM2) { HostFeatureControl |= static_cast(FEXCore::Config::HostFeatures::ENABLEFLAGM2); } + if (TestHeaderData->EnabledHostFeatures & FEATURE_CRYPTO) { + HostFeatureControl |= static_cast(FEXCore::Config::HostFeatures::ENABLECRYPTO); + } // Always enable ARMv8.1 LSE atomics. HostFeatureControl |= static_cast(FEXCore::Config::HostFeatures::ENABLEATOMICS); - // Always enable crypto extensions. - HostFeatureControl |= static_cast(FEXCore::Config::HostFeatures::ENABLECRYPTO); if (TestHeaderData->DisabledHostFeatures & FEATURE_SVE128) { HostFeatureControl |= static_cast(FEXCore::Config::HostFeatures::DISABLESVE); @@ -538,6 +540,9 @@ int main(int argc, char **argv, char **const envp) { if (TestHeaderData->DisabledHostFeatures & FEATURE_FLAGM2) { HostFeatureControl |= static_cast(FEXCore::Config::HostFeatures::DISABLEFLAGM2); } + if (TestHeaderData->DisabledHostFeatures & FEATURE_CRYPTO) { + HostFeatureControl |= static_cast(FEXCore::Config::HostFeatures::DISABLECRYPTO); + } FEXCore::Config::EraseSet(FEXCore::Config::CONFIG_HOSTFEATURES, fextl::fmt::format("{}", HostFeatureControl)); FEXCore::Config::EraseSet(FEXCore::Config::CONFIG_FORCESVEWIDTH, fextl::fmt::format("{}", SVEWidth));