about summary refs log tree commit diff
path: root/compiler/rustc_target/src
diff options
context:
space:
mode:
authorTaiki Endo <te316e89@gmail.com>2024-11-09 03:17:24 +0900
committerTaiki Endo <te316e89@gmail.com>2024-11-09 03:17:24 +0900
commit400a690b5f99cd345b679014fe0c821d3847bcd3 (patch)
tree8505f1299b5b97271917f86cebc2228c3e3bf6a5 /compiler/rustc_target/src
parentc07aa1e17199e27f6f7ac8f3307bca7bda0084b6 (diff)
downloadrust-400a690b5f99cd345b679014fe0c821d3847bcd3.tar.gz
rust-400a690b5f99cd345b679014fe0c821d3847bcd3.zip
Add v9 and leoncasa target feature to sparc
Diffstat (limited to 'compiler/rustc_target/src')
-rw-r--r--compiler/rustc_target/src/target_features.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/compiler/rustc_target/src/target_features.rs b/compiler/rustc_target/src/target_features.rs
index 96f1e257bb5..b649c0353a4 100644
--- a/compiler/rustc_target/src/target_features.rs
+++ b/compiler/rustc_target/src/target_features.rs
@@ -545,6 +545,13 @@ const IBMZ_FEATURES: &[(&str, Stability, ImpliedFeatures)] = &[
     // tidy-alphabetical-end
 ];
 
+const SPARC_FEATURES: &[(&str, Stability, ImpliedFeatures)] = &[
+    // tidy-alphabetical-start
+    ("leoncasa", Unstable(sym::sparc_target_feature), &[]),
+    ("v9", Unstable(sym::sparc_target_feature), &[]),
+    // tidy-alphabetical-end
+];
+
 /// When rustdoc is running, provide a list of all known features so that all their respective
 /// primitives may be documented.
 ///
@@ -563,6 +570,7 @@ pub fn all_rust_features() -> impl Iterator<Item = (&'static str, Stability)> {
         .chain(CSKY_FEATURES)
         .chain(LOONGARCH_FEATURES)
         .chain(IBMZ_FEATURES)
+        .chain(SPARC_FEATURES)
         .cloned()
         .map(|(f, s, _)| (f, s))
 }
@@ -582,6 +590,7 @@ impl super::spec::Target {
             "csky" => CSKY_FEATURES,
             "loongarch64" => LOONGARCH_FEATURES,
             "s390x" => IBMZ_FEATURES,
+            "sparc" | "sparc64" => SPARC_FEATURES,
             _ => &[],
         }
     }