Skip to content

Commit ec979de

Browse files
authored
Merge pull request #1415 from coastalwhite/stabilize-riscv-target-features
Doc: Add the RISC-V stabilized target features
2 parents 16fd3c0 + 5d015eb commit ec979de

File tree

1 file changed

+60
-0
lines changed

1 file changed

+60
-0
lines changed

src/attributes/codegen.md

+60
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,66 @@ Feature | Implicitly Enables | Feature Name
204204
`tme` | | FEAT_TME - Transactional Memory Extension
205205
`vh` | | FEAT_VHE - Virtualization Host Extensions
206206

207+
#### `riscv32` or `riscv64`
208+
209+
This platform requires that `#[target_feature]` is only applied to [`unsafe`
210+
functions][unsafe function].
211+
212+
Further documentation on these features can be found in their respective
213+
specification. Many specifications are described in the [RISC-V ISA Manual] or
214+
in another manual hosted on the [RISC-V GitHub Account].
215+
216+
[RISC-V ISA Manual]: https://github.com/riscv/riscv-isa-manual
217+
[RISC-V GitHub Account]: https://github.com/riscv
218+
219+
Feature | Implicitly Enables | Description
220+
------------|---------------------|-------------------
221+
`a` | | [A][rv-a] — Atomic instructions
222+
`c` | | [C][rv-c] — Compressed instructions
223+
`m` | | [M][rv-m] — Integer Multiplication and Division instructions
224+
`zb` | `zba`, `zbc`, `zbs` | [Zb][rv-zb] — Bit Manipulation instructions
225+
`zba` | | [Zba][rv-zb-zba] — Address Generation instructions
226+
`zbb` | | [Zbb][rv-zb-zbb] — Basic bit-manipulation
227+
`zbc` | | [Zbc][rv-zb-zbc] — Carry-less multiplication
228+
`zbkb` | | [Zbkb][rv-zb-zbkb] — Bit Manipulation Instructions for Cryptography
229+
`zbkc` | | [Zbkc][rv-zb-zbc] — Carry-less multiplication for Cryptography
230+
`zbkx` | | [Zbkx][rv-zb-zbkx] — Crossbar permutations
231+
`zbs` | | [Zbs][rv-zb-zbs] — Single-bit instructions
232+
`zk` | `zkn`, `zkr`, `zks`, `zkt`, `zbkb`, `zbkc`, `zkbx` | [Zk][rv-zk] — Scalar Cryptography
233+
`zkn` | `zknd`, `zkne`, `zknh`, `zbkb`, `zbkc`, `zkbx` | [Zkn][rv-zkn] — NIST Algorithm suite extension
234+
`zknd` | | [Zknd][rv-zknd] — NIST Suite: AES Decryption
235+
`zkne` | | [Zkne][rv-zkne] — NIST Suite: AES Encryption
236+
`zknh` | | [Zknh][rv-zknh] — NIST Suite: Hash Function Instructions
237+
`zkr` | | [Zkr][rv-zkr] — Entropy Source Extension
238+
`zks` | `zksed`, `zksh`, `zbkb`, `zbkc`, `zkbx` | [Zks][rv-zks] — ShangMi Algorithm Suite
239+
`zksed` | | [Zksed][rv-zksed] — ShangMi Suite: SM4 Block Cipher Instructions
240+
`zksh` | | [Zksh][rv-zksh] — ShangMi Suite: SM3 Hash Function Instructions
241+
`zkt` | | [Zkt][rv-zkt] — Data Independent Execution Latency Subset
242+
243+
<!-- Keep links near each table to make it easier to move and update. -->
244+
245+
[rv-a]: https://github.com/riscv/riscv-isa-manual/blob/de46343a245c6ee1f7b1a40c92fe1a86bd4f4978/src/a-st-ext.adoc
246+
[rv-c]: https://github.com/riscv/riscv-isa-manual/blob/de46343a245c6ee1f7b1a40c92fe1a86bd4f4978/src/c-st-ext.adoc
247+
[rv-m]: https://github.com/riscv/riscv-isa-manual/blob/de46343a245c6ee1f7b1a40c92fe1a86bd4f4978/src/m-st-ext.adoc
248+
[rv-zb]: https://github.com/riscv/riscv-bitmanip
249+
[rv-zb-zba]: https://github.com/riscv/riscv-bitmanip/blob/main/bitmanip/zba.adoc
250+
[rv-zb-zbb]: https://github.com/riscv/riscv-bitmanip/blob/main/bitmanip/zbb.adoc
251+
[rv-zb-zbc]: https://github.com/riscv/riscv-bitmanip/blob/main/bitmanip/zbc.adoc
252+
[rv-zb-zbkb]: https://github.com/riscv/riscv-bitmanip/blob/main/bitmanip/zbkb.adoc
253+
[rv-zb-zbkc]: https://github.com/riscv/riscv-bitmanip/blob/main/bitmanip/zbkc.adoc
254+
[rv-zb-zbkx]: https://github.com/riscv/riscv-bitmanip/blob/main/bitmanip/zbkx.adoc
255+
[rv-zb-zbs]: https://github.com/riscv/riscv-bitmanip/blob/main/bitmanip/zbs.adoc
256+
[rv-zk]: https://github.com/riscv/riscv-crypto/blob/e2dd7d98b7f34d477e38cb5fd7a3af4379525189/doc/scalar/riscv-crypto-scalar-zk.adoc
257+
[rv-zkn]: https://github.com/riscv/riscv-crypto/blob/e2dd7d98b7f34d477e38cb5fd7a3af4379525189/doc/scalar/riscv-crypto-scalar-zkn.adoc
258+
[rv-zkne]: https://github.com/riscv/riscv-crypto/blob/e2dd7d98b7f34d477e38cb5fd7a3af4379525189/doc/scalar/riscv-crypto-scalar-zkne.adoc
259+
[rv-zknd]: https://github.com/riscv/riscv-crypto/blob/e2dd7d98b7f34d477e38cb5fd7a3af4379525189/doc/scalar/riscv-crypto-scalar-zknd.adoc
260+
[rv-zknh]: https://github.com/riscv/riscv-crypto/blob/e2dd7d98b7f34d477e38cb5fd7a3af4379525189/doc/scalar/riscv-crypto-scalar-zknh.adoc
261+
[rv-zkr]: https://github.com/riscv/riscv-crypto/blob/e2dd7d98b7f34d477e38cb5fd7a3af4379525189/doc/scalar/riscv-crypto-scalar-zkr.adoc
262+
[rv-zks]: https://github.com/riscv/riscv-crypto/blob/e2dd7d98b7f34d477e38cb5fd7a3af4379525189/doc/scalar/riscv-crypto-scalar-zks.adoc
263+
[rv-zksed]: https://github.com/riscv/riscv-crypto/blob/e2dd7d98b7f34d477e38cb5fd7a3af4379525189/doc/scalar/riscv-crypto-scalar-zksed.adoc
264+
[rv-zksh]: https://github.com/riscv/riscv-crypto/blob/e2dd7d98b7f34d477e38cb5fd7a3af4379525189/doc/scalar/riscv-crypto-scalar-zksh.adoc
265+
[rv-zkt]: https://github.com/riscv/riscv-crypto/blob/e2dd7d98b7f34d477e38cb5fd7a3af4379525189/doc/scalar/riscv-crypto-scalar-zkr.adoc
266+
207267
#### `wasm32` or `wasm64`
208268

209269
`#[target_feature]` may be used with both safe and

0 commit comments

Comments
 (0)