Changeset View
Changeset View
Standalone View
Standalone View
sys/x86/linux/linux_x86_sigframe.h
Show First 20 Lines • Show All 132 Lines • ▼ Show 20 Lines | struct l_fpstate { | ||||
u_int16_t cwd; | u_int16_t cwd; | ||||
u_int16_t swd; | u_int16_t swd; | ||||
u_int16_t twd; | u_int16_t twd; | ||||
u_int16_t fop; | u_int16_t fop; | ||||
u_int64_t rip; | u_int64_t rip; | ||||
u_int64_t rdp; | u_int64_t rdp; | ||||
u_int32_t mxcsr; | u_int32_t mxcsr; | ||||
u_int32_t mxcsr_mask; | u_int32_t mxcsr_mask; | ||||
u_int32_t st_space[32]; | u_int8_t st[8][16]; | ||||
u_int32_t xmm_space[64]; | u_int8_t xmm[16][16]; | ||||
u_int32_t reserved2[24]; | u_int32_t reserved2[24]; | ||||
}; | } __aligned(16); | ||||
struct l_sigcontext { | struct l_sigcontext { | ||||
l_ulong sc_r8; | l_ulong sc_r8; | ||||
l_ulong sc_r9; | l_ulong sc_r9; | ||||
l_ulong sc_r10; | l_ulong sc_r10; | ||||
l_ulong sc_r11; | l_ulong sc_r11; | ||||
l_ulong sc_r12; | l_ulong sc_r12; | ||||
l_ulong sc_r13; | l_ulong sc_r13; | ||||
l_ulong sc_r14; | l_ulong sc_r14; | ||||
kib: So what would we do when Linux starts using that space?
In fact I believe that you do not need… | |||||
l_ulong sc_r15; | l_ulong sc_r15; | ||||
l_ulong sc_rdi; | l_ulong sc_rdi; | ||||
l_ulong sc_rsi; | l_ulong sc_rsi; | ||||
l_ulong sc_rbp; | l_ulong sc_rbp; | ||||
l_ulong sc_rbx; | l_ulong sc_rbx; | ||||
l_ulong sc_rdx; | l_ulong sc_rdx; | ||||
l_ulong sc_rax; | l_ulong sc_rax; | ||||
l_ulong sc_rcx; | l_ulong sc_rcx; | ||||
Show All 22 Lines | |||||
/* | /* | ||||
* We make the stack look like Linux expects it when calling a signal | * We make the stack look like Linux expects it when calling a signal | ||||
* handler, but use the BSD way of calling the handler and sigreturn(). | * handler, but use the BSD way of calling the handler and sigreturn(). | ||||
*/ | */ | ||||
struct l_rt_sigframe { | struct l_rt_sigframe { | ||||
struct l_ucontext sf_uc; | struct l_ucontext sf_uc; | ||||
struct l_siginfo sf_si; | struct l_siginfo sf_si; | ||||
struct l_fpstate sf_fs; | |||||
}; | }; | ||||
#endif /* __i386__ || (__amd64__ && COMPAT_LINUX32) */ | #endif /* __i386__ || (__amd64__ && COMPAT_LINUX32) */ | ||||
#endif /* !_X86_LINUX_SIGFRAME_H_ */ | #endif /* !_X86_LINUX_SIGFRAME_H_ */ |
So what would we do when Linux starts using that space?
In fact I believe that you do not need to save any of these fields. When restroring context, set owned to _MC_FPOWNED_FPU, mc_fpformat to _MC_FPFMT_XMM, and flags to _MX_HASFPXSTATE,