From patchwork Sat May 12 00:43:09 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 135613 Delivered-To: patch@linaro.org Received: by 2002:a2e:9706:0:0:0:0:0 with SMTP id r6-v6csp1584210lji; Fri, 11 May 2018 18:11:03 -0700 (PDT) X-Google-Smtp-Source: AB8JxZr9r2mRrcas3C5cKVGK8ldmxvXnCklzApf16ZJs8QtM+92buR6UrwMwCiuzJBQvXrHW5WBQ X-Received: by 2002:a0c:9825:: with SMTP id c34-v6mr671510qvd.150.1526087463769; Fri, 11 May 2018 18:11:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526087463; cv=none; d=google.com; s=arc-20160816; b=UqgKzAGNoAzNrCqliy8Xc6XGTL83vnC2XWJmuVIZpb/jGOHC9vfhXZWGmIRfsH9F3C 5ZsTIohdJleg5FjTeYj3EoAEFnYu8xNPLwJ90CgKYFkWkKRnzmwXybiiw3vLlFjEEQIA hSQMEKo8PXByZ4Q6ansoHD1P6ImEy8fDsIAEVAEdTcBjn1JpoNEvO+Hk8CS0tKcPD2ZC 7GKy04WqpGhy7VXQblbtgmsAfkKIZ7+8I8dY0KMD1TfD42VJsNQ2EsiFKE9IcaOfz7uR 1nv7QutYCa87AAMhxZZG4SYghDMV9jBAqTguJMydzQWqxjqCO7W2GJ8uV9tnl9ToaQeY FYKw== 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:references:in-reply-to :message-id:date:to:from:dkim-signature:arc-authentication-results; bh=i2ogW9HMXSP2ADff11gDF3x+P/BNaPOQE2sQs52ZqQY=; b=FFhiuLUo4fF/XaTpdBaRpUnW/q7VEdADwtKpi32IsGPlPLpwaMb+FnGLfzsN7401E1 8T0EFUscF42CWTN7jOWeoDW/fTi5yMTM2ZBkq/jK9gWHwHxwvAqIhF/P/Zlbjy4OO3kT Lyo2qzCXDivFclTWS+snYJhmEmR4azJT9AIa02Wi8B9yxQYnjW5f6/WfL+SzH7xkwT7n seFfPkV7dPbVPYnyCTduOP8G7xnj0XAJJBgzCdA654g0kD1efx+wjlcYMwZEQmJ7yF0V NKpctFIUDiHIG03ra3U+3d7GgNtnKEgEUhDTND0iG6aM6T4EoagUektz2ZWuMFVwOkPk I+7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=bxshdrpz; 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 e30-v6si4234440qtg.171.2018.05.11.18.11.03 for (version=TLS1 cipher=AES128-SHA bits=128/128); Fri, 11 May 2018 18:11:03 -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=bxshdrpz; 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]:60729 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fHJ3v-0007kW-9q for patch@linaro.org; Fri, 11 May 2018 21:11:03 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33661) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fHIdd-0005Et-Vh for qemu-devel@nongnu.org; Fri, 11 May 2018 20:43:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fHIda-00031R-UO for qemu-devel@nongnu.org; Fri, 11 May 2018 20:43:54 -0400 Received: from mail-pg0-x244.google.com ([2607:f8b0:400e:c05::244]:34997) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fHIda-00031G-Nz for qemu-devel@nongnu.org; Fri, 11 May 2018 20:43:50 -0400 Received: by mail-pg0-x244.google.com with SMTP id n1-v6so3086681pgs.2 for ; Fri, 11 May 2018 17:43:50 -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; bh=i2ogW9HMXSP2ADff11gDF3x+P/BNaPOQE2sQs52ZqQY=; b=bxshdrpzpYZ8Eska+vNQScpyVsN945paT7N7fMECBMVDTvLDm0XpLPECT7p9e0c06W sqginrQr/zIvQp/0kC1NLgGTimG11Yb/GE5FbBeF81ans8ojOM2LnKjPcTZpv1+z2BVa GYSYszs5bouBT++u/wxPBhEEEtKKj11XBn+sA= 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; bh=i2ogW9HMXSP2ADff11gDF3x+P/BNaPOQE2sQs52ZqQY=; b=FtY+Se3ti3cP62qLg+1GZLhyhjKOQ0LYdQ6eI7YiguFTIX0bzqnSwyXXZz2GqnhwFL XMI4xyl4XPdJ0hnPag6ZsZfkHGXjoQlov6ouEHwE+CshsMY9Sjt1u4QM8jZ7zo8eaKlD NIX/s7UdzsdSVGUGXXuHx86hg+FgI8ulHVpwkyeB09Cz86bafheHppl6+43kOQ8Y/NbP hKDnWFxvTLa2ZJFo0Ws47PkXUrqJYJMUNzyUw1fDMB6/+vwACvQCrB+DFo7v2YURNx+7 Kn+aE25AMqJ+MJyxHuuNulFeW8k1j38AbS6GiIisH5Q6qdBE+MRrDYJ0irzK2Cy2jg29 NZVg== X-Gm-Message-State: ALKqPwffXlKbCx+E+W3yKgdLx6kqIOQQ2SROt7UKyorX4Q4rf8W+/U3z XUHcE2jctleElmKmr72wBwF+5KWZN88= X-Received: by 2002:a62:9d5a:: with SMTP id i87-v6mr1000306pfd.190.1526085829466; Fri, 11 May 2018 17:43:49 -0700 (PDT) Received: from cloudburst.twiddle.net (97-113-2-170.tukw.qwest.net. [97.113.2.170]) by smtp.gmail.com with ESMTPSA id k84-v6sm10756406pfh.93.2018.05.11.17.43.47 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 11 May 2018 17:43:48 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Fri, 11 May 2018 17:43:09 -0700 Message-Id: <20180512004311.9299-26-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180512004311.9299-1-richard.henderson@linaro.org> References: <20180512004311.9299-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c05::244 Subject: [Qemu-devel] [PATCH v2 25/27] fpu/softfloat: Make is_nan et al available to softfloat-specialize.h 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, alex.bennee@linaro.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" We will need these helpers within softfloat-specialize.h, so move the definitions above the include. After specialization, they will not always be used so mark them to avoid the Werror. Signed-off-by: Richard Henderson --- fpu/softfloat.c | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) -- 2.17.0 Reviewed-by: Peter Maydell diff --git a/fpu/softfloat.c b/fpu/softfloat.c index 15a272759d..bafb3b17ec 100644 --- a/fpu/softfloat.c +++ b/fpu/softfloat.c @@ -181,6 +181,22 @@ typedef enum __attribute__ ((__packed__)) { float_class_snan, } FloatClass; +/* Simple helpers for checking if what NaN we have */ +static inline __attribute__((unused)) bool is_nan(FloatClass c) +{ + return unlikely(c >= float_class_qnan); +} + +static inline __attribute__((unused)) bool is_snan(FloatClass c) +{ + return c == float_class_snan; +} + +static inline __attribute__((unused)) bool is_qnan(FloatClass c) +{ + return c == float_class_qnan; +} + /* * Structure holding all of the decomposed parts of a float. The * exponent is unbiased and the fraction is normalized. All @@ -536,20 +552,6 @@ static float64 float64_round_pack_canonical(FloatParts p, float_status *s) return float64_pack_raw(round_canonical(p, s, &float64_params)); } -/* Simple helpers for checking if what NaN we have */ -static bool is_nan(FloatClass c) -{ - return unlikely(c >= float_class_qnan); -} -static bool is_snan(FloatClass c) -{ - return c == float_class_snan; -} -static bool is_qnan(FloatClass c) -{ - return c == float_class_qnan; -} - static FloatParts return_nan(FloatParts a, float_status *s) { switch (a.cls) {