1
0
Fork 0
mirror of https://github.com/tobast/libunwind-eh_elf.git synced 2024-11-15 12:48:12 +01:00

Save FPU state when saving context. For XMM-capable CPUs only (for now).

This commit is contained in:
Konstantin Belousov 2010-04-10 00:47:08 +03:00
parent 117ccd246d
commit 9fe75c7d93

View file

@ -103,12 +103,10 @@ _Ux86_getcontext:
FREEBSD_UC_MCONTEXT_OWNEDFP_OFF(%eax)
movl $FREEBSD_UC_MCONTEXT_FPFMT_XMM,\
FREEBSD_UC_MCONTEXT_FPFORMAT_OFF(%eax)
/*
leal LINUX_UC_FPREGS_MEM_OFF(%eax), %ecx
movl %ecx, (LINUX_UC_MCONTEXT_OFF+LINUX_SC_FPSTATE_OFF)(%eax)
fnstenv (%ecx)
fldenv (%ecx)
*/
/* Require CPU with fxsave implemented, and enabled by OS. */
fxsave FREEBSD_UC_MCONTEXT_FPSTATE_OFF(%eax)
movl $FREEBSD_UC_MCONTEXT_MC_LEN_VAL,\
FREEBSD_UC_MCONTEXT_MC_LEN_OFF(%eax)
#endif