about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorTsukasa OI <floss_rust@irq.a4lg.com>2025-04-06 03:36:45 +0000
committerTsukasa OI <floss_rust@irq.a4lg.com>2025-04-16 01:20:54 +0000
commitb084603c631cf4cea540a35aca0ad7b2d8599ef2 (patch)
tree7e930b67d266630cc9f75f00e86656d64e70e936 /tests
parent38c560ae681d5c0d3fd615eaedc537a282fb1086 (diff)
rustc_target: RISC-V: feature addition batch 2
This commit adds unprivileged ratified extensions that are either
dicoverable from the `riscv_hwprobe` syscall of the Linux kernel (as of
version 6.14) plus 1 minus 3 extensions.

Plus 1:

*   "B"
    This is a combination of "Zba", "Zbb" and "Zbs".
    Note:
    Although not required by the RISC-V specification, it is convenient to
    imply "B" from its three members (will be implemented in LLVM 21/22) but
    this is not yet implemented in Rust due to current implication handling.
    It still implies three members *from* "B".

Minus 2:

*   "Zcf" (target_arch = "riscv32" only)
    This is the compression instruction subset corresponding "F".
    This is implied from RV32 + "C" + "F" but this complex handling is
    not yet supported by Rust's feature handling.
*   "Zcd"
    This is the compression instruction subset corresponding "D".
    This is implied from "C" + "D" but this complex handling is
    not yet supported by Rust's feature handling.
*   "Supm"
    Unlike regular RISC-V extensions, "Supm" and "Sspm" extensions do not
    provide any specific architectural features / constraints but requires
    *some* mechanisms to control pointer masking for the current mode.
    For instance, reported existence of the "Supm" extension in Linux means
    that `prctl` system call to control pointer masking is available and
    there are alternative ways to detect the existence.

Notes:

*   Because this commit adds the "Zca" extension (an integer subset of the
    "C" extension), the "C" extension is modified to imply "Zca".
Diffstat (limited to 'tests')
-rw-r--r--tests/ui/check-cfg/target_feature.stderr10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/ui/check-cfg/target_feature.stderr b/tests/ui/check-cfg/target_feature.stderr
index aa5fd09c0c7..4f7b8345e86 100644
--- a/tests/ui/check-cfg/target_feature.stderr
+++ b/tests/ui/check-cfg/target_feature.stderr
@@ -49,6 +49,7 @@ LL |     cfg!(target_feature = "_UNEXPECTED_VALUE");
 `avxvnni`
 `avxvnniint16`
 `avxvnniint8`
+`b`
 `backchain`
 `bf16`
 `bmi1`
@@ -318,17 +319,25 @@ LL |     cfg!(target_feature = "_UNEXPECTED_VALUE");
 `zbkc`
 `zbkx`
 `zbs`
+`zca`
+`zcb`
+`zcmop`
 `zdinx`
+`zfa`
 `zfh`
 `zfhmin`
 `zfinx`
 `zhinx`
 `zhinxmin`
+`zicboz`
 `zicntr`
+`zicond`
 `zicsr`
 `zifencei`
+`zihintntl`
 `zihintpause`
 `zihpm`
+`zimop`
 `zk`
 `zkn`
 `zknd`
@@ -339,6 +348,7 @@ LL |     cfg!(target_feature = "_UNEXPECTED_VALUE");
 `zksed`
 `zksh`
 `zkt`
+`ztso`
 `zvbb`
 `zvbc`
 `zve32f`