From 1a928f434ae218e0e1d4cf63d53eb6612b5abe80 Mon Sep 17 00:00:00 2001 From: Dave Huseby Date: Fri, 10 Jul 2015 16:48:59 -0700 Subject: adding support for i686-unknown-freebsd target --- src/libstd/sys/common/stack.rs | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'src/libstd/sys/common/stack.rs') diff --git a/src/libstd/sys/common/stack.rs b/src/libstd/sys/common/stack.rs index 002e3b20c35..0ab987273dc 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,10 +196,12 @@ 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"))] @@ -262,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; @@ -291,14 +291,16 @@ 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"))] -- cgit 1.4.1-3-g733a5 From c415683402e2c93afaa1b7aa9a127b1fd302ccdd Mon Sep 17 00:00:00 2001 From: Dave Huseby Date: Sat, 11 Jul 2015 07:18:12 -0700 Subject: fixing trailing whitespace --- src/libstd/sys/common/stack.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/libstd/sys/common/stack.rs') diff --git a/src/libstd/sys/common/stack.rs b/src/libstd/sys/common/stack.rs index 0ab987273dc..41c8ac4aed3 100644 --- a/src/libstd/sys/common/stack.rs +++ b/src/libstd/sys/common/stack.rs @@ -293,7 +293,7 @@ pub unsafe fn get_sp_limit() -> usize { // powerpc - FIXME(POWERPC): missing... // arm-ios - no segmented stacks. // openbsd/bitrig/netbsd - no segmented stacks. - // x86-freebsd - 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. -- cgit 1.4.1-3-g733a5