1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
|
/* Copyright (C) 2012-2020 Free Software Foundation, Inc.
Contributed by ARM Ltd.
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3, or (at your option)
any later version.
GCC is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
/* This is a list of ISA extentsions in AArch64.
Before using #include to read this file, define a macro:
AARCH64_OPT_EXTENSION(EXT_NAME, FLAG_CANONICAL, FLAGS_ON, FLAGS_OFF,
SYNTHETIC, FEATURE_STRING)
- EXT_NAME is the name of the extension, represented as a string constant.
- FLAGS_CANONICAL is the canonical internal name for this flag.
- FLAGS_ON are the bitwise-or of the features that enabling the extension
adds, or zero if enabling this extension has no effect on other features.
- FLAGS_OFF are the bitwise-or of the features that disabling the extension
removes, or zero if disabling this extension has no effect on other
features.
- SYNTHETIC is a boolean to indicate whether the option is a purely synthetic
grouping of options and that the option itself has no feature bit (e.g.
crypto). This is used to determine when sum of the individual options in
FLAGS_ON can be replaced by FLAG_CANONICAL in options minimization. If the
group is synthetic then they can be replaced when all options in FLAGS_ON
are enabled, otherwise they can only be replaced when
FLAGS_ON | FLAG_CANONICAL are enabled.
- FEAT_STRING is a string containing the entries in the 'Features' field of
/proc/cpuinfo on a GNU/Linux system that correspond to this architecture
extension being available. Sometimes multiple entries are needed to enable
the extension (for example, the 'crypto' extension depends on four
entries: aes, pmull, sha1, sha2 being present). In that case this field
should contain a space (" ") separated list of the strings in 'Features'
that are required. Their order is not important. An empty string means
do not detect this feature during auto detection.
NOTE: Any changes to the AARCH64_OPT_EXTENSION macro need to be mirrored in
config.gcc. */
/* Enabling "fp" just enables "fp".
Disabling "fp" also disables "simd", "crypto", "fp16", "aes", "sha2",
"sha3", sm3/sm4, "sve", "sve2", "sve2-aes", "sve2-sha3", "sve2-sm4",
"sve2-bitperm", "i8mm", "f32mm", "f64mm", and "bf16". */
AARCH64_OPT_EXTENSION("fp", AARCH64_FL_FP, 0, AARCH64_FL_SIMD | \
AARCH64_FL_CRYPTO | AARCH64_FL_F16 | AARCH64_FL_AES | \
AARCH64_FL_SHA2 | AARCH64_FL_SHA3 | AARCH64_FL_SM4 | \
AARCH64_FL_SVE | AARCH64_FL_SVE2 | AARCH64_FL_SVE2_AES | \
AARCH64_FL_SVE2_SHA3 | AARCH64_FL_SVE2_SM4 | \
AARCH64_FL_SVE2_BITPERM | AARCH64_FL_I8MM | \
AARCH64_FL_F32MM | AARCH64_FL_F64MM | AARCH64_FL_BF16,
false, "fp")
/* Enabling "simd" also enables "fp".
Disabling "simd" also disables "crypto", "dotprod", "aes", "sha2", "sha3",
"sm3/sm4", "sve", "sve2", "sve2-aes", "sve2-sha3", "sve2-sm4",
"sve2-bitperm", "i8mm", "f32mm" and "f64mm". */
AARCH64_OPT_EXTENSION("simd", AARCH64_FL_SIMD, AARCH64_FL_FP, \
AARCH64_FL_CRYPTO | AARCH64_FL_DOTPROD | \
AARCH64_FL_AES | AARCH64_FL_SHA2 | AARCH64_FL_SHA3 | \
AARCH64_FL_SM4 | AARCH64_FL_SVE | AARCH64_FL_SVE2 | \
AARCH64_FL_SVE2_AES | AARCH64_FL_SVE2_SHA3 | \
AARCH64_FL_SVE2_SM4 | AARCH64_FL_SVE2_BITPERM | \
AARCH64_FL_I8MM | AARCH64_FL_F32MM | AARCH64_FL_F64MM, \
false, "asimd")
/* Enabling "crypto" also enables "fp", "simd", "aes" and "sha2".
Disabling "crypto" disables "crypto", "aes", "sha2", "sha3" and "sm3/sm4",
"sve2-aes", "sve2-sha3", "sve2-sm4". */
AARCH64_OPT_EXTENSION("crypto", AARCH64_FL_CRYPTO, AARCH64_FL_FP | \
AARCH64_FL_SIMD | AARCH64_FL_AES | AARCH64_FL_SHA2, \
AARCH64_FL_AES | AARCH64_FL_SHA2 | AARCH64_FL_SHA3 | \
AARCH64_FL_SM4 | AARCH64_FL_SVE2_AES | \
AARCH64_FL_SVE2_SHA3 | AARCH64_FL_SVE2_SM4, true, \
"aes pmull sha1 sha2")
/* Enabling or disabling "crc" only changes "crc". */
AARCH64_OPT_EXTENSION("crc", AARCH64_FL_CRC, 0, 0, false, "crc32")
/* Enabling or disabling "lse" only changes "lse". */
AARCH64_OPT_EXTENSION("lse", AARCH64_FL_LSE, 0, 0, false, "atomics")
/* Enabling "fp16" also enables "fp".
Disabling "fp16" disables "fp16", "fp16fml", "sve", "sve2",
"sve2-aes", "sve2-sha3", "sve2-sm4", "sve2-bitperm", "f32mm" and
"f64mm". */
AARCH64_OPT_EXTENSION("fp16", AARCH64_FL_F16, AARCH64_FL_FP, \
AARCH64_FL_F16FML | AARCH64_FL_SVE | AARCH64_FL_F32MM | \
AARCH64_FL_F64MM | AARCH64_FL_SVE2 | \
AARCH64_FL_SVE2_AES | AARCH64_FL_SVE2_SHA3 | \
AARCH64_FL_SVE2_SM4 | AARCH64_FL_SVE2_BITPERM, false, \
"fphp asimdhp")
/* Enabling or disabling "rcpc" only changes "rcpc". */
AARCH64_OPT_EXTENSION("rcpc", AARCH64_FL_RCPC, 0, 0, false, "lrcpc")
/* Enabling "rdma" also enables "fp", "simd".
Disabling "rdma" just disables "rdma". */
AARCH64_OPT_EXTENSION("rdma", AARCH64_FL_RDMA, \
AARCH64_FL_FP | AARCH64_FL_SIMD, 0, false, "asimdrdm")
/* Enabling "dotprod" also enables "simd".
Disabling "dotprod" only disables "dotprod". */
AARCH64_OPT_EXTENSION("dotprod", AARCH64_FL_DOTPROD, AARCH64_FL_SIMD, 0, \
false, "asimddp")
/* Enabling "aes" also enables "simd".
Disabling "aes" disables "aes" and "sve2-aes'. */
AARCH64_OPT_EXTENSION("aes", AARCH64_FL_AES, AARCH64_FL_SIMD, \
AARCH64_FL_SVE2_AES, false, "aes")
/* Enabling "sha2" also enables "simd".
Disabling "sha2" just disables "sha2". */
AARCH64_OPT_EXTENSION("sha2", AARCH64_FL_SHA2, AARCH64_FL_SIMD, 0, false, \
"sha1 sha2")
/* Enabling "sha3" enables "simd" and "sha2".
Disabling "sha3" disables "sha3" and "sve2-sha3". */
AARCH64_OPT_EXTENSION("sha3", AARCH64_FL_SHA3, AARCH64_FL_SIMD | \
AARCH64_FL_SHA2, AARCH64_FL_SVE2_SHA3, false, \
"sha3 sha512")
/* Enabling "sm4" also enables "simd".
Disabling "sm4" disables "sm4" and "sve2-sm4". */
AARCH64_OPT_EXTENSION("sm4", AARCH64_FL_SM4, AARCH64_FL_SIMD, \
AARCH64_FL_SVE2_SM4, false, "sm3 sm4")
/* Enabling "fp16fml" also enables "fp" and "fp16".
Disabling "fp16fml" just disables "fp16fml". */
AARCH64_OPT_EXTENSION("fp16fml", AARCH64_FL_F16FML, \
AARCH64_FL_FP | AARCH64_FL_F16, 0, false, "asimdfhm")
/* Enabling "sve" also enables "fp16", "fp" and "simd".
Disabling "sve" disables "sve", "f32mm", "f64mm", "sve2", "sve2-aes",
"sve2-sha3", "sve2-sm4" and "sve2-bitperm". */
AARCH64_OPT_EXTENSION("sve", AARCH64_FL_SVE, AARCH64_FL_FP | AARCH64_FL_SIMD | \
AARCH64_FL_F16, AARCH64_FL_F32MM | AARCH64_FL_F64MM | \
AARCH64_FL_SVE2 | AARCH64_FL_SVE2_AES | \
AARCH64_FL_SVE2_SHA3 | AARCH64_FL_SVE2_SM4 | \
AARCH64_FL_SVE2_BITPERM, false, "sve")
/* Enabling/Disabling "profile" does not enable/disable any other feature. */
AARCH64_OPT_EXTENSION("profile", AARCH64_FL_PROFILE, 0, 0, false, "")
/* Enabling/Disabling "rng" only changes "rng". */
AARCH64_OPT_EXTENSION("rng", AARCH64_FL_RNG, 0, 0, false, "rng")
/* Enabling/Disabling "memtag" only changes "memtag". */
AARCH64_OPT_EXTENSION("memtag", AARCH64_FL_MEMTAG, 0, 0, false, "")
/* Enabling/Disabling "sb" only changes "sb". */
AARCH64_OPT_EXTENSION("sb", AARCH64_FL_SB, 0, 0, false, "sb")
/* Enabling/Disabling "ssbs" only changes "ssbs". */
AARCH64_OPT_EXTENSION("ssbs", AARCH64_FL_SSBS, 0, 0, false, "ssbs")
/* Enabling/Disabling "predres" only changes "predres". */
AARCH64_OPT_EXTENSION("predres", AARCH64_FL_PREDRES, 0, 0, false, "")
/* Enabling "sve2" also enables "sve", "fp16", "fp", and "simd".
Disabling "sve2" disables "sve2", "sve2-aes", "sve2-sha3", "sve2-sm4", and
"sve2-bitperm". */
AARCH64_OPT_EXTENSION("sve2", AARCH64_FL_SVE2, AARCH64_FL_SVE | \
AARCH64_FL_FP | AARCH64_FL_SIMD | AARCH64_FL_F16, \
AARCH64_FL_SVE2_AES | AARCH64_FL_SVE2_SHA3 | \
AARCH64_FL_SVE2_SM4 | AARCH64_FL_SVE2_BITPERM, false, "sve2")
/* Enabling "sve2-sm4" also enables "sm4", "simd", "fp16", "fp", "sve", and
"sve2". Disabling "sve2-sm4" just disables "sve2-sm4". */
AARCH64_OPT_EXTENSION("sve2-sm4", AARCH64_FL_SVE2_SM4, AARCH64_FL_SM4 | \
AARCH64_FL_SIMD | AARCH64_FL_F16 | AARCH64_FL_FP | \
AARCH64_FL_SVE | AARCH64_FL_SVE2, 0, false, "svesm4")
/* Enabling "sve2-aes" also enables "aes", "simd", "fp16", "fp", "sve", and
"sve2". Disabling "sve2-aes" just disables "sve2-aes". */
AARCH64_OPT_EXTENSION("sve2-aes", AARCH64_FL_SVE2_AES, AARCH64_FL_AES | \
AARCH64_FL_SIMD | AARCH64_FL_F16 | AARCH64_FL_FP | \
AARCH64_FL_SVE | AARCH64_FL_SVE2, 0, false, "sveaes")
/* Enabling "sve2-sha3" also enables "sha3", "simd", "fp16", "fp", "sve", and
"sve2". Disabling "sve2-sha3" just disables "sve2-sha3". */
AARCH64_OPT_EXTENSION("sve2-sha3", AARCH64_FL_SVE2_SHA3, AARCH64_FL_SHA3 | \
AARCH64_FL_SIMD | AARCH64_FL_F16 | AARCH64_FL_FP | \
AARCH64_FL_SVE | AARCH64_FL_SVE2, 0, false, "svesha3")
/* Enabling "sve2-bitperm" also enables "simd", "fp16", "fp", "sve", and
"sve2". Disabling "sve2-bitperm" just disables "sve2-bitperm". */
AARCH64_OPT_EXTENSION("sve2-bitperm", AARCH64_FL_SVE2_BITPERM, AARCH64_FL_SIMD | \
AARCH64_FL_F16 | AARCH64_FL_FP | AARCH64_FL_SVE | \
AARCH64_FL_SVE2, 0, false, "svebitperm")
/* Enabling or disabling "tme" only changes "tme". */
AARCH64_OPT_EXTENSION("tme", AARCH64_FL_TME, 0, 0, false, "")
/* Enabling "i8mm" also enables "simd" and "fp".
Disabling "i8mm" only disables "i8mm". */
AARCH64_OPT_EXTENSION("i8mm", AARCH64_FL_I8MM, \
AARCH64_FL_SIMD | AARCH64_FL_FP, 0, false, "i8mm")
/* Enabling "f32mm" also enables "sve", "fp16", "fp", and "simd".
Disabling "f32mm" only disables "f32mm". */
AARCH64_OPT_EXTENSION("f32mm", AARCH64_FL_F32MM, \
AARCH64_FL_SVE | AARCH64_FL_F16 | AARCH64_FL_FP | \
AARCH64_FL_SIMD, 0, false, "f32mm")
/* Enabling "f64mm" also enables "sve", "fp16", "fp", and "simd".
Disabling "f64mm" only disables "f64mm". */
AARCH64_OPT_EXTENSION("f64mm", AARCH64_FL_F64MM, \
AARCH64_FL_SVE | AARCH64_FL_F16 | AARCH64_FL_FP | \
AARCH64_FL_SIMD, 0, false, "f64mm")
/* Enabling "bf16" also enables "simd" and "fp".
Disabling "bf16" only disables "bf16". */
AARCH64_OPT_EXTENSION("bf16", AARCH64_FL_BF16, \
AARCH64_FL_SIMD | AARCH64_FL_FP, 0, false, "bf16")
/* Enabling/Disabling "flagm" only changes "flagm". */
AARCH64_OPT_EXTENSION("flagm", AARCH64_FL_FLAGM, 0, 0, false, "flagm")
/* Enabling/Disabling "pauth" only changes "pauth". */
AARCH64_OPT_EXTENSION("pauth", AARCH64_FL_PAUTH, 0, 0, false, "paca pacg")
#undef AARCH64_OPT_EXTENSION
|