On Wednesday 21 October 2026 23:26:48 Peter0x44 wrote: > On 2026-10-21 21:41, Pali Rohár wrote: > > On Tuesday 20 October 2026 01:40:17 Peter0x44 wrote: > > > On 2026-10-19 12:01, Pali Rohár wrote: > > > > The msvcrt/UCRT _fpreset function is not only the x87 fninit instruction > > > > but is doing also some other work, like setting SSE registers or > > > > recovering > > > > from state when the function was called from the SIGFPE signal handler > > > > (which is begin called from SEH exception filter dispatcher). > > > > > > I was curious what it does with SSE, so I tested it. It resets MXCSR > > > to > > > 0x1f80. But on x86_64 it doesn't touch the x87 unit at all. Only on > > > i686 does it also reset the x87 control word (to 0x027f). That's the > > > same for ucrtbase.dll and msvcrt.dll. > > > > So, we do not need to change MXCSR in fesetenv (which you added > > recently), right? > > For msvcrt and ucrt, it's probably not needed. Not sure I would jump the gun > to just remove it though. > Maybe crtdll.dll, msvcrt20, msvcrt40 are not aware of SSE and could need > this anyway? > I don't think it hurts to keep it. I will leave the decision up to you. Send > a patch if you want it removed.
Ok. I will investigate how older msvcr* version behaves and will do cleanup (if it is possible) based on my results of those older libs. At least we would have documentation how libs are working. _______________________________________________ Mingw-w64-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
