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 authored and JohnTitor committed Jun 30, 2020
1 parent 4d0e2b3 commit 4c78b20
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 @@ -66,6 +66,30 @@ s! {
pub nla_type: u16,
}

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 @@ -123,7 +147,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 4c78b20

Please sign in to comment.