about summary refs log tree commit diff
diff options
context:
space:
mode:
authorTsukasa OI <floss_rust@irq.a4lg.com>2025-04-30 05:48:51 +0000
committerTsukasa OI <floss_rust@irq.a4lg.com>2025-05-01 00:09:45 +0000
commitadb92aeb4a1f6cd8313fa880c19a39a8caefbded (patch)
tree7b8df36862af8d0e2f274aed43ae5da71b46f523
parentb45dd71d1824f176fba88f6c40467030a16afa2c (diff)
downloadrust-adb92aeb4a1f6cd8313fa880c19a39a8caefbded.tar.gz
rust-adb92aeb4a1f6cd8313fa880c19a39a8caefbded.zip
rustc_target: Adjust RISC-V feature implication (Za64rs and Za128rs)
The Za64rs extension (reservation set -- a primitive memory unit of LR/SC
atomic operations -- is naturally aligned and *at most* 64 bytes) is a
superset of the Za128rs extension (*at most* 128 bytes; note that smaller
the reservation set is, more fine grained control over atomics).

This commit handles this as a feature implication.
-rw-r--r--compiler/rustc_target/src/target_features.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_target/src/target_features.rs b/compiler/rustc_target/src/target_features.rs
index 69c8b9119ab..9031e0530c5 100644
--- a/compiler/rustc_target/src/target_features.rs
+++ b/compiler/rustc_target/src/target_features.rs
@@ -507,7 +507,7 @@ static RISCV_FEATURES: &[(&str, Stability, ImpliedFeatures)] = &[
     ("unaligned-vector-mem", Unstable(sym::riscv_target_feature), &[]),
     ("v", Unstable(sym::riscv_target_feature), &["zvl128b", "zve64d"]),
     ("za128rs", Unstable(sym::riscv_target_feature), &[]),
-    ("za64rs", Unstable(sym::riscv_target_feature), &[]),
+    ("za64rs", Unstable(sym::riscv_target_feature), &["za128rs"]), // Za64rs ⊃ Za128rs
     ("zaamo", Unstable(sym::riscv_target_feature), &[]),
     ("zabha", Unstable(sym::riscv_target_feature), &["zaamo"]),
     ("zacas", Unstable(sym::riscv_target_feature), &["zaamo"]),