Skip to content

Commit 58659c7

Browse files
committed
rustc_target: introduce Architecture
Improve type safety by using an enum rather than strings.
1 parent 11d2046 commit 58659c7

File tree

316 files changed

+1407
-1063
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

316 files changed

+1407
-1063
lines changed

compiler/rustc_attr_parsing/src/attributes/link_attrs.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use rustc_hir::attrs::*;
44
use rustc_session::Session;
55
use rustc_session::parse::feature_err;
66
use rustc_span::kw;
7-
use rustc_target::spec::BinaryFormat;
7+
use rustc_target::spec::{Architecture, BinaryFormat};
88

99
use super::prelude::*;
1010
use super::util::parse_single_integer;
@@ -439,7 +439,7 @@ impl LinkParser {
439439
cx.expected_name_value(item.span(), Some(sym::import_name_type));
440440
return true;
441441
};
442-
if cx.sess().target.arch != "x86" {
442+
if cx.sess().target.arch != Architecture::X86 {
443443
cx.emit_err(ImportNameTypeX86 { span: item.span() });
444444
return true;
445445
}

compiler/rustc_codegen_cranelift/src/abi/mod.rs

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ use rustc_middle::ty::print::with_no_trimmed_paths;
2020
use rustc_session::Session;
2121
use rustc_span::source_map::Spanned;
2222
use rustc_target::callconv::{FnAbi, PassMode};
23+
use rustc_target::spec::Architecture;
2324
use smallvec::SmallVec;
2425

2526
use self::pass_mode::*;
@@ -155,7 +156,7 @@ impl<'tcx> FunctionCx<'_, '_, 'tcx> {
155156
let ret = self.lib_call_unadjusted(name, params, returns, &args)[0];
156157

157158
Cow::Owned(vec![codegen_bitcast(self, types::I128, ret)])
158-
} else if ret_single_i128 && self.tcx.sess.target.arch == "s390x" {
159+
} else if ret_single_i128 && self.tcx.sess.target.arch == Architecture::S390x {
159160
// Return i128 using a return area pointer on s390x.
160161
let mut params = params;
161162
let mut args = args.to_vec();
@@ -641,7 +642,7 @@ pub(crate) fn codegen_terminator_call<'tcx>(
641642
.flat_map(|arg_abi| arg_abi.get_abi_param(fx.tcx).into_iter()),
642643
);
643644

644-
if fx.tcx.sess.target.is_like_darwin && fx.tcx.sess.target.arch == "aarch64" {
645+
if fx.tcx.sess.target.is_like_darwin && fx.tcx.sess.target.arch == Architecture::AArch64 {
645646
// Add any padding arguments needed for Apple AArch64.
646647
// There's no need to pad the argument list unless variadic arguments are actually being
647648
// passed.
@@ -787,25 +788,25 @@ pub(crate) fn codegen_drop<'tcx>(
787788
pub(crate) fn lib_call_arg_param(tcx: TyCtxt<'_>, ty: Type, is_signed: bool) -> AbiParam {
788789
let param = AbiParam::new(ty);
789790
if ty.is_int() && u64::from(ty.bits()) < tcx.data_layout.pointer_size().bits() {
790-
match (&*tcx.sess.target.arch, &*tcx.sess.target.vendor) {
791-
("x86_64", _) | ("aarch64", "apple") => match (ty, is_signed) {
791+
match (tcx.sess.target.arch, tcx.sess.target.vendor.as_ref()) {
792+
(Architecture::X86_64, _) | (Architecture::AArch64, "apple") => match (ty, is_signed) {
792793
(types::I8 | types::I16, true) => param.sext(),
793794
(types::I8 | types::I16, false) => param.uext(),
794795
_ => param,
795796
},
796-
("aarch64", _) => param,
797-
("riscv64", _) => match (ty, is_signed) {
797+
(Architecture::AArch64, _) => param,
798+
(Architecture::RiscV64, _) => match (ty, is_signed) {
798799
(types::I32, _) | (_, true) => param.sext(),
799800
_ => param.uext(),
800801
},
801-
("s390x", _) => {
802+
(Architecture::S390x, _) => {
802803
if is_signed {
803804
param.sext()
804805
} else {
805806
param.uext()
806807
}
807808
}
808-
_ => unimplemented!("{:?}", tcx.sess.target.arch),
809+
(arch, _) => unimplemented!("{arch:?}"),
809810
}
810811
} else {
811812
param

compiler/rustc_codegen_cranelift/src/codegen_f16_f128.rs

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
1+
use rustc_target::spec::Architecture;
2+
13
use crate::prelude::*;
24

35
pub(crate) fn f16_to_f32(fx: &mut FunctionCx<'_, '_, '_>, value: Value) -> Value {
4-
let (value, arg_ty) =
5-
if fx.tcx.sess.target.vendor == "apple" && fx.tcx.sess.target.arch == "x86_64" {
6-
(
7-
fx.bcx.ins().bitcast(types::I16, MemFlags::new(), value),
8-
lib_call_arg_param(fx.tcx, types::I16, false),
9-
)
10-
} else {
11-
(value, AbiParam::new(types::F16))
12-
};
6+
let (value, arg_ty) = if fx.tcx.sess.target.vendor == "apple"
7+
&& fx.tcx.sess.target.arch == Architecture::X86_64
8+
{
9+
(
10+
fx.bcx.ins().bitcast(types::I16, MemFlags::new(), value),
11+
lib_call_arg_param(fx.tcx, types::I16, false),
12+
)
13+
} else {
14+
(value, AbiParam::new(types::F16))
15+
};
1316
fx.lib_call("__extendhfsf2", vec![arg_ty], vec![AbiParam::new(types::F32)], &[value])[0]
1417
}
1518

@@ -19,7 +22,9 @@ fn f16_to_f64(fx: &mut FunctionCx<'_, '_, '_>, value: Value) -> Value {
1922
}
2023

2124
pub(crate) fn f32_to_f16(fx: &mut FunctionCx<'_, '_, '_>, value: Value) -> Value {
22-
let ret_ty = if fx.tcx.sess.target.vendor == "apple" && fx.tcx.sess.target.arch == "x86_64" {
25+
let ret_ty = if fx.tcx.sess.target.vendor == "apple"
26+
&& fx.tcx.sess.target.arch == Architecture::X86_64
27+
{
2328
types::I16
2429
} else {
2530
types::F16
@@ -34,7 +39,9 @@ pub(crate) fn f32_to_f16(fx: &mut FunctionCx<'_, '_, '_>, value: Value) -> Value
3439
}
3540

3641
fn f64_to_f16(fx: &mut FunctionCx<'_, '_, '_>, value: Value) -> Value {
37-
let ret_ty = if fx.tcx.sess.target.vendor == "apple" && fx.tcx.sess.target.arch == "x86_64" {
42+
let ret_ty = if fx.tcx.sess.target.vendor == "apple"
43+
&& fx.tcx.sess.target.arch == Architecture::X86_64
44+
{
3845
types::I16
3946
} else {
4047
types::F16

compiler/rustc_codegen_cranelift/src/common.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use rustc_middle::ty::layout::{
88
};
99
use rustc_span::source_map::Spanned;
1010
use rustc_target::callconv::FnAbi;
11-
use rustc_target::spec::{HasTargetSpec, Target};
11+
use rustc_target::spec::{Architecture, HasTargetSpec, Target};
1212

1313
use crate::constant::ConstantCx;
1414
use crate::debuginfo::FunctionDebugContext;
@@ -373,7 +373,7 @@ impl<'tcx> FunctionCx<'_, '_, 'tcx> {
373373
"size must be a multiple of alignment (size={size}, align={align})"
374374
);
375375

376-
let abi_align = if self.tcx.sess.target.arch == "s390x" { 8 } else { 16 };
376+
let abi_align = if self.tcx.sess.target.arch == Architecture::S390x { 8 } else { 16 };
377377
if align <= abi_align {
378378
let stack_slot = self.bcx.create_sized_stack_slot(StackSlotData {
379379
kind: StackSlotKind::ExplicitSlot,

compiler/rustc_codegen_cranelift/src/lib.rs

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ use rustc_middle::dep_graph::{WorkProduct, WorkProductId};
5050
use rustc_session::Session;
5151
use rustc_session::config::OutputFilenames;
5252
use rustc_span::{Symbol, sym};
53+
use rustc_target::spec::Architecture;
5354

5455
pub use crate::config::*;
5556
use crate::prelude::*;
@@ -186,20 +187,20 @@ impl CodegenBackend for CraneliftCodegenBackend {
186187

187188
fn target_config(&self, sess: &Session) -> TargetConfig {
188189
// FIXME return the actually used target features. this is necessary for #[cfg(target_feature)]
189-
let target_features = if sess.target.arch == "x86_64" && sess.target.os != "none" {
190-
// x86_64 mandates SSE2 support and rustc requires the x87 feature to be enabled
191-
vec![sym::fxsr, sym::sse, sym::sse2, Symbol::intern("x87")]
192-
} else if sess.target.arch == "aarch64" {
193-
match &*sess.target.os {
190+
let target_features = match sess.target.arch {
191+
Architecture::X86_64 if sess.target.os != "none" => {
192+
// x86_64 mandates SSE2 support and rustc requires the x87 feature to be enabled
193+
vec![sym::fxsr, sym::sse, sym::sse2, Symbol::intern("x87")]
194+
}
195+
Architecture::AArch64 => match &*sess.target.os {
194196
"none" => vec![],
195197
// On macOS the aes, sha2 and sha3 features are enabled by default and ring
196198
// fails to compile on macOS when they are not present.
197199
"macos" => vec![sym::neon, sym::aes, sym::sha2, sym::sha3],
198200
// AArch64 mandates Neon support
199201
_ => vec![sym::neon],
200-
}
201-
} else {
202-
vec![]
202+
},
203+
_ => vec![],
203204
};
204205
// FIXME do `unstable_target_features` properly
205206
let unstable_target_features = target_features.clone();
@@ -208,14 +209,14 @@ impl CodegenBackend for CraneliftCodegenBackend {
208209
// Windows, whereas LLVM 21+ and Cranelift pass it indirectly. This means that `f128` won't
209210
// work when linking against a LLVM-built sysroot.
210211
let has_reliable_f128 = !sess.target.is_like_windows;
211-
let has_reliable_f16 = match &*sess.target.arch {
212+
let has_reliable_f16 = match sess.target.arch {
212213
// FIXME(f16_f128): LLVM 20 does not support `f16` on s390x, meaning the required
213214
// builtins are not available in `compiler-builtins`.
214-
"s390x" => false,
215+
Architecture::S390x => false,
215216
// FIXME(f16_f128): `rustc_codegen_llvm` currently disables support on Windows GNU
216217
// targets due to GCC using a different ABI than LLVM. Therefore `f16` won't be
217218
// available when using a LLVM-built sysroot.
218-
"x86_64"
219+
Architecture::X86_64
219220
if sess.target.os == "windows"
220221
&& sess.target.env == "gnu"
221222
&& sess.target.abi != "llvm" =>

compiler/rustc_codegen_gcc/src/abi.rs

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ use rustc_middle::ty::layout::LayoutOf;
1212
#[cfg(feature = "master")]
1313
use rustc_session::config;
1414
use rustc_target::callconv::{ArgAttributes, CastTarget, FnAbi, PassMode};
15+
#[cfg(feature = "master")]
16+
use rustc_target::spec::Architecture;
1517

1618
use crate::builder::Builder;
1719
use crate::context::CodegenCx;
@@ -233,12 +235,12 @@ impl<'gcc, 'tcx> FnAbiGccExt<'gcc, 'tcx> for FnAbi<'tcx, Ty<'tcx>> {
233235

234236
#[cfg(feature = "master")]
235237
fn gcc_cconv(&self, cx: &CodegenCx<'gcc, 'tcx>) -> Option<FnAttribute<'gcc>> {
236-
conv_to_fn_attribute(self.conv, &cx.tcx.sess.target.arch)
238+
conv_to_fn_attribute(self.conv, cx.tcx.sess.target.arch)
237239
}
238240
}
239241

240242
#[cfg(feature = "master")]
241-
pub fn conv_to_fn_attribute<'gcc>(conv: CanonAbi, arch: &str) -> Option<FnAttribute<'gcc>> {
243+
pub fn conv_to_fn_attribute<'gcc>(conv: CanonAbi, arch: Architecture) -> Option<FnAttribute<'gcc>> {
242244
let attribute = match conv {
243245
CanonAbi::C | CanonAbi::Rust => return None,
244246
CanonAbi::RustCold => FnAttribute::Cold,
@@ -251,15 +253,11 @@ pub fn conv_to_fn_attribute<'gcc>(conv: CanonAbi, arch: &str) -> Option<FnAttrib
251253
ArmCall::CCmseNonSecureEntry => FnAttribute::ArmCmseNonsecureEntry,
252254
ArmCall::Aapcs => FnAttribute::ArmPcs("aapcs"),
253255
},
254-
CanonAbi::GpuKernel => {
255-
if arch == "amdgpu" {
256-
FnAttribute::GcnAmdGpuHsaKernel
257-
} else if arch == "nvptx64" {
258-
FnAttribute::NvptxKernel
259-
} else {
260-
panic!("Architecture {} does not support GpuKernel calling convention", arch);
261-
}
262-
}
256+
CanonAbi::GpuKernel => match arch {
257+
Architecture::AmdGpu => FnAttribute::GcnAmdGpuHsaKernel,
258+
Architecture::Nvptx64 => FnAttribute::NvptxKernel,
259+
arch => panic!("Architecture {arch} does not support GpuKernel calling convention"),
260+
},
263261
// TODO(antoyo): check if those AVR attributes are mapped correctly.
264262
CanonAbi::Interrupt(interrupt_kind) => match interrupt_kind {
265263
InterruptKind::Avr => FnAttribute::AvrSignal,

compiler/rustc_codegen_gcc/src/attributes.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ use rustc_middle::middle::codegen_fn_attrs::CodegenFnAttrFlags;
99
#[cfg(feature = "master")]
1010
use rustc_middle::mir::TerminatorKind;
1111
use rustc_middle::ty;
12+
#[cfg(feature = "master")]
13+
use rustc_target::spec::Architecture;
1214

1315
use crate::context::CodegenCx;
1416
use crate::gcc_util::to_gcc_features;
@@ -70,7 +72,7 @@ fn inline_attr<'gcc, 'tcx>(
7072
InlineAttr::Hint => Some(FnAttribute::Inline),
7173
InlineAttr::Force { .. } => Some(FnAttribute::AlwaysInline),
7274
InlineAttr::Never => {
73-
if cx.sess().target.arch != "amdgpu" {
75+
if cx.sess().target.arch != Architecture::AmdGpu {
7476
Some(FnAttribute::NoInline)
7577
} else {
7678
None
@@ -153,8 +155,8 @@ pub fn from_fn_attrs<'gcc, 'tcx>(
153155
.join(",");
154156
if !target_features.is_empty() {
155157
#[cfg(feature = "master")]
156-
match cx.sess().target.arch.as_ref() {
157-
"x86" | "x86_64" | "powerpc" => {
158+
match cx.sess().target.arch {
159+
Architecture::X86 | Architecture::X86_64 | Architecture::PowerPC => {
158160
func.add_attribute(FnAttribute::Target(&target_features))
159161
}
160162
// The target attribute is not supported on other targets in GCC.

compiler/rustc_codegen_gcc/src/base.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ use rustc_middle::mir::mono::Visibility;
1515
use rustc_middle::ty::TyCtxt;
1616
use rustc_session::config::DebugInfo;
1717
use rustc_span::Symbol;
18-
use rustc_target::spec::RelocModel;
1918
#[cfg(feature = "master")]
2019
use rustc_target::spec::SymbolVisibility;
20+
use rustc_target::spec::{Architecture, RelocModel};
2121

2222
use crate::builder::Builder;
2323
use crate::context::CodegenCx;
@@ -116,7 +116,7 @@ pub fn compile_codegen_unit(
116116
.map(|string| &string[1..])
117117
.collect();
118118

119-
if !disabled_features.contains("avx") && tcx.sess.target.arch == "x86_64" {
119+
if !disabled_features.contains("avx") && tcx.sess.target.arch == Architecture::X86_64 {
120120
// NOTE: we always enable AVX because the equivalent of llvm.x86.sse2.cmp.pd in GCC for
121121
// SSE2 is multiple builtins, so we use the AVX __builtin_ia32_cmppd instead.
122122
// FIXME(antoyo): use the proper builtins for llvm.x86.sse2.cmp.pd and similar.

compiler/rustc_codegen_gcc/src/context.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,7 @@ impl<'gcc, 'tcx> MiscCodegenMethods<'tcx> for CodegenCx<'gcc, 'tcx> {
487487
let entry_name = self.sess().target.entry_name.as_ref();
488488
if !self.functions.borrow().contains_key(entry_name) {
489489
#[cfg(feature = "master")]
490-
let conv = conv_to_fn_attribute(self.sess().target.entry_abi, &self.sess().target.arch);
490+
let conv = conv_to_fn_attribute(self.sess().target.entry_abi, self.sess().target.arch);
491491
#[cfg(not(feature = "master"))]
492492
let conv = None;
493493
Some(self.declare_entry_fn(entry_name, fn_type, conv))

compiler/rustc_codegen_gcc/src/gcc_util.rs

Lines changed: 36 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ use gccjit::Context;
33
use rustc_codegen_ssa::target_features;
44
use rustc_data_structures::smallvec::{SmallVec, smallvec};
55
use rustc_session::Session;
6+
use rustc_target::spec::Architecture;
67

78
fn gcc_features_by_flags(sess: &Session, features: &mut Vec<String>) {
89
target_features::retpoline_features_by_flags(sess, features);
@@ -65,44 +66,47 @@ pub(crate) fn global_gcc_features(sess: &Session, diagnostics: bool) -> Vec<Stri
6566

6667
// To find a list of GCC's names, check https://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html
6768
pub fn to_gcc_features<'a>(sess: &Session, s: &'a str) -> SmallVec<[&'a str; 2]> {
68-
let arch = if sess.target.arch == "x86_64" { "x86" } else { &*sess.target.arch };
6969
// cSpell:disable
70-
match (arch, s) {
70+
match (sess.target.arch, s) {
7171
// FIXME: seems like x87 does not exist?
72-
("x86", "x87") => smallvec![],
73-
("x86", "sse4.2") => smallvec!["sse4.2", "crc32"],
74-
("x86", "pclmulqdq") => smallvec!["pclmul"],
75-
("x86", "rdrand") => smallvec!["rdrnd"],
76-
("x86", "bmi1") => smallvec!["bmi"],
77-
("x86", "cmpxchg16b") => smallvec!["cx16"],
78-
("x86", "avx512vaes") => smallvec!["vaes"],
79-
("x86", "avx512gfni") => smallvec!["gfni"],
80-
("x86", "avx512vpclmulqdq") => smallvec!["vpclmulqdq"],
72+
(Architecture::X86 | Architecture::X86_64, "x87") => smallvec![],
73+
(Architecture::X86 | Architecture::X86_64, "sse4.2") => smallvec!["sse4.2", "crc32"],
74+
(Architecture::X86 | Architecture::X86_64, "pclmulqdq") => smallvec!["pclmul"],
75+
(Architecture::X86 | Architecture::X86_64, "rdrand") => smallvec!["rdrnd"],
76+
(Architecture::X86 | Architecture::X86_64, "bmi1") => smallvec!["bmi"],
77+
(Architecture::X86 | Architecture::X86_64, "cmpxchg16b") => smallvec!["cx16"],
78+
(Architecture::X86 | Architecture::X86_64, "avx512vaes") => smallvec!["vaes"],
79+
(Architecture::X86 | Architecture::X86_64, "avx512gfni") => smallvec!["gfni"],
80+
(Architecture::X86 | Architecture::X86_64, "avx512vpclmulqdq") => smallvec!["vpclmulqdq"],
8181
// NOTE: seems like GCC requires 'avx512bw' for 'avx512vbmi2'.
82-
("x86", "avx512vbmi2") => smallvec!["avx512vbmi2", "avx512bw"],
82+
(Architecture::X86 | Architecture::X86_64, "avx512vbmi2") => {
83+
smallvec!["avx512vbmi2", "avx512bw"]
84+
}
8385
// NOTE: seems like GCC requires 'avx512bw' for 'avx512bitalg'.
84-
("x86", "avx512bitalg") => smallvec!["avx512bitalg", "avx512bw"],
85-
("aarch64", "rcpc2") => smallvec!["rcpc-immo"],
86-
("aarch64", "dpb") => smallvec!["ccpp"],
87-
("aarch64", "dpb2") => smallvec!["ccdp"],
88-
("aarch64", "frintts") => smallvec!["fptoint"],
89-
("aarch64", "fcma") => smallvec!["complxnum"],
90-
("aarch64", "pmuv3") => smallvec!["perfmon"],
91-
("aarch64", "paca") => smallvec!["pauth"],
92-
("aarch64", "pacg") => smallvec!["pauth"],
86+
(Architecture::X86 | Architecture::X86_64, "avx512bitalg") => {
87+
smallvec!["avx512bitalg", "avx512bw"]
88+
}
89+
(Architecture::AArch64, "rcpc2") => smallvec!["rcpc-immo"],
90+
(Architecture::AArch64, "dpb") => smallvec!["ccpp"],
91+
(Architecture::AArch64, "dpb2") => smallvec!["ccdp"],
92+
(Architecture::AArch64, "frintts") => smallvec!["fptoint"],
93+
(Architecture::AArch64, "fcma") => smallvec!["complxnum"],
94+
(Architecture::AArch64, "pmuv3") => smallvec!["perfmon"],
95+
(Architecture::AArch64, "paca") => smallvec!["pauth"],
96+
(Architecture::AArch64, "pacg") => smallvec!["pauth"],
9397
// Rust ties fp and neon together. In GCC neon implicitly enables fp,
9498
// but we manually enable neon when a feature only implicitly enables fp
95-
("aarch64", "f32mm") => smallvec!["f32mm", "neon"],
96-
("aarch64", "f64mm") => smallvec!["f64mm", "neon"],
97-
("aarch64", "fhm") => smallvec!["fp16fml", "neon"],
98-
("aarch64", "fp16") => smallvec!["fullfp16", "neon"],
99-
("aarch64", "jsconv") => smallvec!["jsconv", "neon"],
100-
("aarch64", "sve") => smallvec!["sve", "neon"],
101-
("aarch64", "sve2") => smallvec!["sve2", "neon"],
102-
("aarch64", "sve2-aes") => smallvec!["sve2-aes", "neon"],
103-
("aarch64", "sve2-sm4") => smallvec!["sve2-sm4", "neon"],
104-
("aarch64", "sve2-sha3") => smallvec!["sve2-sha3", "neon"],
105-
("aarch64", "sve2-bitperm") => smallvec!["sve2-bitperm", "neon"],
99+
(Architecture::AArch64, "f32mm") => smallvec!["f32mm", "neon"],
100+
(Architecture::AArch64, "f64mm") => smallvec!["f64mm", "neon"],
101+
(Architecture::AArch64, "fhm") => smallvec!["fp16fml", "neon"],
102+
(Architecture::AArch64, "fp16") => smallvec!["fullfp16", "neon"],
103+
(Architecture::AArch64, "jsconv") => smallvec!["jsconv", "neon"],
104+
(Architecture::AArch64, "sve") => smallvec!["sve", "neon"],
105+
(Architecture::AArch64, "sve2") => smallvec!["sve2", "neon"],
106+
(Architecture::AArch64, "sve2-aes") => smallvec!["sve2-aes", "neon"],
107+
(Architecture::AArch64, "sve2-sm4") => smallvec!["sve2-sm4", "neon"],
108+
(Architecture::AArch64, "sve2-sha3") => smallvec!["sve2-sha3", "neon"],
109+
(Architecture::AArch64, "sve2-bitperm") => smallvec!["sve2-bitperm", "neon"],
106110
(_, s) => smallvec![s],
107111
}
108112
// cSpell:enable

0 commit comments

Comments
 (0)