1 /* Copyright (C
) 2012-2018 Free Software Foundation
, Inc.
2 Contributed by ARM Ltd.
4 This file is part of GCC.
6 GCC is free software
; you can redistribute it and
/or modify it
7 under the terms of the GNU General Public License as published by
8 the Free Software Foundation
; either version
3, or (at your option
)
11 GCC 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.
16 You should have received a copy of the GNU General Public License
17 along with GCC
; see the file COPYING3. If not see
18 <http
://www.gnu.org
/licenses
/>.
*/
20 /* This is a list of ISA extentsions in AArch64.
22 Before using #include to read this file
, define a macro
:
24 AARCH64_OPT_EXTENSION(EXT_NAME
, FLAG_CANONICAL
, FLAGS_ON
, FLAGS_OFF
, FEATURE_STRING
)
26 EXT_NAME is the name of the extension
, represented as a string constant.
27 FLAGS_CANONICAL is the canonical internal name for this flag.
28 FLAGS_ON are the bitwise
-or of the features that enabling the extension
29 adds
, or zero if enabling this extension has no effect on other features.
30 FLAGS_OFF are the bitwise
-or of the features that disabling the extension
31 removes
, or zero if disabling this extension has no effect on other
33 FEAT_STRING is a string containing the entries in the
'Features' field of
34 /proc
/cpuinfo on a GNU
/Linux system that correspond to this architecture
35 extension being available. Sometimes multiple entries are needed to enable
36 the
extension (for example
, the
'crypto' extension depends on four
37 entries
: aes
, pmull
, sha1
, sha2 being present
). In that case this field
38 should contain a
space (" ") separated list of the strings in
'Features'
39 that are required. Their order is not important.
*/
41 /* Enabling
"fp" just enables
"fp".
42 Disabling
"fp" also disables
"simd", "crypto", "fp16", "aes", "sha2",
43 "sha3", sm3
/sm4 and
"sve".
*/
44 AARCH64_OPT_EXTENSION("fp", AARCH64_FL_FP
, 0, AARCH64_FL_SIMD | AARCH64_FL_CRYPTO |\
45 AARCH64_FL_F16 | AARCH64_FL_AES | AARCH64_FL_SHA2 |\
46 AARCH64_FL_SHA3 | AARCH64_FL_SM4 | AARCH64_FL_SVE
, "fp")
48 /* Enabling
"simd" also enables
"fp".
49 Disabling
"simd" also disables
"crypto", "dotprod", "aes", "sha2", "sha3",
50 "sm3/sm4" and
"sve".
*/
51 AARCH64_OPT_EXTENSION("simd", AARCH64_FL_SIMD
, AARCH64_FL_FP
, AARCH64_FL_CRYPTO |\
52 AARCH64_FL_DOTPROD | AARCH64_FL_AES | AARCH64_FL_SHA2 |\
53 AARCH64_FL_SHA3 | AARCH64_FL_SM4 | AARCH64_FL_SVE
,
56 /* Enabling
"crypto" also enables
"fp" and
"simd".
57 Disabling
"crypto" disables
"crypto", "aes", "sha2", "sha3" and
"sm3/sm4".
*/
58 AARCH64_OPT_EXTENSION("crypto", AARCH64_FL_CRYPTO
, AARCH64_FL_FP | AARCH64_FL_SIMD
,\
59 AARCH64_FL_AES | AARCH64_FL_SHA2 |AARCH64_FL_SHA3 | AARCH64_FL_SM4
,\
60 "aes pmull sha1 sha2")
62 /* Enabling or disabling
"crc" only changes
"crc".
*/
63 AARCH64_OPT_EXTENSION("crc", AARCH64_FL_CRC
, 0, 0, "crc32")
65 /* Enabling or disabling
"lse" only changes
"lse".
*/
66 AARCH64_OPT_EXTENSION("lse", AARCH64_FL_LSE
, 0, 0, "atomics")
68 /* Enabling
"fp16" also enables
"fp".
69 Disabling
"fp16" disables
"fp16", "fp16fml" and
"sve".
*/
70 AARCH64_OPT_EXTENSION("fp16", AARCH64_FL_F16
, AARCH64_FL_FP
,
71 AARCH64_FL_F16FML | AARCH64_FL_SVE
, "fphp asimdhp")
73 /* Enabling or disabling
"rcpc" only changes
"rcpc".
*/
74 AARCH64_OPT_EXTENSION("rcpc", AARCH64_FL_RCPC
, 0, 0, "lrcpc")
76 /* Enabling
"rdma" also enables
"fp", "simd".
77 Disabling
"rdma" just disables
"rdma".
*/
78 AARCH64_OPT_EXTENSION("rdma", AARCH64_FL_RDMA
, AARCH64_FL_FP | AARCH64_FL_SIMD
, 0, "asimdrdm")
80 /* Enabling
"dotprod" also enables
"simd".
81 Disabling
"dotprod" only disables
"dotprod".
*/
82 AARCH64_OPT_EXTENSION("dotprod", AARCH64_FL_DOTPROD
, AARCH64_FL_SIMD
, 0, "asimddp")
84 /* Enabling
"aes" also enables
"simd".
85 Disabling
"aes" just disables
"aes".
*/
86 AARCH64_OPT_EXTENSION("aes", AARCH64_FL_AES
, AARCH64_FL_SIMD
, 0, "aes")
88 /* Enabling
"sha2" also enables
"simd".
89 Disabling
"sha2" just disables
"sha2".
*/
90 AARCH64_OPT_EXTENSION("sha2", AARCH64_FL_SHA2
, AARCH64_FL_SIMD
, 0, "sha1 sha2")
92 /* Enabling
"sha3" enables
"simd" and
"sha2".
93 Disabling
"sha3" just disables
"sha3".
*/
94 AARCH64_OPT_EXTENSION("sha3", AARCH64_FL_SHA3
, AARCH64_FL_SIMD | AARCH64_FL_SHA2
, 0, "sha3 sha512")
96 /* Enabling
"sm4" also enables
"simd".
97 Disabling
"sm4" just disables
"sm4".
*/
98 AARCH64_OPT_EXTENSION("sm4", AARCH64_FL_SM4
, AARCH64_FL_SIMD
, 0, "sm3 sm4")
100 /* Enabling
"fp16fml" also enables
"fp" and
"fp16".
101 Disabling
"fp16fml" just disables
"fp16fml".
*/
102 AARCH64_OPT_EXTENSION("fp16fml", AARCH64_FL_F16FML
, AARCH64_FL_FP | AARCH64_FL_F16
, 0, "asimdfml")
104 /* Enabling
"sve" also enables
"fp16", "fp" and
"simd".
105 Disabling
"sve" just disables
"sve".
*/
106 AARCH64_OPT_EXTENSION("sve", AARCH64_FL_SVE
, AARCH64_FL_FP | AARCH64_FL_SIMD | AARCH64_FL_F16
, 0, "sve")
108 /* Enabling
/Disabling
"profile" does not enable
/disable any other feature.
*/
109 AARCH64_OPT_EXTENSION("profile", AARCH64_FL_PROFILE
, 0, 0, "")
111 #undef AARCH64_OPT_EXTENSION