From patchwork Thu Jun 18 04:26:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 191056 Delivered-To: patch@linaro.org Received: by 2002:a92:cf06:0:0:0:0:0 with SMTP id c6csp1081423ilo; Wed, 17 Jun 2020 22:10:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw1ynDIaDOraLKBBHxznU0txUo33vR/a2aO7QMGRxvU4bWlyXyvZctcX9MTIJS06jqi+LSi X-Received: by 2002:a25:b992:: with SMTP id r18mr3655058ybg.283.1592457005761; Wed, 17 Jun 2020 22:10:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592457005; cv=none; d=google.com; s=arc-20160816; b=eXnWkQwTj42EE4xBd7PWK3TIkHpLycjaw1VE+/yOjRr8pXPb8GJjes4OoyX2hfT8xI s+web0gODjuC84OerMmuNVAsKZLYycbStw9oPHG5YTq+JneVjJSHj2Q3r7tuoS3ZYrQf GWF9UmNl3NijjEj7qSYxqTPodd9Xn4WYpTa3L4562J5vKH7hPIIq6gVyKb9v6tOp6swk Pav9bCoeWCV0RkgRUFiIjOBnwhJwK8jiHkM2uQUvtNv7zpjjl11KugOqpXpfcUU8cz5Z e9+2Ubte2hbbKoiuty25DVyFtUeRZTMHC2ZZfdZDuNRKzUK73gC5lWE8TUnMTFIjFeE6 lKdA== 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=JnIvscga/41MHmopAUGND2DFOQvZJOfzYshgRIbja6w=; b=U13GgYoqeul3GXJAiTL0hv2GX1ry0yzMAljHmQkGzPOromfyXMpatH16LF1n57hvwG Iur6LjSc6HuZQ4mBXpaiB61+sNbXXPV4RHyLZYLBDwXI4JiBllN2jzkttoAw2/pEKzzQ xZwXkNKAp1LG3YvT1CZFYZyKyTtP5sHs5au4D+sfbzuZMRZWlXGeVq21WQh8TKLjnhT3 nkXXtbVohJ/HrEZLblhphDoDHyWjA0+GA4Cuq/QqYkI1F128xyby3/ytu5G3TIgMjq2L TsOeq2ct0au/kNU+FwHtGnMBLGmq62d0tvBi947k+yKdXINgxc6MDEBfEZBdsvnxxdnS ftFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=MC91PRMo; 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=fail (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 p72si1692254ybg.7.2020.06.17.22.10.05 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 17 Jun 2020 22:10:05 -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=fail header.i=@linaro.org header.s=google header.b=MC91PRMo; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:57590 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jlmoP-0000bc-2d for patch@linaro.org; Thu, 18 Jun 2020 01:10:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34302) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jlmEz-0007B4-Th for qemu-devel@nongnu.org; Thu, 18 Jun 2020 00:33:29 -0400 Received: from mail-pg1-x544.google.com ([2607:f8b0:4864:20::544]:42082) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jlmEy-0003fb-7Z for qemu-devel@nongnu.org; Thu, 18 Jun 2020 00:33:29 -0400 Received: by mail-pg1-x544.google.com with SMTP id e9so2328567pgo.9 for ; Wed, 17 Jun 2020 21:33:27 -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=JnIvscga/41MHmopAUGND2DFOQvZJOfzYshgRIbja6w=; b=MC91PRMo3aGGAYJcXbt+4cffLSLpTEuWhVKiM4V9z7VvbS2MOB4FXVk8WCcy+pB07N f9nGmsCvy0xcDtjEC5sELLT5nc/1h4GhAucji0+48IuvT3O4atRA3dNJfLQ7zX1klFqa 5wMvAEZHLF9VPGCNKbMLj1vwzwuaalXa9BV/9jjOT6Dyx1QYzjMTT7dw+A0FSFumowWf X/4nvtVpxcPnPX9IUey00vhJL5izKjw1cH5fuVbp4NUFCgkkgGs9G0OhIOLAuD93XOvR AMdm8vO6IPIQ1Rq4Rgzm9XNy/9HyK+1HvgduDvQHldquVg4ppHaaxEBlGqtSZsVgp6MD V7wA== 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=JnIvscga/41MHmopAUGND2DFOQvZJOfzYshgRIbja6w=; b=KLNVg0CaX/xxmw3NDMQrQ6oJO2wYPE/vJe/t1Kr0r8cWRE9UGSoCYhEYZhHX+Yvgbg b/zFul3R3rNbl9GiOQ9D2XIDO2MWC3ftECl5hMlcSE7c26B6JrsOZjn5YFzidURyKn+G MrYzgDS7lXaqG+Z/I7/LxShrpYlM3FhdULnwOI/kYSgU/nqre8v45XdRdef8zF0mBxD8 5jJKbfaB+hypWbZnlbp4ZCCSbL9XJOKH8IQEdItyT+ZRDkw5e3p8cIlOYnMzuJbqLJvo Fnhor1yLAB/lWkqzE+6lyngLug2xPlaUO0d0IAJlFgKG4z0cbG71SmdRBXO1OiFSY417 h1fg== X-Gm-Message-State: AOAM530DjXCaqAn82bULzxV29cqhT+0Nm+gBzFyLJ7r/CFnUTFazxpLO /RN9A3amJK4nQjiuo9wMeMuXUTH7ziM= X-Received: by 2002:aa7:84cc:: with SMTP id x12mr1884519pfn.235.1592454806628; Wed, 17 Jun 2020 21:33:26 -0700 (PDT) Received: from localhost.localdomain (174-21-143-238.tukw.qwest.net. [174.21.143.238]) by smtp.gmail.com with ESMTPSA id q22sm1288212pfg.192.2020.06.17.21.33.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Jun 2020 21:33:26 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 093/100] softfloat: Add float16_is_normal Date: Wed, 17 Jun 2020 21:26:37 -0700 Message-Id: <20200618042644.1685561-94-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200618042644.1685561-1-richard.henderson@linaro.org> References: <20200618042644.1685561-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::544; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x544.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=_AUTOLEARN 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: qemu-arm@nongnu.org, steplong@quicinc.com 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 16ca697a73..cd1fcfbf0c 100644 --- a/include/fpu/softfloat.h +++ b/include/fpu/softfloat.h @@ -264,6 +264,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