From owner-cvs-all@FreeBSD.ORG Fri Jun 18 04:02:47 2004 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0D55316A4CE; Fri, 18 Jun 2004 04:02:47 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 062CB43D2D; Fri, 18 Jun 2004 04:02:47 +0000 (GMT) (envelope-from peter@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.11/8.12.11) with ESMTP id i5I41sXo000425; Fri, 18 Jun 2004 04:01:54 GMT (envelope-from peter@repoman.freebsd.org) Received: (from peter@localhost) by repoman.freebsd.org (8.12.11/8.12.11/Submit) id i5I41sZf000421; Fri, 18 Jun 2004 04:01:54 GMT (envelope-from peter) Message-Id: <200406180401.i5I41sZf000421@repoman.freebsd.org> From: Peter Wemm Date: Fri, 18 Jun 2004 04:01:54 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/amd64/amd64 fpu.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Jun 2004 04:02:47 -0000 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