@@ -13,17 +13,25 @@ pub const RUSTC_SPECIFIC_FEATURES: &[&str] = &["crt-static"];
13
13
// if it doesn't, to_llvm_feature in llvm_util in rustc_codegen_llvm needs to be adapted
14
14
15
15
const ARM_ALLOWED_FEATURES : & [ ( & str , Option < Symbol > ) ] = & [
16
+ // tidy-alphabetical-start
16
17
( "aclass" , Some ( sym:: arm_target_feature) ) ,
17
- ( "mclass" , Some ( sym:: arm_target_feature) ) ,
18
- ( "rclass" , Some ( sym:: arm_target_feature) ) ,
19
- ( "dsp" , Some ( sym:: arm_target_feature) ) ,
20
- ( "neon" , Some ( sym:: arm_target_feature) ) ,
18
+ ( "aes" , Some ( sym:: arm_target_feature) ) ,
21
19
( "crc" , Some ( sym:: arm_target_feature) ) ,
22
20
( "crypto" , Some ( sym:: arm_target_feature) ) ,
23
- ( "aes" , Some ( sym:: arm_target_feature) ) ,
24
- ( "sha2" , Some ( sym:: arm_target_feature) ) ,
25
- ( "i8mm" , Some ( sym:: arm_target_feature) ) ,
21
+ ( "d32" , Some ( sym:: arm_target_feature) ) ,
26
22
( "dotprod" , Some ( sym:: arm_target_feature) ) ,
23
+ ( "dsp" , Some ( sym:: arm_target_feature) ) ,
24
+ ( "fp-armv8" , Some ( sym:: arm_target_feature) ) ,
25
+ ( "i8mm" , Some ( sym:: arm_target_feature) ) ,
26
+ ( "mclass" , Some ( sym:: arm_target_feature) ) ,
27
+ ( "neon" , Some ( sym:: arm_target_feature) ) ,
28
+ ( "rclass" , Some ( sym:: arm_target_feature) ) ,
29
+ ( "sha2" , Some ( sym:: arm_target_feature) ) ,
30
+ // This is needed for inline assembly, but shouldn't be stabilized as-is
31
+ // since it should be enabled per-function using #[instruction_set], not
32
+ // #[target_feature].
33
+ ( "thumb-mode" , Some ( sym:: arm_target_feature) ) ,
34
+ ( "thumb2" , Some ( sym:: arm_target_feature) ) ,
27
35
( "v5te" , Some ( sym:: arm_target_feature) ) ,
28
36
( "v6" , Some ( sym:: arm_target_feature) ) ,
29
37
( "v6k" , Some ( sym:: arm_target_feature) ) ,
@@ -33,118 +41,115 @@ const ARM_ALLOWED_FEATURES: &[(&str, Option<Symbol>)] = &[
33
41
( "vfp2" , Some ( sym:: arm_target_feature) ) ,
34
42
( "vfp3" , Some ( sym:: arm_target_feature) ) ,
35
43
( "vfp4" , Some ( sym:: arm_target_feature) ) ,
36
- ( "fp-armv8" , Some ( sym:: arm_target_feature) ) ,
37
- // This is needed for inline assembly, but shouldn't be stabilized as-is
38
- // since it should be enabled per-function using #[instruction_set], not
39
- // #[target_feature].
40
- ( "thumb-mode" , Some ( sym:: arm_target_feature) ) ,
41
- ( "thumb2" , Some ( sym:: arm_target_feature) ) ,
42
- ( "d32" , Some ( sym:: arm_target_feature) ) ,
44
+ // tidy-alphabetical-end
43
45
] ;
44
46
45
47
const AARCH64_ALLOWED_FEATURES : & [ ( & str , Option < Symbol > ) ] = & [
46
- // FEAT_AdvSimd & FEAT_FP
47
- ( "neon" , None ) ,
48
- // FEAT_FP16
49
- ( "fp16" , None ) ,
50
- // FEAT_SVE
51
- ( "sve" , None ) ,
48
+ // tidy-alphabetical-start
49
+ // FEAT_AES
50
+ ( "aes" , None ) ,
51
+ // FEAT_BF16
52
+ ( "bf16" , None ) ,
53
+ // FEAT_BTI
54
+ ( "bti" , None ) ,
52
55
// FEAT_CRC
53
56
( "crc" , None ) ,
54
- // FEAT_RAS
55
- ( "ras" , None ) ,
56
- // FEAT_LSE
57
- ( "lse" , None ) ,
58
- // FEAT_RDM
59
- ( "rdm" , None ) ,
60
- // FEAT_RCPC
61
- ( "rcpc" , None ) ,
62
- // FEAT_RCPC2
63
- ( "rcpc2" , None ) ,
64
- // FEAT_DotProd
65
- ( "dotprod" , None ) ,
66
- // FEAT_TME
67
- ( "tme" , None ) ,
68
- // FEAT_FHM
69
- ( "fhm" , None ) ,
70
57
// FEAT_DIT
71
58
( "dit" , None ) ,
72
- // FEAT_FLAGM
73
- ( "flagm" , None ) ,
74
- // FEAT_SSBS
75
- ( "ssbs" , None ) ,
76
- // FEAT_SB
77
- ( "sb" , None ) ,
78
- // FEAT_PAUTH (address authentication)
79
- ( "paca" , None ) ,
80
- // FEAT_PAUTH (generic authentication)
81
- ( "pacg" , None ) ,
59
+ // FEAT_DotProd
60
+ ( "dotprod" , None ) ,
82
61
// FEAT_DPB
83
62
( "dpb" , None ) ,
84
63
// FEAT_DPB2
85
64
( "dpb2" , None ) ,
86
- // FEAT_SVE2
87
- ( "sve2" , None ) ,
88
- // FEAT_SVE2_AES
89
- ( "sve2-aes" , None ) ,
90
- // FEAT_SVE2_SM4
91
- ( "sve2-sm4" , None ) ,
92
- // FEAT_SVE2_SHA3
93
- ( "sve2-sha3" , None ) ,
94
- // FEAT_SVE2_BitPerm
95
- ( "sve2-bitperm" , None ) ,
96
- // FEAT_FRINTTS
97
- ( "frintts" , None ) ,
98
- // FEAT_I8MM
99
- ( "i8mm" , None ) ,
100
65
// FEAT_F32MM
101
66
( "f32mm" , None ) ,
102
67
// FEAT_F64MM
103
68
( "f64mm" , None ) ,
104
- // FEAT_BF16
105
- ( "bf16" , None ) ,
106
- // FEAT_RAND
107
- ( "rand" , None ) ,
108
- // FEAT_BTI
109
- ( "bti" , None ) ,
110
- // FEAT_MTE
111
- ( "mte" , None ) ,
112
- // FEAT_JSCVT
113
- ( "jsconv" , None ) ,
114
69
// FEAT_FCMA
115
70
( "fcma" , None ) ,
116
- // FEAT_AES
117
- ( "aes" , None ) ,
71
+ // FEAT_FHM
72
+ ( "fhm" , None ) ,
73
+ // FEAT_FLAGM
74
+ ( "flagm" , None ) ,
75
+ // FEAT_FP16
76
+ ( "fp16" , None ) ,
77
+ // FEAT_FRINTTS
78
+ ( "frintts" , None ) ,
79
+ // FEAT_I8MM
80
+ ( "i8mm" , None ) ,
81
+ // FEAT_JSCVT
82
+ ( "jsconv" , None ) ,
83
+ // FEAT_LOR
84
+ ( "lor" , None ) ,
85
+ // FEAT_LSE
86
+ ( "lse" , None ) ,
87
+ // FEAT_MTE
88
+ ( "mte" , None ) ,
89
+ // FEAT_AdvSimd & FEAT_FP
90
+ ( "neon" , None ) ,
91
+ // FEAT_PAUTH (address authentication)
92
+ ( "paca" , None ) ,
93
+ // FEAT_PAUTH (generic authentication)
94
+ ( "pacg" , None ) ,
95
+ // FEAT_PAN
96
+ ( "pan" , None ) ,
97
+ // FEAT_PMUv3
98
+ ( "pmuv3" , None ) ,
99
+ // FEAT_RAND
100
+ ( "rand" , None ) ,
101
+ // FEAT_RAS
102
+ ( "ras" , None ) ,
103
+ // FEAT_RCPC
104
+ ( "rcpc" , None ) ,
105
+ // FEAT_RCPC2
106
+ ( "rcpc2" , None ) ,
107
+ // FEAT_RDM
108
+ ( "rdm" , None ) ,
109
+ // FEAT_SB
110
+ ( "sb" , None ) ,
118
111
// FEAT_SHA1 & FEAT_SHA256
119
112
( "sha2" , None ) ,
120
113
// FEAT_SHA512 & FEAT_SHA3
121
114
( "sha3" , None ) ,
122
115
// FEAT_SM3 & FEAT_SM4
123
116
( "sm4" , None ) ,
124
- // FEAT_PAN
125
- ( "pan" , None ) ,
126
- // FEAT_LOR
127
- ( "lor" , None ) ,
128
- // FEAT_VHE
129
- ( "vh" , None ) ,
130
- // FEAT_PMUv3
131
- ( "pmuv3" , None ) ,
132
117
// FEAT_SPE
133
118
( "spe" , None ) ,
119
+ // FEAT_SSBS
120
+ ( "ssbs" , None ) ,
121
+ // FEAT_SVE
122
+ ( "sve" , None ) ,
123
+ // FEAT_SVE2
124
+ ( "sve2" , None ) ,
125
+ // FEAT_SVE2_AES
126
+ ( "sve2-aes" , None ) ,
127
+ // FEAT_SVE2_BitPerm
128
+ ( "sve2-bitperm" , None ) ,
129
+ // FEAT_SVE2_SHA3
130
+ ( "sve2-sha3" , None ) ,
131
+ // FEAT_SVE2_SM4
132
+ ( "sve2-sm4" , None ) ,
133
+ // FEAT_TME
134
+ ( "tme" , None ) ,
134
135
( "v8.1a" , Some ( sym:: aarch64_ver_target_feature) ) ,
135
136
( "v8.2a" , Some ( sym:: aarch64_ver_target_feature) ) ,
136
137
( "v8.3a" , Some ( sym:: aarch64_ver_target_feature) ) ,
137
138
( "v8.4a" , Some ( sym:: aarch64_ver_target_feature) ) ,
138
139
( "v8.5a" , Some ( sym:: aarch64_ver_target_feature) ) ,
139
140
( "v8.6a" , Some ( sym:: aarch64_ver_target_feature) ) ,
140
141
( "v8.7a" , Some ( sym:: aarch64_ver_target_feature) ) ,
142
+ // FEAT_VHE
143
+ ( "vh" , None ) ,
144
+ // tidy-alphabetical-end
141
145
] ;
142
146
143
147
const AARCH64_TIED_FEATURES : & [ & [ & str ] ] = & [
144
148
& [ "paca" , "pacg" ] , // Together these represent `pauth` in LLVM
145
149
] ;
146
150
147
151
const X86_ALLOWED_FEATURES : & [ ( & str , Option < Symbol > ) ] = & [
152
+ // tidy-alphabetical-start
148
153
( "adx" , None ) ,
149
154
( "aes" , None ) ,
150
155
( "avx" , None ) ,
@@ -194,69 +199,80 @@ const X86_ALLOWED_FEATURES: &[(&str, Option<Symbol>)] = &[
194
199
( "xsavec" , None ) ,
195
200
( "xsaveopt" , None ) ,
196
201
( "xsaves" , None ) ,
202
+ // tidy-alphabetical-end
197
203
] ;
198
204
199
205
const HEXAGON_ALLOWED_FEATURES : & [ ( & str , Option < Symbol > ) ] = & [
206
+ // tidy-alphabetical-start
200
207
( "hvx" , Some ( sym:: hexagon_target_feature) ) ,
201
208
( "hvx-length128b" , Some ( sym:: hexagon_target_feature) ) ,
209
+ // tidy-alphabetical-end
202
210
] ;
203
211
204
212
const POWERPC_ALLOWED_FEATURES : & [ ( & str , Option < Symbol > ) ] = & [
213
+ // tidy-alphabetical-start
205
214
( "altivec" , Some ( sym:: powerpc_target_feature) ) ,
206
215
( "power8-altivec" , Some ( sym:: powerpc_target_feature) ) ,
207
- ( "power9-altivec" , Some ( sym:: powerpc_target_feature) ) ,
208
216
( "power8-vector" , Some ( sym:: powerpc_target_feature) ) ,
217
+ ( "power9-altivec" , Some ( sym:: powerpc_target_feature) ) ,
209
218
( "power9-vector" , Some ( sym:: powerpc_target_feature) ) ,
210
219
( "vsx" , Some ( sym:: powerpc_target_feature) ) ,
220
+ // tidy-alphabetical-end
211
221
] ;
212
222
213
223
const MIPS_ALLOWED_FEATURES : & [ ( & str , Option < Symbol > ) ] = & [
224
+ // tidy-alphabetical-start
214
225
( "fp64" , Some ( sym:: mips_target_feature) ) ,
215
226
( "msa" , Some ( sym:: mips_target_feature) ) ,
216
227
( "virt" , Some ( sym:: mips_target_feature) ) ,
228
+ // tidy-alphabetical-end
217
229
] ;
218
230
219
231
const RISCV_ALLOWED_FEATURES : & [ ( & str , Option < Symbol > ) ] = & [
220
- ( "m" , Some ( sym :: riscv_target_feature ) ) ,
232
+ // tidy-alphabetical-start
221
233
( "a" , Some ( sym:: riscv_target_feature) ) ,
222
234
( "c" , Some ( sym:: riscv_target_feature) ) ,
223
- ( "f" , Some ( sym:: riscv_target_feature) ) ,
224
235
( "d" , Some ( sym:: riscv_target_feature) ) ,
225
236
( "e" , Some ( sym:: riscv_target_feature) ) ,
237
+ ( "f" , Some ( sym:: riscv_target_feature) ) ,
238
+ ( "m" , Some ( sym:: riscv_target_feature) ) ,
226
239
( "v" , Some ( sym:: riscv_target_feature) ) ,
227
- ( "zfinx" , Some ( sym:: riscv_target_feature) ) ,
228
- ( "zdinx" , Some ( sym:: riscv_target_feature) ) ,
229
- ( "zhinx" , Some ( sym:: riscv_target_feature) ) ,
230
- ( "zhinxmin" , Some ( sym:: riscv_target_feature) ) ,
231
- ( "zfh" , Some ( sym:: riscv_target_feature) ) ,
232
- ( "zfhmin" , Some ( sym:: riscv_target_feature) ) ,
233
240
( "zba" , Some ( sym:: riscv_target_feature) ) ,
234
241
( "zbb" , Some ( sym:: riscv_target_feature) ) ,
235
242
( "zbc" , Some ( sym:: riscv_target_feature) ) ,
236
- ( "zbs" , Some ( sym:: riscv_target_feature) ) ,
237
243
( "zbkb" , Some ( sym:: riscv_target_feature) ) ,
238
244
( "zbkc" , Some ( sym:: riscv_target_feature) ) ,
239
245
( "zbkx" , Some ( sym:: riscv_target_feature) ) ,
246
+ ( "zbs" , Some ( sym:: riscv_target_feature) ) ,
247
+ ( "zdinx" , Some ( sym:: riscv_target_feature) ) ,
248
+ ( "zfh" , Some ( sym:: riscv_target_feature) ) ,
249
+ ( "zfhmin" , Some ( sym:: riscv_target_feature) ) ,
250
+ ( "zfinx" , Some ( sym:: riscv_target_feature) ) ,
251
+ ( "zhinx" , Some ( sym:: riscv_target_feature) ) ,
252
+ ( "zhinxmin" , Some ( sym:: riscv_target_feature) ) ,
253
+ ( "zk" , Some ( sym:: riscv_target_feature) ) ,
254
+ ( "zkn" , Some ( sym:: riscv_target_feature) ) ,
240
255
( "zknd" , Some ( sym:: riscv_target_feature) ) ,
241
256
( "zkne" , Some ( sym:: riscv_target_feature) ) ,
242
257
( "zknh" , Some ( sym:: riscv_target_feature) ) ,
243
- ( "zksed" , Some ( sym:: riscv_target_feature) ) ,
244
- ( "zksh" , Some ( sym:: riscv_target_feature) ) ,
245
258
( "zkr" , Some ( sym:: riscv_target_feature) ) ,
246
- ( "zkn" , Some ( sym:: riscv_target_feature) ) ,
247
259
( "zks" , Some ( sym:: riscv_target_feature) ) ,
248
- ( "zk" , Some ( sym:: riscv_target_feature) ) ,
260
+ ( "zksed" , Some ( sym:: riscv_target_feature) ) ,
261
+ ( "zksh" , Some ( sym:: riscv_target_feature) ) ,
249
262
( "zkt" , Some ( sym:: riscv_target_feature) ) ,
263
+ // tidy-alphabetical-end
250
264
] ;
251
265
252
266
const WASM_ALLOWED_FEATURES : & [ ( & str , Option < Symbol > ) ] = & [
253
- ( "simd128" , None ) ,
267
+ // tidy-alphabetical-start
254
268
( "atomics" , Some ( sym:: wasm_target_feature) ) ,
255
- ( "nontrapping-fptoint" , Some ( sym:: wasm_target_feature) ) ,
256
269
( "bulk-memory" , Some ( sym:: wasm_target_feature) ) ,
257
270
( "mutable-globals" , Some ( sym:: wasm_target_feature) ) ,
271
+ ( "nontrapping-fptoint" , Some ( sym:: wasm_target_feature) ) ,
258
272
( "reference-types" , Some ( sym:: wasm_target_feature) ) ,
259
273
( "sign-ext" , Some ( sym:: wasm_target_feature) ) ,
274
+ ( "simd128" , None ) ,
275
+ // tidy-alphabetical-end
260
276
] ;
261
277
262
278
const BPF_ALLOWED_FEATURES : & [ ( & str , Option < Symbol > ) ] = & [ ( "alu32" , Some ( sym:: bpf_target_feature) ) ] ;
0 commit comments