File tree Expand file tree Collapse file tree 4 files changed +27
-0
lines changed Expand file tree Collapse file tree 4 files changed +27
-0
lines changed Original file line number Diff line number Diff line change 7272 - arm-unknown-linux-gnueabihf
7373 - armv7-unknown-linux-gnueabihf
7474 - aarch64-unknown-linux-gnu
75+ - riscv64gc-unknown-linux-gnu
7576 - powerpc64le-unknown-linux-gnu
7677 - mips-unknown-linux-gnu
7778 - mips64-unknown-linux-gnuabi64
Original file line number Diff line number Diff line change @@ -185,6 +185,7 @@ others at:
185185* [ ` x86_64 ` ]
186186* [ ` arm ` ]
187187* [ ` aarch64 ` ]
188+ * [ ` riscv ` ]
188189* [ ` mips ` ]
189190* [ ` mips64 ` ]
190191* [ ` powerpc ` ]
@@ -196,6 +197,7 @@ others at:
196197[ `x86_64` ] : x86_64/index.html
197198[ `arm` ] : arm/index.html
198199[ `aarch64` ] : aarch64/index.html
200+ [ `riscv` ] : riscv/index.html
199201[ `mips` ] : mips/index.html
200202[ `mips64` ] : mips64/index.html
201203[ `powerpc` ] : powerpc/index.html
Original file line number Diff line number Diff line change @@ -55,6 +55,16 @@ pub mod arch {
5555 pub use crate :: core_arch:: aarch64:: * ;
5656 }
5757
58+ /// Platform-specific intrinsics for the `riscv` platform.
59+ ///
60+ /// See the [module documentation](../index.html) for more details.
61+ #[ cfg( any( target_arch = "riscv32" , target_arch = "riscv64" , doc) ) ]
62+ #[ doc( cfg( any( target_arch = "riscv32" , target_arch = "riscv64" ) ) ) ]
63+ #[ unstable( feature = "stdsimd" , issue = "27731" ) ]
64+ pub mod riscv {
65+ pub use crate :: core_arch:: riscv:: * ;
66+ }
67+
5868 /// Platform-specific intrinsics for the `wasm32` platform.
5969 ///
6070 /// This module provides intrinsics specific to the WebAssembly
@@ -251,6 +261,10 @@ mod aarch64;
251261#[ doc( cfg( any( target_arch = "arm" ) ) ) ]
252262mod arm;
253263
264+ #[ cfg( any( target_arch = "riscv32" , target_arch = "riscv64" , doc) ) ]
265+ #[ doc( cfg( any( target_arch = "riscv32" , target_arch = "riscv64" ) ) ) ]
266+ mod riscv;
267+
254268#[ cfg( any( target_family = "wasm" , doc) ) ]
255269#[ doc( cfg( target_family = "wasm" ) ) ]
256270mod wasm32;
Original file line number Diff line number Diff line change 1+ //! RISC-V intrinsics
2+
3+ /// Generates the `PAUSE` instruction
4+ ///
5+ /// The PAUSE instruction is a HINT that indicates the current hart's rate of instruction retirement
6+ /// should be temporarily reduced or paused. The duration of its effect must be bounded and may be zero.
7+ #[ inline]
8+ pub fn pause ( ) {
9+ unsafe { asm ! ( ".word 0x0100000F" , options( nomem, nostack) ) }
10+ }
You can’t perform that action at this time.
0 commit comments