7#include <botan/internal/cpuid_features.h>
9#include <botan/exceptn.h>
15 case CPUFeature::Bit::NEON:
17 case CPUFeature::Bit::SHA1:
19 case CPUFeature::Bit::SHA2:
21 case CPUFeature::Bit::AES:
23 case CPUFeature::Bit::PMULL:
26 throw Invalid_State(
"CPUFeature invalid bit");
32 if(tok ==
"neon" || tok ==
"simd") {
33 return CPUFeature::Bit::NEON;
34 }
else if(tok ==
"armv8sha1" || tok ==
"arm_sha1") {
35 return CPUFeature::Bit::SHA1;
36 }
else if(tok ==
"armv8sha2" || tok ==
"arm_sha2") {
37 return CPUFeature::Bit::SHA2;
38 }
else if(tok ==
"armv8aes" || tok ==
"arm_aes") {
39 return CPUFeature::Bit::AES;
40 }
else if(tok ==
"armv8pmull" || tok ==
"arm_pmull") {
41 return CPUFeature::Bit::PMULL;
static std::optional< CPUFeature > from_string(std::string_view)
std::string to_string() const