Commit b084603
committed
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".1 parent 38c560a commit b084603
File tree
2 files changed
+21
-1
lines changed- compiler/rustc_target/src
- tests/ui/check-cfg
2 files changed
+21
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
491 | 491 | | |
492 | 492 | | |
493 | 493 | | |
494 | | - | |
| 494 | + | |
| 495 | + | |
495 | 496 | | |
496 | 497 | | |
497 | 498 | | |
| |||
520 | 521 | | |
521 | 522 | | |
522 | 523 | | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
523 | 527 | | |
| 528 | + | |
524 | 529 | | |
525 | 530 | | |
526 | 531 | | |
527 | 532 | | |
528 | 533 | | |
| 534 | + | |
529 | 535 | | |
| 536 | + | |
530 | 537 | | |
531 | 538 | | |
| 539 | + | |
532 | 540 | | |
533 | 541 | | |
| 542 | + | |
534 | 543 | | |
535 | 544 | | |
536 | 545 | | |
| |||
541 | 550 | | |
542 | 551 | | |
543 | 552 | | |
| 553 | + | |
544 | 554 | | |
545 | 555 | | |
546 | 556 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| 52 | + | |
52 | 53 | | |
53 | 54 | | |
54 | 55 | | |
| |||
318 | 319 | | |
319 | 320 | | |
320 | 321 | | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
321 | 325 | | |
| 326 | + | |
322 | 327 | | |
323 | 328 | | |
324 | 329 | | |
325 | 330 | | |
326 | 331 | | |
| 332 | + | |
327 | 333 | | |
| 334 | + | |
328 | 335 | | |
329 | 336 | | |
| 337 | + | |
330 | 338 | | |
331 | 339 | | |
| 340 | + | |
332 | 341 | | |
333 | 342 | | |
334 | 343 | | |
| |||
339 | 348 | | |
340 | 349 | | |
341 | 350 | | |
| 351 | + | |
342 | 352 | | |
343 | 353 | | |
344 | 354 | | |
| |||
0 commit comments