mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-02-21 16:26:12 +08:00
Previously, sigfe had a bug that the signal handler destroys fpu state. This is caused by fninit instruction in sigdelayed. With this patch, saving/restoring the FPU/SIMD state is done using fxsave/fxrstor or xsave/xrstor rather than fnstcw/fldcw, stmxcsr/ldmxcsr and push/pop xmm0-xmm15. Since xsave/xrstor is used, not only x87/MMX/SSE states but also AVX/AVX2/AVX-512 states can be maintained unlike before. Addresses: https://cygwin.com/pipermail/cygwin/2024-October/256503.html Fixes: ed89fbc3ff11 ("* gendef (sigdelayed (x86_64)): Save and restore FPU control word.") Reported-by: Christian Franke <Christian.Franke@t-online.de> Suggested-by: Brian Inglis <Brian.Inglis@SystematicSW.ab.ca> Reviewed-by: Corinna Vinschen <corinna@vinschen.de> Signed-off-by: Takashi Yano <takashi.yano@nifty.ne.jp>