From owner-cvs-src@FreeBSD.ORG Fri Jan 11 17:11:32 2008 Return-Path: Delivered-To: cvs-src@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A021916A469; Fri, 11 Jan 2008 17:11:32 +0000 (UTC) (envelope-from bde@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 881E713C4E1; Fri, 11 Jan 2008 17:11:32 +0000 (UTC) (envelope-from bde@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m0BHBWS4014283; Fri, 11 Jan 2008 17:11:32 GMT (envelope-from bde@repoman.freebsd.org) Received: (from bde@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m0BHBWxv014282; Fri, 11 Jan 2008 17:11:32 GMT (envelope-from bde) Message-Id: <200801111711.m0BHBWxv014282@repoman.freebsd.org> From: Bruce Evans Date: Fri, 11 Jan 2008 17:11:32 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/sys/amd64/include ieeefp.h X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jan 2008 17:11:32 -0000 bde 2008-01-11 17:11:32 UTC FreeBSD src repository Modified files: sys/amd64/include ieeefp.h Log: Fix fpset*() to not trap if there is a currently unmasked exception. Unmasked exceptions (which can be fixed up using fpset*() before they trap) are very rare, especially on amd64 since SSE exceptions trap synchronously, but I want to merge the faster amd64 implementations of fpset*() back to i386 without introducing the bug on i386. The i386 implementation has always avoided the trap automatically by changing things using load/store of the FP environment, but this is very slow. Most changes only affect the control word, so they can usually be done much more efficiently, and amd64 has always done this, but loading the control word can trap. This version use the fast method only in the usual case where it will not trap. This only costs a couple of integer instructions (including one branch which I haven't optimized carefully yet) in the usual case, but bloats the inlines a lot. The inlines were already a bit too large to handle both the FPU and SSE. Revision Changes Path 1.19 +42 -12 src/sys/amd64/include/ieeefp.h