Skip to content
Snippets Groups Projects
Unverified Commit 458f49c8 authored by Yuki Okushi's avatar Yuki Okushi Committed by GitHub
Browse files

Merge pull request #1894 from alistair23/alistair/rv32

parents 2ae4135c bdfd0159
No related branches found
No related tags found
No related merge requests found
......@@ -225,6 +225,7 @@ powerpc64-unknown-freebsd \
riscv64gc-unknown-linux-gnu \
riscv32imac-unknown-none-elf \
riscv32imc-unknown-none-elf \
riscv32gc-unknown-linux-gnu \
sparc64-unknown-netbsd \
thumbv6m-none-eabi \
......
......@@ -8,7 +8,8 @@ macro_rules! expand_align {
target_arch = "s390x",
target_arch = "sparc64",
target_arch = "aarch64",
target_arch = "riscv64"),
target_arch = "riscv64",
target_arch = "riscv32"),
repr(align(4)))]
#[cfg_attr(not(any(target_pointer_width = "32",
target_arch = "x86_64",
......@@ -17,7 +18,8 @@ macro_rules! expand_align {
target_arch = "s390x",
target_arch = "sparc64",
target_arch = "aarch64",
target_arch = "riscv64")),
target_arch = "riscv64",
target_arch = "riscv32")),
repr(align(8)))]
pub struct pthread_mutexattr_t {
#[doc(hidden)]
......
......@@ -5,22 +5,39 @@ use pthread_mutex_t;
pub type c_long = i32;
pub type c_ulong = u32;
pub type clock_t = i32;
pub type time_t = i32;
pub type suseconds_t = i32;
pub type ino_t = u32;
pub type off_t = i32;
pub type blkcnt_t = i32;
pub type fsblkcnt_t = ::c_ulong;
pub type fsfilcnt_t = ::c_ulong;
pub type rlim_t = c_ulong;
pub type shmatt_t = ::c_ulong;
pub type msgqnum_t = ::c_ulong;
pub type msglen_t = ::c_ulong;
pub type blksize_t = i32;
pub type nlink_t = u32;
pub type __u64 = ::c_ulonglong;
pub type __fsword_t = i32;
pub type fsblkcnt64_t = u64;
pub type fsfilcnt64_t = u64;
cfg_if! {
if #[cfg(target_arch = "riscv32")] {
pub type time_t = i64;
pub type suseconds_t = i64;
pub type ino_t = u64;
pub type off_t = i64;
pub type blkcnt_t = i64;
pub type fsblkcnt_t = u64;
pub type fsfilcnt_t = u64;
pub type rlim_t = u64;
pub type blksize_t = i64;
} else {
pub type time_t = i32;
pub type suseconds_t = i32;
pub type ino_t = u32;
pub type off_t = i32;
pub type blkcnt_t = i32;
pub type fsblkcnt_t = ::c_ulong;
pub type fsfilcnt_t = ::c_ulong;
pub type rlim_t = c_ulong;
pub type blksize_t = i32;
}
}
s! {
pub struct stat {
......@@ -278,6 +295,9 @@ cfg_if! {
} else if #[cfg(target_arch = "sparc")] {
mod sparc;
pub use self::sparc::*;
} else if #[cfg(target_arch = "riscv32")] {
mod riscv32;
pub use self::riscv32::*;
} else {
// Unknown target_arch
}
......
This diff is collapsed.
......@@ -1213,7 +1213,8 @@ cfg_if! {
target_arch = "x86",
target_arch = "x86_64",
target_arch = "s390x",
target_arch = "riscv64"
target_arch = "riscv64",
target_arch = "riscv32"
))] {
pub const PTHREAD_STACK_MIN: ::size_t = 16384;
} else if #[cfg(any(
......@@ -1453,7 +1454,8 @@ cfg_if! {
target_arch = "arm",
target_arch = "mips",
target_arch = "powerpc",
target_arch = "sparc"))] {
target_arch = "sparc",
target_arch = "riscv32"))] {
mod b32;
pub use self::b32::*;
} else if #[cfg(any(target_arch = "x86_64",
......
......@@ -8,6 +8,7 @@ macro_rules! expand_align {
target_arch = "s390x",
target_arch = "sparc64",
target_arch = "riscv64",
target_arch = "riscv32",
all(target_arch = "aarch64",
target_env = "musl")))]
__align: [::c_int; 0],
......@@ -17,6 +18,7 @@ macro_rules! expand_align {
target_arch = "s390x",
target_arch = "sparc64",
target_arch = "riscv64",
target_arch = "riscv32",
all(target_arch = "aarch64",
target_env = "musl"))))]
__align: [::c_long; 0],
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment