Date: Fri, 18 Jun 2004 04:01:54 +0000 (UTC) From: Peter Wemm <peter@FreeBSD.org> To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/amd64/amd64 fpu.c Message-ID: <200406180401.i5I41sZf000421@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
peter 2004-06-18 04:01:54 UTC FreeBSD src repository Modified files: sys/amd64/amd64 fpu.c Log: Try harder to give new processes a clean initial fpu state. fpu_cleanstate wasn't actually clean, it was saving the xmm registers as left over by the bios. fninit() doesn't clear those. In fpudna(), instead of doing a fninit() and forgetting to load the initial mxcsr, do a full fxrstor(&fpu_cleanstate). Otherwise we hand over whatever random values are left in the xmm registers by the last user. I'm not certain of whether this is excessive paranoia or not, but there was an outright bug in neglecting to set the mxcsr value that caused awk to SIGFPE in some case. Especially for Tim Robbins. :-) i386 probably should do something about the mxcsr setings too. Found by: tjr Revision Changes Path 1.154 +5 -7 src/sys/amd64/amd64/fpu.c
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200406180401.i5I41sZf000421>