diff options
Diffstat (limited to 'pkg')
-rw-r--r-- | pkg/cpuid/cpuid_arm64.go | 77 |
1 files changed, 49 insertions, 28 deletions
diff --git a/pkg/cpuid/cpuid_arm64.go b/pkg/cpuid/cpuid_arm64.go index 6d71290c9..08381c1c0 100644 --- a/pkg/cpuid/cpuid_arm64.go +++ b/pkg/cpuid/cpuid_arm64.go @@ -36,78 +36,98 @@ import ( // Currently, only the HWCAP bits are supported. const ( - // Single and double precision float point types. + // ARM64FeatureFP indicates support for single and double precision + // float point types. ARM64FeatureFP Feature = iota - // Advanced SIMD with single and double precision - // float point arithmetic. + // ARM64FeatureASIMD indicates support for Advanced SIMD with single + // and double precision float point arithmetic. ARM64FeatureASIMD - // The generic timer is configured to generate - // events at a frequency of approximately 100KHz. + // ARM64FeatureEVTSTRM indicates support for the generic timer + // configured to generate events at a frequency of approximately + // 100KHz. ARM64FeatureEVTSTRM - // AES instructions(AESE/AESD/AESMC/AESIMC). + // ARM64FeatureAES indicates support for AES instructions + // (AESE/AESD/AESMC/AESIMC). ARM64FeatureAES - // AES instructions(PMULL/PMULL2). + // ARM64FeaturePMULL indicates support for AES instructions + // (PMULL/PMULL2). ARM64FeaturePMULL - // SHA1 instructions(SHA1C/SHA1P/SHA1M etc). + // ARM64FeatureSHA1 indicates support for SHA1 instructions + // (SHA1C/SHA1P/SHA1M etc). ARM64FeatureSHA1 - // SHA2 instructions(SHA256H/SHA256H2/SHA256SU0 etc). + // ARM64FeatureSHA2 indicates support for SHA2 instructions + // (SHA256H/SHA256H2/SHA256SU0 etc). ARM64FeatureSHA2 - // CRC32 instructions(CRC32B/CRC32H/CRC32W etc). + // ARM64FeatureCRC32 indicates support for CRC32 instructions + // (CRC32B/CRC32H/CRC32W etc). ARM64FeatureCRC32 - // Atomic instructions(LDADD/LDCLR/LDEOR/LDSET etc). + // ARM64FeatureATOMICS indicates support for atomic instructions + // (LDADD/LDCLR/LDEOR/LDSET etc). ARM64FeatureATOMICS - // Half precision float point arithmetic. + // ARM64FeatureFPHP indicates support for half precision float point + // arithmetic. ARM64FeatureFPHP - // ASIMD with half precision float point arithmetic. + // ARM64FeatureASIMDHP indicates support for ASIMD with half precision + // float point arithmetic. ARM64FeatureASIMDHP - // EL0 access to certain ID registers is available. + // ARM64FeatureCPUID indicates support for EL0 access to certain ID + // registers is available. ARM64FeatureCPUID - // SQRDMLAH and SQRDMLSH instructions implemented. + // ARM64FeatureASIMDRDM indicates support for SQRDMLAH and SQRDMLSH + // instructions. ARM64FeatureASIMDRDM - // The FJCVTZS instruction is implemented. + // ARM64FeatureJSCVT indicates support for the FJCVTZS instruction. ARM64FeatureJSCVT - // The FCMLA and FCADD instructions are implemented. + // ARM64FeatureFCMA indicates support for the FCMLA and FCADD + // instructions. ARM64FeatureFCMA - // The LDAPRB/LDAPRH/LDAPR instructions are implemented. + // ARM64FeatureLRCPC indicates support for the LDAPRB/LDAPRH/LDAPR + // instructions. ARM64FeatureLRCPC - // DC instruction(DC CVAP) supported. + // ARM64FeatureDCPOP indicates support for DC instruction (DC CVAP). ARM64FeatureDCPOP - // SHA3 instructions(EOR3/RAX1/XAR/BCAX) implemented. + // ARM64FeatureSHA3 indicates support for SHA3 instructions + // (EOR3/RAX1/XAR/BCAX). ARM64FeatureSHA3 - // SM3 instructions(SM3SS1/SM3TT1A/SM3TT1B) implemented. + // ARM64FeatureSM3 indicates support for SM3 instructions + // (SM3SS1/SM3TT1A/SM3TT1B). ARM64FeatureSM3 - // SM4 instructions(SM4E/SM4EKEY) implemented. + // ARM64FeatureSM4 indicates support for SM4 instructions + // (SM4E/SM4EKEY). ARM64FeatureSM4 - // Dot Product instructions(UDOT/SDOT) implemented. + // ARM64FeatureASIMDDP indicates support for dot product instructions + // (UDOT/SDOT). ARM64FeatureASIMDDP - // SHA2 instructions(SHA512H/SHA512H2/SHA512SU0) implemented. + // ARM64FeatureSHA512 indicates support for SHA2 instructions + // (SHA512H/SHA512H2/SHA512SU0). ARM64FeatureSHA512 - // Scalable Vector Extension implemented. + // ARM64FeatureSVE indicates support for Scalable Vector Extension. ARM64FeatureSVE - // FMLAL and FMLSL instructions are implemented. + // ARM64FeatureASIMDFHM indicates support for FMLAL and FMLSL + // instructions. ARM64FeatureASIMDFHM ) @@ -237,8 +257,9 @@ func (fs *FeatureSet) HasFeature(feature Feature) bool { return fs.Set[feature] } -// UseXsaveopt returns true if 'fs' supports the "xsaveopt" instruction. -// Noop on arm64. +// UseXsave returns true if 'fs' supports the "xsave" instruction. +// +// Irrelevant on arm64. func (fs *FeatureSet) UseXsave() bool { return false } |