From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38792) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f6bR4-00036F-2T for qemu-devel@nongnu.org; Thu, 12 Apr 2018 08:34:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f6bR1-0004NP-F1 for qemu-devel@nongnu.org; Thu, 12 Apr 2018 08:34:42 -0400 Received: from mail.uni-paderborn.de ([131.234.142.9]:36804) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1f6bR1-0004Lz-0O for qemu-devel@nongnu.org; Thu, 12 Apr 2018 08:34:39 -0400 References: <20180412115838.10208-1-alex.bennee@linaro.org> <20180412115838.10208-3-alex.bennee@linaro.org> From: Bastian Koppelmann Message-ID: <8a3b838f-70ce-33ec-db83-ee4fa2aad3a0@mail.uni-paderborn.de> Date: Thu, 12 Apr 2018 14:34:34 +0200 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH v1 2/2] fpu/softfloat: raise float_invalid for NaN in float_to_int List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell , =?UTF-8?Q?Alex_Benn=c3=a9e?= Cc: QEMU Developers , Aurelien Jarno On 04/12/2018 02:26 PM, Peter Maydell wrote: > On 12 April 2018 at 12:58, Alex Bennée wrote: >> Fixes https://bugs.launchpad.net/qemu/+bug/1759264 >> >> Signed-off-by: Alex Bennée >> Cc: Bastian Koppelmann >> --- >> fpu/softfloat.c | 1 + >> 1 file changed, 1 insertion(+) >> >> diff --git a/fpu/softfloat.c b/fpu/softfloat.c >> index 9b99aa6ec8..ddc77c273c 100644 >> --- a/fpu/softfloat.c >> +++ b/fpu/softfloat.c >> @@ -1344,6 +1344,7 @@ static int64_t round_to_int_and_pack(FloatParts in, int rmode, >> case float_class_qnan: >> case float_class_dnan: >> case float_class_msnan: >> + s->float_exception_flags = orig_flags | float_flag_invalid; >> return max; >> case float_class_inf: >> return p.sign ? min : max; > > Don't we also need to raise the Invalid flag for float_class_inf ? > Yup, as mentioned in the bug report. Cheers, Bastian