diff options
Diffstat (limited to 'compiler/rustc_target/src/target_features.rs')
| -rw-r--r-- | compiler/rustc_target/src/target_features.rs | 35 |
1 files changed, 34 insertions, 1 deletions
diff --git a/compiler/rustc_target/src/target_features.rs b/compiler/rustc_target/src/target_features.rs index ea7c15a3595..65a85151bef 100644 --- a/compiler/rustc_target/src/target_features.rs +++ b/compiler/rustc_target/src/target_features.rs @@ -145,6 +145,7 @@ static ARM_FEATURES: &[(&str, Stability, ImpliedFeatures)] = &[ ("dotprod", Unstable(sym::arm_target_feature), &["neon"]), ("dsp", Unstable(sym::arm_target_feature), &[]), ("fp-armv8", Unstable(sym::arm_target_feature), &["vfp4"]), + ("fp16", Unstable(sym::arm_target_feature), &["neon"]), ("fpregs", Unstable(sym::arm_target_feature), &[]), ("i8mm", Unstable(sym::arm_target_feature), &["neon"]), ("mclass", Unstable(sym::arm_target_feature), &[]), @@ -496,9 +497,14 @@ static RISCV_FEATURES: &[(&str, Stability, ImpliedFeatures)] = &[ ("relax", Unstable(sym::riscv_target_feature), &[]), ("unaligned-scalar-mem", Unstable(sym::riscv_target_feature), &[]), ("v", Unstable(sym::riscv_target_feature), &[]), + ("za128rs", Unstable(sym::riscv_target_feature), &[]), + ("za64rs", Unstable(sym::riscv_target_feature), &[]), ("zaamo", Unstable(sym::riscv_target_feature), &[]), ("zabha", Unstable(sym::riscv_target_feature), &["zaamo"]), + ("zacas", Unstable(sym::riscv_target_feature), &["zaamo"]), ("zalrsc", Unstable(sym::riscv_target_feature), &[]), + ("zama16b", Unstable(sym::riscv_target_feature), &[]), + ("zawrs", Unstable(sym::riscv_target_feature), &[]), ("zba", Stable, &[]), ("zbb", Stable, &[]), ("zbc", Stable, &[]), @@ -610,7 +616,26 @@ static LOONGARCH_FEATURES: &[(&str, Stability, ImpliedFeatures)] = &[ const IBMZ_FEATURES: &[(&str, Stability, ImpliedFeatures)] = &[ // tidy-alphabetical-start ("backchain", Unstable(sym::s390x_target_feature), &[]), + ("deflate-conversion", Unstable(sym::s390x_target_feature), &[]), + ("enhanced-sort", Unstable(sym::s390x_target_feature), &[]), + ("guarded-storage", Unstable(sym::s390x_target_feature), &[]), + ("high-word", Unstable(sym::s390x_target_feature), &[]), + ("nnp-assist", Unstable(sym::s390x_target_feature), &["vector"]), + ("transactional-execution", Unstable(sym::s390x_target_feature), &[]), ("vector", Unstable(sym::s390x_target_feature), &[]), + ("vector-enhancements-1", Unstable(sym::s390x_target_feature), &["vector"]), + ("vector-enhancements-2", Unstable(sym::s390x_target_feature), &["vector-enhancements-1"]), + ("vector-packed-decimal", Unstable(sym::s390x_target_feature), &["vector"]), + ( + "vector-packed-decimal-enhancement", + Unstable(sym::s390x_target_feature), + &["vector-packed-decimal"], + ), + ( + "vector-packed-decimal-enhancement-2", + Unstable(sym::s390x_target_feature), + &["vector-packed-decimal-enhancement"], + ), // tidy-alphabetical-end ]; @@ -767,7 +792,7 @@ impl Target { /// the first list contains target features that must be enabled for ABI reasons, /// and the second list contains target feature that must be disabled for ABI reasons. /// - /// These features are automatically appended to whatever the target spec sats as default + /// These features are automatically appended to whatever the target spec sets as default /// features for the target. /// /// All features enabled/disabled via `-Ctarget-features` and `#[target_features]` are checked @@ -789,6 +814,13 @@ impl Target { // x87 must be enabled, soft-float must be disabled. FeatureConstraints { required: &["x87"], incompatible: &["soft-float"] } } + Some(RustcAbi::X86Sse2) => { + // Extended hardfloat ABI. x87 and SSE2 must be enabled, soft-float must be disabled. + FeatureConstraints { + required: &["x87", "sse2"], + incompatible: &["soft-float"], + } + } Some(RustcAbi::X86Softfloat) => { // Softfloat ABI, requires corresponding target feature. That feature trumps // `x87` and all other FPU features so those do not matter. @@ -816,6 +848,7 @@ impl Target { // LLVM handles the rest. FeatureConstraints { required: &["soft-float"], incompatible: &[] } } + Some(r) => panic!("invalid Rust ABI for x86_64: {r:?}"), } } "arm" => { |
