diff --git a/src/liballoc_jemalloc/lib.rs b/src/liballoc_jemalloc/lib.rs index 347e97e6ffc..aae0528e42c 100644 --- a/src/liballoc_jemalloc/lib.rs +++ b/src/liballoc_jemalloc/lib.rs @@ -77,7 +77,8 @@ #[cfg(all(any(target_arch = "x86", target_arch = "x86_64", target_arch = "aarch64", - target_arch = "powerpc64")))] + target_arch = "powerpc64", + target_arch = "mips64")))] const MIN_ALIGN: usize = 16; // MALLOCX_ALIGN(a) macro diff --git a/src/liballoc_system/lib.rs b/src/liballoc_system/lib.rs index 9eade937bfb..2c0c6d068ca 100644 --- a/src/liballoc_system/lib.rs +++ b/src/liballoc_system/lib.rs @@ -32,7 +32,8 @@ target_arch = "asmjs")))] const MIN_ALIGN: usize = 8; #[cfg(all(any(target_arch = "x86_64", - target_arch = "aarch64")))] + target_arch = "aarch64", + target_arch = "mips64")))] const MIN_ALIGN: usize = 16; #[no_mangle] diff --git a/src/libpanic_unwind/gcc.rs b/src/libpanic_unwind/gcc.rs index bd0c2f5126d..c2e8eccbd22 100644 --- a/src/libpanic_unwind/gcc.rs +++ b/src/libpanic_unwind/gcc.rs @@ -124,7 +124,7 @@ fn rust_exception_class() -> uw::_Unwind_Exception_Class { #[cfg(any(target_arch = "arm", target_arch = "aarch64"))] const UNWIND_DATA_REG: (i32, i32) = (0, 1); // R0, R1 / X0, X1 -#[cfg(any(target_arch = "mips", target_arch = "mipsel"))] +#[cfg(any(target_arch = "mips", target_arch = "mipsel", target_arch = "mips64"))] const UNWIND_DATA_REG: (i32, i32) = (4, 5); // A0, A1 #[cfg(any(target_arch = "powerpc", target_arch = "powerpc64"))] diff --git a/src/libstd/env.rs b/src/libstd/env.rs index 753411991ab..0380965ed20 100644 --- a/src/libstd/env.rs +++ b/src/libstd/env.rs @@ -661,6 +661,7 @@ pub mod consts { /// - arm /// - aarch64 /// - mips + /// - mips64 /// - powerpc /// - powerpc64 #[stable(feature = "env", since = "1.0.0")] @@ -928,6 +929,11 @@ mod arch { pub const ARCH: &'static str = "mips"; } +#[cfg(target_arch = "mips64")] +mod arch { + pub const ARCH: &'static str = "mips64"; +} + #[cfg(target_arch = "powerpc")] mod arch { pub const ARCH: &'static str = "powerpc"; diff --git a/src/libstd/os/linux/raw.rs b/src/libstd/os/linux/raw.rs index 1be76961fea..0f62877500b 100644 --- a/src/libstd/os/linux/raw.rs +++ b/src/libstd/os/linux/raw.rs @@ -155,6 +155,11 @@ pub struct stat { } } +#[cfg(target_arch = "mips64")] +mod arch { + pub use libc::{off_t, ino_t, nlink_t, blksize_t, blkcnt_t, stat, time_t}; +} + #[cfg(target_arch = "aarch64")] mod arch { use os::raw::{c_long, c_int}; diff --git a/src/libunwind/libunwind.rs b/src/libunwind/libunwind.rs index 680ad3ecd64..8292a684178 100644 --- a/src/libunwind/libunwind.rs +++ b/src/libunwind/libunwind.rs @@ -56,6 +56,9 @@ pub enum _Unwind_Reason_Code { #[cfg(target_arch = "mips")] pub const unwinder_private_data_size: usize = 2; +#[cfg(target_arch = "mips64")] +pub const unwinder_private_data_size: usize = 2; + #[cfg(any(target_arch = "powerpc", target_arch = "powerpc64"))] pub const unwinder_private_data_size: usize = 2;