about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorManish Goregaokar <manishsmail@gmail.com>2015-06-03 14:46:41 +0530
committerManish Goregaokar <manishsmail@gmail.com>2015-06-03 14:46:41 +0530
commite490c17eb5d85d6b968d91b2ca93f3607934e78d (patch)
tree5f5ba78b6cf176d8cef8cb89c3c1a7af04aeac9e /src/libstd
parent27dd5e9ce9ad87c4273157154f4b3907cd529a53 (diff)
parent506d5a8d1946d53f6d052c5b7d6c6d50caa4ff0a (diff)
downloadrust-e490c17eb5d85d6b968d91b2ca93f3607934e78d.tar.gz
rust-e490c17eb5d85d6b968d91b2ca93f3607934e78d.zip
Rollup merge of #25974 - richo:stack-msg, r=alexcrichton
These are implemented in asm, they're just not inlined.

Open questions are:
* Should I just inline them? They're.. big, but it seems as though this needs violates the #[inline(always)] gaurantees the others make.
* Does something (llvm?) provide these as intrinsics? The structure of this code suggests that we could be hoisting off something else, instead of flagrantly ignoring it like we do for power and mips.
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/sys/common/stack.rs12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/libstd/sys/common/stack.rs b/src/libstd/sys/common/stack.rs
index fadeebc8150..11982ebc572 100644
--- a/src/libstd/sys/common/stack.rs
+++ b/src/libstd/sys/common/stack.rs
@@ -139,7 +139,6 @@ pub unsafe fn record_os_managed_stack_bounds(stack_lo: usize, _stack_hi: usize)
 pub unsafe fn record_sp_limit(limit: usize) {
     return target_record_sp_limit(limit);
 
-    // x86-64
     #[cfg(all(target_arch = "x86_64",
               any(target_os = "macos", target_os = "ios")))]
     #[inline(always)]
@@ -164,7 +163,6 @@ pub unsafe fn record_sp_limit(limit: usize) {
         asm!("movq $0, %fs:32" :: "r"(limit) :: "volatile")
     }
 
-    // x86
     #[cfg(all(target_arch = "x86",
               any(target_os = "macos", target_os = "ios")))]
     #[inline(always)]
@@ -182,8 +180,8 @@ pub unsafe fn record_sp_limit(limit: usize) {
     unsafe fn target_record_sp_limit(_: usize) {
     }
 
-    // mips, arm - Some brave soul can port these to inline asm, but it's over
-    //             my head personally
+    // mips, arm - The implementations are a bit big for inline asm!
+    //             They can be found in src/rt/arch/$target_arch/record_sp.S
     #[cfg(any(target_arch = "mips",
               target_arch = "mipsel",
               all(target_arch = "arm", not(target_os = "ios"))))]
@@ -221,7 +219,6 @@ pub unsafe fn record_sp_limit(limit: usize) {
 pub unsafe fn get_sp_limit() -> usize {
     return target_get_sp_limit();
 
-    // x86-64
     #[cfg(all(target_arch = "x86_64",
               any(target_os = "macos", target_os = "ios")))]
     #[inline(always)]
@@ -255,7 +252,6 @@ pub unsafe fn get_sp_limit() -> usize {
         return limit;
     }
 
-    // x86
     #[cfg(all(target_arch = "x86",
               any(target_os = "macos", target_os = "ios")))]
     #[inline(always)]
@@ -278,8 +274,8 @@ pub unsafe fn get_sp_limit() -> usize {
         return 1024;
     }
 
-    // mips, arm - Some brave soul can port these to inline asm, but it's over
-    //             my head personally
+    // mips, arm - The implementations are a bit big for inline asm!
+    //             They can be found in src/rt/arch/$target_arch/record_sp.S
     #[cfg(any(target_arch = "mips",
               target_arch = "mipsel",
               all(target_arch = "arm", not(target_os = "ios"))))]