diff options
| author | Akos Kiss <akiss@inf.u-szeged.hu> | 2014-12-12 23:39:27 +0000 |
|---|---|---|
| committer | Akos Kiss <akiss@inf.u-szeged.hu> | 2015-01-03 15:16:10 +0000 |
| commit | 6e5fb8bd1bef7a36c32194b35ec16d0365adbcf1 (patch) | |
| tree | b6bbb41f6e5b897a93ffb89d1603ab7c16096cf1 /src/libstd/sys | |
| parent | fc2ba13939aa9672d886beb06efde7aeda2d5f7f (diff) | |
| download | rust-6e5fb8bd1bef7a36c32194b35ec16d0365adbcf1.tar.gz rust-6e5fb8bd1bef7a36c32194b35ec16d0365adbcf1.zip | |
Initial version of AArch64 support.
Adds AArch64 knowledge to: * configure, * make files, * sources, * tests, and * documentation.
Diffstat (limited to 'src/libstd/sys')
| -rw-r--r-- | src/libstd/sys/common/stack.rs | 13 | ||||
| -rw-r--r-- | src/libstd/sys/unix/c.rs | 11 | ||||
| -rw-r--r-- | src/libstd/sys/unix/stack_overflow.rs | 3 | ||||
| -rw-r--r-- | src/libstd/sys/unix/sync.rs | 8 |
4 files changed, 27 insertions, 8 deletions
diff --git a/src/libstd/sys/common/stack.rs b/src/libstd/sys/common/stack.rs index 2a88e20c8fa..ce5ab67ae61 100644 --- a/src/libstd/sys/common/stack.rs +++ b/src/libstd/sys/common/stack.rs @@ -1,4 +1,4 @@ -// Copyright 2013 The Rust Project Developers. See the COPYRIGHT +// Copyright 2013-2015 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // @@ -226,6 +226,11 @@ pub unsafe fn record_sp_limit(limit: uint) { } } + // aarch64 - FIXME(AARCH64): missing... + #[cfg(target_arch = "aarch64")] + unsafe fn target_record_sp_limit(_: uint) { + } + // iOS segmented stack is disabled for now, see related notes #[cfg(all(target_arch = "arm", target_os = "ios"))] #[inline(always)] unsafe fn target_record_sp_limit(_: uint) { @@ -315,6 +320,12 @@ pub unsafe fn get_sp_limit() -> uint { } } + // aarch64 - FIXME(AARCH64): missing... + #[cfg(target_arch = "aarch64")] + unsafe fn target_get_sp_limit() -> uint { + 1024 + } + // iOS doesn't support segmented stacks yet. This function might // be called by runtime though so it is unsafe to mark it as // unreachable, let's return a fixed constant. diff --git a/src/libstd/sys/unix/c.rs b/src/libstd/sys/unix/c.rs index 1bb8ed78177..ca419d1c7f4 100644 --- a/src/libstd/sys/unix/c.rs +++ b/src/libstd/sys/unix/c.rs @@ -1,4 +1,4 @@ -// Copyright 2014 The Rust Project Developers. See the COPYRIGHT +// Copyright 2014-2015 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // @@ -28,7 +28,8 @@ pub const FIONBIO: libc::c_ulong = 0x8004667e; #[cfg(any(all(target_os = "linux", any(target_arch = "x86", target_arch = "x86_64", - target_arch = "arm")), + target_arch = "arm", + target_arch = "aarch64")), target_os = "android"))] pub const FIONBIO: libc::c_ulong = 0x5421; #[cfg(all(target_os = "linux", @@ -43,7 +44,8 @@ pub const FIOCLEX: libc::c_ulong = 0x20006601; #[cfg(any(all(target_os = "linux", any(target_arch = "x86", target_arch = "x86_64", - target_arch = "arm")), + target_arch = "arm", + target_arch = "aarch64")), target_os = "android"))] pub const FIOCLEX: libc::c_ulong = 0x5451; #[cfg(all(target_os = "linux", @@ -127,7 +129,8 @@ mod select { #[cfg(any(all(target_os = "linux", any(target_arch = "x86", target_arch = "x86_64", - target_arch = "arm")), + target_arch = "arm", + target_arch = "aarch64")), target_os = "android"))] mod signal { use libc; diff --git a/src/libstd/sys/unix/stack_overflow.rs b/src/libstd/sys/unix/stack_overflow.rs index 95ab9b459d6..1fd619a28db 100644 --- a/src/libstd/sys/unix/stack_overflow.rs +++ b/src/libstd/sys/unix/stack_overflow.rs @@ -1,4 +1,4 @@ -// Copyright 2014 The Rust Project Developers. See the COPYRIGHT +// Copyright 2014-2015 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // @@ -147,6 +147,7 @@ mod imp { #[cfg(any(all(target_os = "linux", target_arch = "x86"), // may not match all(target_os = "linux", target_arch = "x86_64"), all(target_os = "linux", target_arch = "arm"), // may not match + all(target_os = "linux", target_arch = "aarch64"), all(target_os = "linux", target_arch = "mips"), // may not match all(target_os = "linux", target_arch = "mipsel"), // may not match target_os = "android"))] // may not match diff --git a/src/libstd/sys/unix/sync.rs b/src/libstd/sys/unix/sync.rs index 77c5582d8a4..1d8a59dbbb3 100644 --- a/src/libstd/sys/unix/sync.rs +++ b/src/libstd/sys/unix/sync.rs @@ -1,4 +1,4 @@ -// Copyright 2014 The Rust Project Developers. See the COPYRIGHT +// Copyright 2014-2015 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // @@ -125,15 +125,19 @@ mod os { target_arch = "mips", target_arch = "mipsel"))] const __SIZEOF_PTHREAD_MUTEX_T: uint = 24 - 8; + #[cfg(target_arch = "aarch64")] + const __SIZEOF_PTHREAD_MUTEX_T: uint = 48 - 8; #[cfg(any(target_arch = "x86_64", target_arch = "x86", target_arch = "arm", + target_arch = "aarch64", target_arch = "mips", target_arch = "mipsel"))] const __SIZEOF_PTHREAD_COND_T: uint = 48 - 8; - #[cfg(target_arch = "x86_64")] + #[cfg(any(target_arch = "x86_64", + target_arch = "aarch64"))] const __SIZEOF_PTHREAD_RWLOCK_T: uint = 56 - 8; #[cfg(any(target_arch = "x86", |
