Messages in this thread | | | From | Andi Kleen <> | Subject | Re: X86 fpu registers in a signal handler's ucontext | Date | Mon, 29 Apr 2013 10:57:34 -0700 |
| |
"Warlich, Christof" <christof.warlich@siemens.com> writes: > > First, this link: > http://valgrind.10908.n7.nabble.com/need-FPU-and-SSE-state-in-sigcontext-ucontext-td19844.html > suggests that unlike the GPRs, the FP registers are _not_ restored after > returnung from the signal handler.
The FP registers are restored lazily, but the state for this is kept in the kernel.
One easy way may be to catch the FPU exception too and clear from there?
There can be some complications with different save formats too (XSAVE vs FXSAVE). So your solution may not be necessarily 100% portable to all systems.
-Andi
-- ak@linux.intel.com -- Speaking for myself only
| |