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_AARCH64_H_
16 #define CPU_FEATURES_INCLUDE_CPUINFO_AARCH64_H_
18 #include "cpu_features_macros.h"
20 CPU_FEATURES_START_CPP_NAMESPACE
23 int fp : 1; // Floating-point.
24 int asimd : 1; // Advanced SIMD.
25 int aes : 1; // Hardware-accelerated Advanced Encryption Standard.
26 int pmull : 1; // Polynomial multiply long.
27 int sha1 : 1; // Hardware-accelerated SHA1.
28 int sha2 : 1; // Hardware-accelerated SHA2-256.
29 int crc32 : 1; // Hardware-accelerated CRC-32.
31 // Make sure to update Aarch64FeaturesEnum below if you add a field here.
35 Aarch64Features features;
42 Aarch64Info GetAarch64Info(void);
44 ////////////////////////////////////////////////////////////////////////////////
45 // Introspection functions
56 } Aarch64FeaturesEnum;
58 int GetAarch64FeaturesEnumValue(const Aarch64Features* features,
59 Aarch64FeaturesEnum value);
61 const char* GetAarch64FeaturesEnumName(Aarch64FeaturesEnum);
63 CPU_FEATURES_END_CPP_NAMESPACE
65 #endif // CPU_FEATURES_INCLUDE_CPUINFO_AARCH64_H_