bitrig integration
This commit is contained in:
parent
e29f420255
commit
cd8f31759f
50 changed files with 1116 additions and 77 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue