Skip to content

std: Remove misleading comments about segmented stacks #25974

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 3, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 4 additions & 8 deletions src/libstd/sys/common/stack.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand All @@ -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)]
Expand All @@ -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"))))]
Expand Down Expand Up @@ -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)]
Expand Down Expand Up @@ -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)]
Expand All @@ -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"))))]
Expand Down