Auto merge of #1470 - semarie:openbsd-sparc64, r=gnzlbg

add support for sparc64 on OpenBSD
This commit is contained in:
bors 2019-08-15 17:54:09 +00:00
commit dab1050e40
5 changed files with 20 additions and 2 deletions

View File

@ -12,3 +12,5 @@ cfg_if! {
pub const _ALIGNBYTES: usize = 8 - 1;
}
}
pub const _MAX_PAGE_SHIFT: u32 = 12;

View File

@ -1297,8 +1297,9 @@ pub const IFF_LINK1: ::c_int = 0x2000; // per link layer defined bit
pub const IFF_LINK2: ::c_int = 0x4000; // per link layer defined bit
pub const IFF_MULTICAST: ::c_int = 0x8000; // supports multicast
pub const PTHREAD_STACK_MIN : ::size_t = 4096;
pub const SIGSTKSZ : ::size_t = 28672;
pub const PTHREAD_STACK_MIN: ::size_t = (1_usize << _MAX_PAGE_SHIFT);
pub const MINSIGSTKSZ: ::size_t = (3_usize << _MAX_PAGE_SHIFT);
pub const SIGSTKSZ: ::size_t = MINSIGSTKSZ + (1_usize << _MAX_PAGE_SHIFT) * 4;
pub const PT_FIRSTMACH: ::c_int = 32;
@ -1437,6 +1438,9 @@ cfg_if! {
} else if #[cfg(target_arch = "aarch64")] {
mod aarch64;
pub use self::aarch64::*;
} else if #[cfg(target_arch = "sparc64")] {
mod sparc64;
pub use self::sparc64::*;
} else {
// Unknown target_arch
}

View File

@ -0,0 +1,8 @@
pub type c_long = i64;
pub type c_ulong = u64;
pub type c_char = i8;
#[doc(hidden)]
pub const _ALIGNBYTES: usize = 0xf;
pub const _MAX_PAGE_SHIFT: u32 = 13;

View File

@ -12,3 +12,5 @@ cfg_if! {
pub const _ALIGNBYTES: usize = 4 - 1;
}
}
pub const _MAX_PAGE_SHIFT: u32 = 12;

View File

@ -15,6 +15,8 @@ cfg_if! {
}
}
pub const _MAX_PAGE_SHIFT: u32 = 12;
pub const PT_STEP: ::c_int = PT_FIRSTMACH + 0;
pub const PT_GETREGS: ::c_int = PT_FIRSTMACH + 1;
pub const PT_SETREGS: ::c_int = PT_FIRSTMACH + 2;