diff options
| author | Dave Huseby <dhuseby@mozilla.com> | 2015-01-16 23:51:04 -0800 |
|---|---|---|
| committer | Dave Huseby <dhuseby@mozilla.com> | 2015-02-11 14:49:06 -0800 |
| commit | cd8f31759fd04b9ce9c903fa00cae81dc5bba546 (patch) | |
| tree | 7c0cb181b5e808735036346cb9ce7789847111e3 /src/libstd/sys/common/stack.rs | |
| parent | e29f42025513374f1a88404491d1b40386acf994 (diff) | |
| download | rust-cd8f31759fd04b9ce9c903fa00cae81dc5bba546.tar.gz rust-cd8f31759fd04b9ce9c903fa00cae81dc5bba546.zip | |
bitrig integration
Diffstat (limited to 'src/libstd/sys/common/stack.rs')
| -rw-r--r-- | src/libstd/sys/common/stack.rs | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/src/libstd/sys/common/stack.rs b/src/libstd/sys/common/stack.rs index 8dd2f154fa8..bc4ea662318 100644 --- a/src/libstd/sys/common/stack.rs +++ b/src/libstd/sys/common/stack.rs @@ -189,11 +189,18 @@ pub unsafe fn record_sp_limit(limit: uint) { unsafe fn target_record_sp_limit(limit: uint) { asm!("movq $0, %fs:24" :: "r"(limit) :: "volatile") } - #[cfg(all(target_arch = "x86_64", target_os = "dragonfly"))] #[inline(always)] + #[cfg(all(target_arch = "x86_64", target_os = "dragonfly"))] + #[inline(always)] unsafe fn target_record_sp_limit(limit: uint) { asm!("movq $0, %fs:32" :: "r"(limit) :: "volatile") } + #[cfg(target_os = "bitrig")] + #[inline(always)] + unsafe fn target_record_sp_limit(_: uint) { + // segmented stacks are disabled + } + // x86 #[cfg(all(target_arch = "x86", any(target_os = "macos", target_os = "ios")))] @@ -276,12 +283,18 @@ pub unsafe fn get_sp_limit() -> uint { asm!("movq %fs:24, $0" : "=r"(limit) ::: "volatile"); return limit; } - #[cfg(all(target_arch = "x86_64", target_os = "dragonfly"))] #[inline(always)] + #[cfg(all(target_arch = "x86_64", target_os = "dragonfly"))] + #[inline(always)] unsafe fn target_get_sp_limit() -> uint { let limit; asm!("movq %fs:32, $0" : "=r"(limit) ::: "volatile"); return limit; } + #[cfg(target_os = "bitrig")] + #[inline(always)] + unsafe fn target_get_sp_limit() -> uint { + return 2048; + } // x86 |
