Skip to content
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

Tracking Issue for RISC-V Ratified Extensions Intrinsics #114544

Open
2 of 11 tasks
coastalwhite opened this issue Aug 6, 2023 · 3 comments
Open
2 of 11 tasks

Tracking Issue for RISC-V Ratified Extensions Intrinsics #114544

coastalwhite opened this issue Aug 6, 2023 · 3 comments
Labels
A-floating-point Area: Floating point numbers and arithmetic A-SIMD Area: SIMD (Single Instruction Multiple Data) A-target-feature Area: Enabling/disabling target features like AVX, Neon, etc. C-tracking-issue Category: An issue tracking the progress of sth. like the implementation of an RFC O-riscv Target: RISC-V architecture T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.

Comments

@coastalwhite
Copy link
Contributor

coastalwhite commented Aug 6, 2023

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 coastalwhite added C-tracking-issue Category: An issue tracking the progress of sth. like the implementation of an RFC T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. labels Aug 6, 2023
coastalwhite added a commit to coastalwhite/rust that referenced this issue Aug 6, 2023
@coastalwhite
Copy link
Contributor Author

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
Copy link
Contributor Author

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
Copy link
Contributor Author

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

bors added a commit to rust-lang-ci/rust that referenced this issue Oct 30, 2023
…features, r=Amanieu

Stabilize Ratified RISC-V Target Features

Stabilization PR for the ratified RISC-V target features. This stabilizes some of the target features tracked by rust-lang#44839. This is also a part of rust-lang#114544 and eventually needed for the RISC-V part of rust-lang/rfcs#3268.

There is a similar PR for the the stdarch crate which can be found at rust-lang/stdarch#1476.

This was briefly discussed on Zulip
(https://rust-lang.zulipchat.com/#narrow/stream/250483-t-compiler.2Frisc-v/topic/Stabilization.20of.20RISC-V.20Target.20Features/near/394793704).

Specifically, this PR stabilizes the:
* Atomic Instructions (A) on v2.0
* Compressed Instructions (C) on v2.0
* ~Double-Precision Floating-Point (D) on v2.2~
* ~Embedded Base (E) (Given as `RV32E` / `RV64E`) on v2.0~
* ~Single-Precision Floating-Point (F) on v2.2~
* Integer Multiplication and Division (M) on v2.0
* ~Vector Operations (V) on v1.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`
* ~Double-Precision Floating-Point in Integer Register (Zdinx) on v1.0~
* ~Half-Precision Floating-Point (Zfh) on v1.0~
* ~Minimal Half-Precision Floating-Point (Zfhmin) on v1.0~
* ~Single-Precision Floating-Point in Integer Register (Zfinx) on v1.0~
* ~Half-Precision Floating-Point in Integer Register (Zhinx) on v1.0~
* ~Minimal Half-Precision Floating-Point in Integer Register (Zhinxmin) on v1.0~

r? `@Amanieu`
endeneer added a commit to endeneer/hypocaust-2 that referenced this issue Nov 30, 2023
This commit is to solve the following build error:
```
error[E0658]: use of unstable library feature 'riscv_ext_intrinsics'
   --> src/guest/vmexit.rs:236:9
    |
236 |         core::arch::riscv64::hfence_gvma_all();
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: see issue #114544 <rust-lang/rust#114544> for more information
    = help: add `#![feature(riscv_ext_intrinsics)]` to the crate attributes to enable
```

Signed-off-by: Tan En De <ende.tan@starfivetech.com>
@workingjubilee workingjubilee added O-riscv Target: RISC-V architecture A-floating-point Area: Floating point numbers and arithmetic A-SIMD Area: SIMD (Single Instruction Multiple Data) A-target-feature Area: Enabling/disabling target features like AVX, Neon, etc. labels Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-floating-point Area: Floating point numbers and arithmetic A-SIMD Area: SIMD (Single Instruction Multiple Data) A-target-feature Area: Enabling/disabling target features like AVX, Neon, etc. C-tracking-issue Category: An issue tracking the progress of sth. like the implementation of an RFC O-riscv Target: RISC-V architecture T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

2 participants