1 /* CPU feature detection for AArch64 architecture. 2 Copyright (C) 2023-2024 Free Software Foundation, Inc. 3 4 This file is part of GCC. 5 6 This file is free software; you can redistribute it and/or modify it 7 under the terms of the GNU General Public License as published by the 8 Free Software Foundation; either version 3, or (at your option) any 9 later version. 10 11 This file is distributed in the hope that it will be useful, but 12 WITHOUT ANY WARRANTY; without even the implied warranty of 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 General Public License for more details. 15 16 Under Section 7 of GPL version 3, you are granted additional 17 permissions described in the GCC Runtime Library Exception, version 18 3.1, as published by the Free Software Foundation. 19 20 You should have received a copy of the GNU General Public License and 21 a copy of the GCC Runtime Library Exception along with this program; 22 see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 23 <http://www.gnu.org/licenses/>. */ 24 25 /* This enum is used in libgcc feature detection, and in the function 26 multiversioning implementation in aarch64.cc. The enum should use the same 27 values as the corresponding enum in LLVM's compiler-rt, to faciliate 28 compatibility between compilers. */ 29 30 enum CPUFeatures { 31 FEAT_RNG, 32 FEAT_FLAGM, 33 FEAT_FLAGM2, 34 FEAT_FP16FML, 35 FEAT_DOTPROD, 36 FEAT_SM4, 37 FEAT_RDM, 38 FEAT_LSE, 39 FEAT_FP, 40 FEAT_SIMD, 41 FEAT_CRC, 42 FEAT_SHA1, 43 FEAT_SHA2, 44 FEAT_SHA3, 45 FEAT_AES, 46 FEAT_PMULL, 47 FEAT_FP16, 48 FEAT_DIT, 49 FEAT_DPB, 50 FEAT_DPB2, 51 FEAT_JSCVT, 52 FEAT_FCMA, 53 FEAT_RCPC, 54 FEAT_RCPC2, 55 FEAT_FRINTTS, 56 FEAT_DGH, 57 FEAT_I8MM, 58 FEAT_BF16, 59 FEAT_EBF16, 60 FEAT_RPRES, 61 FEAT_SVE, 62 FEAT_SVE_BF16, 63 FEAT_SVE_EBF16, 64 FEAT_SVE_I8MM, 65 FEAT_SVE_F32MM, 66 FEAT_SVE_F64MM, 67 FEAT_SVE2, 68 FEAT_SVE_AES, 69 FEAT_SVE_PMULL128, 70 FEAT_SVE_BITPERM, 71 FEAT_SVE_SHA3, 72 FEAT_SVE_SM4, 73 FEAT_SME, 74 FEAT_MEMTAG, 75 FEAT_MEMTAG2, 76 FEAT_MEMTAG3, 77 FEAT_SB, 78 FEAT_PREDRES, 79 FEAT_SSBS, 80 FEAT_SSBS2, 81 FEAT_BTI, 82 FEAT_LS64, 83 FEAT_LS64_V, 84 FEAT_LS64_ACCDATA, 85 FEAT_WFXT, 86 FEAT_SME_F64, 87 FEAT_SME_I64, 88 FEAT_SME2, 89 FEAT_RCPC3, 90 FEAT_MAX, 91 FEAT_EXT = 62, /* Reserved to indicate presence of additional features field 92 in __aarch64_cpu_features. */ 93 FEAT_INIT /* Used as flag of features initialization completion. */ 94 }; 95