From patchwork Sun Aug 30 02:31:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 248719 Delivered-To: patch@linaro.org Received: by 2002:a92:5b9c:0:0:0:0:0 with SMTP id c28csp2298820ilg; Sat, 29 Aug 2020 19:32:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxDo1sBbzlQS0P/jEBB1WALOIpgK95wXrF9OkKlH0ofzsAiUfBan68ED12BxS6PCAoigWPV X-Received: by 2002:a25:c2c7:: with SMTP id s190mr10806309ybf.161.1598754774695; Sat, 29 Aug 2020 19:32:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598754774; cv=none; d=google.com; s=arc-20160816; b=f2+ohoN9xEfm6JZJw+K5zDMTuO+s1rYr1ZXeswCpiwK1TOvOsqXEDqiI2f8TOe/bLV vg3Qtgzjt2gdxadFxjGPEv/NeDYChQjtWRlgk9q+2BkZ1e/afyeaJL24qOMnEo4MLJ5p 0qdfy90V0NxbhFgZkMcUTxd9s0pUJriKBFTJHV7EHSqq/PBp1fLio3a5D2tVTdOuVBly fEuqE/oanHuRAPgKVRHpKEHe80wlgLrbotVuNZ4C/4mBcr26h7zhprqkWVE+Io1/j61c 0JrelDOp/eIBXicsp04qQkfSC571Sud1x2ks/0jeMe0DbasB2oslNhqZMcEYGqDMEIZb +mKg== 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:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=+4RZCdMOsaMUmLqVgZAlaR32NMPZinL4K5nOFXnWb04=; b=QxTvZOnPMy8Uq1Ol1vo0ZzSZCNf+kCLV2Y+GBoqJqXAwXAI7WkLmoysesk2TYo3bXX PkG4RW+BNr9BF9osfIUoKo8Mvr92ACnI6fqOtFuJhSEx7LJcwS6c4Fa8Z18nz2xllrKf TzseXXVWP/tl5uYfXLyBTeeblm+OlLGQsP7n0AaDmZIpT/7JttzD0UisEENWQnTW76kV yNb/T6tRyngwe5zXsu3XIB4IYpBhE41F8fMbEONxdt17kTLUBjCD0RWl1FpPdgPnWI60 QxQ7wyk68NtKRe997dYpUZxvt13owGmdmRgLY5AwFXnJIBHHDdiC7XielIwPyhDQgHjf y9nA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hNeXNvho; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id r8si3454672ybo.451.2020.08.29.19.32.54 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 29 Aug 2020 19:32:54 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hNeXNvho; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:35230 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kCD9K-0002hW-2Z for patch@linaro.org; Sat, 29 Aug 2020 22:32:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52824) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kCD8g-0002en-0t for qemu-devel@nongnu.org; Sat, 29 Aug 2020 22:32:14 -0400 Received: from mail-pl1-x632.google.com ([2607:f8b0:4864:20::632]:38749) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kCD8d-0002XS-M8 for qemu-devel@nongnu.org; Sat, 29 Aug 2020 22:32:13 -0400 Received: by mail-pl1-x632.google.com with SMTP id t11so1427531plr.5 for ; Sat, 29 Aug 2020 19:32:11 -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=+4RZCdMOsaMUmLqVgZAlaR32NMPZinL4K5nOFXnWb04=; b=hNeXNvhovHKc8cmmSF6P3EICfYFuUE2EI0kMk3PNr1KehLlUhJNYU7uiRIZxohYzOu nYfe3aSyqscHcVQhVwpbeTpnqtSl8VSY6VL0+xkW2XLVoXIEPncVxy2ctt12FRdMr/x2 J/BFgzdiZy7TxKwDHCoilY1blYZUaCWDs54uh65nO+cfcaK+UyjH9kAdTOlhCcxrouy4 +ZAJp5xLjSHImChQPKQdXOIwndK8LmjD+nNmdSfZzaNB/f4uZbtKk+AQLXpibnOSc082 qSKZorIam89ABBDFXL3yB4wAEfYtg67HlEu1/wS5eOP4BuPJl43FiDb88UOL/9NqeBhz BTrg== 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=+4RZCdMOsaMUmLqVgZAlaR32NMPZinL4K5nOFXnWb04=; b=OvUV0yRnkfYFXo7yvx+wuCjpqsL8eejHNZLBAHp7vVc7B/poNA+qrmz9d13KM75KXg 5SjXReWaDPAlMhA9SMfhTW8oSVdA8GEhHx37X2MIDUngknECnKJd+E3MLszPyPn6kVOr 2LSWnxSdpXajW/afsLbHpoSkzoEqxrZZONjkt/QbWOvx4LxLTezXUGntY+ek7Z3GcEsc JB1zrKNG0sNsejSwfRabUdopql+S/NEF4PPXW+ruVnDHRoR1/A55HrMat5HdhdR82/ib oY3L362ZcWYFikanyJaEV+eBLcWlxeb4+kChGaDIpKejbkmB0tMzDdpgs965m3pbc+fe tZcQ== X-Gm-Message-State: AOAM530gjgq6y3jVPJFxPC55BbraVk1WwIG/bSeruYTkTP3Q4sR6Sinj 05hfXRxIfvOIVvLZKf2s0d/iEY9APsCrkQ== X-Received: by 2002:a17:90b:95:: with SMTP id bb21mr4971269pjb.68.1598754729948; Sat, 29 Aug 2020 19:32:09 -0700 (PDT) Received: from localhost.localdomain ([71.212.141.89]) by smtp.gmail.com with ESMTPSA id l23sm3546269pgt.16.2020.08.29.19.32.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 29 Aug 2020 19:32:09 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PULL 3/7] softfloat: Add float16_is_normal Date: Sat, 29 Aug 2020 19:31:59 -0700 Message-Id: <20200830023203.612312-4-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200830023203.612312-1-richard.henderson@linaro.org> References: <20200830023203.612312-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::632; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x632.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, Stephen Long Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Stephen Long This float16 predicate was missing from the normal set. Signed-off-by: Stephen Long Signed-off-by: Richard Henderson --- include/fpu/softfloat.h | 5 +++++ 1 file changed, 5 insertions(+) -- 2.25.1 diff --git a/include/fpu/softfloat.h b/include/fpu/softfloat.h index 0a5a5e5d0b..863dfc6151 100644 --- a/include/fpu/softfloat.h +++ b/include/fpu/softfloat.h @@ -272,6 +272,11 @@ static inline bool float16_is_zero_or_denormal(float16 a) return (float16_val(a) & 0x7c00) == 0; } +static inline bool float16_is_normal(float16 a) +{ + return (((float16_val(a) >> 10) + 1) & 0x1f) >= 2; +} + static inline float16 float16_abs(float16 a) { /* Note that abs does *not* handle NaN specially, nor does