From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=38872 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PH2jJ-0008Jg-9Q for qemu-devel@nongnu.org; Fri, 12 Nov 2010 18:08:26 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PH2jI-0004ou-13 for qemu-devel@nongnu.org; Fri, 12 Nov 2010 18:08:25 -0500 Received: from mail-qw0-f45.google.com ([209.85.216.45]:62026) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PH2jH-0004od-SJ for qemu-devel@nongnu.org; Fri, 12 Nov 2010 18:08:23 -0500 Received: by qwi4 with SMTP id 4so346198qwi.4 for ; Fri, 12 Nov 2010 15:08:23 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <20101111192104.GA4826@nightcrawler> References: <1289499842-28818-1-git-send-email-peter.maydell@linaro.org> <1289499842-28818-5-git-send-email-peter.maydell@linaro.org> <20101111192104.GA4826@nightcrawler> Date: Fri, 12 Nov 2010 23:08:22 +0000 Message-ID: Subject: Re: [Qemu-devel] [PATCH 4/8] ARM: Return correct result for float-to-integer conversion of NaN From: Peter Maydell Content-Type: text/plain; charset=UTF-8 List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Nathan Froyd Cc: qemu-devel@nongnu.org On 11 November 2010 19:21, Nathan Froyd wrote: > On Thu, Nov 11, 2010 at 06:23:58PM +0000, Peter Maydell wrote: >> The ARM architecture mandates that converting a NaN value to >> integer gives zero. This isn't the behaviour of the SoftFloat >> library, so NaNs must be special-cased. > > This is correct, but it's really only correct if FP traps are disabled. True (in that if you take a trap you don't return any result at all), but isn't it a bit of a red herring for this patchset given that qemu doesn't implement trapping on FP exceptions? I can make the commit message read "gives zero (if Invalid Operation FP exceptions are not being trapped)" if you think that would be clearer. -- PMM