@@ -56,14 +56,14 @@ pub mod arch {
5656 pub use crate :: core_arch:: aarch64:: * ;
5757 }
5858
59- /// Platform-specific intrinsics for the `riscv ` platform.
59+ /// Platform-specific intrinsics for the `riscv32 ` platform.
6060 ///
6161 /// See the [module documentation](../index.html) for more details.
62- #[ cfg( any( target_arch = "riscv32" , target_arch = "riscv64" , doc) ) ]
63- #[ doc( cfg( any( target_arch = "riscv32" , target_arch = "riscv64" ) ) ) ]
62+ #[ cfg( any( target_arch = "riscv32" , doc) ) ]
63+ #[ doc( cfg( any( target_arch = "riscv32" ) ) ) ]
6464 #[ unstable( feature = "stdsimd" , issue = "27731" ) ]
65- pub mod riscv {
66- pub use crate :: core_arch:: riscv :: * ;
65+ pub mod riscv32 {
66+ pub use crate :: core_arch:: riscv_shared :: * ;
6767 }
6868
6969 /// Platform-specific intrinsics for the `riscv64` platform.
@@ -73,8 +73,11 @@ pub mod arch {
7373 #[ doc( cfg( any( target_arch = "riscv64" ) ) ) ]
7474 #[ unstable( feature = "stdsimd" , issue = "27731" ) ]
7575 pub mod riscv64 {
76- pub use crate :: core_arch:: riscv:: * ;
7776 pub use crate :: core_arch:: riscv64:: * ;
77+ // RISC-V RV64 supports all RV32 instructions as well in current specifications (2022-01-05).
78+ // Module `riscv_shared` includes instructions available under all RISC-V platforms,
79+ // i.e. RISC-V RV32 instructions.
80+ pub use crate :: core_arch:: riscv_shared:: * ;
7881 }
7982
8083 /// Platform-specific intrinsics for the `wasm32` platform.
@@ -275,7 +278,7 @@ mod arm;
275278
276279#[ cfg( any( target_arch = "riscv32" , target_arch = "riscv64" , doc) ) ]
277280#[ doc( cfg( any( target_arch = "riscv32" , target_arch = "riscv64" ) ) ) ]
278- mod riscv ;
281+ mod riscv_shared ;
279282
280283#[ cfg( any( target_arch = "riscv64" , doc) ) ]
281284#[ doc( cfg( any( target_arch = "riscv64" ) ) ) ]
0 commit comments