From 6988d2294defdbe02dfca1287613b649d21259a1 Mon Sep 17 00:00:00 2001 From: Gijs Burghoorn Date: Wed, 4 Oct 2023 13:45:30 +0200 Subject: [PATCH] Stabilize Ratified RISC-V Target Features As shortly discussed on Zulip (https://rust-lang.zulipchat.com/#narrow/stream/250483-t-compiler.2Frisc-v/topic/Stabilization.20of.20RISC-V.20Target.20Features/near/394793704), this commit stabilizes the ratified RISC-V instruction bases and extensions. Specifically, this commit stabilizes the: * Atomic Instructions (A) on v2.0 * Compressed Instructions (C) on v2.0 * Integer Multiplication and Division (M) on v2.0 * Bit Manipulations (B) on v1.0 listed as `zba`, `zbc`, `zbs` * Scalar Cryptography (Zk) v1.0.1 listed as `zk`, `zkn`, `zknd`, `zkne`, `zknh`, `zkr`, `zks`, `zksed`, `zksh`, `zkt`, `zbkb`, `zbkc` `zkbx` --- .../rustc_codegen_ssa/src/target_features.rs | 40 +++++++++---------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/compiler/rustc_codegen_ssa/src/target_features.rs b/compiler/rustc_codegen_ssa/src/target_features.rs index baf6b19d3f97e..e57e0ee25244a 100644 --- a/compiler/rustc_codegen_ssa/src/target_features.rs +++ b/compiler/rustc_codegen_ssa/src/target_features.rs @@ -244,38 +244,38 @@ const MIPS_ALLOWED_FEATURES: &[(&str, Option)] = &[ const RISCV_ALLOWED_FEATURES: &[(&str, Option)] = &[ // tidy-alphabetical-start - ("a", Some(sym::riscv_target_feature)), - ("c", Some(sym::riscv_target_feature)), + ("a", None), + ("c", None), ("d", Some(sym::riscv_target_feature)), ("e", Some(sym::riscv_target_feature)), ("f", Some(sym::riscv_target_feature)), - ("m", Some(sym::riscv_target_feature)), + ("m", None), ("relax", Some(sym::riscv_target_feature)), ("unaligned-scalar-mem", Some(sym::riscv_target_feature)), ("v", Some(sym::riscv_target_feature)), - ("zba", Some(sym::riscv_target_feature)), - ("zbb", Some(sym::riscv_target_feature)), - ("zbc", Some(sym::riscv_target_feature)), - ("zbkb", Some(sym::riscv_target_feature)), - ("zbkc", Some(sym::riscv_target_feature)), - ("zbkx", Some(sym::riscv_target_feature)), - ("zbs", Some(sym::riscv_target_feature)), + ("zba", None), + ("zbb", None), + ("zbc", None), + ("zbkb", None), + ("zbkc", None), + ("zbkx", None), + ("zbs", None), ("zdinx", Some(sym::riscv_target_feature)), ("zfh", Some(sym::riscv_target_feature)), ("zfhmin", Some(sym::riscv_target_feature)), ("zfinx", Some(sym::riscv_target_feature)), ("zhinx", Some(sym::riscv_target_feature)), ("zhinxmin", Some(sym::riscv_target_feature)), - ("zk", Some(sym::riscv_target_feature)), - ("zkn", Some(sym::riscv_target_feature)), - ("zknd", Some(sym::riscv_target_feature)), - ("zkne", Some(sym::riscv_target_feature)), - ("zknh", Some(sym::riscv_target_feature)), - ("zkr", Some(sym::riscv_target_feature)), - ("zks", Some(sym::riscv_target_feature)), - ("zksed", Some(sym::riscv_target_feature)), - ("zksh", Some(sym::riscv_target_feature)), - ("zkt", Some(sym::riscv_target_feature)), + ("zk", None), + ("zkn", None), + ("zknd", None), + ("zkne", None), + ("zknh", None), + ("zkr", None), + ("zks", None), + ("zksed", None), + ("zksh", None), + ("zkt", None), // tidy-alphabetical-end ];