From patchwork Fri Nov 19 16:04:29 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 519250 Delivered-To: patch@linaro.org Received: by 2002:ac0:c605:0:0:0:0:0 with SMTP id p5csp2723718imj; Fri, 19 Nov 2021 08:10:52 -0800 (PST) X-Google-Smtp-Source: ABdhPJzpBwD16RfMrMlab02Ts2e1cSgvQGTDhsHdqkU2be/S4No7Aw4gNc9CwsJNpqEncL4wjqXc X-Received: by 2002:ae9:eb10:: with SMTP id b16mr30948180qkg.191.1637338252389; Fri, 19 Nov 2021 08:10:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1637338252; cv=none; d=google.com; s=arc-20160816; b=nqUcyUS8alSuULBLOkC6bBVuOYMq6D9P/1b+AvhHisIeTCa9luPZaxJiafRkMHJKAs TVJZpHoJQAbIZNZudzkQLLNk9nbpRq/ZMaxkL804JPZwYRmf0I1hyw5au6C2BW774UFg PUpvdhrST93z8zlpNzPvs2r92vqEneSpblORHOtkBXLhJd5Dhtqh7fMOPlPWh6wMh+uM /LhN/YCaBro6trLDaHNj872JMZI77qGbg7pnnNVtJRZH1VTaCT5f8uoB9OiChswmEPP2 vJIGKEREo1uckv3XrrjZ7Xm9qH5m87tRdcCvpHF+W21tT8e+M3WSPeEqP+WccvMS/9dG X39Q== 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=jEiQcufYOoW3VtmWCCkr3S7OMGfha+42dK/Pa431vkQ=; b=IOj2GMgsc7v+vYs+QQjfbKv6mgPJXG7r+f6aYK+M28XXdmiEjo9ctG+cMBm7NXdgO8 5fMcxzzEd/AYNgW+u9bR1Kpeqh2BtGCqe2QicnRjD3IdUN4gZcG7iuXWwr2yNM6CGL02 K9BgseUg5WAZIgu1v0jvg9uq/9cEeYoSaZDc1AlQHQ4ApW74FdU1914pBDPiL81OjCUi FOJW+owAME1Ap9oTcgSJ5z0NtHOXLBsf5l3Qx3q2Gg/2ibuvwG6owUgVPnK0hCuz1aOq QhzG7Nd4zPlpLvMJNCs4M88L+8G0w9g0coAtX/bVoP2lLUeasDc2vrSjhRqPa7xlHYHQ P6Lg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=xbl8c3CX; 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 f11si228174qko.104.2021.11.19.08.10.52 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 19 Nov 2021 08:10:52 -0800 (PST) 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=xbl8c3CX; 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]:35312 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mo6TT-0004xc-Pv for patch@linaro.org; Fri, 19 Nov 2021 11:10:51 -0500 Received: from eggs.gnu.org ([209.51.188.92]:43116) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mo6O8-0004np-Dk for qemu-devel@nongnu.org; Fri, 19 Nov 2021 11:05:20 -0500 Received: from [2a00:1450:4864:20::335] (port=45003 helo=mail-wm1-x335.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mo6O6-00047B-GD for qemu-devel@nongnu.org; Fri, 19 Nov 2021 11:05:20 -0500 Received: by mail-wm1-x335.google.com with SMTP id c71-20020a1c9a4a000000b0032cdcc8cbafso7868344wme.3 for ; Fri, 19 Nov 2021 08:05:12 -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=jEiQcufYOoW3VtmWCCkr3S7OMGfha+42dK/Pa431vkQ=; b=xbl8c3CXZ+PEiDpKW6oc08At+SJdpdgS6OhmNQNICyRED04i+uttLY/Zu8U7OuFx+B rmRnZsq7nLOpxS+d+9AnzGE8tffmeiU/cOeH8nABJ0USeWTo3NP4OYGJHomM6IYKCih1 mA5Dz/F+FqYTHpM5QqUaQKb0iq1agLGC5c3PlC1xrXu3nSqgieLT3+60IMw027jpDc5a paD8rkV09BMUDv9spAkMnYdjIlJ3/y3TUSQAiNPL8IaApU9Lm0mmwT2gJQdNhzyz3ClI OFrRLq6k+7JKvKFNVslewsGF56aIW5KcVVN+bKTIEmTGBBt9+YqfZTPzNo9DiZkmzia4 QB1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=jEiQcufYOoW3VtmWCCkr3S7OMGfha+42dK/Pa431vkQ=; b=h4sqyMdVqb/LlDQ5MCQ3lvSZ01nLw+Of9UnHNFb75YSU8nxi8rvu0LBwcEsmqdKYYh pF1ueMqzHjyZjKRsc2VvXqfK010LHUh+Vj0Zu3pABNEnm9AYiGy8ezBcq6GjRyU8p5vT Q4wdUAzgPuapKYtGKMkGkaQtWmvXAKF7oeigA8iDtnyN8/KBLoit+25ohiDCsedfo/E7 GrQG5oHQ4FKWBW1orRK6ZTtvEnFwTKXEwDl/3B0ivK+FNENRFJhef2C0e0BuEyD8Rk6o rXKcXzMlY9XAcMEQduYpBM0UeOOiVXS2aEln1nA5znxYt4xLQE+rculYhauz1nHPh3wG jDMQ== X-Gm-Message-State: AOAM533gDkP7WYP488OlZcg+GWBhno81jX8FxHIaHFa2jG6C1GuqM4Bt 7TZIE2OLnJ23yfPM/EM/CtSbUys5fgtPhK5LqmI= X-Received: by 2002:a05:600c:34d6:: with SMTP id d22mr866967wmq.111.1637337911423; Fri, 19 Nov 2021 08:05:11 -0800 (PST) Received: from localhost.localdomain (165.red-37-158-79.dynamicip.rima-tde.net. [37.158.79.165]) by smtp.gmail.com with ESMTPSA id q84sm14044877wme.3.2021.11.19.08.05.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Nov 2021 08:05:10 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 02/35] softfloat: Add flag specific to Inf - Inf Date: Fri, 19 Nov 2021 17:04:29 +0100 Message-Id: <20211119160502.17432-3-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211119160502.17432-1-richard.henderson@linaro.org> References: <20211119160502.17432-1-richard.henderson@linaro.org> MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::335 (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=richard.henderson@linaro.org; helo=mail-wm1-x335.google.com X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 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, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-ppc@nongnu.org, danielhb413@gmail.com, alex.bennee@linaro.org, clg@kaod.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" PowerPC has this flag, and it's easier to compute it here than after the fact. Signed-off-by: Richard Henderson --- include/fpu/softfloat-types.h | 1 + fpu/softfloat-parts.c.inc | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/include/fpu/softfloat-types.h b/include/fpu/softfloat-types.h index 65a43aff59..eaa12e1e00 100644 --- a/include/fpu/softfloat-types.h +++ b/include/fpu/softfloat-types.h @@ -152,6 +152,7 @@ enum { float_flag_inexact = 0x0010, float_flag_input_denormal = 0x0020, float_flag_output_denormal = 0x0040, + float_flag_invalid_isi = 0x0080, /* inf - inf */ }; /* diff --git a/fpu/softfloat-parts.c.inc b/fpu/softfloat-parts.c.inc index 41d4b17e41..eb2b475ca4 100644 --- a/fpu/softfloat-parts.c.inc +++ b/fpu/softfloat-parts.c.inc @@ -354,7 +354,7 @@ static FloatPartsN *partsN(addsub)(FloatPartsN *a, FloatPartsN *b, return a; } /* Inf - Inf */ - float_raise(float_flag_invalid, s); + float_raise(float_flag_invalid | float_flag_invalid_isi, s); parts_default_nan(a, s); return a; } @@ -494,6 +494,7 @@ static FloatPartsN *partsN(muladd)(FloatPartsN *a, FloatPartsN *b, if (ab_mask & float_cmask_inf) { if (c->cls == float_class_inf && a->sign != c->sign) { + float_raise(float_flag_invalid | float_flag_invalid_isi, s); goto d_nan; } goto return_inf;