From owner-freebsd-sparc Fri Jan 17 8:31:10 2003 Delivered-To: freebsd-sparc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BFE2137B401 for ; Fri, 17 Jan 2003 08:31:08 -0800 (PST) Received: from wall.polstra.com (wall-gw.polstra.com [206.213.73.130]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7269B43E4A for ; Fri, 17 Jan 2003 08:31:07 -0800 (PST) (envelope-from jdp@polstra.com) Received: from vashon.polstra.com (vashon.polstra.com [206.213.73.13]) by wall.polstra.com (8.12.3/8.12.3) with ESMTP id h0HGV5u5017196 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Fri, 17 Jan 2003 08:31:06 -0800 (PST) (envelope-from jdp@vashon.polstra.com) Received: (from jdp@localhost) by vashon.polstra.com (8.12.5/8.12.5/Submit) id h0HGV5PO041575; Fri, 17 Jan 2003 08:31:05 -0800 (PST) (envelope-from jdp) Date: Fri, 17 Jan 2003 08:31:05 -0800 (PST) Message-Id: <200301171631.h0HGV5PO041575@vashon.polstra.com> To: sparc@freebsd.org From: John Polstra Cc: tmoestl@gmx.net Subject: Re: Sparc64 floating point questions In-Reply-To: <20030117133055.GA304@crow.dom2ip.de> References: <20030115021706.GA5902@crow.dom2ip.de> <200301170216.h0H2G0PZ040597@vashon.polstra.com> <20030117133055.GA304@crow.dom2ip.de> Organization: Polstra & Co., Seattle, WA Sender: owner-freebsd-sparc@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org In article <20030117133055.GA304@crow.dom2ip.de>, Thomas Moestl wrote: > Since you are going to write to all fp registers anyway, both will get > set automatically. These bits are not used by the hardware and exist > only to allow software to skip saving unused registers. The kernel > does not currently make use of them. However, if it (or a userland > thread manager) did, and a switch was to take place before all > registers were restored, the missing dirty bits would indicate that > the yet unaccessed parts of the registers need not be saved, which > does not matter at all since their old values will not be used any > more. > The kernel itself does never clear DU and DL, so it is possible to use > them in user land to skip unnecessary saving (and unneccesary > reloading if one of the halves was not accessed at all); in this case > it would be necessary to clear the bits explicitely after reloading. > Both will however get set currently each time the fp registers are > restored after a (kernel) context switch, so this does probably not > really pay off. Also, things would break if the kernel started to use > them for saving decisions. > > Setting FEF explicitely before reloading makes sure that a fp state > that was saved on a previous context switch and that might not have > been restored yet will not be restored due to the following register > accesses. Since all registers will be overwritten anyway, this would > just eat cycles unnecessarily. Thanks! I understand it perfectly now. John -- John Polstra John D. Polstra & Co., Inc. Seattle, Washington USA "Disappointment is a good sign of basic intelligence." -- Chögyam Trungpa To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-sparc" in the body of the message