xref: /aosp_15_r20/external/cpu_features/include/cpuinfo_aarch64.h (revision eca53ba6d2e951e174b64682eaf56a36b8204c89)
1*eca53ba6SRoland Levillain // Copyright 2017 Google LLC
2*eca53ba6SRoland Levillain //
3*eca53ba6SRoland Levillain // Licensed under the Apache License, Version 2.0 (the "License");
4*eca53ba6SRoland Levillain // you may not use this file except in compliance with the License.
5*eca53ba6SRoland Levillain // You may obtain a copy of the License at
6*eca53ba6SRoland Levillain //
7*eca53ba6SRoland Levillain //    http://www.apache.org/licenses/LICENSE-2.0
8*eca53ba6SRoland Levillain //
9*eca53ba6SRoland Levillain // Unless required by applicable law or agreed to in writing, software
10*eca53ba6SRoland Levillain // distributed under the License is distributed on an "AS IS" BASIS,
11*eca53ba6SRoland Levillain // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12*eca53ba6SRoland Levillain // See the License for the specific language governing permissions and
13*eca53ba6SRoland Levillain // limitations under the License.
14*eca53ba6SRoland Levillain 
15*eca53ba6SRoland Levillain ////////////////////////////////////////////////////////////////////////////////
16*eca53ba6SRoland Levillain // A note on Windows AArch64 implementation
17*eca53ba6SRoland Levillain ////////////////////////////////////////////////////////////////////////////////
18*eca53ba6SRoland Levillain 
19*eca53ba6SRoland Levillain // Getting cpu info via EL1 system registers is not possible, so we delegate it
20*eca53ba6SRoland Levillain // to the Windows API (i.e., IsProcessorFeaturePresent and GetNativeSystemInfo).
21*eca53ba6SRoland Levillain // The `implementer`, `variant` and `part` fields of the `Aarch64Info` struct
22*eca53ba6SRoland Levillain // are not used, so they are set to 0. To get `revision` we use
23*eca53ba6SRoland Levillain // `wProcessorRevision` from `SYSTEM_INFO`.
24*eca53ba6SRoland Levillain //
25*eca53ba6SRoland Levillain // Cryptographic Extension:
26*eca53ba6SRoland Levillain // -----------------------------------------------------------------------------
27*eca53ba6SRoland Levillain // According to documentation Arm Architecture Reference Manual for
28*eca53ba6SRoland Levillain // A-profile architecture. A2.3 The Armv8 Cryptographic Extension. The Armv8.0
29*eca53ba6SRoland Levillain // Cryptographic Extension provides instructions for the acceleration of
30*eca53ba6SRoland Levillain // encryption and decryption, and includes the following features: FEAT_AES,
31*eca53ba6SRoland Levillain // FEAT_PMULL, FEAT_SHA1, FEAT_SHA256.
32*eca53ba6SRoland Levillain // see: https://developer.arm.com/documentation/ddi0487/latest
33*eca53ba6SRoland Levillain //
34*eca53ba6SRoland Levillain // We use `PF_ARM_V8_CRYPTO_INSTRUCTIONS_AVAILABLE` to detect all Armv8.0 crypto
35*eca53ba6SRoland Levillain // features. This value reports all features or nothing, so even if you only
36*eca53ba6SRoland Levillain // have support FEAT_AES and FEAT_PMULL, it will still return false.
37*eca53ba6SRoland Levillain //
38*eca53ba6SRoland Levillain // From Armv8.2, an implementation of the Armv8.0 Cryptographic Extension can
39*eca53ba6SRoland Levillain // include either or both of:
40*eca53ba6SRoland Levillain //
41*eca53ba6SRoland Levillain // • The AES functionality, including support for multiplication of 64-bit
42*eca53ba6SRoland Levillain //   polynomials. The ID_AA64ISAR0_EL1.AES field indicates whether this
43*eca53ba6SRoland Levillain //   functionality is supported.
44*eca53ba6SRoland Levillain // • The SHA1 and SHA2-256 functionality. The ID_AA64ISAR0_EL1.{SHA2, SHA1}
45*eca53ba6SRoland Levillain //   fields indicate whether this functionality is supported.
46*eca53ba6SRoland Levillain //
47*eca53ba6SRoland Levillain // ID_AA64ISAR0_EL1.AES, bits [7:4]:
48*eca53ba6SRoland Levillain // Indicates support for AES instructions in AArch64 state. Defined values are:
49*eca53ba6SRoland Levillain // - 0b0000 No AES instructions implemented.
50*eca53ba6SRoland Levillain // - 0b0001 AESE, AESD, AESMC, and AESIMC instructions implemented.
51*eca53ba6SRoland Levillain // - 0b0010 As for 0b0001, plus PMULL/PMULL2 instructions operating on 64-bit
52*eca53ba6SRoland Levillain //   data quantities.
53*eca53ba6SRoland Levillain //
54*eca53ba6SRoland Levillain // FEAT_AES implements the functionality identified by the value 0b0001.
55*eca53ba6SRoland Levillain // FEAT_PMULL implements the functionality identified by the value 0b0010.
56*eca53ba6SRoland Levillain // From Armv8, the permitted values are 0b0000 and 0b0010.
57*eca53ba6SRoland Levillain //
58*eca53ba6SRoland Levillain // ID_AA64ISAR0_EL1.SHA1, bits [11:8]:
59*eca53ba6SRoland Levillain // Indicates support for SHA1 instructions in AArch64 state. Defined values are:
60*eca53ba6SRoland Levillain // - 0b0000 No SHA1 instructions implemented.
61*eca53ba6SRoland Levillain // - 0b0001 SHA1C, SHA1P, SHA1M, SHA1H, SHA1SU0, and SHA1SU1 instructions
62*eca53ba6SRoland Levillain //   implemented.
63*eca53ba6SRoland Levillain //
64*eca53ba6SRoland Levillain // FEAT_SHA1 implements the functionality identified by the value 0b0001.
65*eca53ba6SRoland Levillain // From Armv8, the permitted values are 0b0000 and 0b0001.
66*eca53ba6SRoland Levillain // If the value of ID_AA64ISAR0_EL1.SHA2 is 0b0000, this field must have the
67*eca53ba6SRoland Levillain // value 0b0000.
68*eca53ba6SRoland Levillain //
69*eca53ba6SRoland Levillain // ID_AA64ISAR0_EL1.SHA2, bits [15:12]:
70*eca53ba6SRoland Levillain // Indicates support for SHA2 instructions in AArch64 state. Defined values are:
71*eca53ba6SRoland Levillain // - 0b0000 No SHA2 instructions implemented.
72*eca53ba6SRoland Levillain // - 0b0001 Implements instructions: SHA256H, SHA256H2, SHA256SU0, and
73*eca53ba6SRoland Levillain //   SHA256SU1.
74*eca53ba6SRoland Levillain // - 0b0010 Implements instructions:
75*eca53ba6SRoland Levillain //          • SHA256H, SHA256H2, SHA256SU0, and SHA256SU1.
76*eca53ba6SRoland Levillain //          • SHA512H, SHA512H2, SHA512SU0, and SHA512SU1.
77*eca53ba6SRoland Levillain //
78*eca53ba6SRoland Levillain // FEAT_SHA256 implements the functionality identified by the value 0b0001.
79*eca53ba6SRoland Levillain // FEAT_SHA512 implements the functionality identified by the value 0b0010.
80*eca53ba6SRoland Levillain //
81*eca53ba6SRoland Levillain // In Armv8, the permitted values are 0b0000 and 0b0001.
82*eca53ba6SRoland Levillain // From Armv8.2, the permitted values are 0b0000, 0b0001, and 0b0010.
83*eca53ba6SRoland Levillain //
84*eca53ba6SRoland Levillain // If the value of ID_AA64ISAR0_EL1.SHA1 is 0b0000, this field must have the
85*eca53ba6SRoland Levillain // value 0b0000.
86*eca53ba6SRoland Levillain //
87*eca53ba6SRoland Levillain // If the value of this field is 0b0010, ID_AA64ISAR0_EL1.SHA3
88*eca53ba6SRoland Levillain // must have the value 0b0001.
89*eca53ba6SRoland Levillain //
90*eca53ba6SRoland Levillain // Other cryptographic features that we cannot detect such as sha512, sha3, sm3,
91*eca53ba6SRoland Levillain // sm4, sveaes, svepmull, svesha3, svesm4 we set to 0.
92*eca53ba6SRoland Levillain //
93*eca53ba6SRoland Levillain // FP/SIMD:
94*eca53ba6SRoland Levillain // -----------------------------------------------------------------------------
95*eca53ba6SRoland Levillain // FP/SIMD must be implemented on all Armv8.0 implementations, but
96*eca53ba6SRoland Levillain // implementations targeting specialized markets may support the following
97*eca53ba6SRoland Levillain // combinations:
98*eca53ba6SRoland Levillain //
99*eca53ba6SRoland Levillain // • No NEON or floating-point.
100*eca53ba6SRoland Levillain // • Full floating-point and SIMD support with exception trapping.
101*eca53ba6SRoland Levillain // • Full floating-point and SIMD support without exception trapping.
102*eca53ba6SRoland Levillain //
103*eca53ba6SRoland Levillain // ref:
104*eca53ba6SRoland Levillain // https://developer.arm.com/documentation/den0024/a/AArch64-Floating-point-and-NEON
105*eca53ba6SRoland Levillain //
106*eca53ba6SRoland Levillain // So, we use `PF_ARM_VFP_32_REGISTERS_AVAILABLE`,
107*eca53ba6SRoland Levillain // `PF_ARM_NEON_INSTRUCTIONS_AVAILABLE` to detect `asimd` and `fp`
108*eca53ba6SRoland Levillain 
109*eca53ba6SRoland Levillain #ifndef CPU_FEATURES_INCLUDE_CPUINFO_AARCH64_H_
110*eca53ba6SRoland Levillain #define CPU_FEATURES_INCLUDE_CPUINFO_AARCH64_H_
111*eca53ba6SRoland Levillain 
112*eca53ba6SRoland Levillain #include "cpu_features_cache_info.h"
113*eca53ba6SRoland Levillain #include "cpu_features_macros.h"
114*eca53ba6SRoland Levillain 
115*eca53ba6SRoland Levillain CPU_FEATURES_START_CPP_NAMESPACE
116*eca53ba6SRoland Levillain 
117*eca53ba6SRoland Levillain typedef struct {
118*eca53ba6SRoland Levillain   int fp : 1;          // Floating-point.
119*eca53ba6SRoland Levillain   int asimd : 1;       // Advanced SIMD.
120*eca53ba6SRoland Levillain   int evtstrm : 1;     // Generic timer generated events.
121*eca53ba6SRoland Levillain   int aes : 1;         // Hardware-accelerated Advanced Encryption Standard.
122*eca53ba6SRoland Levillain   int pmull : 1;       // Polynomial multiply long.
123*eca53ba6SRoland Levillain   int sha1 : 1;        // Hardware-accelerated SHA1.
124*eca53ba6SRoland Levillain   int sha2 : 1;        // Hardware-accelerated SHA2-256.
125*eca53ba6SRoland Levillain   int crc32 : 1;       // Hardware-accelerated CRC-32.
126*eca53ba6SRoland Levillain   int atomics : 1;     // Armv8.1 atomic instructions.
127*eca53ba6SRoland Levillain   int fphp : 1;        // Half-precision floating point support.
128*eca53ba6SRoland Levillain   int asimdhp : 1;     // Advanced SIMD half-precision support.
129*eca53ba6SRoland Levillain   int cpuid : 1;       // Access to certain ID registers.
130*eca53ba6SRoland Levillain   int asimdrdm : 1;    // Rounding Double Multiply Accumulate/Subtract.
131*eca53ba6SRoland Levillain   int jscvt : 1;       // Support for JavaScript conversion.
132*eca53ba6SRoland Levillain   int fcma : 1;        // Floating point complex numbers.
133*eca53ba6SRoland Levillain   int lrcpc : 1;       // Support for weaker release consistency.
134*eca53ba6SRoland Levillain   int dcpop : 1;       // Data persistence writeback.
135*eca53ba6SRoland Levillain   int sha3 : 1;        // Hardware-accelerated SHA3.
136*eca53ba6SRoland Levillain   int sm3 : 1;         // Hardware-accelerated SM3.
137*eca53ba6SRoland Levillain   int sm4 : 1;         // Hardware-accelerated SM4.
138*eca53ba6SRoland Levillain   int asimddp : 1;     // Dot product instruction.
139*eca53ba6SRoland Levillain   int sha512 : 1;      // Hardware-accelerated SHA512.
140*eca53ba6SRoland Levillain   int sve : 1;         // Scalable Vector Extension.
141*eca53ba6SRoland Levillain   int asimdfhm : 1;    // Additional half-precision instructions.
142*eca53ba6SRoland Levillain   int dit : 1;         // Data independent timing.
143*eca53ba6SRoland Levillain   int uscat : 1;       // Unaligned atomics support.
144*eca53ba6SRoland Levillain   int ilrcpc : 1;      // Additional support for weaker release consistency.
145*eca53ba6SRoland Levillain   int flagm : 1;       // Flag manipulation instructions.
146*eca53ba6SRoland Levillain   int ssbs : 1;        // Speculative Store Bypass Safe PSTATE bit.
147*eca53ba6SRoland Levillain   int sb : 1;          // Speculation barrier.
148*eca53ba6SRoland Levillain   int paca : 1;        // Address authentication.
149*eca53ba6SRoland Levillain   int pacg : 1;        // Generic authentication.
150*eca53ba6SRoland Levillain   int dcpodp : 1;      // Data cache clean to point of persistence.
151*eca53ba6SRoland Levillain   int sve2 : 1;        // Scalable Vector Extension (version 2).
152*eca53ba6SRoland Levillain   int sveaes : 1;      // SVE AES instructions.
153*eca53ba6SRoland Levillain   int svepmull : 1;    // SVE polynomial multiply long instructions.
154*eca53ba6SRoland Levillain   int svebitperm : 1;  // SVE bit permute instructions.
155*eca53ba6SRoland Levillain   int svesha3 : 1;     // SVE SHA3 instructions.
156*eca53ba6SRoland Levillain   int svesm4 : 1;      // SVE SM4 instructions.
157*eca53ba6SRoland Levillain   int flagm2 : 1;      // Additional flag manipulation instructions.
158*eca53ba6SRoland Levillain   int frint : 1;       // Floating point to integer rounding.
159*eca53ba6SRoland Levillain   int svei8mm : 1;     // SVE Int8 matrix multiplication instructions.
160*eca53ba6SRoland Levillain   int svef32mm : 1;    // SVE FP32 matrix multiplication instruction.
161*eca53ba6SRoland Levillain   int svef64mm : 1;    // SVE FP64 matrix multiplication instructions.
162*eca53ba6SRoland Levillain   int svebf16 : 1;     // SVE BFloat16 instructions.
163*eca53ba6SRoland Levillain   int i8mm : 1;        // Int8 matrix multiplication instructions.
164*eca53ba6SRoland Levillain   int bf16 : 1;        // BFloat16 instructions.
165*eca53ba6SRoland Levillain   int dgh : 1;         // Data Gathering Hint instruction.
166*eca53ba6SRoland Levillain   int rng : 1;         // True random number generator support.
167*eca53ba6SRoland Levillain   int bti : 1;         // Branch target identification.
168*eca53ba6SRoland Levillain   int mte : 1;         // Memory tagging extension.
169*eca53ba6SRoland Levillain   int ecv : 1;         // Enhanced counter virtualization.
170*eca53ba6SRoland Levillain   int afp : 1;         // Alternate floating-point behaviour.
171*eca53ba6SRoland Levillain   int rpres : 1;       // 12-bit reciprocal (square root) estimate precision.
172*eca53ba6SRoland Levillain   int mte3 : 1;        // MTE asymmetric fault handling.
173*eca53ba6SRoland Levillain   int sme : 1;         // Scalable Matrix Extension.
174*eca53ba6SRoland Levillain   int smei16i64 : 1;   // 16-bit to 64-bit integer widening outer product.
175*eca53ba6SRoland Levillain   int smef64f64 : 1;   // FP64 to FP64 outer product.
176*eca53ba6SRoland Levillain   int smei8i32 : 1;    // 8-bit to 32-bit integer widening outer product.
177*eca53ba6SRoland Levillain   int smef16f32 : 1;   // FP16 to FP32 outer product.
178*eca53ba6SRoland Levillain   int smeb16f32 : 1;   // BFloat16 to FP32 outper product.
179*eca53ba6SRoland Levillain   int smef32f32 : 1;   // FP32 to FP32 outer product.
180*eca53ba6SRoland Levillain   int smefa64 : 1;     // Full A64 support for SME in streaming mode.
181*eca53ba6SRoland Levillain   int wfxt : 1;        // WFE and WFI with timeout.
182*eca53ba6SRoland Levillain   int ebf16 : 1;       // Extended BFloat16 instructions.
183*eca53ba6SRoland Levillain   int sveebf16 : 1;    // SVE BFloat16 instructions.
184*eca53ba6SRoland Levillain   int cssc : 1;        // Common short sequence compression instructions.
185*eca53ba6SRoland Levillain   int rprfm : 1;       // Range Prefetch Memory hint instruction.
186*eca53ba6SRoland Levillain   int sve2p1 : 1;      // Scalable Vector Extension (version 2.1).
187*eca53ba6SRoland Levillain   int sme2 : 1;        // Scalable Matrix Extension (version 2).
188*eca53ba6SRoland Levillain   int sme2p1 : 1;      // Scalable Matrix Extension (version 2.1).
189*eca53ba6SRoland Levillain   int smei16i32 : 1;   // 16-bit to 64-bit integer widening outer product.
190*eca53ba6SRoland Levillain   int smebi32i32 : 1;  // 1-bit binary to 32-bit integer outer product.
191*eca53ba6SRoland Levillain   int smeb16b16 : 1;   // SME2.1 BFloat16 instructions.
192*eca53ba6SRoland Levillain   int smef16f16 : 1;   // FP16 to FP16 outer product.
193*eca53ba6SRoland Levillain 
194*eca53ba6SRoland Levillain   // Make sure to update Aarch64FeaturesEnum below if you add a field here.
195*eca53ba6SRoland Levillain } Aarch64Features;
196*eca53ba6SRoland Levillain 
197*eca53ba6SRoland Levillain typedef struct {
198*eca53ba6SRoland Levillain   Aarch64Features features;
199*eca53ba6SRoland Levillain   int implementer;  // We set 0 for Windows.
200*eca53ba6SRoland Levillain   int variant;      // We set 0 for Windows.
201*eca53ba6SRoland Levillain   int part;         // We set 0 for Windows.
202*eca53ba6SRoland Levillain   int revision;     // We use GetNativeSystemInfo to get processor revision for
203*eca53ba6SRoland Levillain                     // Windows.
204*eca53ba6SRoland Levillain } Aarch64Info;
205*eca53ba6SRoland Levillain 
206*eca53ba6SRoland Levillain Aarch64Info GetAarch64Info(void);
207*eca53ba6SRoland Levillain 
208*eca53ba6SRoland Levillain ////////////////////////////////////////////////////////////////////////////////
209*eca53ba6SRoland Levillain // Introspection functions
210*eca53ba6SRoland Levillain 
211*eca53ba6SRoland Levillain typedef enum {
212*eca53ba6SRoland Levillain   AARCH64_FP,
213*eca53ba6SRoland Levillain   AARCH64_ASIMD,
214*eca53ba6SRoland Levillain   AARCH64_EVTSTRM,
215*eca53ba6SRoland Levillain   AARCH64_AES,
216*eca53ba6SRoland Levillain   AARCH64_PMULL,
217*eca53ba6SRoland Levillain   AARCH64_SHA1,
218*eca53ba6SRoland Levillain   AARCH64_SHA2,
219*eca53ba6SRoland Levillain   AARCH64_CRC32,
220*eca53ba6SRoland Levillain   AARCH64_ATOMICS,
221*eca53ba6SRoland Levillain   AARCH64_FPHP,
222*eca53ba6SRoland Levillain   AARCH64_ASIMDHP,
223*eca53ba6SRoland Levillain   AARCH64_CPUID,
224*eca53ba6SRoland Levillain   AARCH64_ASIMDRDM,
225*eca53ba6SRoland Levillain   AARCH64_JSCVT,
226*eca53ba6SRoland Levillain   AARCH64_FCMA,
227*eca53ba6SRoland Levillain   AARCH64_LRCPC,
228*eca53ba6SRoland Levillain   AARCH64_DCPOP,
229*eca53ba6SRoland Levillain   AARCH64_SHA3,
230*eca53ba6SRoland Levillain   AARCH64_SM3,
231*eca53ba6SRoland Levillain   AARCH64_SM4,
232*eca53ba6SRoland Levillain   AARCH64_ASIMDDP,
233*eca53ba6SRoland Levillain   AARCH64_SHA512,
234*eca53ba6SRoland Levillain   AARCH64_SVE,
235*eca53ba6SRoland Levillain   AARCH64_ASIMDFHM,
236*eca53ba6SRoland Levillain   AARCH64_DIT,
237*eca53ba6SRoland Levillain   AARCH64_USCAT,
238*eca53ba6SRoland Levillain   AARCH64_ILRCPC,
239*eca53ba6SRoland Levillain   AARCH64_FLAGM,
240*eca53ba6SRoland Levillain   AARCH64_SSBS,
241*eca53ba6SRoland Levillain   AARCH64_SB,
242*eca53ba6SRoland Levillain   AARCH64_PACA,
243*eca53ba6SRoland Levillain   AARCH64_PACG,
244*eca53ba6SRoland Levillain   AARCH64_DCPODP,
245*eca53ba6SRoland Levillain   AARCH64_SVE2,
246*eca53ba6SRoland Levillain   AARCH64_SVEAES,
247*eca53ba6SRoland Levillain   AARCH64_SVEPMULL,
248*eca53ba6SRoland Levillain   AARCH64_SVEBITPERM,
249*eca53ba6SRoland Levillain   AARCH64_SVESHA3,
250*eca53ba6SRoland Levillain   AARCH64_SVESM4,
251*eca53ba6SRoland Levillain   AARCH64_FLAGM2,
252*eca53ba6SRoland Levillain   AARCH64_FRINT,
253*eca53ba6SRoland Levillain   AARCH64_SVEI8MM,
254*eca53ba6SRoland Levillain   AARCH64_SVEF32MM,
255*eca53ba6SRoland Levillain   AARCH64_SVEF64MM,
256*eca53ba6SRoland Levillain   AARCH64_SVEBF16,
257*eca53ba6SRoland Levillain   AARCH64_I8MM,
258*eca53ba6SRoland Levillain   AARCH64_BF16,
259*eca53ba6SRoland Levillain   AARCH64_DGH,
260*eca53ba6SRoland Levillain   AARCH64_RNG,
261*eca53ba6SRoland Levillain   AARCH64_BTI,
262*eca53ba6SRoland Levillain   AARCH64_MTE,
263*eca53ba6SRoland Levillain   AARCH64_ECV,
264*eca53ba6SRoland Levillain   AARCH64_AFP,
265*eca53ba6SRoland Levillain   AARCH64_RPRES,
266*eca53ba6SRoland Levillain   AARCH64_MTE3,
267*eca53ba6SRoland Levillain   AARCH64_SME,
268*eca53ba6SRoland Levillain   AARCH64_SME_I16I64,
269*eca53ba6SRoland Levillain   AARCH64_SME_F64F64,
270*eca53ba6SRoland Levillain   AARCH64_SME_I8I32,
271*eca53ba6SRoland Levillain   AARCH64_SME_F16F32,
272*eca53ba6SRoland Levillain   AARCH64_SME_B16F32,
273*eca53ba6SRoland Levillain   AARCH64_SME_F32F32,
274*eca53ba6SRoland Levillain   AARCH64_SME_FA64,
275*eca53ba6SRoland Levillain   AARCH64_WFXT,
276*eca53ba6SRoland Levillain   AARCH64_EBF16,
277*eca53ba6SRoland Levillain   AARCH64_SVE_EBF16,
278*eca53ba6SRoland Levillain   AARCH64_CSSC,
279*eca53ba6SRoland Levillain   AARCH64_RPRFM,
280*eca53ba6SRoland Levillain   AARCH64_SVE2P1,
281*eca53ba6SRoland Levillain   AARCH64_SME2,
282*eca53ba6SRoland Levillain   AARCH64_SME2P1,
283*eca53ba6SRoland Levillain   AARCH64_SME_I16I32,
284*eca53ba6SRoland Levillain   AARCH64_SME_BI32I32,
285*eca53ba6SRoland Levillain   AARCH64_SME_B16B16,
286*eca53ba6SRoland Levillain   AARCH64_SME_F16F16,
287*eca53ba6SRoland Levillain   AARCH64_LAST_,
288*eca53ba6SRoland Levillain } Aarch64FeaturesEnum;
289*eca53ba6SRoland Levillain 
290*eca53ba6SRoland Levillain int GetAarch64FeaturesEnumValue(const Aarch64Features* features,
291*eca53ba6SRoland Levillain                                 Aarch64FeaturesEnum value);
292*eca53ba6SRoland Levillain 
293*eca53ba6SRoland Levillain const char* GetAarch64FeaturesEnumName(Aarch64FeaturesEnum);
294*eca53ba6SRoland Levillain 
295*eca53ba6SRoland Levillain CPU_FEATURES_END_CPP_NAMESPACE
296*eca53ba6SRoland Levillain 
297*eca53ba6SRoland Levillain #if !defined(CPU_FEATURES_ARCH_AARCH64)
298*eca53ba6SRoland Levillain #error "Including cpuinfo_aarch64.h from a non-aarch64 target."
299*eca53ba6SRoland Levillain #endif
300*eca53ba6SRoland Levillain 
301*eca53ba6SRoland Levillain #endif  // CPU_FEATURES_INCLUDE_CPUINFO_AARCH64_H_
302