-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #2685 - Amanieu:riscv-ucontext, r=Amanieu
Add ucontext_t and mcontext_t for RISC-V Linux
- Loading branch information
Showing
6 changed files
with
185 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
s_no_extra_traits! { | ||
#[allow(missing_debug_implementations)] | ||
pub struct ucontext_t { | ||
pub __uc_flags: ::c_ulong, | ||
pub uc_link: *mut ucontext_t, | ||
pub uc_stack: ::stack_t, | ||
pub uc_sigmask: ::sigset_t, | ||
pub uc_mcontext: mcontext_t, | ||
} | ||
|
||
#[allow(missing_debug_implementations)] | ||
#[repr(align(16))] | ||
pub struct mcontext_t { | ||
pub __gregs: [::c_ulong; 32], | ||
pub __fpregs: __riscv_mc_fp_state, | ||
} | ||
|
||
#[allow(missing_debug_implementations)] | ||
pub union __riscv_mc_fp_state { | ||
pub __f: __riscv_mc_f_ext_state, | ||
pub __d: __riscv_mc_d_ext_state, | ||
pub __q: __riscv_mc_q_ext_state, | ||
} | ||
|
||
#[allow(missing_debug_implementations)] | ||
pub struct __riscv_mc_f_ext_state { | ||
pub __f: [::c_uint; 32], | ||
pub __fcsr: ::c_uint, | ||
} | ||
|
||
#[allow(missing_debug_implementations)] | ||
pub struct __riscv_mc_d_ext_state { | ||
pub __f: [::c_ulonglong; 32], | ||
pub __fcsr: ::c_uint, | ||
} | ||
|
||
#[allow(missing_debug_implementations)] | ||
#[repr(align(16))] | ||
pub struct __riscv_mc_q_ext_state { | ||
pub __f: [::c_ulonglong; 64], | ||
pub __fcsr: ::c_uint, | ||
pub __glibc_reserved: [::c_uint; 3], | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
s_no_extra_traits! { | ||
#[allow(missing_debug_implementations)] | ||
pub struct ucontext_t { | ||
pub __uc_flags: ::c_ulong, | ||
pub uc_link: *mut ucontext_t, | ||
pub uc_stack: ::stack_t, | ||
pub uc_sigmask: ::sigset_t, | ||
pub uc_mcontext: mcontext_t, | ||
} | ||
|
||
#[allow(missing_debug_implementations)] | ||
#[repr(align(16))] | ||
pub struct mcontext_t { | ||
pub __gregs: [::c_ulong; 32], | ||
pub __fpregs: __riscv_mc_fp_state, | ||
} | ||
|
||
#[allow(missing_debug_implementations)] | ||
pub union __riscv_mc_fp_state { | ||
pub __f: __riscv_mc_f_ext_state, | ||
pub __d: __riscv_mc_d_ext_state, | ||
pub __q: __riscv_mc_q_ext_state, | ||
} | ||
|
||
#[allow(missing_debug_implementations)] | ||
pub struct __riscv_mc_f_ext_state { | ||
pub __f: [::c_uint; 32], | ||
pub __fcsr: ::c_uint, | ||
} | ||
|
||
#[allow(missing_debug_implementations)] | ||
pub struct __riscv_mc_d_ext_state { | ||
pub __f: [::c_ulonglong; 32], | ||
pub __fcsr: ::c_uint, | ||
} | ||
|
||
#[allow(missing_debug_implementations)] | ||
#[repr(align(16))] | ||
pub struct __riscv_mc_q_ext_state { | ||
pub __f: [::c_ulonglong; 64], | ||
pub __fcsr: ::c_uint, | ||
pub __glibc_reserved: [::c_uint; 3], | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
s_no_extra_traits! { | ||
#[allow(missing_debug_implementations)] | ||
pub struct ucontext_t { | ||
pub __uc_flags: ::c_ulong, | ||
pub uc_link: *mut ucontext_t, | ||
pub uc_stack: ::stack_t, | ||
pub uc_sigmask: ::sigset_t, | ||
pub uc_mcontext: mcontext_t, | ||
} | ||
|
||
#[allow(missing_debug_implementations)] | ||
#[repr(align(16))] | ||
pub struct mcontext_t { | ||
pub __gregs: [::c_ulong; 32], | ||
pub __fpregs: __riscv_mc_fp_state, | ||
} | ||
|
||
#[allow(missing_debug_implementations)] | ||
pub union __riscv_mc_fp_state { | ||
pub __f: __riscv_mc_f_ext_state, | ||
pub __d: __riscv_mc_d_ext_state, | ||
pub __q: __riscv_mc_q_ext_state, | ||
} | ||
|
||
#[allow(missing_debug_implementations)] | ||
pub struct __riscv_mc_f_ext_state { | ||
pub __f: [::c_uint; 32], | ||
pub __fcsr: ::c_uint, | ||
} | ||
|
||
#[allow(missing_debug_implementations)] | ||
pub struct __riscv_mc_d_ext_state { | ||
pub __f: [::c_ulonglong; 32], | ||
pub __fcsr: ::c_uint, | ||
} | ||
|
||
#[allow(missing_debug_implementations)] | ||
#[repr(align(16))] | ||
pub struct __riscv_mc_q_ext_state { | ||
pub __f: [::c_ulonglong; 64], | ||
pub __fcsr: ::c_uint, | ||
pub __glibc_reserved: [::c_uint; 3], | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters