Received: from [140.186.70.92] (port=46939 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PaxLo-00078B-Nl for qemu-devel@nongnu.org; Thu, 06 Jan 2011 16:26:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PaxLn-0003RH-DC for qemu-devel@nongnu.org; Thu, 06 Jan 2011 16:26:28 -0500 Received: from hall.aurel32.net ([88.191.126.93]:57110) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PaxLn-0003RA-6L for qemu-devel@nongnu.org; Thu, 06 Jan 2011 16:26:27 -0500 Date: Thu, 6 Jan 2011 22:26:18 +0100 From: Aurelien Jarno Subject: Re: [Qemu-devel] [PATCH v2 0/3] ARM/softfloat: support flushing denormals on input Message-ID: <20110106212618.GE15256@volta.aurel32.net> References: <1294342675-20643-1-git-send-email-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <1294342675-20643-1-git-send-email-peter.maydell@linaro.org> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: qemu-devel@nongnu.org On Thu, Jan 06, 2011 at 07:37:52PM +0000, Peter Maydell wrote: > On ARM, the FPSCR FZ bit (which controls whether denormals should be > flushed to zero) is supposed to cause this flushing to occur both > when the output of a calculation is a denormal (already implemented in > softfloat) and also when the input to a calculation is a denormal > (not implemented, as noted by a FIXME comment). > > This patchset adds the support to softfloat for flushing denormals on > input. This is controlled using a new status flag to enable it (so that > CPUs which only flush on output continue to work). There is a new > exception status bit to indicate when input flushing has happened > (because on ARM it is reported via a different FPSCR bit to that used > when an output denormal is flushed to zero). > > I have deliberately only implemented this for input float32 and > float64 values because that is what ARM requires (on ARM float16 > inputs must not be flushed to zero and floatx80 and float128 are > not used) so other changes would be totally untested code. > > Existing CPUs should be unaffected as there is no behaviour change > unless the mode is enabled. > > (I suspect that MIPS should be able to use this to implement the > FCSR FO bit if desired.) > > Tested using random instruction generation for vadd/vsub/vmul/vdiv > with the FPSCR FZ bit set. > > The only change from v1 is that I have split the old patch 2/2 > into two parts, since it accidentally included a one-liner bugfix > where we were setting the softfloat cumulative exception flags > wrongly if the FPSCR was written to explicitly. > > Peter Maydell (3): > softfloat: Implement flushing input denormals to zero > ARM: Set softfloat cumulative exc flags from correct FPSCR bits > ARM: wire up the softfloat flush_input_to_zero flag > > fpu/softfloat.c | 104 ++++++++++++++++++++++++++++++++++++++++++++++++++- > fpu/softfloat.h | 22 ++++++++++- > target-arm/helper.c | 10 ++++- > 3 files changed, 131 insertions(+), 5 deletions(-) > > Thanks, all 3 applied. -- Aurelien Jarno GPG: 1024D/F1BCDB73 aurelien@aurel32.net http://www.aurel32.net