rust-lang / rust

Empowering everyone to build reliable and efficient software.
https://www.rust-lang.org
Other
98.5k stars 12.74k forks source link

Tracking Issue for RISC-V Ratified Extensions Intrinsics #114544

Open coastalwhite opened 1 year ago

coastalwhite commented 1 year ago

This issue tracks the implementation of all the intrinsics linked to the Ratified RISC-V Extensions. The, not yet stable intrinsics are behind the riscv_ext_intrinsics nightly feature.

Steps

Unresolved Questions

Implementation History

coastalwhite commented 1 year ago

Two additional points:

  1. Upcoming PRs should use the rustc_legacy_const_generics for immediate values instead.
  2. Prefer LLVM intrinsics to assembly. Intrinsics can be found here.
coastalwhite commented 1 year ago

Entropy Source of the Cryptographic Scalar Extension are not implemented in LLVM. Therefore, it should be implemented with inline assembly and is not part of the implemented intrinsics.

coastalwhite commented 1 year ago

Extensions such as Zfinx, Zdinx and Zhinx are all done by LLVM without intrinsics and therefore don't have to be done.