-
Notifications
You must be signed in to change notification settings - Fork 568
RISC-V Extensions update including 29 extensions to stabilize #1987
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
c60bc59 to
25d43f0
Compare
25d43f0 to
a35f1c8
Compare
Possible ConsiderationSome platform behavior extensions are hard to make a short, concise summary. Do we prefer to keep long(er than usual) descriptions? Or, do we just link to the RISC-V Profiles documentation and let it explain? My Current PositionI prefer the latter if allowed but mdbook design is confirmed not broken so the current approach (long descriptions) is okay for me. |
|
Ping. Can someone review this PR? |
a35f1c8 to
d27acfa
Compare
d27acfa to
5527d55
Compare
5527d55 to
9d250ee
Compare
|
This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
9d250ee to
94395db
Compare
This commit directly corresponds to rust-lang/rust#145948. See that proposal for criteria of 29 new extensions. Notes (for the Rust reference): * Updated existing `a` and `c` to imply its subset(s). * `a` equals `zalrsc` and `zaamo` combined (imply both from `a`). * The C extension always implies the Zca extension and conditionally implies Zcf and/or Zcd extensions (on RISC-V) but `c` (Rust target feature) only implies `zca` as both `zcf` and `zcd` are not to be stabilized on this proposal. * For each extension, linked to the first document containing it with the ratified state. For instance, all extensions present in the RVA23 profiles link to (3) (despite that they are present in (2)) because they were not ratified at the time when (2) is published. References: 1. RISC-V Instruction Set Manual (version 20250508): <https://github.com/riscv/riscv-isa-manual/tree/20250508> 2. RISC-V Profiles (version 1.0 - RVA23 profiles were not ratified at the time): <https://github.com/riscv/riscv-profiles/tree/v1.0> 3. RISC-V Profiles (RVA23/RVB23-ratified version): <https://github.com/riscv/riscv-profiles/tree/rva23-rvb23-ratified>
94395db to
317dbf6
Compare
|
Rebased and made some clarification in the commit message (the same as the edited initial comment). |
|
3 days ago, corresponding stabilization proposal To reviewers: Please prepare for actual stabilization. It is not to be merged for now (in the FCP period) but approving this PR is appreciated! EDIT: I checked the changes again and no rebase seems required. |
|
The corresponding change (pull request) has finished its FCP and has been marked Complete. I understand that many people are on holiday at the end of the year (so there’s no urgency), but I would appreciate it if you could approve this change as well. |
|
@Amanieu Thanks for re-approval. However, this project requires approvals from at least two person (with write access) and we have to find someone else to approve this PR. |
…anieu
Stabilize 29 RISC-V target features (`riscv_ratified_v2`)
This commit stabilizes RISC-V target features with following constraints:
* Describes a ratified extension.
* Implemented on Rust 1.88.0 or before.
Waiting for four+ version cycles seems sufficient.
* Does not disrupt current rustc's target feature (cf. #140570) + ABI (cf. #132618) handling.
It excludes `E` and all floating point-arithmetic extensions. The `Zfinx` family does not involve floating point registers but not stabilizing for now to avoid possible confusion between the `F` extension family.
* Not vector-related (floating point and integer).
While integer vector subsets should not cause any ABI issues (as they don't use ABI-dependent floating point registers), we need to discuss before stabilizing them.
* Supported by the lowest LLVM version supported by rustc (LLVM 20).
List of target features to be stabilized:
1. `b`
2. `za64rs` (no-RT)
3. `za128rs` (no-RT)
4. `zaamo`
5. `zabha`
6. `zacas`
7. `zalrsc`
8. `zama16b` (no-RT)
9. `zawrs`
10. `zca`
11. `zcb`
12. `zcmop`
13. `zic64b` (no-RT)
14. `zicbom`
15. `zicbop` (no-RT)
16. `zicboz`
17. `ziccamoa` (no-RT)
18. `ziccif` (no-RT)
19. `zicclsm` (no-RT)
20. `ziccrse` (no-RT)
21. `zicntr`
22. `zicond`
23. `zicsr`
24. `zifencei`
25. `zihintntl`
26. `zihintpause`
27. `zihpm`
28. `zimop`
29. `ztso`
Of which, 20 of them (29 minus 9 "no-RT" target features) support runtime detection through `std::arch::is_riscv_feature_detected!()`.
Corresponding PR for the Reference: rust-lang/reference#1987
|
@a4lg just one person needs to approve, provided they are member of these teams |
|
@tshepang Ah I misunderstood some of GitHub system messages. Sorry. Still, it needs an approve from others. Given the fact that corresponding rust-lang/rust#145948 is already in the merge queue, I'd like to avoid de-sync between the implementation and the reference manual. |
ehuss
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Merging now that rust-lang/rust#145948 has been merged.
…anieu
Stabilize 29 RISC-V target features (`riscv_ratified_v2`)
This commit stabilizes RISC-V target features with following constraints:
* Describes a ratified extension.
* Implemented on Rust 1.88.0 or before.
Waiting for four+ version cycles seems sufficient.
* Does not disrupt current rustc's target feature (cf. rust-lang/rust#140570) + ABI (cf. rust-lang/rust#132618) handling.
It excludes `E` and all floating point-arithmetic extensions. The `Zfinx` family does not involve floating point registers but not stabilizing for now to avoid possible confusion between the `F` extension family.
* Not vector-related (floating point and integer).
While integer vector subsets should not cause any ABI issues (as they don't use ABI-dependent floating point registers), we need to discuss before stabilizing them.
* Supported by the lowest LLVM version supported by rustc (LLVM 20).
List of target features to be stabilized:
1. `b`
2. `za64rs` (no-RT)
3. `za128rs` (no-RT)
4. `zaamo`
5. `zabha`
6. `zacas`
7. `zalrsc`
8. `zama16b` (no-RT)
9. `zawrs`
10. `zca`
11. `zcb`
12. `zcmop`
13. `zic64b` (no-RT)
14. `zicbom`
15. `zicbop` (no-RT)
16. `zicboz`
17. `ziccamoa` (no-RT)
18. `ziccif` (no-RT)
19. `zicclsm` (no-RT)
20. `ziccrse` (no-RT)
21. `zicntr`
22. `zicond`
23. `zicsr`
24. `zifencei`
25. `zihintntl`
26. `zihintpause`
27. `zihpm`
28. `zimop`
29. `ztso`
Of which, 20 of them (29 minus 9 "no-RT" target features) support runtime detection through `std::arch::is_riscv_feature_detected!()`.
Corresponding PR for the Reference: rust-lang/reference#1987
This commit directly corresponds to rust-lang/rust#145948.
See that proposal for criteria of 29 new extensions.
Notes (for the Rust reference)
aandcto imply its subset(s).aequalszalrscandzaamocombined (imply both froma).c(Rust target feature) only implieszcaas bothzcfandzcdare not to be stabilized on this proposal.For instance, all extensions present in the RVA23 profiles link to (3) (despite that they are present in (2)) because they were not ratified at the time when (2) is published.
References
https://github.com/riscv/riscv-isa-manual/tree/20250508
https://github.com/riscv/riscv-profiles/tree/v1.0
https://github.com/riscv/riscv-profiles/tree/rva23-rvb23-ratified