From patchwork Thu Apr 12 11:58:38 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 133267 Delivered-To: patch@linaro.org Received: by 10.46.84.29 with SMTP id i29csp1612533ljb; Thu, 12 Apr 2018 05:04:06 -0700 (PDT) X-Google-Smtp-Source: AIpwx499QQlFediKpeYK+34yMmJ0+TfywTC2kzsA8X/k8uvv3tcQzi/FYx4AFUj8VlddS/nL+7C+ X-Received: by 10.55.207.148 with SMTP id v20mr768671qkl.194.1523534646684; Thu, 12 Apr 2018 05:04:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523534646; cv=none; d=google.com; s=arc-20160816; b=p9Xb5SYgDlMh7D/kQID0e7gOPYdXxJTvDzemVGnsKDaJxSFQV35KTZHbEP+k/U0VCO xzvvbgHTvdEVON0fu7FqZKYT/HSwwce4AuWUKRBLvSav1rzILTu9LyxtSrItgbbezQ98 kpWdWtSdzeKMSaXwuBWF+IuguPhOsNwnjbFbpgQEWDJEQWHg5ShRhaQNAVjK3ydkHjmH Z+jhiFaf1Rt1TVyWEOCBXG2EPuv5fPHYpPS7s8xm+R9eE41gt/lhUI3xZf98kQXdxEeT 4t7YeSpCXmXwPIir0MrnWzh1A1I2g0UV8A5sHUTQTjgLqC4a7mlHrRl89zKsjRNAaktY AxQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature:arc-authentication-results; bh=zORy7m/tcclQukMW6u8ezjH8aTgfgPfMYUyweIvFVkM=; b=0LdHuo0Db3goH30yHIUomtEKcWWIu8B/eaTKO8tA2PLzBOMRbJV2glenP9hhlFUOb+ MEqoNhpNr1ZqTx+7V5/LFrG9Y+t+cM61wigZzHvAvB7spYBGBT44sJG0Hus1471tRNcu lwtiUkZ24+Uf6mxX/4qNnKH1pxNcu/WoxbJuu4o/x5L0PBNjoSOTZ6vFC1/tG34GpBRF XKtQf55Os9f0zduIkPeVg8XWXHmhqeNWzTm3+qQP+VQ+ex7TKFoDzqpuXEUHQtlicB0+ FnDUsUGarLAICP/gmEP1svyMqKU4CSYeEgs2Wq6EQnxQCVMRFL+pyfYCxPi8MV/T0GCq 1KNA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=LARHiR+3; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id 139si1552457qkl.61.2018.04.12.05.04.06 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 12 Apr 2018 05:04:06 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=LARHiR+3; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:33948 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f6axS-0002BG-7B for patch@linaro.org; Thu, 12 Apr 2018 08:04:06 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44907) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f6asI-0007LM-9J for qemu-devel@nongnu.org; Thu, 12 Apr 2018 07:58:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f6asE-0007Py-HM for qemu-devel@nongnu.org; Thu, 12 Apr 2018 07:58:46 -0400 Received: from mail-wm0-x243.google.com ([2a00:1450:400c:c09::243]:52877) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f6asE-0007PS-Bx for qemu-devel@nongnu.org; Thu, 12 Apr 2018 07:58:42 -0400 Received: by mail-wm0-x243.google.com with SMTP id g8so10970732wmd.2 for ; Thu, 12 Apr 2018 04:58:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=zORy7m/tcclQukMW6u8ezjH8aTgfgPfMYUyweIvFVkM=; b=LARHiR+3tF4taGCszteexNFGAl6y1cqQCeEsT5o/SPvxRcUiEV6tKKKSQeqI9dusTk KIeBUxxBOds6XgAmu5iPjJdG6Hd9WL0jC+A5UGXUDWZF3hgNf9y5w/qIHSK/Is524AXK 78fpbbtEr2kPHRpN07TQ30QDxjmJ0aPHJu+DM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=zORy7m/tcclQukMW6u8ezjH8aTgfgPfMYUyweIvFVkM=; b=CqwNL0ecTDTkMK8MBx0/sc9viWAVQfcKpDXP/gl8JBq3GcPr5r+YvIK3dVnMEsDhja KcdR1MySR/S4U3R2FHQPY3aeNV8im0a4li0xIb/rF1eB/SPaRb7DgLxYxb7dj/F9z1FV oPh3j4AvJHhTwNHfsvLNvxwEyH48+nONusUq8SvN06w7V+v/4QWQ2fhivMHoYAsaDpt1 QNygDcV4d0C4+gtsVA3D50w3OVjg3084IIv0NYlYzAo6PzdZ77e1eq9AVX67u1E3QsZ6 SuBsc7EUDJOtVIRwFRnJSXs1zDwpEYP6aMkOLuBtD8fE8UlTYXV/YEfCabhQdPoQW96P hthQ== X-Gm-Message-State: ALQs6tAXYFrHLUyJg0B3MSg8JGjX3jCN596XbMjFrlnm16I1fHSdhhO3 TSnI27/gvCf6O6fE7CoMfgR0/Q== X-Received: by 10.28.212.84 with SMTP id l81mr484527wmg.151.1523534321192; Thu, 12 Apr 2018 04:58:41 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id s49sm4711034wrc.36.2018.04.12.04.58.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Apr 2018 04:58:40 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 7E6873E0402; Thu, 12 Apr 2018 12:58:38 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Date: Thu, 12 Apr 2018 12:58:38 +0100 Message-Id: <20180412115838.10208-3-alex.bennee@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180412115838.10208-1-alex.bennee@linaro.org> References: <20180412115838.10208-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c09::243 Subject: [Qemu-devel] [PATCH v1 2/2] fpu/softfloat: raise float_invalid for NaN in float_to_int X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Bastian Koppelmann , =?utf-8?q?Alex_Be?= =?utf-8?b?bm7DqWU=?= , qemu-devel@nongnu.org, Aurelien Jarno Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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(+) -- 2.17.0 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;