diff options
| author | Mathieu David <mathieudavid@mathieudavid.org> | 2015-07-27 20:46:01 +0200 |
|---|---|---|
| committer | Mathieu David <mathieudavid@mathieudavid.org> | 2015-07-27 20:46:01 +0200 |
| commit | f6e9240a99e86d2c799dc29f179dd2870e51f71d (patch) | |
| tree | a7e5ba20745b16949a45a4612b2708e262693a7b /src/libstd/sys/common/stack.rs | |
| parent | 003c3eaa62981b791f9eb7bcad015baa1e00d98c (diff) | |
| parent | 3351afeecffcc9ebaeb1188a5cde976da8e4a5aa (diff) | |
| download | rust-f6e9240a99e86d2c799dc29f179dd2870e51f71d.tar.gz rust-f6e9240a99e86d2c799dc29f179dd2870e51f71d.zip | |
Fix the relative path issue by including the files using include_bytes!
Diffstat (limited to 'src/libstd/sys/common/stack.rs')
| -rw-r--r-- | src/libstd/sys/common/stack.rs | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/src/libstd/sys/common/stack.rs b/src/libstd/sys/common/stack.rs index 11982ebc572..41c8ac4aed3 100644 --- a/src/libstd/sys/common/stack.rs +++ b/src/libstd/sys/common/stack.rs @@ -170,8 +170,7 @@ pub unsafe fn record_sp_limit(limit: usize) { asm!("movl $$0x48+90*4, %eax movl $0, %gs:(%eax)" :: "r"(limit) : "eax" : "volatile") } - #[cfg(all(target_arch = "x86", - any(target_os = "linux", target_os = "freebsd")))] + #[cfg(all(target_arch = "x86", target_os = "linux"))] #[inline(always)] unsafe fn target_record_sp_limit(limit: usize) { asm!("movl $0, %gs:48" :: "r"(limit) :: "volatile") @@ -197,11 +196,14 @@ pub unsafe fn record_sp_limit(limit: usize) { // aarch64 - FIXME(AARCH64): missing... // powerpc - FIXME(POWERPC): missing... // arm-ios - iOS segmented stack is disabled for now, see related notes - // openbsd - segmented stack is disabled + // openbsd/bitrig/netbsd - no segmented stacks. + // x86-freebsd - no segmented stacks. #[cfg(any(target_arch = "aarch64", target_arch = "powerpc", all(target_arch = "arm", target_os = "ios"), + all(target_arch = "x86", target_os = "freebsd"), target_os = "bitrig", + target_os = "netbsd", target_os = "openbsd"))] unsafe fn target_record_sp_limit(_: usize) { } @@ -261,8 +263,7 @@ pub unsafe fn get_sp_limit() -> usize { movl %gs:(%eax), $0" : "=r"(limit) :: "eax" : "volatile"); return limit; } - #[cfg(all(target_arch = "x86", - any(target_os = "linux", target_os = "freebsd")))] + #[cfg(all(target_arch = "x86", target_os = "linux"))] #[inline(always)] unsafe fn target_get_sp_limit() -> usize { let limit; @@ -290,15 +291,18 @@ pub unsafe fn get_sp_limit() -> usize { // aarch64 - FIXME(AARCH64): missing... // powerpc - FIXME(POWERPC): missing... - // arm-ios - iOS doesn't support segmented stacks yet. - // openbsd - OpenBSD doesn't support segmented stacks. + // arm-ios - no segmented stacks. + // openbsd/bitrig/netbsd - no segmented stacks. + // x86-freebsd - no segmented stacks.. // // This function might be called by runtime though // so it is unsafe to unreachable, let's return a fixed constant. #[cfg(any(target_arch = "aarch64", target_arch = "powerpc", all(target_arch = "arm", target_os = "ios"), + all(target_arch = "x86", target_os = "freebsd"), target_os = "bitrig", + target_os = "netbsd", target_os = "openbsd"))] #[inline(always)] unsafe fn target_get_sp_limit() -> usize { |
