1 // Copyright 2017 Google Inc.
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
7 // http://www.apache.org/licenses/LICENSE-2.0
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
15 #ifndef CPU_FEATURES_INCLUDE_CPUINFO_ARM_H_
16 #define CPU_FEATURES_INCLUDE_CPUINFO_ARM_H_
18 #include "cpu_features_macros.h"
20 CPU_FEATURES_START_CPP_NAMESPACE
23 int vfp : 1; // Vector Floating Point.
24 int iwmmxt : 1; // Intel Wireless MMX Technology.
25 int neon : 1; // Advanced SIMD.
26 int vfpv3 : 1; // VFP version 3
27 int vfpv3d16 : 1; // VFP version 3 with 16 D-registers
28 int vfpv4 : 1; // VFP version 4 with fast context switching
29 int idiva : 1; // SDIV and UDIV hardware division in ARM mode.
30 int idivt : 1; // SDIV and UDIV hardware division in Thumb mode.
31 int aes : 1; // Hardware-accelerated Advanced Encryption Standard.
32 int pmull : 1; // Polynomial multiply long.
33 int sha1 : 1; // Hardware-accelerated SHA1.
34 int sha2 : 1; // Hardware-accelerated SHA2-256.
35 int crc32 : 1; // Hardware-accelerated CRC-32.
37 // Make sure to update ArmFeaturesEnum below if you add a field here.
49 // TODO(user): Add macros to know which features are present at compile
52 ArmInfo GetArmInfo(void);
54 ////////////////////////////////////////////////////////////////////////////////
55 // Introspection functions
74 int GetArmFeaturesEnumValue(const ArmFeatures* features, ArmFeaturesEnum value);
76 const char* GetArmFeaturesEnumName(ArmFeaturesEnum);
78 CPU_FEATURES_END_CPP_NAMESPACE
80 #endif // CPU_FEATURES_INCLUDE_CPUINFO_ARM_H_