Skip to content

Commit fb4607c

Browse files
committed
riscv: use name riscv32 for 32-bit RISC-V architecture
1 parent ebe0141 commit fb4607c

File tree

3 files changed

+11
-10
lines changed

3 files changed

+11
-10
lines changed

crates/core_arch/src/core_arch_docs.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ others at:
185185
* [`x86_64`]
186186
* [`arm`]
187187
* [`aarch64`]
188-
* [`riscv`]
188+
* [`riscv32`]
189189
* [`riscv64`]
190190
* [`mips`]
191191
* [`mips64`]
@@ -198,7 +198,7 @@ others at:
198198
[`x86_64`]: x86_64/index.html
199199
[`arm`]: arm/index.html
200200
[`aarch64`]: aarch64/index.html
201-
[`riscv`]: riscv/index.html
201+
[`riscv32`]: riscv32/index.html
202202
[`riscv64`]: riscv64/index.html
203203
[`mips`]: mips/index.html
204204
[`mips64`]: mips64/index.html

crates/core_arch/src/mod.rs

+8-7
Original file line numberDiff line numberDiff line change
@@ -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::riscv32::*;
6767
}
6868

6969
/// Platform-specific intrinsics for the `riscv64` platform.
@@ -73,8 +73,9 @@ 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-14).
78+
pub use crate::core_arch::riscv32::*;
7879
}
7980

8081
/// Platform-specific intrinsics for the `wasm32` platform.
@@ -275,7 +276,7 @@ mod arm;
275276

276277
#[cfg(any(target_arch = "riscv32", target_arch = "riscv64", doc))]
277278
#[doc(cfg(any(target_arch = "riscv32", target_arch = "riscv64")))]
278-
mod riscv;
279+
mod riscv32;
279280

280281
#[cfg(any(target_arch = "riscv64", doc))]
281282
#[doc(cfg(any(target_arch = "riscv64")))]

crates/core_arch/src/riscv/mod.rs renamed to crates/core_arch/src/riscv32/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//! RISC-V intrinsics
1+
//! RISC-V RV32 intrinsics
22
33
use crate::arch::asm;
44

0 commit comments

Comments
 (0)