From patchwork Sun Feb 4 04:11:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 126804 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp927000ljc; Sat, 3 Feb 2018 20:21:21 -0800 (PST) X-Google-Smtp-Source: AH8x224XYmXBLZha3q8qeCzoPPNueUMsdci7xUfWR4vE4cRdtgH7xqdDdCaThPXekf9xwBnylowF X-Received: by 10.37.239.79 with SMTP id w15mr28862320ybm.293.1517718081306; Sat, 03 Feb 2018 20:21:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517718081; cv=none; d=google.com; s=arc-20160816; b=MLWJURFWFaUNk9PsAqvH+OAQIqUPU/lyvkVDXwDQDcNz/MXK6r9DpI7ZNzZbbdMhZQ mCKjrG4cVx3X5RjLxT7y5KANZrWEiEhGd4JKqKy80tEA/zkZQir0YtO24FeV9TbtlHaJ lPDKQXT/v5F9AtzrkHSbh0S9buZVrAU4ZwTt17gWRC3JPvGOGn6aab5GYYyf1ai2kWJt iHoulvNotQyn2Nlbp2c+DSVIT5nUfHQ59TIXOrptONHTh6/jXet89EWC8+PUzcBI9GZ5 ADrJBr3SqDIAou5cJNj5IxrJ7rycU/o9y9GlIsIwHP4FZOJAm5KfMZfhidASvNQsM6Kp uc8w== 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=7y0D9zhkuYel2O0QBH3dwcy6DXVAIGyUN+AKLIY+j2k=; b=siJ60IbZNVPAFygMDYQE7eZ2ubY4a2zGiYUK56vfCpCGoHr2jpBNji7sYCniOyGPXb Nv0ie1sIAUmeqOt5wy1jkK5OGML3nKG0z7NKvryEwjvyfuM5BrdOQZw2UMvO+nQINkTt xPBlWE7au8VZkdT5niRgUIjb0szhZiYQOpTGY2dIl8xQDB0lNHglqy4phZ8zz/sjr7aY TWotPhBI4Opqd8LvfDe+JPdehEitcFFEAbfcJjS/7PtkQCjEHGKDdtmhGzSYEt8cHRgm DdvY8HDAT8JEKfdJnU0etQ1xOYo9OodcPtgkZvOUmOdUgFDNIxcsLIlhYU6IFtrfzjz4 IYFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=SNvmEX7s; 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 c69si544876ybh.224.2018.02.03.20.21.21 for (version=TLS1 cipher=AES128-SHA bits=128/128); Sat, 03 Feb 2018 20:21:21 -0800 (PST) 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=SNvmEX7s; 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]:58304 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eiBns-0004Hd-Ll for patch@linaro.org; Sat, 03 Feb 2018 23:21:20 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47378) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eiBes-0004kd-KX for qemu-devel@nongnu.org; Sat, 03 Feb 2018 23:12:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eiBer-0004zB-Og for qemu-devel@nongnu.org; Sat, 03 Feb 2018 23:12:02 -0500 Received: from mail-pf0-x242.google.com ([2607:f8b0:400e:c00::242]:37163) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eiBer-0004yy-If for qemu-devel@nongnu.org; Sat, 03 Feb 2018 23:12:01 -0500 Received: by mail-pf0-x242.google.com with SMTP id p1so19466574pfh.4 for ; Sat, 03 Feb 2018 20:12:01 -0800 (PST) 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=7y0D9zhkuYel2O0QBH3dwcy6DXVAIGyUN+AKLIY+j2k=; b=SNvmEX7sEqLh5sChXLt8iHYmOwVD9i5Hs1wRc92s3wddYyrD602b3BIxETesfeVJ0/ b4ABtL2TBJelH6DO2/iB3fl9hsfi1RYzf/054mhrSqU4WIs0uBZGbLJ6onKjkiG39Qtp IUH1LCXzkIBb9oPQ82Q2iKE05Uy66sW3fz1z8= 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=7y0D9zhkuYel2O0QBH3dwcy6DXVAIGyUN+AKLIY+j2k=; b=gZyQ/cyCyed6hphryppdmme0kJpVAgE0OPcw2jfpMclSuRsV6+OlXVKFo7zja8z7IW duMRjdANZo+CcVKrsl+j2NenMkg6+TRQTQ+MtwhTzv88LUvK/jvQ0QzUSxorxsE+OZRW sUCTr9/UzMb7GaJ5pMGooAaycx9JnlEFZIGYWbjndjuraKq6rJnNm9PQc8qaIJ2WmER1 JegMmSiTQaxXB6c0lPS5MSxmegNRieqQkzwtFHJn5iWp3dXD7KsfFjPO4mxO2cHt8u5X XT8eiqTvHq5iKpzp1NjtDxtkVIfmhORnobt5JKQLxbh8yvIFmBy3QQmsvY3xknHJLxGY HweA== X-Gm-Message-State: APf1xPD2hqXrKtrbfm4ZxGiam3sJtK42bpJLVEW5o4eLdQItCErSVY// /oDIno+Rwe6aN4zC1HysR4ekvwxCXTE= X-Received: by 10.98.157.213 with SMTP id a82mr573160pfk.242.1517717520353; Sat, 03 Feb 2018 20:12:00 -0800 (PST) Received: from cloudburst.twiddle.net (174-21-6-47.tukw.qwest.net. [174.21.6.47]) by smtp.gmail.com with ESMTPSA id k3sm1399425pgr.12.2018.02.03.20.11.59 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 03 Feb 2018 20:11:59 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Date: Sat, 3 Feb 2018 20:11:26 -0800 Message-Id: <20180204041136.17525-15-richard.henderson@linaro.org> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180204041136.17525-1-richard.henderson@linaro.org> References: <20180204041136.17525-1-richard.henderson@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c00::242 Subject: [Qemu-devel] [PATCH 14/24] fpu/soft-fp: Adjust _FP_CMP_CHECK_NAN 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: peter.maydell@linaro.org, cota@braap.org, alex.bennee@linaro.org, hsp.cat7@gmail.com Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" The fourth argument to _FP_CMP is a 4-state integer operand that controls the operation wrt raising exceptions. However, the usage that we need within QEMU produces a -Werror=int-in-bool-context: error: ?: using integer constants in boolean context, \ the expression will always evaluate to ‘true’ glue(FP_CMP_, FS)(r, A, B, float_relation_unordered, (quiet ? 1 : 2)); note: in definition of macro ‘_FP_CMP_CHECK_NAN’ if (ex) \ ^~ Adding an explicit comparison avoids this. Signed-off-by: Richard Henderson --- fpu/op-common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.14.3 diff --git a/fpu/op-common.h b/fpu/op-common.h index c5f33c0148..c4d8b58a03 100644 --- a/fpu/op-common.h +++ b/fpu/op-common.h @@ -1242,7 +1242,7 @@ { \ /* The arguments are unordered, which may or may not result in \ an exception. */ \ - if (ex) \ + if ((ex) != 0) \ { \ /* At least some cases of unordered arguments result in \ exceptions; check whether this is one. */ \