Skip to content

Commit

Permalink
Update mcontext_t definition on musl, add fpstate struct
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark McCaskey committed Jan 24, 2020
1 parent 74ff412 commit 822fa9b
Showing 1 changed file with 26 additions and 1 deletion.
27 changes: 26 additions & 1 deletion src/unix/linux_like/linux/musl/b64/x86_64/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,30 @@ s! {
__reserved: [::c_long; 3],
}

pub struct _libc_fpxreg {
pub significand: [u16; 4],
pub exponent: u16,
__private: [u16; 3],
}

pub struct _libc_xmmreg {
pub element: [u32; 4],
}

pub struct _libc_fpstate {
pub cwd: u16,
pub swd: u16,
pub ftw: u16,
pub fop: u16,
pub rip: u64,
pub rdp: u64,
pub mxcsr: u32,
pub mxcr_mask: u32,
pub _st: [_libc_fpxreg; 8],
pub _xmm: [_libc_xmmreg; 16],
__private: [u64; 12],
}

pub struct user_regs_struct {
pub r15: ::c_ulong,
pub r14: ::c_ulong,
Expand Down Expand Up @@ -105,7 +129,8 @@ s! {
// file: arch/x86_64/bits/signal.h#L80-L84
pub struct mcontext_t {
pub gregs: [greg_t; 23],
__private: [u64; 9],
pub fpregs: *mut _libc_fpstate,
__private: [u64; 8],
}

pub struct ipc_perm {
Expand Down

0 comments on commit 822fa9b

Please sign in to comment.